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 |
|---|---|---|---|---|---|---|
used by cpmv result_ is Component/Port/Object[] | static void _cpmvMergeResult(Object result_, Vector vresult_)
{
if (result_ == null) return;
if (result_ instanceof Component || result_ instanceof Port)
vresult_.addElement(result_);
else {
Object[] tmp_ = (Object[])result_;
for (int j=0; j<tmp_.length; j++) vresult_.addElement(tmp_[j]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Object[] getComponents();",
"public Vector getResultObjects() {\n\treturn _vcResults;\n }",
"public Point[] getPorts() {\r\n return new Point[] { new Point((int) ports[0].getCenterX(), (int) ports[0].getCenterY()),\r\n new Point((int) ports[1].getCenterX(), (int) ports[1].getCenterY()),\r\n new Point((int) ports[2].getCenterX(), (int) ports[2].getCenterY()),\r\n new Point((int) ports[3].getCenterX(), (int) ports[3].getCenterY()) };\r\n }",
"private MrnWoatlas5[] doGet(Vector result) {\n if (dbg) System.out.println (\"vector size = \" + result.size());\n int latitudeCol = db.getColNumber(LATITUDE);\n int longitudeCol = db.getColNumber(LONGITUDE);\n int depthCol = db.getColNumber(DEPTH);\n int temperatureMinCol = db.getColNumber(TEMPERATURE_MIN);\n int temperatureMaxCol = db.getColNumber(TEMPERATURE_MAX);\n int salinityMinCol = db.getColNumber(SALINITY_MIN);\n int salinityMaxCol = db.getColNumber(SALINITY_MAX);\n int oxygenMinCol = db.getColNumber(OXYGEN_MIN);\n int oxygenMaxCol = db.getColNumber(OXYGEN_MAX);\n int nitrateMinCol = db.getColNumber(NITRATE_MIN);\n int nitrateMaxCol = db.getColNumber(NITRATE_MAX);\n int phosphateMinCol = db.getColNumber(PHOSPHATE_MIN);\n int phosphateMaxCol = db.getColNumber(PHOSPHATE_MAX);\n int silicateMinCol = db.getColNumber(SILICATE_MIN);\n int silicateMaxCol = db.getColNumber(SILICATE_MAX);\n int chlorophyllMinCol = db.getColNumber(CHLOROPHYLL_MIN);\n int chlorophyllMaxCol = db.getColNumber(CHLOROPHYLL_MAX);\n MrnWoatlas5[] cArray = new MrnWoatlas5[result.size()];\n for (int i = 0; i < result.size(); i++) {\n Vector row = (Vector) result.elementAt(i);\n cArray[i] = new MrnWoatlas5();\n if (latitudeCol != -1)\n cArray[i].setLatitude ((String) row.elementAt(latitudeCol));\n if (longitudeCol != -1)\n cArray[i].setLongitude ((String) row.elementAt(longitudeCol));\n if (depthCol != -1)\n cArray[i].setDepth ((String) row.elementAt(depthCol));\n if (temperatureMinCol != -1)\n cArray[i].setTemperatureMin((String) row.elementAt(temperatureMinCol));\n if (temperatureMaxCol != -1)\n cArray[i].setTemperatureMax((String) row.elementAt(temperatureMaxCol));\n if (salinityMinCol != -1)\n cArray[i].setSalinityMin ((String) row.elementAt(salinityMinCol));\n if (salinityMaxCol != -1)\n cArray[i].setSalinityMax ((String) row.elementAt(salinityMaxCol));\n if (oxygenMinCol != -1)\n cArray[i].setOxygenMin ((String) row.elementAt(oxygenMinCol));\n if (oxygenMaxCol != -1)\n cArray[i].setOxygenMax ((String) row.elementAt(oxygenMaxCol));\n if (nitrateMinCol != -1)\n cArray[i].setNitrateMin ((String) row.elementAt(nitrateMinCol));\n if (nitrateMaxCol != -1)\n cArray[i].setNitrateMax ((String) row.elementAt(nitrateMaxCol));\n if (phosphateMinCol != -1)\n cArray[i].setPhosphateMin ((String) row.elementAt(phosphateMinCol));\n if (phosphateMaxCol != -1)\n cArray[i].setPhosphateMax ((String) row.elementAt(phosphateMaxCol));\n if (silicateMinCol != -1)\n cArray[i].setSilicateMin ((String) row.elementAt(silicateMinCol));\n if (silicateMaxCol != -1)\n cArray[i].setSilicateMax ((String) row.elementAt(silicateMaxCol));\n if (chlorophyllMinCol != -1)\n cArray[i].setChlorophyllMin((String) row.elementAt(chlorophyllMinCol));\n if (chlorophyllMaxCol != -1)\n cArray[i].setChlorophyllMax((String) row.elementAt(chlorophyllMaxCol));\n } // for i\n return cArray;\n }",
"public List getPortletComponents() {\n return components;\n }",
"com.exacttarget.wsdl.partnerapi.ObjectDefinition[] getObjectDefinitionArray();",
"@DISPID(-2147417074)\n @PropGet\n com4j.Com4jObject all();",
"@Override\n public OgcPropertyList<AbstractProcess> getComponentList()\n {\n return components;\n }",
"public List<ServiceResultInterface> getComponents() {\n\t\treturn components;\n\t}",
"@Override\n\tpublic String[] toArray() {\n\t\tString strValue[] = new String[DSPPackager.PACKAGER_MBASE_88301I\n\t\t\t\t.getFieldDefinitionList().length];\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"localhost\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // Header type\n\t\tstrValue[1] = strHostName; // Device Name\n\t\tstrValue[5] = \"213\"; // Header Length\n\t\tstrValue[7] = \"0200\"; // Version\n\t\tstrValue[8] = \"*DSP\"; // Version\n\t\tstrValue[9] = \"MBSD\"; // Data format\n\t\tstrValue[10] = \"*LINX\"; // Source ID\n\t\tstrValue[14] = \"01\"; // Source ID\n\t\tstrValue[17] = \"BBMBSLNMNTFNC\"; // Scenario Number\n\t\tstrValue[22] = \"1\";\n\t\tstrValue[23] = \"10\";\n\t\tstrValue[24] = aa.getTeller(); // User ID\n\t\tstrValue[25] = strHostName; // Terminal ID\n\t\tstrValue[26] = \"88301\"; // Supervisor ID\n\t\tstrValue[27] = \"N\";\n\t\tstrValue[31] = aa.getTeller(); // Message Header\n\t\tstrValue[32] = \"1\"; // Message Header\n\t\tstrValue[34] = \"*END\";\n\t\tstrValue[36] = \"BTS\";\n\t\tstrValue[37] = \"RBS\";\n\t\tstrValue[39] = strHostName; // Terminal ID\n\t\tstrValue[40] = \"27\"; // Journal Seq\n\t\tstrValue[41] = aa.getBranch(); // Branch Code\n\t\tstrValue[45] = \"88301\"; // Transaction Code\n\t\tstrValue[46] = \"C\"; // add\n\t\tstrValue[47] = \"R\"; // response\n\t\tstrValue[48] = \"1\"; // Work station\n\t\tstrValue[49] = \"N\";\n\t\tstrValue[50] = \"F\";\n\t\tstrValue[56] = \"\";\n\t\tstrValue[67] = aa.getApplicationNo(); // application Number\n\t\tstrValue[68] = aa.getCifNum();\n\t\tstrValue[69] = aa.getApplicationDate();\n\t\tstrValue[71] = aa.getBranch(); // lpad 5 '0'\n\t\tstrValue[72] = aa.getWorkingEx();\n\t\tstrValue[73] = aa.getSpecProvision(); // Y/N\n\t\tstrValue[74] = aa.getClasifielDate();\n\t\tstrValue[75] = aa.getCarCode();\n\t\tstrValue[76] = aa.getReviewDate();\n\t\tstrValue[77] = aa.getRetention();\n\t\tstrValue[78] = aa.getReviewReMark();\n\t\tstrValue[79] = aa.getRefinanceFrom();\n\t\tstrValue[80] = aa.getTucachPn();\n\t\tstrValue[81] = aa.getTinhHinhTc();\n\t\tstrValue[82] = aa.getKhaNangVayVon();\n\t\tstrValue[83] = aa.getDamBaoTienVay();\n\t\tstrValue[84] = aa.getLimitAmount();\n\t\tstrValue[85] = aa.getCurencyType();\n\t\tstrValue[86] = aa.getOfficeCode();\n\t\tstrValue[87] = aa.getClassification();\n\t\tstrValue[88] = aa.getMARemarck();\n\t\tstrValue[89] = aa.getMADate();\n\t\treturn strValue;\n\t}",
"public ArrayList parseQueryToGPUObject(GraphDatabaseService db, ArrayList components){\n\t\tArrayList componentsArray = new ArrayList();\n\t\tfor(int i = 0; i<components.size();i++){\n\t\t\tGPU gpu = new GPU();\n\t\t\tTransaction tx = db.beginTx();\n\t\t\ttry{\n\t\t\t\tNodeProxy node = (NodeProxy) components.get(i);\n\t\t\t\t//Hardware\n\t\t\t\tgpu.setEan(node.getProperty(\"EAN\").toString());\n\t\t\t\tgpu.setSku(node.getProperty(\"SKU\").toString());\n\t\t\t\tgpu.setTweakersid(node.getProperty(\"Tweakers ID\").toString());\n\t\t\t\tgpu.setAantalaanbieders(node.getProperty(\"Aantal aanbieders\").toString());\n\t\t\t\tgpu.setEersteprijsvermelding(node.getProperty(\"Eerste prijsvermelding\").toString());\n\t\t\t\tgpu.setMerk(node.getProperty(\"Merk\").toString());\n\t\t\t\tgpu.setUitvoering(node.getProperty(\"Uitvoering\").toString());\n\t\t\t\tgpu.setUrl(node.getProperty(\"url\").toString());\n\t\t\t\tgpu.setIsEmpty(false);\n\t\t\t\tgpu.setIsMatched(true);\n\n\t\t\t\t//Gpu specific\n\t\t\t\tgpu.setGeheugengrootte(node.getProperty(\"Geheugengrootte\").toString());\n\t\t\t\tgpu.setVideochipfabrikant(node.getProperty(\"Videochipfabrikant\").toString());\n\t\t\t\tgpu.setGeheugenbusbreedte(node.getProperty(\"Geheugen Busbreedte\").toString());\n\t\t\t\tgpu.setChipsetgeneratie(node.getProperty(\"Chipset generatie\").toString());\n\t\t\t\tgpu.setOpenglversie(node.getProperty(\"OpenGL versie\").toString());\n\t\t\t\tgpu.setTypekoeling(node.getProperty(\"Type koeling\").toString());\n\t\t\t\tgpu.setAantalslots(node.getProperty(\"Aantal slots\").toString());\n\t\t\t\tgpu.setCardinterfacevideo(node.getProperty(\"Card Interface (Video)\").toString());\n\t\t\t\tgpu.setGeheugentypevideokaarten(node.getProperty(\"Geheugen Type (videokaarten)\").toString());\n\t\t\t\tgpu.setVerkoopstatus(node.getProperty(\"Verkoopstatus\").toString());\n\t\t\t\tgpu.setAantalpinsvideokaarten(node.getProperty(\"Aantal pins (videokaarten)\").toString());\n\t\t\t\tgpu.setLinkinterface(node.getProperty(\"Link Interface\").toString());\n\t\t\t\tgpu.setNominalesnelheidvideochip(node.getProperty(\"Nominale snelheid videochip\").toString());\n\t\t\t\tgpu.setVideouit(node.getProperty(\"Video uit\").toString());\n\t\t\t\tgpu.setLengte(node.getProperty(\"Lengte\").toString());\n\t\t\t\tgpu.setMaximaleturbofrequentie(node.getProperty(\"Maximale turbo frequentie\").toString());\n\t\t\t\tgpu.setGeheugensnelheid(node.getProperty(\"Geheugen Snelheid\").toString());\n\t\t\t\tgpu.setShadermodel(node.getProperty(\"Shader model\").toString());\n\t\t\t\tgpu.setDirectxversie(node.getProperty(\"DirectX versie\").toString());\n\t\t\t\tgpu.setVideochip(node.getProperty(\"Videochip\").toString());\n\t\t\t\tgpu.setAantal6pins(node.getProperty(\"Aantal 6 pins\").toString());\n\t\t\t\tgpu.setProduct(node.getProperty(\"Product\").toString());\n\n\t\t\t\ttx.success();\n\t\t\t}catch(Exception e){\n\t\t\t\tgpu.setIsEmpty(true);\n\t\t\t\tgpu.setIsMatched(false);\n\t\t\t} finally {\n\t\t\t\tcomponentsArray.add(gpu);\n\t\t\t\ttx.close();\n\t\t\t}\n\t\t}\n\t\treturn componentsArray;\n\t}",
"public interface IDescribeLayoutResult {\r\n\r\n /**\r\n * element : layouts of type {urn:partner.soap.sforce.com}DescribeLayout\r\n * java type: com.sforce.soap.partner.DescribeLayout[]\r\n */\r\n\r\n public com.sforce.soap.partner.IDescribeLayout[] getLayouts();\r\n\r\n public void setLayouts(com.sforce.soap.partner.IDescribeLayout[] layouts);\r\n\r\n /**\r\n * element : recordTypeMappings of type {urn:partner.soap.sforce.com}RecordTypeMapping\r\n * java type: com.sforce.soap.partner.RecordTypeMapping[]\r\n */\r\n\r\n public com.sforce.soap.partner.IRecordTypeMapping[] getRecordTypeMappings();\r\n\r\n public void setRecordTypeMappings(com.sforce.soap.partner.IRecordTypeMapping[] recordTypeMappings);\r\n\r\n /**\r\n * element : recordTypeSelectorRequired of type {http://www.w3.org/2001/XMLSchema}boolean\r\n * java type: boolean\r\n */\r\n\r\n public boolean getRecordTypeSelectorRequired();\r\n\r\n public boolean isRecordTypeSelectorRequired();\r\n\r\n public void setRecordTypeSelectorRequired(boolean recordTypeSelectorRequired);\r\n\r\n\r\n}",
"public Object[] getCompInfo() {\n\t\tObject comp[] = new Object[2];\n\t\tcomp[0] = \"IBM\";\n\t\tcomp[1] = 1000;\n\t\t\n\t\treturn comp;\n\t}",
"@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(19)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject list();",
"public ServiceResultAggregate(String name, List<Result<?>> resultList, List<ServiceResultInterface> components) {\n\t\tsuper(name, resultList);\n\t\tthis.components = components;\n\t}",
"protected ComponentStruct[] getCASComponents() throws SessionQueryException\n {\n ComponentStruct[] cases = null;\n\n try\n {\n cases = getSessionManagementAdminService().getComponentsForType(Components.SOURCE_COMPONENT);\n\n GUILoggerHome.find().debug(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT, cases);\n if (GUILoggerHome.find().isInformationOn())\n {\n GUILoggerHome.find().information(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT,\n \"Found \" + cases.length + \" CAS Components\");\n }\n }\n catch(Exception e)\n {\n throw new SessionQueryException(\"Could not retrieve CAS Components.\", e);\n }\n\n return cases;\n }",
"public ServiceResultAggregate(String name, List<Result<?>> resultList) {\n\t\tsuper(name, resultList);\n\t\tthis.components = new ArrayList<>(5);\n\t}",
"@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}",
"protected abstract Object[] getData();",
"@DISPID(-4)\n @PropGet\n java.util.Iterator<Com4jObject> iterator();",
"public IScapSyncSearchResult[] getResults();",
"private static XdmValue decodeResponse(ReadablePipe port)\n throws SaxonApiException\n , ServlexException\n {\n List<XdmItem> result = new ArrayList<XdmItem>();\n port.canReadSequence(true);\n // if there are more than 1 docs, the first one must be web:response,\n // and the following ones are the bodies\n int count = port.documentCount();\n if ( count == 0 ) {\n LOG.debug(\"The pipeline returned no document on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n // TODO: If there is no document on the port, we return an empty\n // sequence. We should probably throw an error instead...\n return XdmEmptySequence.getInstance();\n }\n else if ( count > 1 ) {\n LOG.debug(\"The pipeline returned \" + count + \" documents on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n while ( port.moreDocuments() ) {\n XdmNode doc = port.read();\n addToList(result, doc);\n }\n }\n else {\n LOG.debug(\"The pipeline returned 1 document on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n XdmNode response = port.read();\n if ( LOG.debug()) {\n LOG.debug(\"Content of the outpot port '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"': \" + response);\n }\n if ( response == null ) {\n // TODO: If there is no web:response, we return an empty sequence.\n // We should probably throw an error instead...\n return XdmEmptySequence.getInstance();\n }\n XdmNode wrapper_elem = getWrapperElem(response);\n // not a web:wrapper, so only one doc, so must be web:response\n if ( wrapper_elem == null ) {\n addToList(result, response);\n }\n // a web:wrapper, so unwrap the sequence\n else {\n XdmSequenceIterator it = wrapper_elem.axisIterator(Axis.CHILD);\n while ( it.hasNext() ) {\n // TODO: FIXME: For now, due to some strange behaviour in\n // Calabash, we ignore everything but elements (because it\n // exposes the indentation as text nodes, which is wrong...)\n XdmItem child = it.next();\n if ( child instanceof XdmNode && ((XdmNode) child).getNodeKind() == XdmNodeKind.ELEMENT ) {\n addToList(result, (XdmNode) child);\n }\n }\n }\n }\n return new XdmValue(result);\n }",
"public static String[] portListVul(){\n String [] infoVuln = {\"\"}; \n return infoVuln;\n }",
"@Override\n\t\tpublic abstract T[] parse(Object valueToParse, Type componentType);",
"public COSArray toList() \n {\n return array;\n }",
"public DataStructure getPorts() {\r\n\t\treturn ports == null ? EmptyStructures.EMPTY_STRUCTURE : new ArrayList(ports.values());\r\n\t}",
"public void receiveResultsIO_FI_OA_AFS_OA024(out.deal.afs.zc024.MT_FI_OA_AFS_OA024_REP result) {\n\t}",
"public ImmutableComponent[] getComponents(){\n\t return this.components;\n\t}",
"java.util.List<com.sanqing.sca.message.ProtocolDecode.DataObject> \n getDataObjectList();",
"public ServiceResultAggregate(String name) {\n\t\tsuper(name);\n\t\tthis.components = new ArrayList<>(5);\n\t}",
"public void receiveResultPlanesHijo(\r\n es.mitc.redes.urbanismoenred.serviciosweb.v1_86.UrbrWSServiceStub.PlanesHijoResponseE result\r\n ) {\r\n }",
"@Override\n public Object getData() {\n return devices;\n }",
"@Override\n\tpublic String[] toArray() {\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"127.0.0.1\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // 0 :\n\t\tstrValue[1] = strHostName; // 1 :\n\t\tstrValue[5] = \"213\"; // 5 :\n\t\tstrValue[7] = \"0200\"; // 7 :\n\t\tstrValue[8] = \"*DSP\"; // 8 :\n\t\tstrValue[9] = \"MBSD\"; // 9 :\n\t\tstrValue[10] = \"*LINX\"; // 10 :\n\t\tstrValue[14] = \"01\"; // 14 :\n\t\tstrValue[17] = \"BBMBSLNINQFNC\"; // 17 :\n\t\tstrValue[22] = \"1\"; // 22 :\n\t\tstrValue[23] = \"10\"; // 23 :\n\t\tstrValue[24] = calla.getTeller(); // 24 :\n\t\tstrValue[25] = strHostName; // 25 :\n\t\tstrValue[26] = \"86305\"; // 26 :\n\t\tstrValue[27] = \"N\"; // 27 :\n\t\tstrValue[31] = calla.getTeller(); // 31 : User ID\n\t\tstrValue[32] = \"1\"; // 32 : Reference Number\n\t\tstrValue[34] = \"*END\"; // 34 : End of Group Indicator\n\t\tstrValue[36] = \"BTS\"; // 36 : Source ID\n\t\tstrValue[37] = \"RBS\"; // 37 : Destination ID\n\t\tstrValue[39] = strHostName; // 39 : Terminal ID\n\t\tstrValue[40] = \"27\"; // 40 : Bank Number\n\t\tstrValue[41] = calla.getBranch(); // 41 : Branch\n\t\t\t\t\t\t\t\t\t\t\t// Number\n\t\tstrValue[45] = \"86305\"; // Transaction Code\n\t\tstrValue[46] = \"I\"; // \"D\",\"C\" Action Code\n\t\tstrValue[47] = \"R\"; // Transaction Mode\n\t\tstrValue[48] = \"1\"; // No. Of Records To Retrieve\n\t\tstrValue[49] = \"N\"; // More Records Indicator\n\t\tstrValue[50] = \"F\"; // Search Method\n\t\tstrValue[56] = \"D\"; // 56 : Response Reason For Code 3\n\t\tstrValue[67] = calla.getApplicationNo(); // Account number\n\t\tstrValue[68] = calla.getFacilityCode(); // 240\n\t\tstrValue[69] = calla.getFacId();//\n\t\tstrValue[70] = calla.getCollateralId(); //\n\n\t\treturn strValue;\n\t}",
"public List init(List list) {\n Iterator it = components.iterator();\n PortletComponent comp;\n while (it.hasNext()) {\n comp = (PortletComponent) it.next();\n comp.setTheme(theme);\n list = comp.init(list);\n }\n System.err.println(\"Made a components list!!!! \" + list.size());\n for (int i = 0; i < list.size(); i++) {\n ComponentIdentifier c = (ComponentIdentifier) list.get(i);\n System.err.println(\"id: \" + c.getComponentID() + \" : \" + c.getClassName() + \" : \" + c.hasPortlet());\n \n }\n componentIdentifiers = list;\n return componentIdentifiers;\n }",
"com.exacttarget.wsdl.partnerapi.ObjectDefinition getObjectDefinitionArray(int i);",
"private List<List<XGraph.XVertex>> getComponents() {\n scc = new SCC(graph);\n int componentCount = scc.findSSC();\n List<List<XGraph.XVertex>> components = new ArrayList<>();\n for (int i = 0; i < componentCount; i++) {\n components.add(new ArrayList<>());\n }\n for (Graph.Vertex vertex : graph) {\n CC.CCVertex component = scc.getCCVertex(vertex);\n components.get(component.cno - 1).add((XGraph.XVertex) vertex);\n }\n return components;\n }",
"T[] getObjects() {\n\t\treturn this.array;\n\t}",
"public Object[] getElements(Object arg0) {\n\t\t\t\tRoomFactory roomFactory=(RoomFactory)arg0;\r\n\t\t\t\treturn roomFactory.getRoomList().toArray();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}",
"private DynamicObject getMatchResult(TruffleObject result, String inputStr) {\n return JSArray.createLazyRegexArray(context, regexResultAccessor.groupCount(result), result, inputStr);\n }",
"public Object getDataElements(int[] components, int offset, Object obj) {\n if ((components.length-offset) < numComponents) {\n throw new IllegalArgumentException(\"Component array too small\"+\n \" (should be \"+numComponents);\n }\n switch(transferType) {\n case DataBuffer.TYPE_INT:\n {\n int[] pixel;\n if (obj == null) {\n pixel = new int[components.length];\n }\n else {\n pixel = (int[]) obj;\n }\n System.arraycopy(components, offset, pixel, 0,\n numComponents);\n return pixel;\n }\n \n case DataBuffer.TYPE_BYTE:\n {\n byte[] pixel;\n if (obj == null) {\n pixel = new byte[components.length];\n }\n else {\n pixel = (byte[]) obj;\n }\n for (int i=0; i < numComponents; i++) {\n pixel[i] = (byte) (components[offset+i]&0xff);\n }\n return pixel;\n }\n \n case DataBuffer.TYPE_USHORT:\n {\n short[] pixel;\n if (obj == null) {\n pixel = new short[components.length];\n }\n else {\n pixel = (short[]) obj;\n }\n for (int i=0; i < numComponents; i++) {\n pixel[i] = (short) (components[offset+i]&0xffff);\n }\n return pixel;\n }\n \n default:\n throw new UnsupportedOperationException(\"This method has not been \"+\n \"implemented for transferType \" +\n transferType);\n }\n }",
"public PortCommandResult getPortDetails() throws Exception {\n _log.info(\"3PARDriver:getPortDetails enter\");\n ClientResponse clientResp = null;\n\n try {\n clientResp = get(URI_PORTS);\n if (clientResp == null) {\n _log.error(\"3PARDriver:There is no response from 3PAR\");\n throw new HP3PARException(\"There is no response from 3PAR\");\n } else if (clientResp.getStatus() != 200) {\n String errResp = getResponseDetails(clientResp);\n throw new HP3PARException(errResp);\n } else {\n String responseString = clientResp.getEntity(String.class);\n _log.info(\"3PARDriver:getPortDetails 3PAR response is {}\", responseString);\n PortCommandResult portResult = new Gson().fromJson(sanitize(responseString),\n PortCommandResult.class);\n return portResult;\n }\n } catch (Exception e) {\n throw e;\n } finally {\n if (clientResp != null) {\n clientResp.close();\n }\n _log.info(\"3PARDriver:getPortDetails leave\");\n } //end try/catch/finally\n }",
"@VTID(14)\n java.util.Iterator<Com4jObject> iterator();",
"public static Object[] toRef(String soption_, Paths[] pathss_,\r\n boolean sort_, Shell shell_)\r\n {\r\n CommandOption option_ = new CommandOption(soption_,\r\n false/*dont expand*/);\r\n\r\n Vector v_ = __common__(option_, pathss_, sort_, shell_);\r\n\r\n //java.lang.System.out.println(\"RESULT OF __COMMON__: \" + v_);\r\n \r\n Vector vresult_ = new Vector();\r\n for (int i=0; i<v_.size(); i++) {\r\n Directory d_ = (Directory)v_.elementAt(i);\r\n //if (d_ == null || (d_.child == null && d_.object == null))\r\n // continue;\r\n if (d_ == null) continue;\r\n if (d_.ids != null) {\r\n if (!option_.createPort) continue;\r\n // make port(s)\r\n for (int j=2; j<d_.ids.length; j++) {\r\n Port new_ = new Port();\r\n String tmp_ = d_.ids[j];\r\n int index_ = tmp_.indexOf('@');\r\n String gid_ = index_ >= tmp_.length() -1?\r\n \"\": tmp_.substring(index_+1);\r\n d_.parent.addPort(new_, gid_, tmp_.substring(0, index_));\r\n vresult_.addElement(new_);\r\n }\r\n }\r\n else if (d_.child != null) {//(d_.object == null) {\r\n Object[] oo_ = d_.child;\r\n if (oo_.length == 0) continue;\r\n for (int j=0; j<oo_.length; j++)\r\n if (oo_[j] != null && oo_[j] != Common.NULL_WRAPPED_OBJECT)\r\n vresult_.addElement(oo_[j]);\r\n }\r\n else if (d_.object != null) {// pure object reference\r\n if (d_.object == NULL_OBJECT)\r\n vresult_.addElement(null);\r\n else\r\n vresult_.addElement(d_.object);\r\n }\r\n }\r\n if (vresult_.size() == 0) {\r\n if (!option_.quiet)\r\n shell_.println(\"Warning: no object was matched in \"\r\n + getWarningMsg(pathss_) + \".\");\r\n return null;\r\n }\r\n //if (vresult_.size() == 1) return vresult_.firstElement();\r\n Object[] result_ = new Object[vresult_.size()];\r\n vresult_.copyInto(result_);\r\n return result_;\r\n }",
"public static List<Component> getLComponent(Connector c)\n\t{\n\t\tList<Component> LComponent = new java.util.LinkedList<Component>();\n\t\tfor(Object o : c.getActualPort())\n\t\t{\n\t\t\tInnerPortReference ipr = (InnerPortReference) o;\n\t\t\tLComponent.add((Component)ipr.getTargetInstance().getTargetPart());\n\t\t}\n\t\treturn LComponent;\n\t}",
"Object[] getElements() {\n\tif (this.results == null) {\n\t\tinitResults();\n\t\tif (this.filterAdvancedScenarios != null) {\n\t\t\tthis.results.setFingerprints(this.filterAdvancedScenarios.isChecked());\n\t\t}\n\t}\n\treturn this.results.getElements();\n}",
"@Override\r\n\tpublic Porduct GetResult() {\n\t\treturn product;\r\n\t}",
"public interface ComponentInterface {\n\t\n\t/** \n\t * Execute component once and calculate metric values\n\t * \n\t * @param inputData Input data set\n\t * @return List of Objects containing component outputs\n\t */\n\t public java.util.List<Object> execute(java.util.List<Object> inputData);\n\t \n\t /** \n\t * Calculate metrics\n\t * \n\t * @param outputValues Output values of component execution\n\t * @param truthValues Component-generated truth values\n\t * @return List of Objects containing computed values of metrics\n\t */\n\t public java.util.List<Object> calculateMetrics(java.util.List<Object> outputValues, java.util.List<Object> truthValues);\n\t \n\t /**\n\t * Generate an input data set\n\t * @param genericProperties Generic parameters for data set generation (e.g., number of data points)\n\t * @return List of Objects containing generated input values\n\t */\n\t public java.util.List<Object> generateDataSet(java.util.List<Object> genericProperties);\n\t \n\t /**\n\t * Generate truth values \n\t * \n\t * @return List of Objects containing generated truth values\n\t */\n\t public java.util.List<Object> generateTruthValues();\n\t \n\t /**\n\t * Generate values for control variables\n\t * \n\t * @return List of Objects containing generated control variable values\n\t */\n\t public java.util.List<Object> generateControlVars();\n\t \n\t /**\n\t * Set control variable values to use in subsequent executions\n\t * \n\t * @param controlValues Values for control variables\n\t */\n\t public void setControlVars(java.util.List<Object> controlValues);\n\n}",
"protected Object[] get_ComponentInfo()\n {\n return new Object[]\n {\n \"ReporterMBean contains settings and statistics for the Coherence JMX Reporter.\",\n \"com.bea.owner=Context,com.bea.VisibleToPartitions=ALWAYS\",\n };\n }",
"public IDevice[] getDevices() { return devices; }",
"public String toString()\n/* */ {\n/* 210 */ return \"[array type, component type: \" + this._componentType + \"]\";\n/* */ }",
"@Override\r\n\tprotected Object covertToArrayType(Object componentType) throws SerializeException {\r\n\t\t//return super.covertToArrayType(AdvancedDeserializerUtil.covertToArrayType(componentType));\r\n\t\treturn super.covertToArrayType(AdvancedDeserializerUtil.covertToArrayType(componentType));\r\n\t}",
"private String[] getComponentArray(JComponent[] components)\r\n {\r\n\t int len = components.length;\r\n\t String[] values = new String[len];\r\n\t for (int i=0; i<len; i++)\r\n\t {\r\n\t\t values[i] = getComponentValue(components[i]);\r\n\t }\r\n\t return values;\r\n }",
"public ArrayList getDeviceInfo();",
"private Vector getContactItems() {\n return protocol.getContactItems();\n }",
"@Override\n\tprotected void GetDataFromNative() {\n\t\tAutoGrease = CAN1Comm.Get_AutoGreaseOperationStatus_3449_PGN65527();\n\t\tQuickcoupler = CAN1Comm.Get_QuickCouplerOperationStatus_3448_PGN65527();\n\t\tRideControl = CAN1Comm.Get_RideControlOperationStatus_3447_PGN65527();\n\t\tBeaconLamp = CAN1Comm.Get_BeaconLampOperationStatus_3444_PGN65527();\n\t\tMirrorHeat = CAN1Comm.Get_MirrorHeatOperationStatus_3450_PGN65527();\n\t\tFineModulation = CAN1Comm.Get_ComponentCode_1699_PGN65330_EHCU();\n\t}",
"public void receiveResultPlanesPadre(\r\n es.mitc.redes.urbanismoenred.serviciosweb.v1_86.UrbrWSServiceStub.PlanesPadreResponseE result\r\n ) {\r\n }",
"public int[] getComponents(Object pixel, int[] components, int offset) {\n int intpixel[];\n if (pixel instanceof int[]) {\n intpixel = (int[])pixel;\n } else {\n intpixel = DataBuffer.toIntArray(pixel);\n if (intpixel == null) {\n throw new UnsupportedOperationException(\"This method has not been \"+\n \"implemented for transferType \" + transferType);\n }\n }\n if (intpixel.length < numComponents) {\n throw new IllegalArgumentException\n (\"Length of pixel array < number of components in model\");\n }\n if (components == null) {\n components = new int[offset+numComponents];\n }\n else if ((components.length-offset) < numComponents) {\n throw new IllegalArgumentException\n (\"Length of components array < number of components in model\");\n }\n System.arraycopy(intpixel, 0, components, offset, numComponents);\n\n return components;\n }",
"@Override\n\t\tpublic Object[] toArray() {\n\t\t\treturn null;\n\t\t}",
"public List<Port> getPorts(ISchemaInfo info);",
"List<PCDevice> getAllPC();",
"public Object[][] getSlotsInfo() {\n synchronized (lock) {\n jedisArray = getJedis(\"SLOT\");\n\n for (int index = 0; index < jedisArray.length; index++) {\n if (flag[index] == 1) {\n try {\n String info = jedisArray[index].clusterNodes();\n\n initNodeInfo(info);\n\n data = new Object[ipPort2nodeSlots.size()][2];\n int count = 0;\n for (String item : ipPort2nodeSlots.keySet()) {\n data[count][0] = item;\n data[count++][1] = ipPort2nodeSlots.get(item)\n .size();\n }\n break;\n } catch (Exception e) {\n continue;\n }\n }\n }\n }\n return data;\n }",
"Object[] elements(Object[] destination) {\n return elements.toArray(destination);\n }",
"public class_689[] method_3955() {\r\n return this.field_3403;\r\n }",
"public Object[] list() {\r\n ArrayList<Object> obj = new ArrayList<>();\r\n obj.add(row);\r\n obj.add(table);\r\n obj.add(variable);\r\n obj.add(name);\r\n obj.add(equEquipement);\r\n obj.add(equDesignation);\r\n obj.add(orgOrgane);\r\n obj.add(orgDesignation);\r\n obj.add(unite);\r\n obj.add(comment);\r\n obj.add(datemod);\r\n obj.add(state);\r\n\r\n return obj.toArray();\r\n }",
"java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();",
"java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();",
"void visitArray(Object array, Type componentType);",
"@VTID(11)\r\n java.util.Iterator<Com4jObject> iterator();",
"public void receiveResultProvinciasCallejero(\r\n es.mitc.redes.urbanismoenred.serviciosweb.v1_86.UrbrWSServiceStub.ProvinciasCallejeroResponseE result\r\n ) {\r\n }",
"public O[] toArray()\r\n {\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n O[] a = (O[]) new Object[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }",
"public void testGetArray() {\n System.out.println(\"getArray\"); // NOI18N\n \n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n PropertyValue arrayPropertyValue = PropertyValue.createValue(primitveDescritor, type, DesignComponentTest.PROPERTY1_VALUE_STRING); // NOI18N\n List<PropertyValue> array = new ArrayList();\n \n array.add(arrayPropertyValue);\n \n PropertyValue result = PropertyValue.createArray(type,array);\n \n type = type.getArrayType();\n assertEquals(type,result.getType());\n assertNotNull(result.getArray());\n }",
"public void receiveResultGetCoordenadas(\r\n es.mitc.redes.urbanismoenred.serviciosweb.v1_86.UrbrWSServiceStub.GetCoordenadasResponseE result\r\n ) {\r\n }",
"org.landxml.schema.landXML11.BridgeElementDocument.BridgeElement[] getBridgeElementArray();",
"@Override\n public CommandResultList getResultList() {\n return cresultList;\n }",
"public ArrayList<ComProduct> get_all_comproduct() throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\" service operation started !\");\n\n\t\ttry{\n\t\t\tArrayList<ComProduct> ComProduct_list;\n\n\t\t\tComProduct_list = ComProduct_Default_Activity_dao.get_all_comproduct();\n\n \t\t\tlog.info(\" Object returned from service method !\");\n\t\t\treturn ComProduct_list;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\" service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}",
"@Override\r\n\tpublic List<CmnInterfaceData> process(I000091OutputBean item) throws Exception {\r\n\r\n\t\tLOG.info(DOLLAR + INSIDE_METHOD + DOLLAR);\r\n\r\n\t\t/**Variable PatternOutputBean list */\r\n\t\tfinalList = new ArrayList<I000091PatternOutputBean>();\r\n\t\t\r\n\t\t/**Variable Common Interface data list */\r\n\t\ttotalList = new ArrayList<CmnInterfaceData>();\r\n\t\t\r\n\t\t/**P0002.3 ResultSet of Buyer Group Code */\r\n\t\tList<Object[]> result = commonUtil.exctByrGrpCd(item.getOcfRgnCd(), item.getOcfByrGrpCd());\r\n\t\t\r\n\t\tif(result != null && !(result.isEmpty())){\r\n\t\t\tList<I000091Bean> byrGrpList = commonUtil.extrctByrGrp(result);\r\n\t\t\t\r\n\t\t\tif(result.size() == 1){\r\n\t\t\t\tgetRgnlWklyList(item, byrGrpList.get(0));\r\n\t\t\t}else{\r\n\t\t\t\tgetByrGrpList(item, byrGrpList);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(finalList != null && !(finalList.isEmpty())){\r\n\t\t\tfor(I000091PatternOutputBean patternOutput : finalList){\r\n\t\t\t\tgetCmnInterfaceData(patternOutput);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tLOG.info(DOLLAR + OUTSIDE_METHOD + DOLLAR);\r\n\r\n\t\treturn totalList;\r\n\t}",
"@Override\n List<PortDescription> discoverPortDetails();",
"@Override public int[] getSupportedPresenceStatus() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint[] _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_getSupportedPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.createIntArray();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testGetCIMObject_4()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\n\t\tCIMObject[] result = fixture.getCIMObject(aArguments);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"public Object[][] exportResults(){\n \tObject[][] results = new Object[calculators.length][];\n \tfor(int i=0; i<calculators.length; i++){\n \t\tICalculator[] row = calculators[i];\n \t\tresults[i] = new Object[row.length];\n \t\tfor(int j=0; j<row.length; j++){\n \t\t\tresults[i][j] = row[j].getResult();\n \t\t}\n \t}\n \treturn results;\n }",
"public void setComponents(List<ServiceResultInterface> components) {\n\t\tthis.components = components;\n\t}",
"public void receiveResultservicedis(\n ) {\n }",
"public void searchPorts() {\r\n try {\r\n Enumeration pList = CommPortIdentifier.getPortIdentifiers();\r\n System.out.println(\"Porta =: \" + pList.hasMoreElements());\r\n while (pList.hasMoreElements()) {\r\n portas = (CommPortIdentifier) pList.nextElement();\r\n if (portas.getPortType() == CommPortIdentifier.PORT_SERIAL) {\r\n System.out.println(\"Serial USB Port: \" + portas.getName());\r\n } else if (portas.getPortType() == CommPortIdentifier.PORT_PARALLEL) {\r\n System.out.println(\"Parallel Port: \" + portas.getName());\r\n } else {\r\n System.out.println(\"Unknown Port: \" + portas.getName());\r\n }\r\n portaCOM = portas.getName();\r\n }\r\n System.out.println(\"Porta escolhida =\" + portaCOM);\r\n } catch (Exception e) {\r\n System.out.println(\"*****Erro ao escolher a porta******\");\r\n }\r\n }",
"public abstract Response[] collectResponse();",
"public ArrayList getComUnits();",
"public interface SpatialRelationshipGeneratorService {\n public ArrayList<SpatialRelation>[][] getSpatialRelationshipMatrixOfObject(List<GraphicalImageComponent> objectList);\n\n}",
"private void print(FromHostResult < CustomerData > result) {\n try {\n System.out.println(\"Host bytes converted : \"\n + result.getBytesProcessed());\n System.out.println(\"Result JAXB instance as XML :\");\n JAXBContext jaxbContext = JAXBContext.newInstance(CustomerData.class);\n Marshaller marshaller = jaxbContext.createMarshaller();\n marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);\n marshaller.marshal(\n new ObjectFactory().createCustomerData(result.getValue()),\n System.out);\n } catch (JAXBException e) {\n throw new RuntimeException(e);\n }\n }",
"public void receiveResultplanesFromNombre(\r\n es.mitc.redes.urbanismoenred.serviciosweb.v1_86.UrbrWSServiceStub.PlanesFromNombreResponseE result\r\n ) {\r\n }",
"com.bagnet.nettracer.ws.core.pojo.xsd.WSScanPoints[] getScansArray();",
"public void setPortletComponents(ArrayList components) {\n this.components = components;\n }",
"public IFuture<ItemInfo[]> getCatalog()\n\t{\n\t\tfinal Future<ItemInfo[]> ret = new Future<ItemInfo[]>();\n\t\tShopCapa shop = (ShopCapa)capa.getPojoCapability();\n\t\tret.setResult(shop.getCatalog().toArray(new ItemInfo[shop.getCatalog().size()]));\n\t\treturn ret;\n\t}",
"private static DocumentoType[] getDocumentoTypeFromBPSDettaglioCartellaResponse( DettaglioCartellaAvvisoResponse response) {\r\n\t\t \r\n\t\tit.equitalia.dettagliocartellaavviso.wsdl.DocumentoType bpelDocumentoType = response.getCartellaAvviso().getDocumento();\r\n\t\t \r\n\t\tDocumentoType[] result = new DocumentoType[1];\r\n \t \r\n \t\tDocumentoType documentoType = new DocumentoType(); \r\n \t\tresult[0] = documentoType;\r\n\r\n \t\tIdentificativoDocumentoType identificativoDocumentoType = new IdentificativoDocumentoType();\r\n \t\tidentificativoDocumentoType.setTipoDocumento(bpelDocumentoType.getIdDocumento().getTipoDocumento() );\t\t//DATATYPEID=1 \tDescrizione\r\n \t\tidentificativoDocumentoType.setNumeroDocumento(bpelDocumentoType.getIdDocumento().getNumeroDocumento() );\t //DATATYPEID=2 \t\tN° Cartella \r\n \t\tdocumentoType.setIdDocumento(identificativoDocumentoType);\r\n \t\t\r\n \t\tit.equitalia.gestorefascicolows.dati.EnteType[] enti = new it.equitalia.gestorefascicolows.dati.EnteType[bpelDocumentoType.getEnte().length];\r\n \t\t \r\n \t\t \r\n \t\tfor (int iEnte = 0; iEnte < bpelDocumentoType.getEnte().length; iEnte++) {\r\n \t\t\tEnteType enteType = new EnteType();\r\n \t\tenteType.setDescrizione(bpelDocumentoType.getEnte()[iEnte].getDescrizione()); \t//DATATYPEID=3 \t\tEnte\r\n \t\tenti[iEnte] = enteType;\r\n\t\t}\r\n \t\t\r\n \t\tdocumentoType.setEnte(enti);\r\n\r\n \t\tdocumentoType.setDataNotifica(bpelDocumentoType.getDataNotifica()) ; //DATATYPEID=4 \t\t\tData Notifica\r\n \t\tdocumentoType.setImportoTotaleDocumento(bpelDocumentoType.getImportoTotaleDocumento().doubleValue()) ; //DATATYPEID=5 \t\tImporto Iniziale\r\n \t\tdocumentoType.setImportoInizialeTributi(bpelDocumentoType.getImportoInizialeTributi().doubleValue()) ; //DATATYPEID=6 \t\tImporto a ruolo\r\n \t\tdocumentoType.setImportoTotaleCompensi(bpelDocumentoType.getImportoTotaleCompensi().doubleValue()); // DATATYPEID=7 \t\tCompensi entro le scadenze\r\n \t\tdocumentoType.setImportoTotaleNotifica(bpelDocumentoType.getImportoTotaleNotifica().doubleValue()); //DATATYPEID=8 \t\tDiritti di Notifica\r\n\r\n \t\tdocumentoType.setImportoResiduoDocumento(bpelDocumentoType.getImportoResiduoDocumento().doubleValue()); // DATATYPEID=9 \t\tImporto da Pagare \r\n \t\tdocumentoType.setImportoResiduoTributi(bpelDocumentoType.getImportoResiduoTributi().doubleValue()); // DATATYPEID=10 \t\tImporti a ruolo residui\r\n \t\tdocumentoType.setImportoResiduoCompensi(bpelDocumentoType.getImportoResiduoCompensi().doubleValue()); //DATATYPEID=11 \t\tCompensi oltre le scadenze\r\n \t\tdocumentoType.setImportoResiduoNotifica(bpelDocumentoType.getImportoResiduoNotifica().doubleValue()); // DATATYPEID=12 \t\tDiritti di Notifica\r\n \t\tdocumentoType.setImportoInteressiMora(bpelDocumentoType.getImportoInteressiMora().doubleValue()); // DATATYPEID=13 \t\tInteressi di mora\r\n \t\tdocumentoType.setImportoSpeseProcedure(bpelDocumentoType.getImportoSpeseProcedure().doubleValue()); //DATATYPEID=14 \t\tSpese di Procedura\r\n \t\tdocumentoType.setImportoAltreSpese(bpelDocumentoType.getImportoAltreSpese().doubleValue()); \t\t\t\t//DATATYPEID=15 \t\tAltre Spese\r\n \t\tdocumentoType.setFlagSospensione(bpelDocumentoType.getFlagSospensione()); //DATATYPEID=16 \t\tSospensioni\r\n \t\tdocumentoType.setFlagSgravio(bpelDocumentoType.getFlagSgravio()); // DATATYPEID=17 \t\tSgravi\r\n \t\tdocumentoType.setFlagRateazione(bpelDocumentoType.getFlagRateazione()); //DATATYPEID=18 \t\tRateazioni\r\n \t\tdocumentoType.setFlagProcedura(bpelDocumentoType.getFlagProcedura()); //DATATYPEID=19 \t\tProcedure \r\n \t\t\r\n \t\tdocumentoType.setNumeroRav( bpelDocumentoType.getNumeroRav() ); \t\t//DATATYPEID=12 \t\tNumero RAV \r\n \r\n \tdocumentoType.setRObjectId(\"-\") ;\t\t//DATATYPEID=91 \t\t\r\n \t\tdocumentoType.setStatoPdf(CartellaDAOImpl.STATO_DOCUMENTUM_NON_RICHIESTO) ;\t\t//DATATYPEID=92 \t\t\r\n \t\tdocumentoType.setStatoRelate(CartellaDAOImpl.STATO_DOCUMENTUM_NON_RICHIESTO) ;\t\t//DATATYPEID=93 \t\t \r\n \t\t\r\n \t\r\n\t\treturn result ;\r\n\t\r\n\t}",
"public Object[] getScriptOfValuesAsObjects() {\r\n\t\tObject[] values = new Object[dataTestModel.size()];\r\n\t\tint i = 0;\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tvalues[i] = var.getValue();\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t}",
"public PairVector getCCs(){\r\n\t\treturn mccabe.getCCs(javaclass);\r\n\t}",
"@VTID(41)\n com.exceljava.com4j.excel.ListObject getListObject();",
"org.landxml.schema.landXML11.SpeedsDocument.Speeds[] getSpeedsArray();",
"org.landxml.schema.landXML11.LanesDocument.Lanes[] getLanesArray();",
"public Object[][] buildNewGraphDataModel() {\r\n\t\t\r\n\t\tresetDataStructures();\r\n\t\tGraph g = UIFacade.getInstance().getGraph();\r\n\t\t\r\n\t\tObject[][] result = new Object[g.getN()][5];\r\n\t\t\r\n\t\tfor (int i = 0; i < g.getN(); i++) {\r\n\t\t\tNode node = g.getNode(i);\r\n\t\t\tComponentProperties cp = node.getProperties();\r\n //\t\t\t ID\r\n\t\t\tresult[i][0] = new Integer(\r\n\t\t\t\t\t((ID)cp.getPropertyByName(\"ID\")).getValue()); \t\t\t\r\n\t\t\tresult[i][1] = new Integer(DEFAULT_CLIENT_DEMAND); // Demand\t\t\t\r\n\t\t\tresult[i][2] = new Double(DEFAULT_CLIENT_TW_BEGIN);\r\n\t\t\tresult[i][3] = new Double(DEFAULT_CLIENT_TW_END);\r\n\t\t\tresult[i][4] = new Double(DEFAULT_CLIENT_TW_SERVICE);\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"java.util.List<pb4client.TransportRequest> \n getReqList();",
"java.util.List<org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Output> \n getOutputsList();"
] | [
"0.609313",
"0.58356905",
"0.56375426",
"0.556249",
"0.54682225",
"0.54616",
"0.5443602",
"0.5387979",
"0.53820723",
"0.5343109",
"0.5270278",
"0.5263566",
"0.5219375",
"0.5202033",
"0.51804745",
"0.5177992",
"0.51630116",
"0.5139149",
"0.511703",
"0.51127315",
"0.5108785",
"0.51087576",
"0.51045257",
"0.5074579",
"0.50631267",
"0.5046408",
"0.5044034",
"0.50369966",
"0.5028233",
"0.5023353",
"0.5001858",
"0.49879888",
"0.49755695",
"0.4973248",
"0.49696875",
"0.49603072",
"0.4942869",
"0.49354252",
"0.49344316",
"0.4926441",
"0.49199146",
"0.49183014",
"0.49170387",
"0.49082813",
"0.48939618",
"0.4885447",
"0.48845086",
"0.4874204",
"0.4869389",
"0.48657998",
"0.4864976",
"0.4861666",
"0.48530406",
"0.48394567",
"0.48350397",
"0.4816824",
"0.48157406",
"0.48139757",
"0.47661123",
"0.47612047",
"0.47587055",
"0.47567096",
"0.47558713",
"0.47480986",
"0.4741869",
"0.4741869",
"0.47394",
"0.47380465",
"0.47363067",
"0.47333685",
"0.47289562",
"0.4722456",
"0.47206387",
"0.47182426",
"0.47180074",
"0.47178486",
"0.47174063",
"0.47100204",
"0.4709377",
"0.47093382",
"0.47052783",
"0.4703665",
"0.47006837",
"0.46968192",
"0.46959054",
"0.4692854",
"0.46911",
"0.46789497",
"0.4678898",
"0.46787083",
"0.4678199",
"0.46762353",
"0.46733814",
"0.46716604",
"0.46714678",
"0.46713725",
"0.4670917",
"0.46647605",
"0.466417",
"0.46628484"
] | 0.6223378 | 0 |
converts paths to object references returns Object[] | public static Object[] toRef(String soption_, Paths[] pathss_,
boolean sort_, Shell shell_)
{
CommandOption option_ = new CommandOption(soption_,
false/*dont expand*/);
Vector v_ = __common__(option_, pathss_, sort_, shell_);
//java.lang.System.out.println("RESULT OF __COMMON__: " + v_);
Vector vresult_ = new Vector();
for (int i=0; i<v_.size(); i++) {
Directory d_ = (Directory)v_.elementAt(i);
//if (d_ == null || (d_.child == null && d_.object == null))
// continue;
if (d_ == null) continue;
if (d_.ids != null) {
if (!option_.createPort) continue;
// make port(s)
for (int j=2; j<d_.ids.length; j++) {
Port new_ = new Port();
String tmp_ = d_.ids[j];
int index_ = tmp_.indexOf('@');
String gid_ = index_ >= tmp_.length() -1?
"": tmp_.substring(index_+1);
d_.parent.addPort(new_, gid_, tmp_.substring(0, index_));
vresult_.addElement(new_);
}
}
else if (d_.child != null) {//(d_.object == null) {
Object[] oo_ = d_.child;
if (oo_.length == 0) continue;
for (int j=0; j<oo_.length; j++)
if (oo_[j] != null && oo_[j] != Common.NULL_WRAPPED_OBJECT)
vresult_.addElement(oo_[j]);
}
else if (d_.object != null) {// pure object reference
if (d_.object == NULL_OBJECT)
vresult_.addElement(null);
else
vresult_.addElement(d_.object);
}
}
if (vresult_.size() == 0) {
if (!option_.quiet)
shell_.println("Warning: no object was matched in "
+ getWarningMsg(pathss_) + ".");
return null;
}
//if (vresult_.size() == 1) return vresult_.firstElement();
Object[] result_ = new Object[vresult_.size()];
vresult_.copyInto(result_);
return result_;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ObjectNode resolvePaths();",
"public abstract ScaledPathArray getPathList();",
"public Object[] getParentInfo(String path);",
"public static Object[] parse(final String path) {\r\n\t\tfinal boolean allowWildcards = false;\r\n\t\treturn parse(path, allowWildcards);\r\n\t}",
"public abstract List<T> readObj(String path);",
"public Path[] getPaths()\r\n\t{\r\n\t return paths;\r\n\t}",
"List<SoftObjectReference> getObjects();",
"public String[] listObjectNames(String path);",
"org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D[] getPathArray();",
"public abstract ArrayList<CustomPath> getAnnotationPathList();",
"public List<Path> getAllPaths();",
"java.util.List<org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D> getPathList();",
"public interface Path {\n\tVector2D [] getPointsAsArray();\n\n\tList<Vector2D> getPointsAsList();\n}",
"Map<String, PathItem> getPathItems();",
"abstract public List<S> getPath();",
"java.util.List getClassPathElements();",
"public ArrayList<path> getPaths(){\r\n return paths;\r\n }",
"protected CIMObjectPath getObjectPathfromCIMArgument(List<Object> args) {\n Object[] arguments = (Object[]) args.get(0);\n return (CIMObjectPath) arguments[0];\n }",
"TreeNodeValueModel<T>[] path();",
"public synchronized Object[] toArray() {\r\n ProjectFilePart[] array = toArray(new ProjectFilePart[0]);\r\n return array;\r\n }",
"java.util.List<java.lang.String>\n getPathsList();",
"public AtomicVertex[] getPaths()\n {\n return _paths;\n }",
"T[] getObjects() {\n\t\treturn this.array;\n\t}",
"public List<Path> getPaths() {\n return _thePaths;\n }",
"public List<?> getTreePath(Object object)\n {\n LinkedList<Object> result = new LinkedList<Object>();\n result.addFirst(object);\n while ((object = getParent(object)) != null)\n {\n result.addFirst(object);\n }\n \n return result;\n }",
"public List<Transform> getPath() {\n return Collections.unmodifiableList(new ArrayList<>(mPath));\n }",
"public abstract List<String> path();",
"public float[][] getPath() {\n/* 825 */ COSBase base = getCOSObject().getDictionaryObject(COSName.PATH);\n/* 826 */ if (base instanceof COSArray) {\n/* */ \n/* 828 */ COSArray array = (COSArray)base;\n/* 829 */ float[][] pathArray = new float[array.size()][];\n/* 830 */ for (int i = 0; i < array.size(); i++) {\n/* */ \n/* 832 */ COSBase base2 = array.getObject(i);\n/* 833 */ if (base2 instanceof COSArray) {\n/* */ \n/* 835 */ pathArray[i] = ((COSArray)array.getObject(i)).toFloatArray();\n/* */ }\n/* */ else {\n/* */ \n/* 839 */ pathArray[i] = new float[0];\n/* */ } \n/* */ } \n/* 842 */ return pathArray;\n/* */ } \n/* 844 */ return (float[][])null;\n/* */ }",
"public abstract List<String> getControlledPaths();",
"public final FileSystem[] toArray() {\n synchronized (getClass()) {\n FileSystem[] fss = new FileSystem[fileSystems.size()];\n fileSystems.toArray(fss);\n return fss;\n }\n }",
"protected abstract int[] getPathElements();",
"public String[] listObjectNames(String path, boolean recursive);",
"public Position[] getPath() {\n\t\treturn path;\n\t}",
"public Tile[] getPath() {\n\t\tTile[] path = new Tile[tilePath.size()];\n\t\treturn tilePath.toArray(path);\n\t}",
"List<String> getListPaths();",
"public java.lang.Object[] getSourceAsReference() {\n return sourceAsReference;\n }",
"public interface JsonPath {\n\n JsonPath parent();\n\n Optional<JsonObject> getJsonObject(JsonObject jsonObject);\n\n Optional<JsonArray> getJsonArray(JsonObject jsonObject);\n\n static JsonPath root() {\n return new JsonPathImpl(ImmutableList.of());\n }\n\n boolean isRoot();\n\n JsonPath concat(JsonObjectPathSpecImpl jsonObjectPathSpec);\n\n JsonPath concat(JsonArrayPathSpecImpl jsonArrayPathSpec);\n\n JsonPath concat(JsonPath jsonPath);\n\n List<PathSpec> parts();\n\n JsonPath subpath(int start, int end);\n\n int size();\n\n static JsonPath parse(final String pathStr) {\n\n Objects.requireNonNull(pathStr);\n\n ImmutableList.Builder<PathSpec> listBuilder = ImmutableList.builder();\n\n String[] split = pathStr.split(\"\\\\.\");\n for (int i = 0; i < split.length; i++) {\n String strPart = split[i];\n\n if (strPart.isEmpty()) {\n continue;\n }\n\n int start = strPart.indexOf('[');\n\n if (start > 0) {\n int end = strPart.indexOf(']');\n\n listBuilder.add(\n new JsonArrayPathSpecImpl(\n strPart.substring(0, start),\n Integer.parseInt(strPart.substring(start + 1, end))\n )\n );\n continue;\n }\n\n listBuilder.add(\n new JsonObjectPathSpecImpl(\n strPart\n )\n );\n }\n return new JsonPathImpl(\n listBuilder.build()\n );\n }\n\n static void main(String[] asdf) {\n\n String[] ss = {};\n JsonPath parse = JsonPath.parse(\"departments[0].department.department.employee.departments[0].name\");\n System.out.println(\"path: [\" + parse + \"] size: \" + parse.size());\n }\n}",
"@Override\n\tpublic String getReferenceFiles() {\n\t\treturn model.getReferenceFiles();\n\t}",
"public Double[][] getPaths(){\n return paths;\n }",
"public List<Map<String, Object>> getAuktionPath(int objectId, int templateId);",
"Object[] toArray();",
"Object[] toArray();",
"Object[] toArray();",
"java.util.List<java.lang.String>\n getClasspathList();",
"protected String[] getPaths(String[] args, Job job) {\n\t\tString[] paths = new String[2];\n\t\tpaths[0] = args[0];\n\t\tpaths[1] = args[1];\n\t\treturn paths;\n\t}",
"public static LinkedHashMap<String, Vector<Path>> getPaths() {\r\n\t\treturn setPaths;\r\n\t}",
"java.util.List<java.lang.String>\n getClasspathList();",
"public List<Path> toAbsPaths(Collection<Path> tipPaths) {\n\t\tList<Path> result = tipPaths.stream().map(this::tipPathToAbsPath).collect(Collectors.toList());\n\t\treturn result;\n\t}",
"protected Object[] getModelObjects(IResource[] resources) {\n \t\tObject[] result = new Object[resources.length];\n \t\tfor (int i = 0; i < resources.length; i++) {\n \t\t\tresult[i] = getModelObject(resources[i]);\n \t\t}\n \t\treturn result;\n \t}",
"public Collection<Reference> getReferences();",
"protected IDiffElement[] createModelObjects(ISynchronizeModelElement container) {\n \t\tIResource resource = null;\n \t\tif (container == getModelRoot()) {\n \t\t\tresource = ResourcesPlugin.getWorkspace().getRoot();\n \t\t} else {\n \t\t\tresource = container.getResource();\n \t\t}\n \t\tif(resource != null) {\n \t\t\tSyncInfoTree infoTree = getSyncInfoTree();\n \t\t\tIResource[] children = infoTree.members(resource);\n \t\t\tISynchronizeModelElement[] nodes = new ISynchronizeModelElement[children.length];\n \t\t\tfor (int i = 0; i < children.length; i++) {\n \t\t\t\tnodes[i] = createModelObject(container, children[i]);\n \t\t\t}\n \t\t\treturn nodes;\t\n \t\t}\n \t\treturn new IDiffElement[0];\n \t}",
"java.util.List<java.lang.String>\n getSourcepathList();",
"PathKeys getPathKeys();",
"public com.google.protobuf.ProtocolStringList\n getPathsList() {\n return paths_.getUnmodifiableView();\n }",
"public List<String> paths(String path) throws SystemException;",
"private List<PathMapping> computedExpandedPathForArrays(\n Object source, String srcPath, String dstPath, Configuration configuration) {\n String srcpathTrimmed = srcPath.replaceAll(\"\\\\s\", \"\");\n String dstpathTrimmed = dstPath.replaceAll(\"\\\\s\", \"\");\n /*\n\n int firstIndex = srcpathTrimmed.indexOf(\"[*]\");\n if (firstIndex == -1) {\n throw new TransformationException(\"c\");\n }\n String pathTillArray = srcpathTrimmed.substring(0, firstIndex + 3);\n //query the source document to figure out how many entries exist in the source array\n List<Object> items = JsonPath.read(source, pathTillArray);\n if (items == null) {\n throw new TransformationException(\n getStringFromBundle(NULL_QUERY_RESULT, pathTillArray));\n\n }\n int size = items.size();\n String dstpathTrimmed = dstPath.replaceAll(\"\\\\s\", \"\");\n firstIndex = dstpathTrimmed.indexOf(\"[*]\");\n if (firstIndex == -1) {\n throw new TransformationException(getStringFromBundle(INTERNAL_ERROR));\n }\n */\n\n\n List<PathMapping> result = new ArrayList<PathMapping>();\n\n /*\n for (int i = 0; i < size; i++) {\n PathMapping p = new PathMapping();\n p.setSource(srcpathTrimmed.replace(\"[*]\", \"[\" + i + \"]\"));\n p.setTarget(dstpathTrimmed.replace(\"[*]\", \"[\" + i + \"]\"));\n result.add(p);\n }*/\n\n for (int i = 0; i < 1; i++) {\n PathMapping p = new PathMapping();\n p.setSource(srcpathTrimmed);\n p.setTarget(dstpathTrimmed);\n result.add(p);\n }\n\n return result;\n }",
"java.util.List<java.lang.String>\n getSourcepathList();",
"public com.google.protobuf.ProtocolStringList\n getPathsList() {\n return paths_;\n }",
"public Stream<Path> loadAll() {\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"File Retrived\");\n\t\t\treturn Files.walk(this.path, 1).filter(path->!path.equals(this.path)).map(this.path::relativize);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File Retrived Error\");\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object load(String path, Object defaultObject) throws Exception {\n\t\tfinal Object[] object = new Object[1];\n\t\t\n\t\t// Stream\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(path);\n\t\t\tfinal ObjectInputStream ois = new ObjectInputStream(fis);\n\n\t\t\t// Load an object\n\t\t\tobject[0] = ois.readObject();\n\n\t\t\t// Close stream\n\t\t\tois.close();\n\t\t} catch (FileNotFoundException fileNotFoundException){\n\t\t\t// Assign default object when the file is not found.\n\t\t\tobject[0] = defaultObject;\n\t\t}\n\t\t\n\t\t// Return object\n\t\treturn object[0];\n\t}",
"java.util.List<org.jetbrains.r.rinterop.RRef> \n getRefsList();",
"@Test\n public void an_array_path_followed_by_object_followed_by_array_created_and_value_set() {\n\n String path = \"$.shipment.extensionFields.drivers[0].extensions.homePhones[1]\";\n JsonPath compiledPath = JsonPath.compile(path);\n Object output = compiledPath.set(pathConfiguration.jsonProvider().parse(inputObject),\n 99999,pathConfiguration);\n Integer result = parse(output).read(path);\n assertThat(result).isEqualTo(99999);\n }",
"public org.dhis2.ns.schema.dxf2.IndicatorRefDocument.IndicatorRef[] getIndicatorRefArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(INDICATORREF$0, targetList);\n org.dhis2.ns.schema.dxf2.IndicatorRefDocument.IndicatorRef[] result = new org.dhis2.ns.schema.dxf2.IndicatorRefDocument.IndicatorRef[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }",
"private void extractRelatedTriples(Formula context, N3Element.Object ref) {\n\t\tif (ref instanceof Exvar) {\n\t\t\tRDFResource sub = context.get(ref.toString());\n\t\t\tif (sub != null) {\n\t\t\t\trelated.add(sub);\n\t\t\t\tfor (VerbObject obj : sub.verbObjects) {\n\t\t\t\t\textractRelatedTriples(context, obj.object);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (ref instanceof List) {\n\t\t\tfor (Object o : (List<?>) ref) {\n\t\t\t\tif (o instanceof N3Element.Object) {\n\t\t\t\t\textractRelatedTriples(context, (N3Element.Object) o);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"List<PropertySymbol> getAllReferences();",
"com.exacttarget.wsdl.partnerapi.ObjectDefinition[] getObjectDefinitionArray();",
"public java.lang.Object[] getRelationsAsReference() {\n return relationsAsReference;\n }",
"public String[] getFinalPaths(Map<String, String> pathParams) {\n\n List<RestPath> matchingRestPaths = findMatchingRestPaths(pathParams.keySet());\n if (matchingRestPaths == null || matchingRestPaths.isEmpty()) {\n throw new IllegalArgumentException(\"unable to find matching rest path for api [\" + name + \"] and params \" + pathParams);\n }\n\n String[] paths = new String[matchingRestPaths.size()];\n for (int i = 0; i < matchingRestPaths.size(); i++) {\n RestPath restPath = matchingRestPaths.get(i);\n String path = restPath.path;\n for (Map.Entry<String, String> paramEntry : restPath.params.entrySet()) {\n // replace path placeholders with actual values\n String value = pathParams.get(paramEntry.getValue());\n if (value == null) {\n throw new IllegalArgumentException(\"parameter [\" + paramEntry.getValue() + \"] missing\");\n }\n path = path.replace(paramEntry.getKey(), value);\n }\n paths[i] = path;\n }\n return paths;\n }",
"public List<Shape> path()\n\t{\n\t\t// Output path list\n\t\tList<Shape> path = new ArrayList<>();\n\n\t\t// Add the callee to the list\n\t\tpath.add(this);\n\n\t\t// Go up the full hierarchy and add the shapes to the\n\t\t// path\n\t\tShape currentShape = parent;\n\n\t\twhile(currentShape!=null)\n\t\t{\n\t\t\tpath.add(currentShape);\n\t\t\tcurrentShape = currentShape.parent;\n\t\t}\n\n\t\t// Reverse the list to put it into the required order\n\t\tCollections.reverse(path);\n\n\t\treturn path;\n\t}",
"public List<String> getPaths() {\n List<String> result;\n synchronized (this.paths) {\n result = this.paths;\n }\n return result;\n }",
"Object visitArrayOfReferences(ArrayOfReferencesNode node, Object state);",
"public interface Paths extends Constructible, Extensible<Paths> {\n\n /**\n * Adds the given path item to this Paths and return this instance of Paths\n *\n * @param name\n * a path name in the format valid for a Paths object. The field name MUST begin with a slash.\n * @param item\n * the path item added to the list of paths. null values will be rejected (implementation will throw an\n * exception) or ignored.\n * @return the current Paths instance\n */\n Paths addPathItem(String name, PathItem item);\n\n /**\n * Removes the given path item to this Paths.\n *\n * @param name\n * a path name that will be removed.\n */\n void removePathItem(String name);\n\n /**\n * Returns a copy map (potentially immutable) of the path items.\n *\n * @return all items\n */\n Map<String, PathItem> getPathItems();\n\n /**\n * Set the path items map to this Paths\n *\n * @param items\n * a map containing the list of paths. Keys MUST begin with a slash.\n */\n void setPathItems(Map<String, PathItem> items);\n\n /**\n * Check whether a path item is present in the map. This is a convenience method for\n * <code>getPathItems().containsKey(name)</code>\n *\n * @param name\n * a path name in the format valid for a Paths object.\n * @return a boolean to indicate if the path item is present or not.\n */\n default boolean hasPathItem(String name) {\n Map<String, PathItem> map = getPathItems();\n if (map == null) {\n return false;\n }\n return map.containsKey(name);\n }\n\n /**\n * Returns a path item for a given name. This is a convenience method for <code>getPathItems().get(name)</code>\n *\n * @param name\n * a path name in the format valid for a Paths object.\n * @return the corresponding path item or null.\n */\n default PathItem getPathItem(String name) {\n Map<String, PathItem> map = getPathItems();\n if (map == null) {\n return null;\n }\n return map.get(name);\n }\n\n}",
"@Override\n\tpublic List<Object> itemsAtPath(String path) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic String[] list(String path) {\n\t\treturn null;\r\n\t}",
"public final native void setPaths(JsArray<JsArray<LatLng>> value) /*-{\n\t\tthis.setPaths(value);\n\t}-*/;",
"Object[] elements(Object[] destination) {\n return elements.toArray(destination);\n }",
"Variable getRefers();",
"Object[] getChildArray();",
"public File getObject() {\n return _objects;\n }",
"private Path[] getPathArray(List<String> commandLineArgs) {\n int numOfFiles = commandLineArgs.size();\n Path[] filePathArray = new Path[numOfFiles];\n Path currentDir = Paths.get(Jsh.getCurrentDirectory());\n for (int i = 0; i < numOfFiles; i++) {\n filePathArray[i] = currentDir.resolve(commandLineArgs.get(i));\n }\n return filePathArray;\n }",
"final protected Object[] convertSpringProxyObjs(final Object... proxyObjs) {\n\t\tfinal Object[] objs = new Object[proxyObjs.length];\n\t\tint i = 0;\n\t\tfor (final Object o : proxyObjs)\n\t\t\tobjs[i++] = convertSpringProxyObj(o);\n\n\t\treturn objs;\n\t}",
"org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D getPathArray(int i);",
"public default boolean isArrayScanpath() {\n\t\treturn false;\n\t}",
"public static Object getObj(String path){\n int index = Integer.parseInt(path.substring(6).split(\"\\\\.\")[0]) % maxBufferSize;\n if (buffer[index] != null && buffer[index].getPath().equals(path)) {\n return buffer[index];\n }\n return deserialize(path);\n }",
"public List<Reference> references(String owner, String repo, String ref) {\n return apiClient.deserializeAsList(apiClient.get(String.format(\"/repos/%s/%s/git/refs/%s\", owner, repo, ref)), Reference.class);\n }",
"private void readPaths(List<Element> pathElements,\n List<Element> pointElements,\n Model model)\n throws ObjectExistsException {\n // Add the paths.\n for (int i = 0; i < pathElements.size(); i++) {\n Element curPathElement = pathElements.get(i);\n Integer pathID;\n try {\n pathID = Integer.valueOf(curPathElement.getAttributeValue(\"id\"));\n }\n catch (NumberFormatException e) {\n pathID = null;\n }\n String srcName = curPathElement.getAttributeValue(\"sourcePoint\");\n if (srcName == null || srcName.isEmpty()) {\n srcName = \"SourcePoint\" + i + \"Unknown\";\n }\n Point srcPoint = model.getPoint(srcName);\n String destName = curPathElement.getAttributeValue(\"destinationPoint\");\n if (destName == null || destName.isEmpty()) {\n destName = \"DestinationPoint\" + i + \"Unknown\";\n }\n Point destPoint = model.getPoint(destName);\n Path curPath = model.createPath(\n pathID, srcPoint.getReference(), destPoint.getReference());\n TCSObjectReference<Path> pathRef = curPath.getReference();\n String pathName = curPathElement.getAttributeValue(\"name\");\n if (pathName == null || pathName.isEmpty()) {\n pathName = \"PathName\" + i + \"Unknown\";\n }\n model.getObjectPool().renameObject(pathRef, pathName);\n model.setPathLength(pathRef,\n Long.parseLong(curPathElement.getAttributeValue(\"length\", \"1\")));\n model.setPathRoutingCost(pathRef,\n Long.parseLong(curPathElement.getAttributeValue(\"routingCost\", \"1\")));\n model.setPathLocked(pathRef,\n Boolean.parseBoolean(curPathElement.getAttributeValue(\"locked\", \"false\")));\n int maxV;\n try {\n maxV = Integer.parseInt(curPathElement.getAttributeValue(\"maxVelocity\"));\n }\n catch (NumberFormatException e) {\n maxV = 0;\n }\n model.setPathMaxVelocity(pathRef, maxV);\n int maxRV;\n try {\n maxRV = Integer.parseInt(curPathElement.getAttributeValue(\"maxReverseVelocity\"));\n }\n catch (NumberFormatException e) {\n maxRV = 0;\n }\n model.setPathMaxReverseVelocity(pathRef, maxRV);\n List<Element> properties = curPathElement.getChildren(\"property\");\n for (int m = 0; m < properties.size(); m++) {\n Element curPropElement = properties.get(m);\n String curKey = curPropElement.getAttributeValue(\"name\");\n if (curKey == null || curKey.isEmpty()) {\n curKey = \"Key\" + m + \"Unknown\";\n }\n String curValue = curPropElement.getAttributeValue(\"value\");\n if (curValue == null || curValue.isEmpty()) {\n curValue = \"Value\" + m + \"Unknown\";\n }\n model.getObjectPool().setObjectProperty(pathRef, curKey, curValue);\n }\n }\n\n // Loop through all paths. Add the path to its source point as an outgoing\n // path and to its destination point as an incoming path.\n for (Path curPath : model.getPaths(null)) {\n model.addPointOutgoingPath(curPath.getSourcePoint(),\n curPath.getReference());\n model.addPointIncomingPath(curPath.getDestinationPoint(),\n curPath.getReference());\n }\n }",
"List<Path> getFiles();",
"private static List<Element> getXMLPaths(Model model) {\n Set<Path> paths = new TreeSet<>(Comparators.objectsById());\n paths.addAll(model.getPaths(null));\n List<Element> result = new ArrayList<>(paths.size());\n for (Path curPath : paths) {\n Element pathElement = new Element(\"path\");\n pathElement.setAttribute(\"id\", String.valueOf(curPath.getId()));\n pathElement.setAttribute(\"name\", curPath.getName());\n pathElement.setAttribute(\"sourcePoint\",\n curPath.getSourcePoint().getName());\n pathElement.setAttribute(\"destinationPoint\",\n curPath.getDestinationPoint().getName());\n pathElement.setAttribute(\"length\", String.valueOf(curPath.getLength()));\n pathElement.setAttribute(\"routingCost\",\n String.valueOf(curPath.getRoutingCost()));\n // velocities\n pathElement.setAttribute(\"maxVelocity\",\n String.valueOf(curPath.getMaxVelocity()));\n // reverse velocities\n pathElement.setAttribute(\"maxReverseVelocity\",\n String.valueOf(curPath.getMaxReverseVelocity()));\n // locks\n pathElement.setAttribute(\"locked\", String.valueOf(curPath.isLocked()));\n // actions\n for (Map.Entry<String, String> curEntry\n : curPath.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n pathElement.addContent(propertyElement);\n }\n // XXX Add the path's other attributes as well.\n result.add(pathElement);\n }\n return result;\n }",
"public List<Reference> references(String owner, String repo) {\n return apiClient.deserializeAsList(apiClient.get(String.format(\"/repos/%s/%s/git/refs\", owner, repo)), Reference.class);\n }",
"@Override\n\t\tpublic Object[] toArray() {\n\t\t\treturn snapshot().toArray();\n\t\t}",
"@JNICALL(returnType = \"java.lang.Object[]\")\n public /*Object[]*/ KReference getSigners(JNIEnv env, @THIS KReference ref) {\n //TODO fix me\n return null;\n }",
"private Object readObject(String path)\n throws IOException, ClassNotFoundException {\n InputStream file = new FileInputStream(path);\n InputStream buffer = new BufferedInputStream(file);\n ObjectInput input = new ObjectInputStream(buffer);\n Object inputObj = input.readObject();\n input.close();\n return inputObj;\n }",
"GitFile[] getFilesImpl() throws Exception\n {\n TreeWalk twalk = new TreeWalk(getRepo()); twalk.addTree(_rev);\n List <GitFile> files = new ArrayList();\n while(twalk.next()) {\n ObjectId id = twalk.getObjectId(0);\n RevObject rid = getRevObject(id);\n String path = _path + (_path.length()>1? \"/\" : \"\") + twalk.getNameString();\n GitFile child = rid instanceof RevTree? new GitTree((RevTree)rid, path) : new GitBlob((RevBlob)rid, path);\n files.add(child);\n }\n return files.toArray(new GitFile[files.size()]);\n }",
"List<IDirectory> getSourcePath();",
"protected abstract String[] getBaseFolders();",
"@Override\r\n public void dirToPath(String[] arr) {\n\r\n }",
"@SuppressWarnings(\"unchecked\")\n @Override\n public Object[] resolvePath(String path) {\n if (path.startsWith( WEB_APP )) {\n String webpath = \"/\" + path.split( \":\" )[1];\n\n if (isJar( webpath )) {\n logger.debug( \"Found jar: {}\", webpath );\n\n return new InputStream[] { servletContext.getResourceAsStream( webpath ) };\n }\n\n Set<String> paths = servletContext.getResourcePaths( webpath );\n\n if (paths.size() > 0) {\n Iterator<String> itr = paths.iterator();\n List<InputStream> streams = new ArrayList<InputStream>();\n\n while (itr.hasNext()) {\n String source = itr.next();\n\n if (isJar( source )) {\n InputStream stream = servletContext.getResourceAsStream( source );\n\n if (stream != null) {\n logger.debug( \"Found jar: {}\", source );\n\n streams.add( stream );\n }\n }\n }\n\n return streams.toArray( new InputStream[streams.size()] );\n }\n\n }\n\n return null;\n }",
"public List<T> getSavedObjects() {\n // Lazily generate the object, in case it's not needed.\n if (objects == null) {\n if (dbObjects.length > 0) {\n if (dbObjects[0] instanceof JacksonDBObject) {\n throw new UnsupportedOperationException(\n \"Saved object retrieval not supported when using stream serialization\");\n }\n }\n objects = jacksonDBCollection.convertFromDbObjects(dbObjects);\n }\n return objects;\n }",
"@Override\n\tpublic Object[] toArray() {\n\t\treturn snapshot().toArray();\n\t}",
"protected IClasspathEntry[] newClasspathEntriesFromEARProject(Set visited) {\n \t\tList cpEntries = new ArrayList();\n \t\tcpEntries.add(newClasspathEntryFromEARProj());\n \t\ttraverseClasspaths(cpEntries, visited);\n \t\treturn (IClasspathEntry[]) cpEntries.toArray(new IClasspathEntry[cpEntries.size()]);\n \t}"
] | [
"0.6769019",
"0.6199642",
"0.6146033",
"0.6122284",
"0.6051434",
"0.5892154",
"0.58272743",
"0.5817288",
"0.5728583",
"0.5684453",
"0.5597307",
"0.55865866",
"0.55799544",
"0.55634964",
"0.5524132",
"0.54864556",
"0.54676306",
"0.54650486",
"0.53996927",
"0.5396316",
"0.5395512",
"0.53752184",
"0.5368481",
"0.5337941",
"0.5316992",
"0.53157294",
"0.5286932",
"0.523781",
"0.5205468",
"0.5200751",
"0.51644355",
"0.5163217",
"0.5153069",
"0.51417774",
"0.5121055",
"0.5119085",
"0.50997496",
"0.50876147",
"0.508538",
"0.50766987",
"0.50630313",
"0.50630313",
"0.50630313",
"0.50427073",
"0.5034219",
"0.5011651",
"0.5009685",
"0.50047696",
"0.50000626",
"0.49909028",
"0.49883375",
"0.49824992",
"0.49636868",
"0.49591455",
"0.4956789",
"0.4942372",
"0.4928198",
"0.49196836",
"0.49186143",
"0.49080494",
"0.48927236",
"0.4889446",
"0.48739216",
"0.48700812",
"0.4862502",
"0.4862015",
"0.48594326",
"0.48313388",
"0.48217893",
"0.48145598",
"0.48094535",
"0.48050565",
"0.48034176",
"0.47940078",
"0.4788568",
"0.4788181",
"0.4787793",
"0.47834495",
"0.47800606",
"0.47780406",
"0.47746968",
"0.47611767",
"0.47575954",
"0.47560242",
"0.47549748",
"0.47500336",
"0.473841",
"0.47285542",
"0.47254044",
"0.47229412",
"0.47190118",
"0.47098693",
"0.4697615",
"0.46941218",
"0.46844855",
"0.4682919",
"0.4682699",
"0.4681612",
"0.4679801",
"0.46781588"
] | 0.5928972 | 5 |
return array classInfo_ could be a class name or already a Java object | public static Object[] mkdir(String soption_, Object classInfo_,
Paths[] pathss_, boolean calledByOtherCmds_, Shell shell_)
{
CommandOption option_ = new CommandOption(soption_,
false/*dont expand*/);
if (pathss_ == null || pathss_.length == 0) {
if (!option_.quiet) {
if (classInfo_ instanceof String
&& ((String)classInfo_).indexOf('/') > 0)
// classInfo_ is a path!
shell_.println("Error: no class name or Java object"
+ " is given.");
else
shell_.println("Error: no path is specified.");
}
return null;
}
if (classInfo_ == null) {
if (!option_.quiet)
shell_.println("Error: no class class name or Java object"
+ " is given.");
return null;
}
// get the class information from classInfo_
Class class_ = null;
Component comp_ = null; // component or component wrapper
Port port_ = null;
Object object_ = null; // wrapped object
try {
if (classInfo_ instanceof String) {
// class name
class_ = Class.forName((String)classInfo_);
object_ = class_.newInstance();
}
else {
object_ = classInfo_;
class_ = object_.getClass();
}
if (object_ instanceof Component) {
comp_ = (Component)object_;
object_ = null;
}
else if (object_ instanceof Port) {
port_ = (Port)object_;
object_ = null;
}
else {
comp_ = new WrapperComponent();
((WrapperComponent)comp_).setObject(object_);
}
}
catch (Exception e_) {
shell_.println("classInfo: " + classInfo_);
if (!option_.quiet) shell_.println(e_.toString());
return null;
}
option_.recordID = true;
Vector v_ = __common__(option_, pathss_, false, shell_);
Vector vresult_ = new Vector();
boolean firstTime_ = true;
for (int i=0; i<v_.size(); i++) {
Directory d_ = (Directory)v_.elementAt(i);
if (d_ == null
|| ((d_.child == null || d_.child.length == 0)
&& d_.ids == null)) continue;
if (d_.ids != null) { // have id information
// error
if (d_.ids[0] == Common.STOP_RESOLUTION_COMPONENT
&& port_ != null) {
if (!option_.quiet)
shell_.println("Warning: cannot make a port with"
+ " a component id (" + d_.parent
+ "/" + d_.ids[1] + ").");
continue;
}
if (d_.ids[0] == Common.STOP_RESOLUTION_PORT
&& comp_ != null) {
if (!option_.quiet)
shell_.println("Warning: cannot make a component"
+ " with a port id (" + d_.parent
+ "/" + d_.ids[1] + ").");
continue;
}
if (d_.ids[0] == Common.STOP_RESOLUTION_COMPONENT
&& d_.trailingSlash) {
if (!option_.quiet) {
shell_.println("Warning: invalid path '" + d_.parent
+ "/" + d_.ids[1] + "/.");
shell_.println("Remove the trailing slash maybe?");
}
continue;
}
// everything is normal
if (comp_ != null) {
// make component(s)
for (int j=2; j<d_.ids.length; j++) {
Component new_ = firstTime_? comp_:
(Component)comp_.clone();
new_.setID(d_.ids[j]);
d_.parent.addComponent(new_, !option_.keepRuntime);
vresult_.addElement(new_);
firstTime_ = false;
}
}
else {
// make port(s)
for (int j=2; j<d_.ids.length; j++) {
Port new_ = firstTime_? port_: (Port)port_.clone();
String tmp_ = d_.ids[j];
int index_ = tmp_.indexOf('@');
String gid_ = index_ >= tmp_.length() -1?
"": tmp_.substring(index_+1);
d_.parent.addPort(new_, gid_,
tmp_.substring(0, index_));
vresult_.addElement(new_);
firstTime_ = false;
}
}
continue;
} // end if (d_.ids != null)
// else we have no id info unless object_ has id info in it
Object[] oo_ = d_.child;
for (int j=0; j<oo_.length; j++) {
if (oo_[j] instanceof Component) {
// handling wrapper component
if (object_ != null) {
if (oo_[j] instanceof WrapperComponent) {
WrapperComponent parent_ = (WrapperComponent)oo_[j];
if (parent_.getObject() != null) {
if (!option_.quiet)
shell_.println("Warning: " + parent_
+ " contains other"
+ " wrapped object.");
continue;
}
Component new_ = firstTime_? comp_:
(Component)comp_.clone();
parent_.setObject(
((WrapperComponent)new_).getObject());
vresult_.addElement(parent_.getObject());
firstTime_ = false;
continue;
}
else {
// error no matter whether there's a trailing slash
if (!option_.quiet) {
if (d_.trailingSlash)
shell_.println("Warning: component ID"
+ " should be given to make a"
+ " wrapper component under "
+ oo_[j] + ".");
else
shell_.println("Warning: " + oo_[j]
+ " is not a wrapper component.");
}
continue;
}
}
// check no id error
if (comp_ != null) {
if (!d_.trailingSlash) {
if (!option_.quiet) {
// XX: write onto the component?
shell_.println("Warning: " + oo_[j]
+ " already exists.");
shell_.println("Add a trailing slash maybe?");
}
continue;
}
else if (comp_.getID() == null) {
if (!option_.quiet)
shell_.println("Warning: component ID should"
+ " be given to make a component"
+ " under " + oo_[j] + ".");
continue;
}
}
if (port_ != null && port_.getID() == null) {
if (!option_.quiet)
shell_.println("Warning: port ID should be given"
+ " to make a port under " + oo_[j] + ".");
continue;
}
if (comp_ != null) {
// make a component
Component new_ = firstTime_? comp_:
(Component)comp_.clone();
Component parent_ = (Component)oo_[j];
if (!parent_.containsComponent(new_.getID())) {
parent_.addComponent(new_, !option_.keepRuntime);
vresult_.addElement(new_);
firstTime_ = false;
}
else {
if (new_.getParent() != null) {
if (!option_.quiet) {
shell_.println("Warning: source '" + new_
+ "' is not a standalone"
+ " component.");
}
break;
}
if (!option_.quiet) {
// error
if (parent_.getComponent(new_.getID()) != null){
shell_.println("Warning: '" + parent_
+ "' already contains a child"
+ " with ID '"
+ new_.getID() + "'.");
}
else {
shell_.println("Unknown error when adding "
+ new_ + " to " + parent_ + ".");
}
}
}
}
else {
// make a port
Port new_ = firstTime_? port_: (Port)port_.clone();
Component parent_ = (Component)oo_[j];
if (parent_.addPort(new_, new_.getGroupID(),
new_.getID()) != null) {
vresult_.addElement(new_);
firstTime_ = false;
}
else {
if (new_.getHost() != null) {
if (!option_.quiet) {
shell_.println("Warning: source '" + new_
+ "' is not a standalone port.");
}
break;
}
if (!option_.quiet) {
// error
if (parent_.getPort(new_.getGroupID(),
new_.getID()) != null) {
shell_.println("Warning: '" + parent_
+ "' already contains a port '"
+ new_.getID() + "@"
+ new_.getGroupID() + "'.");
}
else {
shell_.println("Unknown error when adding "
+ new_ + " to " + parent_ + ".");
}
}
}
}
} // end if (oo_[j] is component)
else {
// error
if (!option_.quiet)
shell_.println("Warning: cannot make things under "
+ oo_[j] + "!");
}
} // end loop i, index to v_
}
if (vresult_.size() == 0) {
if (!option_.quiet && !calledByOtherCmds_)
shell_.println("Nothing is created.");
return null;
}
//if (vresult_.size() == 1) return vresult_.firstElement();
Object[] result_ = new Object[vresult_.size()];
vresult_.copyInto(result_);
return result_;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] readClasses();",
"public abstract Class<?>[] getCoClasses();",
"@Override\n public ClassInfo getClassInfo() {\n return this.classInfo;\n }",
"private static String getClassNameAfterWrapperArrayOf(Class<?> clazz) {\n if(clazz.isPrimitive()) {\n String baseTypeDescriptor = DescriptorUtils.primitiveClass2BaseTypeDescriptor(clazz);\n return \"[\" + baseTypeDescriptor;\n } else if(clazz.isArray()) {\n return \"[\" + clazz.getName();\n } else {\n // normal object\n return \"[L\" + clazz.getName() + \";\";\n }\n }",
"Object yangAugmentedInfo(Class classObject);",
"Object yangAugmentedInfo(Class classObject);",
"Object getClass_();",
"Object getClass_();",
"public ClassInfo getClassInfo() {\n\t\treturn clsInfo;\n\t}",
"@NotNull\n List<? extends ClassInfo> getClasses();",
"private void cmdInfoClass(String classname) throws NoSystemException {\n MSystem system = system();\n MClass cls = system.model().getClass(classname);\n if (cls == null)\n Log.error(\"Class `\" + classname + \"' not found.\");\n else {\n MMVisitor v = new MMPrintVisitor(new PrintWriter(System.out, true));\n cls.processWithVisitor(v);\n int numObjects = system.state().objectsOfClass(cls).size();\n System.out.println(numObjects + \" object\"\n + ((numObjects == 1) ? \"\" : \"s\")\n + \" of this class in current state.\");\n }\n }",
"public ClassInfo[] getClasses() {\r\n return classes.toArray(new ClassInfo[classes.size()]);\r\n }",
"String getInstanceOfClass();",
"private static String classArrayToString(Class[] pts) {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < pts.length; i++) {\n result.append(getTypeName(pts[i]));\n if (i < pts.length - 1)\n result.append(\",\");\n }\n return result.toString();\n }",
"private String[] getReferencedJavaClasses() {\n\t\tclass ClassNameVisitor extends JVisitor {\n\t\t\tList<String> classNames = new ArrayList<String>();\n\n\t\t\t@Override\n\t\t\tpublic boolean visit(JClassType x, Context ctx) {\n\t\t\t\tclassNames.add(x.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tClassNameVisitor v = new ClassNameVisitor();\n\t\tv.accept(jprogram);\n\t\treturn v.classNames.toArray(new String[v.classNames.size()]);\n\t}",
"public ClassInfo getClassInfo(String fullClassName) {\r\n return classMap.get(fullClassName);\r\n }",
"public ClassInfo() {\n }",
"private void gatherInformation(String className, byte[] bytes) {\n ClassReader reader = new ClassReader(bytes);\n ClassWriter writer = new NonClassloadingClassWriter(reader, ClassWriter.COMPUTE_FRAMES);\n ClassVisitor visitor = new ClassInformationAdapter(writer, methodInformation);\n reader.accept(visitor, 0);\n }",
"java.lang.String getClass_();",
"java.lang.String getClass_();",
"private Class[] getClasses(ArrayList objectList) {\n Class []classTypes = new Class[objectList.size()];\n for(int i=0; i<objectList.size(); ++i) {\n Object obj = objectList.get(i);\n if(obj instanceof Double) classTypes[i] = Double.TYPE;\n else if(obj instanceof Float) classTypes[i] = Float.TYPE;\n else classTypes[i] = obj.getClass();\n }\n return classTypes;\n }",
"public void fetchClassInfo() {\n try {\n telephonyClassName = \"android.telephony.TelephonyManager\";\n listofClass = new String[]{\n \"com.mediatek.telephony.TelephonyManagerEx\",\n \"android.telephony.TelephonyManager\",\n \"android.telephony.MSimTelephonyManager\",\n \"android.telephony.TelephonyManager\"};\n for (int index = 0; index < listofClass.length; index++) {\n if (isTelephonyClassExists(listofClass[index])) {\n if (isMethodExists(listofClass[index], \"getDeviceId\")) {\n if (!simVariant.equalsIgnoreCase(\"\")) {\n break;\n }\n }\n if (isMethodExists(listofClass[index], \"getNetworkOperatorName\")) {\n break;\n } else if (isMethodExists(listofClass[index], \"getSimOperatorName\")) {\n break;\n }\n }\n }\n for (int index = 0; index < listofClass.length; index++) {\n try {\n if (slotName1 == null || slotName1.equalsIgnoreCase(\"\")) {\n getValidSlotFields(listofClass[index]);\n // if(slotName1!=null || !slotName1.equalsIgnoreCase(\"\")){\n getSlotNumber(listofClass[index]);\n } else {\n break;\n }\n } catch (Exception e) {\n LOGE(TAG, \"[fetchClassInfo] Unable to get class info\", e);\n }\n }\n } catch (Exception e) {\n LOGE(TAG, \"[fetchClassInfo] Unable to get class info\", e);\n }\n }",
"boolean hasClassname();",
"public static Class<?>[] desc2classArray(String desc) throws ClassNotFoundException\n\t{\n\t\treturn desc2classArray(ClassHelper.getClassLoader(), desc);\n\t}",
"private Class<?> findInternalClass(String name){\n Class<?> clazz = null;\n for (int i = 0; i < urls.length; i++) {\n String root = urls[i].getPath();\n clazz = realFindClass(root,name);\n if(clazz != null)\n break;\n }\n if(clazz != null) {\n classes.put(name,clazz);\n return clazz;\n }\n return null;\n }",
"private Class<DimensionInterface>[] getAllClasses (String pckgname) {\n\t\t\n\t\ttry {\n\t\t \n\t\t\t// Classes will store our results\n\t\t\tArrayList classes = new ArrayList ();\n\t\t\t\n\n\t\t\t// Get a File object for the package \n\t\t File directory; \n\t\t \n\t\t \n\t\t // Load the package \n\t\t try { \n\t\t \tdirectory = new File (\n\t\t \t\tThread.currentThread ()\n\t\t \t\t\t.getContextClassLoader()\n\t\t \t\t\t.getResource (pckgname.replace('.', '/'))\n\t\t \t\t\t.getFile()\n\t\t \t); \n\t\t \n\t\t } catch (NullPointerException x) { \n\t\t \tSystem.out.println (\"Nullpointer\");\n\t\t \tthrow new ClassNotFoundException (pckgname + \" does not appear to be a valid package\"); \n\t\t }\n\t\t \n\t\t \n\t\t // IF we have found our package, then\n\t\t // obtain the files withtin\n\t\t if ( ! directory.exists ()) {\n\t\t \tSystem.out.println (\"Directory does not exist\");\n\t\t \tthrow new ClassNotFoundException(pckgname + \" does not appear to be a valid package\"); \n\t\t } \t\t \t\n\t\t \t\n\t\t \n\t \t// Get the list of the files contained in the package \n\t \tString[] files = directory.list ();\n\t\t \t\n\t\t \t\n\t \t// Get the files\n\t \tfor (int i=0; i<files.length; i++) { \n\n\t \t\t// we are only interested in .class files \n\t \t\tif ( ! files[i].endsWith(\".class\")) {\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\t\t\n \t\t\t// removes the .class extension \n \t\t\tclasses.add(Class.forName (pckgname + '.' + files[i].substring (0, files[i].length() - 6)));\n\t \t\t\t\n\t \t}\n\t\t \n\t\t \n\t \t// Convert the result in an array\n\t\t Class[] classesA = new Class[classes.size()]; \n\t\t classes.toArray (classesA); \n\t\t \n\t\t \n\t\t // Return\n\t\t return classesA;\n\t\t \n\t\t// Generic error\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"private TypeMirror[] readCustomConverterClasses(Element classElement) {\n AnnotationMirror annotationMirror = null;\n for (AnnotationMirror candidate : classElement.getAnnotationMirrors()) {\n if (context.getClassUtils().isSame(candidate.getAnnotationType(), NamingStrategy.class)) {\n annotationMirror = candidate;\n break;\n }\n }\n assert annotationMirror != null; // We've checked that in the caller already\n\n for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry :\n annotationMirror.getElementValues().entrySet()) {\n if (entry.getKey().getSimpleName().contentEquals(\"customConverterClass\")) {\n @SuppressWarnings(\"unchecked\")\n List<? extends AnnotationValue> values = (List) entry.getValue().getValue();\n TypeMirror[] result = new TypeMirror[values.size()];\n for (int i = 0; i < values.size(); i++) {\n result[i] = ((TypeMirror) values.get(i).getValue());\n }\n return result;\n }\n }\n return new TypeMirror[0];\n }",
"@Override\n\tpublic Class[] getTak(String arg) {\n\t\treturn null;\n\t}",
"@Override\n public byte[] getClassBytes(String name) {\n return null;\n }",
"private void readClassInfo() throws IOException, ClassFormatException {\n access_flags = dataInputStream.readUnsignedShort();\n /* Interfaces are implicitely abstract, the flag should be set\n * according to the JVM specification.\n */\n if ((access_flags & AccessFlag.INTERFACE) != 0) {\n access_flags |= AccessFlag.ABSTRACT;\n }\n if (((access_flags & AccessFlag.ABSTRACT) != 0)\n && ((access_flags & AccessFlag.FINAL) != 0)) {\n throw new ClassFormatException(\"Class \" + file_name + \" can't be both final and abstract\");\n }\n class_name_index = dataInputStream.readUnsignedShort();\n superclass_name_index = dataInputStream.readUnsignedShort();\n }",
"private String classNameAtCPIndex(int idx) {\n if (cpTags[idx] != CONSTANT_Utf8) {\n throw classFileReadException(\"Constant pool entry \" + idx + \" should be UTF8 constant\"); // NOI18N\n }\n\n int arrayLevel = 0;\n\n if (cpObjectCache[idx] == null) {\n int utf8Len = getChar(cpOffsets[idx]);\n int stPos = cpOffsets[idx] + 2;\n int initStPos = stPos;\n\n while (classBuf[stPos] == '[') { // NOI18N\n stPos++;\n arrayLevel++;\n }\n\n if (stPos != initStPos) {\n if (classBuf[stPos] == 'L') { // NOI18N // Non-primitive array type\n stPos++;\n utf8Len--; // To get rid of the terminating ';'\n }\n }\n\n utf8Len = utf8Len - (stPos - initStPos);\n\n String res = StringUtils.utf8ToString(classBuf, stPos, utf8Len);\n\n for (int i = 0; i < arrayLevel; i++) {\n res = \"[\" + res; // NOI18N\n }\n\n cpObjectCache[idx] = res;\n }\n\n return (String) cpObjectCache[idx];\n }",
"@Nonnull\n private static String getJavaClassName( AnyType arrayType ) {\n if( !arrayType.isRefType() ) {\n switch( (ValueType)arrayType ) {\n case bool:\n return \"[Z\";\n case i8:\n return \"[B\";\n case i16:\n return \"[S\";\n case u16:\n return \"[C\";\n case f64:\n return \"[D\";\n case f32:\n return \"[F\";\n case i32:\n return \"[I\";\n case i64:\n return \"[J\";\n case eqref:\n case externref:\n return \"[Ljava.lang.Object;\";\n default:\n throw new WasmException( \"Not supported array type: \" + arrayType, -1 );\n }\n }\n if( arrayType instanceof ArrayType ) {\n return \"[\" + getJavaClassName( ((ArrayType)arrayType).arrayType );\n }\n return \"[L\" + ((StructType)arrayType).getName() + \";\";\n }",
"default @NonNull ClassElement[] getClassElements(@NonNull String aPackage, @NonNull String... stereotypes) {\n return new ClassElement[0];\n }",
"public static String getClassName(EditorInfo info) {\n\t\tif (info.inputType==InputType.TYPE_NULL) return \"NULL\"; //inputType==0 is a common case...\n\t\tint i = info.inputType & InputType.TYPE_MASK_CLASS;\n\t\tfor (Field f : InputType.class.getFields())\n\t\t\ttry {\n\t\t\t\tif (f.getName().startsWith(\"TYPE_CLASS_\")\n\t\t\t\t\t\t&& f.getInt(null)==i)\n\t\t\t\t\treturn f.getName().substring(\"TYPE_CLASS_\".length());\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t//Shouldn't happen, but hope some other field matches!\n\t\t\t\tandroid.util.Log.d(\"DasherIME\",\"Couldn't read field \"+f.getName()+\", skipping...\", e);\n\t\t\t}\n\t\tthrow new IllegalArgumentException(\"InputType class \"+info.inputType+\" not found\");\n\t}",
"final Class<?>[] classes() {\n if (classes instanceof Class[]) {\n return (Class[]) classes;\n } else {\n return new Class[] { (Class) classes };\n }\n }",
"public Class getDataClass();",
"public byte[] get(String res) {\n return classes.get(res);\n }",
"@NotNull\n List<? extends ClassInfo> getAllClasses();",
"private Class loadClass(ClassInfo classInfo) {\n Class type = null;\n try {\n URLClassLoader classLoader = new URLClassLoader(new URL[]{\n new File(classInfo.getPath()).toURI().toURL()\n });\n type = classLoader.loadClass(classInfo.getName());\n } catch (MalformedURLException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Class url stimmt nicht. Ggf. hat der ClassIndexer einen falschen Pfad!\", ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Klasse konnte nicht gefunden werden!\", ex);\n }\n return type;\n }",
"public static Class<?>[] desc2classArray(ClassLoader cl, String desc) throws ClassNotFoundException\n\t{\n\t\tif (desc == null || desc.length() == 0)\n\t\t{\n\t\t\treturn EMPTY_CLASS_ARRAY;\n\t\t}\n\t\t\n\t\tList<Class<?>> csArray = new ArrayList<Class<?>>();\n\t\tMatcher matcher = DESC_PATTERN.matcher(desc);\n\t\tfor ( ; matcher.find();)\n\t\t{\n\t\t\tcsArray.add(name2Class(matcher.group()));\n\t\t}\n\t\t\n\t\treturn csArray.toArray(new Class<?>[csArray.size()]);\n\t}",
"public String getClassName();",
"public static Class getComponentClass (Object array)\n\t{\n\t\tClass c = array.getClass();\n\t\twhile (c.isArray())\n\t\t{\n\t\t\tc = c.getComponentType();\n\t\t}\n\t\t\n\t\treturn c;\n\t}",
"private static Class[] getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes.toArray(new Class[classes.size()]);\n }",
"private static Class[] getClasses(String packageName)\n\t\t\tthrows ClassNotFoundException, IOException {\n\t\tClassLoader classLoader = Thread.currentThread()\n\t\t\t\t.getContextClassLoader();\n\t\tassert classLoader != null;\n\t\tString path = packageName.replace('.', '/');\n\t\tEnumeration<URL> resources = classLoader.getResources(path);\n\t\tList<File> dirs = new ArrayList<File>();\n\t\twhile (resources.hasMoreElements()) {\n\t\t\tURL resource = resources.nextElement();\n\t\t\tdirs.add(new File(resource.getFile()));\n\t\t}\n\t\tArrayList<Class> classes = new ArrayList<Class>();\n\t\tfor (File directory : dirs) {\n\t\t\tclasses.addAll(findClasses(directory, packageName));\n\t\t}\n\t\treturn classes.toArray(new Class[classes.size()]);\n\t}",
"public String getClassName(){\r\n\t\treturn \"ValueArray\";\r\n\t}",
"public abstract Class getDescriptedClass();",
"com.google.protobuf.ByteString\n getClass_Bytes();",
"com.google.protobuf.ByteString\n getClass_Bytes();",
"public ClassInfo declaringClass();",
"public boolean isClass () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"@Override\n public List<BaiseeClazz> findAllClazzInfo() {\n return claMapper.findAllClazzInfo();\n }",
"default boolean isClass() {\n return false;\n }",
"private static String [] init(String className, TypeTree tree) {\n // Use a Linked to avoid resizing.\n Collection<String> types = new LinkedList<String>();\n String [] typearray;\n\t if (className.equals(EntryRep.matchAnyClassName())) {\n\t\t// handle \"match any\" specially\" -- search from ROOT\n\t\t// Simplification suggested by \n\t\t// Lutz Birkhahn <lutz.birkhahn@GMX.DE>\n\t\tclassName = ROOT;\n\t } else {\n\t\t// add this class\n\t\ttypes.add(className);\n\t }\n\n\t // add all subclasses\n\t walkTree(tree.classSet(className), types, tree);\n\n\t // Convert it to an array and then randomize\n\t typearray = types.toArray(new String[types.size()]);\n\t int randnum = 0;\n\t String tmpobj = null;\n int length = typearray.length;\n\t for (int i = 0; i < length; i++) {\n\t\trandnum = numgen.nextInt(length - i);\n\t\ttmpobj = typearray[i];\n\t\ttypearray[i] = typearray[randnum];\n\t\ttypearray[randnum] = tmpobj;\n\t }\n return typearray;\n\t}",
"public Class[] getParamTypeClass(String[] par, ClassLoader cl) {\n List<Class> list = new ArrayList<Class>();\n for(String s : par) {\n Class c = checkIfPrimitive(s);\n if (c != null)\n list.add(c);\n else {\n try {\n c = Class.forName(s, false, cl);\n list.add(c);\n } catch (ClassNotFoundException e) {\n //do nothing. Other test will report the problem if parameter\n // is not specified correctly\n }\n }\n }\n return list.toArray(new Class[0]);\n }",
"public String getClazz();",
"public double[] ClassVect() {\n\t\treturn class_vect;\n\t}",
"org.landxml.schema.landXML11.ClassificationDocument.Classification[] getClassificationArray();",
"public String[] getClassesToCompile();",
"public Map<String, AClassDecl> basicClasses() {\n\t\tLinkedList<PFeature> featList;\n\t\tLinkedList<PFormal> formalList;\n\t\tPFeature pf;\n\t\t\n\t\tfeatList = new LinkedList<PFeature>();\n\t\t\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"abort\"),\n\t\t\t\tnew LinkedList<PFormal>(),\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\t\t\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"type_name\"),\n\t\t\t\tnew LinkedList<PFormal>(),\n\t\t\t\tnew TTypeId(\"String\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\n\t\tfeatList.add(pf);\n\t\t\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"copy\"),\n\t\t\t\tnew LinkedList<PFormal>(),\n\t\t\t\tnew TTypeId(\"SELF_TYPE\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\n\t\tfeatList.add(pf);\n\t\t\n\t\tAClassDecl ObjectClass = new AClassDecl(\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tnew TTypeId(\"_no_class\"),\n\t\t\t\tfeatList\n\t\t\t\t);\n\t\t\n\t\t// The IO class inherits from Object. Its methods are\n\t\t// out_string(Str) : SELF_TYPE writes a string to the output\n\t\t// out_int(Int) : SELF_TYPE \" an int \" \" \"\n\t\t// in_string() : Str reads a string from the input\n\t\t// in_int() : Int \" an int \" \" \"\n\t\tfeatList = new LinkedList<PFeature>();\n\t\t\n\t\tformalList = new LinkedList<PFormal>();\t\t\n\t\tformalList.add(new AFormal(new TObjectId(\"arg\"), new TTypeId(\"String\")));\t\t\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"out_string\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"SELF_TYPE\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tformalList = new LinkedList<PFormal>();\t\t\n\t\tformalList.add(new AFormal(new TObjectId(\"arg\"), new TTypeId(\"Int\")));\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"out_int\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"SELF_TYPE\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tformalList = new LinkedList<PFormal>();\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"in_string\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"String\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"in_int\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"Int\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tAClassDecl IOClass = new AClassDecl(\n\t\t\t\tnew TTypeId(\"IO\"),\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tfeatList\n\t\t\t\t);\n\n\n\t\t// The Int class has no methods and only a single attribute, the\n\t\t// \"val\" for the integer.\n\t\tfeatList = new LinkedList<PFeature>();\n\t\tpf = new AAttributeFeature(\n\t\t\t\tnew TObjectId(\"_val\"),\n\t\t\t\tnew TTypeId(\"_prim_slot\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\t\t\n\t\tAClassDecl IntClass = new AClassDecl(\n\t\t\t\tnew TTypeId(\"Int\"),\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tfeatList\n\t\t\t\t);\n\n\t\t// Bool also has only the \"val\" slot.\n\t\tfeatList = new LinkedList<PFeature>();\n\t\tpf = new AAttributeFeature(\n\t\t\t\tnew TObjectId(\"_val\"),\n\t\t\t\tnew TTypeId(\"_prim_slot\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\t\t\n\t\tAClassDecl BoolClass = new AClassDecl(\n\t\t\t\tnew TTypeId(\"Bool\"),\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tfeatList\n\t\t\t\t);\n\n\t\t// The class Str has a number of slots and operations:\n\t\t// val the length of the string\n\t\t// str_field the string itself\n\t\t// length() : Int returns length of the string\n\t\t// concat(arg: Str) : Str performs string concatenation\n\t\t// substr(arg: Int, arg2: Int): Str substring selection\n\t\tfeatList = new LinkedList<PFeature>();\n\t\tpf = new AAttributeFeature(\n\t\t\t\tnew TObjectId(\"_val\"),\n\t\t\t\tnew TTypeId(\"_prim_slot\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tpf = new AAttributeFeature(\n\t\t\t\tnew TObjectId(\"_str_field\"),\n\t\t\t\tnew TTypeId(\"_prim_slot\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\t\t\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"length\"),\n\t\t\t\tnew LinkedList<PFormal>(),\n\t\t\t\tnew TTypeId(\"Int\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\n\t\tfeatList.add(pf);\t\t\n\n\t\tformalList = new LinkedList<PFormal>();\n\t\tformalList.add(new AFormal(new TObjectId(\"arg\"), new TTypeId(\"String\")));\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"concat\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"String\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tformalList = new LinkedList<PFormal>();\n\t\tformalList.add(new AFormal(new TObjectId(\"arg\"), new TTypeId(\"Int\")));\n\t\tformalList.add(new AFormal(new TObjectId(\"arg2\"), new TTypeId(\"Int\")));\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"substr\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"String\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\t\t\n\t\t\n\t\tAClassDecl StringClass = new AClassDecl(\n\t\t\t\tnew TTypeId(\"String\"),\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tfeatList\n\t\t\t\t);\n\t\t\n\n\t\t/*\n\t\t * Do something with Object_class, IO_class, Int_class, Bool_class, and\n\t\t * Str_class here \n\t\t * \n\t\t */\n\n\t\tMap<String, AClassDecl> map = new TreeMap<String, AClassDecl>();\n\t\t\t\tOBJECT = new Klass();\n\t\t\t\tOBJECT.name = \"Object\";\n\t\t\t\tOBJECT.parent = null;\n\t\t\t\tOBJECT.methods = null;\n\t\t \t\tOBJECT.vars = null;\n\t\t \t\t\n\t\t \t\tIO = new Klass();\n\t\t \t\tIO.name = \"IO\";\n\t\t \t\tIO.parent = OBJECT;\n\n\t\t \t\t\n\t\t \t\tINT = new Klass();\n\t\t \t\tINT.name = \"Int\";\n\t\t \t\tINT.parent = OBJECT;\n\n\t\t \t\t\n\t\t \t\tBOOL = new Klass();\n\t\t \t\tBOOL.name = \"Bool\";\n\t\t \t\tBOOL.parent = OBJECT;\n\n\t\t\t\t\n\t\t \t\tSTR = new Klass();\n\t\t\t\tSTR.name =\"String\";\n\t\t\t\tSTR.parent = OBJECT;\n\n\t\t\t\t\n\t\t\t\tERROR = new Klass();\n\t\t\t\tERROR.name = \"ERROR\";\n\t\t\t\tERROR.parent = OBJECT;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tVOID = new Klass();\n\t\t\t\tVOID.name = \"VOID\";\n\t\t\t\tVOID.parent = OBJECT;\n\n\t\t\t\tklasses.put(\"Object\", OBJECT);\n\t\t\t\tklasses.put(\"IO\", IO);\n\t\t\t\tklasses.put(\"Int\", INT);\n\t\t\t\tklasses.put(\"Bool\", BOOL);\n\t\t\t klasses.put(\"String\", STR);\n\t\t\t\t\n\t\tmap.put(\"Object\", ObjectClass);\n\t\tmap.put(\"IO\", IOClass);\n\t\tmap.put(\"Int\", IntClass);\n\t\tmap.put(\"Bool\", BoolClass);\n\t\tmap.put(\"String\", StringClass);\n\t\t\n\t\treturn map;\n\t\t\n\t}",
"com.google.protobuf.ByteString\n getClassNameBytes();",
"private void readAttributes() {\n int i;\n int j;\n\n classInfo.attrsStartOfs = curBufPos;\n\n char attrCount = nextChar();\n\n for (i = 0; i < attrCount; i++) {\n int attrNameIdx = nextChar();\n int attrLen = nextInt();\n\n if (utf8AtCPIndex(attrNameIdx).equals(\"InnerClasses\")) { // NOI18N\n\n int nOfClasses = nextChar();\n String[] nestedClasses = new String[nOfClasses];\n int curIdx = 0;\n int nonMemberClassCount = 0;\n\n for (j = 0; j < nOfClasses; j++) {\n int innerClassInfoIdx = nextChar();\n int outerClassInfoIdx = nextChar();\n int innerClassNameIdx = nextChar();\n char innerClassAccessFlags = nextChar();\n\n String nestedClassFullName = classNameAtCPIndex(getChar(cpOffsets[innerClassInfoIdx]));\n\n // We are not interested in references to nested classes whose enclosing class is not this one.\n if (innerClassNameIdx != 0) {\n String nestedClassSimpleName = utf8AtCPIndex(innerClassNameIdx);\n\n if (!nestedClassFullName.equals(classInfo.name + \"$\" + nestedClassSimpleName)) { // NOI18N\n // Let's check if it's a local class, with the name like \"EncClass$1$Local\"\n\n int count = nonMemberClassCount + 1;\n\n if (!nestedClassFullName.equals(classInfo.name + \"$\" + count + \"$\" + nestedClassSimpleName)) { // NOI18N\n continue;\n } else {\n nonMemberClassCount = count;\n }\n }\n } else {\n nonMemberClassCount++;\n\n if (!nestedClassFullName.equals(classInfo.name + \"$\" + nonMemberClassCount)) { // NOI18N\n continue;\n }\n }\n\n nestedClasses[curIdx++] = nestedClassFullName;\n }\n\n if (curIdx == nOfClasses) {\n classInfo.nestedClassNames = nestedClasses;\n } else if (curIdx > 0) {\n // We found fewer nested classes for this class than we originally expected, but still more than 0.\n // Create a new array to fit their number exactly.\n classInfo.nestedClassNames = new String[curIdx];\n System.arraycopy(nestedClasses, 0, classInfo.nestedClassNames, 0, curIdx);\n }\n\n break;\n } else {\n curBufPos += attrLen;\n }\n }\n }",
"String getClassName();",
"String getClassName();",
"String getClassName();",
"private byte[] genClassData(String name) {\n\t\tif (data == null) {\n\t\t\tthrow new RuntimeException(\"You must initialize the data array\");\n\t\t}\n\t\tif (dataLength != data.length)\t// EXPECT COMPILE ERROR in javasrc\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\"data corrupt, \" + dataLength + \"!=\" + data.length);\n\t\tbyte[] bd = new byte[data.length];\n\t\tfor (int i=0; i<bd.length; i++)\n\t\t\tbd[i] = (byte)data[i];\n\t\treturn bd;\n\t}",
"public String getClassName () { return _className; }",
"private Class<V> getClassVO() throws ClassNotFoundException {\n Type superclass = this.getClass().getGenericSuperclass();\n\n if (superclass instanceof ParameterizedType) {\n ParameterizedType parameterizedType = (ParameterizedType) superclass;\n Type[] typeArguments = parameterizedType.getActualTypeArguments();\n\n if (typeArguments.length == 2) {\n Type typeVO = typeArguments[1];\n\n if (typeVO instanceof Class) {\n Class c = (Class) typeVO;\n String name = c.getName();\n\n return (Class<V>) Class.forName(name);\n }\n }\n }\n\n return null;\n }",
"com.google.protobuf.ByteString\n getClassNameBytes();",
"Integer[] getClasses() {\n\t\tArrayList<Integer> uniqueClasses = new ArrayList<Integer>();\n\t\tfor(ClassInfo c : preferences) {\n\t\t\tif (uniqueClasses.contains(c.getCourseID()) == false){\n\t\t\t\tuniqueClasses.add(c.getCourseID());\n\t\t\t}\n\t\t}\n\t\treturn uniqueClasses.toArray(new Integer[0]);\n\t}",
"private void readClasses(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t for (Class javaClass : SB_ClassMap.getBaseJavaClasses()) {\r\n\t addJavaClass(book, javaClass.getSimpleName(), javaClass.getName());\r\n\t }\r\n\t \r\n\t List<String> importedClasses = _dataModel.getJavaScript().getImportedJavaClasses();\r\n\t\tfor( String javaClassName : importedClasses) {\r\n\t\t\tString classPackage = javaClassName;\r\n\t\t\tString className = javaClassName.substring(javaClassName.lastIndexOf('.') + 1);\r\n\t\t\taddJavaClass(book, className, classPackage);\r\n\t }\r\n\t\t\r\n\t\t//Now that all classes read in, convert class descriptions\r\n\t\ttry\r\n\t\t{\r\n\t\t book.getUserClassMap().convertClassDescriptions(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex)\r\n\t\t{\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t}",
"public String getClassName() { return className; }",
"abstract String getClassName();",
"public Class getJavaClass() {\n return _class;\n }",
"char[] getSuperclassName();",
"public ClassType[] getArray(){\n\t\t\tClassType[] temp = new ClassType[count];\n\t\t\tfor (int i = 0; i < count; i++){\n\t\t\t\ttemp[i] = new ClassType(anArray[i]);\n\t\t\t}\n\t\t\treturn temp;\n\t\t}",
"public String getClazzName();",
"public abstract Class getDataClass();",
"byte[] createJCasCoverClass(TypeImpl type) {\n this.type = type;\n typeJavaDescriptor = type.getJavaDescriptor();\n typeJavaClassName = type.getName().replace('.', '/');\n cn = new ClassNode(ASM5); // java 8\n cn.version = JAVA_CLASS_VERSION;\n cn.access = ACC_PUBLIC + ACC_SUPER;\n cn.name = typeJavaClassName; \n cn.superName = type.getSuperType().getName().replace('.', '/');\n// cn.interfaces = typeImpl.getInterfaceNamesArray(); // TODO\n \n // add the \"_typeImpl\" field - this has a ref to the TypeImpl for this class\n cn.fields.add(new FieldNode(ACC_PUBLIC + ACC_FINAL + ACC_STATIC,\n \"_typeImpl\", \"Lorg/apache/uima/type_system/impl/TypeImpl;\", null, null));\n \n // add field declares, and getters and setters, and special getters/setters for array things \n type.getMergedStaticFeaturesIntroducedByThisType().stream()\n .forEach(this::addFeatureFieldGetSet);\n \n addStaticInitAndConstructors();\n \n createSwitchGettersAndSetters();\n \n \n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cn.accept(cw);\n return cw.toByteArray();\n }",
"public List<Classinfo> list() {\n\t\treturn null;\r\n\t}",
"@Override\n public List<Class> getAllUssdClasses(String packageName) {\n\n List<Class> commands = new ArrayList<Class>();\n List<String> classNames = new ArrayList<String>();\n\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(\n null, null, null);\n\n StandardLocation location = StandardLocation.CLASS_PATH;\n\n Set<JavaFileObject.Kind> kinds = new HashSet<>();\n kinds.add(JavaFileObject.Kind.CLASS);\n boolean recurse = false;\n Iterable<JavaFileObject> list = new ArrayList<>();\n try {\n list = fileManager.list(location, packageName,\n kinds, recurse);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n for (JavaFileObject javaFileObject : list) {\n String path = javaFileObject.toUri().getPath();\n String className = path.substring(path.lastIndexOf(\"/\") + 1, path.indexOf(\".\"));\n classNames.add(className);\n }\n\n for (String className : classNames) {\n Class klass = null;\n try {\n klass = Class.forName(packageName + \".\" + className);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n if (klass != null && klass.isAnnotationPresent(UssdService.class)) {\n commands.add(klass);\n }\n }\n return commands;\n }",
"Class<?>[] getHandledClasses();",
"public abstract List<String> scanAllClassNames();",
"String getResultClass();",
"@Override\r\n\tpublic void visitJavaClass(JavaClass javaClass) {\n\t\t\r\n\t\t\r\n\t\tvisitClassName=javaClass.getClassName();\r\n\t\t\r\n\t\t//log.debug(\"className:+\"+visitClassName);\r\n\t\tsuper.visitJavaClass(javaClass);\r\n\t\t\r\n\t}",
"west.twouse.language.sparqlas.Class getClass_();",
"public boolean getClassDebugInfo();",
"public String getRuntimeClass();",
"@Override\n\tpublic Class<?> getClassInfo() {\n\t\treturn RouteVO.class;\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tClass<?> class1 = null;\r\n Class<?> class2 = null;\r\n Class<?> class3 = null;\r\n // 一般采用这种形式\r\n try {\r\n\t\t\tclass1 = Class.forName(\"net.xsoftlab.baike.TestReflect\");\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n// class2 = new TestReflect().getClass();\r\n// class3 = TestReflect.class;\r\n System.out.println(\"类名称 \" + class1.getName());\r\n System.out.println(\"类名称 \" + class2.getName());\r\n System.out.println(\"类名称 \" + class3.getName());\r\n\r\n}",
"protected abstract Result createClasses( Outline outline, CClassInfo bean );",
"public List<IclassItem> getClasses() {\n if(projectData!=null){\n return projectData.getClasses();\n }\n return new ArrayList<IclassItem>();\n }",
"public static Class<?> wrapperArrayOf(Class<?> clazz) {\n String arrayClassName = getClassNameAfterWrapperArrayOf(clazz);\n try {\n return Class.forName(arrayClassName);\n } catch (ClassNotFoundException e) {\n // the new class must be found!\n throw new RuntimeException(e);\n }\n }",
"public interface AccessibleClassParser\n{\n /**\n * Parses a Java-loaded class object to an AccessibleClass\n * \n * @param clazz\n * the class to parse\n * @return the parsed AccessibleClass\n */\n AccessibleClass parseAccessibleClass(Class<?> clazz);\n\n /**\n * Check whever the provided class name is said to be primitive\n * (Primitive_Single) or not (Object_Single)\n * \n * @param className\n * the class name\n * @return true if the type is primitive, false otherwise\n * @deprecated @see {@link PrimitiveTypeUtil}\n */\n @Deprecated\n boolean isPrimitiveType(String className);\n\n /**\n * Give the setter method name according to the field name\n * \n * @param name\n * the filed name\n * @return the setter name\n */\n String attributeToSetter(String name);\n\n /**\n * Give the getter method name according to the field name\n * \n * @param name\n * the field name\n * @return the getter name\n */\n String attributeToGetter(String name);\n\n /**\n * Give the getter method name according to the field name for boolean\n * values (is*())\n * \n * @param name\n * the boolean field name\n * @return the getter name\n */\n String booleanAttributeToGetter(String arg0);\n}",
"protected Class getAClass (String className) throws ClassNotFoundException {\n int dot_index = className.lastIndexOf(\".\");\n if (dot_index == -1) { // native class or string\n if (className.equals (\"String\"))\n return String.class;\n else if (className.equals (\"int\"))\n return int.class;\n\t\t\telse if (className.equals (\"long\"))\n return long.class;\n else if (className.equals (\"boolean\"))\n return boolean.class;\n else if (className.equals (\"char\"))\n\t\t\t\treturn char.class;\n else if (className.equals (\"double\"))\n return double.class;\n else if (className.equals (\"Date\") || className.equals (\"Timestamp\"))\n return Class.forName(\"java.sql.Timestamp\");\n else // try native classes\n return Class.forName(\"java.lang.\" + className);\n }\n else { //use class loader\n return Class.forName(className);\n }\n }",
"@Override\n\tprotected Class<?> findClass(String name) throws ClassNotFoundException {\n\t\tFile file = new File(getSimpleName(name) + \".class\");\n FileInputStream fis = null;\n Class<?> clazz = null;\n try {\n fis = new FileInputStream(file);\n int content = 0;\n int i = 0;\n byte[] data = new byte[fis.available()];\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n data[i] = (byte) content;\n i++;\n }\n clazz = defineClass(name, data, 0, data.length);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n \t\tex.printStackTrace();\n \t}\n }\n return clazz;\n\t}",
"public String jniTypeName() {\n if (isCompoundTypeWrapper()) {\n // These are sent down as Buffers (e.g., jobject)\n return \"jobject\";\n }\n\n if (isArrayOfCompoundTypeWrappers()) {\n // These are returned as arrays of ByteBuffers (e.g., jobjectArray)\n return \"jobjectArray /* of ByteBuffer */\";\n }\n\n if (clazz == null) {\n return null;\n }\n\n if (isVoid()) {\n return \"void\";\n }\n\n if (isPrimitive()) {\n return \"j\" + clazz.getName();\n }\n\n if (isPrimitiveArray() || isNIOBuffer()) {\n // We now pass primitive arrays and buffers uniformly down to native code as java.lang.Object.\n return \"jobject\";\n }\n\n if (isArray()) {\n if (isStringArray()) {\n return \"jobjectArray /*elements are String*/\";\n }\n\n Class<?> componentType = clazz.getComponentType();\n\n if (isNIOBufferArray()) {\n return \"jobjectArray /*elements are \" + componentType.getName() + \"*/\";\n }\n\n if (componentType.isArray()) {\n // Type is array-of-arrays-of-something\n \n if (componentType.getComponentType().isPrimitive()) {\n // Type is an array-of-arrays-of-primitive \n return \"jobjectArray /* elements are \" + componentType.getComponentType() + \"[]*/\";\n //return \"jobjectArray\";\n } else {\n throw new RuntimeException(\"Multi-dimensional arrays of types that are not primitives or Strings are not supported.\"); \n }\n }\n\n // Some unusual type that we don't handle\n throw new RuntimeException(\"Unexpected and unsupported array type: \\\"\" + this + \"\\\"\");\n }\n\n if (isString()) {\n return \"jstring\";\n }\n\n return \"jobject\";\n }",
"public List<String> getClassList() {\n return classlist;\n }",
"private Class isPrimitive(String className) {\n Class result = null;\n switch (className) {\n case (\"Byte\"):\n case (\"byte\"):\n result = Byte.class;\n break;\n\n case (\"Short\"):\n case (\"short\"):\n result = Short.class;\n break;\n\n case (\"Integer\"):\n case (\"int\"):\n result = Integer.class;\n break;\n\n case (\"Long\"):\n case (\"long\"):\n result = Long.class;\n break;\n\n case (\"Float\"):\n case (\"float\"):\n result = Float.class;\n break;\n\n case (\"Double\"):\n case (\"double\"):\n result = Double.class;\n break;\n\n case (\"Boolean\"):\n case (\"boolean\"):\n result = Boolean.class;\n break;\n\n case (\"Character\"):\n case (\"char\"):\n result = Character.class;\n break;\n case(\"String\"):\n result = String.class;\n break;\n\n }\n return result;\n }",
"private static void getClassInformation(Class clazz) {\n System.out.println(\"Class - \" + clazz.getName());\n\n Class[] interfaces = clazz.getInterfaces();\n if (interfaces.length != 0) {\n System.out.println(\"Class impliments interfaces: \");\n printArray(interfaces);\n } else {\n System.out.println(\"No impliments interfaces.\");\n }\n\n Field[] declaredFields = clazz.getDeclaredFields();\n if (declaredFields.length != 0) {\n System.out.println(\"Class fields: \");\n for (Field declaredField : declaredFields) {\n if (declaredField.getType().isAssignableFrom(String.class)) {\n try {\n declaredField.setAccessible(true);\n if (declaredField.getName().equals(declaredField.get(clazz))) {\n System.out.println(\" \" + declaredField + \" - name matches the argument!\");\n } else {\n System.out.println(\" \" + declaredField + \", \");\n }\n\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n } else {\n System.out.println(\" \" + declaredField + \", \");\n }\n }\n } else {\n System.out.println(\"No fields.\");\n }\n\n Constructor[] constructors = clazz.getConstructors();\n if (constructors.length != 0) {\n System.out.println(\"Class constructors: \");\n printArray(constructors);\n } else {\n System.out.println(\"No costructors.\");\n }\n\n Method[] declaredMethods = clazz.getDeclaredMethods();\n if (declaredMethods.length != 0) {\n System.out.println(\"Class methods: \");\n for (Method declaredMethod : declaredMethods) {\n if (isGetter(declaredMethod)) System.out.println(\" getter: \" + declaredMethod);\n else if (isSetter(declaredMethod)) System.out.println(\" setter: \" + declaredMethod);\n else {\n System.out.println(\" \" + declaredMethod + \", \");\n }\n }\n } else {\n System.out.println(\"No methods.\");\n }\n }",
"String getClazz();",
"List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }"
] | [
"0.62943935",
"0.61880624",
"0.61620605",
"0.6030202",
"0.6007533",
"0.6007533",
"0.5991307",
"0.5991307",
"0.59827733",
"0.59671485",
"0.5925448",
"0.5915495",
"0.58549976",
"0.58417517",
"0.58403",
"0.5829471",
"0.58077997",
"0.5757426",
"0.5739941",
"0.5739941",
"0.57240516",
"0.5698213",
"0.56900907",
"0.56604916",
"0.5654024",
"0.5648409",
"0.5647734",
"0.5642884",
"0.5638212",
"0.5614834",
"0.5613591",
"0.5610071",
"0.56066114",
"0.5600056",
"0.559166",
"0.55914706",
"0.5560305",
"0.5553387",
"0.55496144",
"0.55457675",
"0.55260336",
"0.5475473",
"0.547241",
"0.5455589",
"0.5421249",
"0.5409106",
"0.5407615",
"0.5407615",
"0.54075795",
"0.54018927",
"0.5400595",
"0.5400499",
"0.5394405",
"0.5380528",
"0.5366812",
"0.535639",
"0.5349848",
"0.53495747",
"0.53464746",
"0.5338283",
"0.5325491",
"0.5321189",
"0.5321189",
"0.5321189",
"0.53120923",
"0.52996224",
"0.5298981",
"0.5294496",
"0.52924323",
"0.5281672",
"0.528159",
"0.52690995",
"0.5266658",
"0.5264909",
"0.52648807",
"0.5263789",
"0.52624446",
"0.52618146",
"0.5260887",
"0.5258608",
"0.5256157",
"0.52531487",
"0.5247232",
"0.5245879",
"0.5241607",
"0.5231455",
"0.52286947",
"0.5222673",
"0.52209806",
"0.52188784",
"0.5214356",
"0.52070355",
"0.5200113",
"0.5199645",
"0.519024",
"0.5189041",
"0.518606",
"0.51764625",
"0.515973",
"0.51493484",
"0.5148684"
] | 0.0 | -1 |
display detail info if is an array object | static String getObjectInfo(Object o_, String prefix_)
{
if (!(o_ instanceof Object[]))
return prefix_ + drcl.util.StringUtil.toString(o_) + "\n";
Object[] oo_ = (Object[])o_;
StringBuffer sb_ = new StringBuffer(prefix_ + o_.getClass().getName()
+ " of length " + oo_.length + "\n");
for (int i=0; i<oo_.length; i++) {
sb_.append(getObjectInfo(oo_[i], prefix_ + " "));
}
return sb_.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDetailInfo(Object ... obj) {\n\t\treturn null;\n\t}",
"@Override\n public String toString() {\n return detail;\n }",
"public String getDetail()\n {\n return detail;\n }",
"public String getDetail() {\r\n return detail;\r\n }",
"public String getDetail() {\r\n return detail;\r\n }",
"@Override\n\tpublic void getDetail() {\n\t\t\n\t}",
"public String getDetail() {\n return detail;\n }",
"public String getDetail() {\n return detail;\n }",
"public String getDetail() {\n return detail;\n }",
"public String getDetail() {\n return detail;\n }",
"public String wantDetail();",
"void printArray(CatalogueItem arr[])\r\n {\r\n int n = arr.length;\r\n for (int i=0; i<n; ++i)\r\n System.out.print(\r\n \"id: \" + arr[i].getItemId() + \" \"\r\n + \"name: \" + arr[i].getItemName() + \" \"\r\n + \"category: \" + arr[i].getCategory() + \"\\n\");\r\n System.out.println();\r\n System.out.println();\r\n }",
"Object getViewDetails();",
"public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }",
"public void display()\r\n\t{\r\n\t\tif(this.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Empty... nothing to display\");\r\n\t\t}else\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The Array: \");\t\r\n\t\tfor (int i =0; i<bookArray.length; i++)\r\n\t\t{\r\n\t\t\tif(bookArray[i]!=null)\r\n\t\t\t\tSystem.out.println(\"\\t\"+'\"'+bookArray[i]+'\"');\r\n\t\t}\r\n\t }\r\n\t}",
"public static boolean isArray_infos_type() {\n return false;\n }",
"public byte[] getDetail() {\r\n return detail;\r\n }",
"static void show(String info, Object[] a) {\n System.out.print(info + \": \");\n show(a);\n }",
"void displayData(SchoolDetailResponse schoolDetailResponse);",
"public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}",
"@Override\n public String getRecordDetail() {\n return \"[\" + type + \"] \"\n + \"[\" + people + \" pax] \"\n + \"[\" + \"Total: $\" + amount + \"] \"\n + \"[\" + amountToMoney() + \" per person] \"\n + nameList;\n }",
"public abstract String showDetails();",
"public void displayRecords() {\n\t\tSystem.out.println(\"****Display Records****\");\n\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tif (details[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(details[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"void displayDetails(String title, String description);",
"public String[] getDetails() {\n\t\treturn details;\n\t}",
"@Override\n\tpublic Object getDetails() {\n\t\treturn details;\n\t}",
"private void showArray() {\n\t\tSystem.out.println(Arrays.toString(this.array));\n\n\t}",
"public void setDetail(String detail) {\n this.detail = detail;\n }",
"public static void show(Student[] student){\n for(int i=0;i<student.length;i++){\n System.out.printf(\"First Name: %s Last Name: %s Gender: %s Student ID: %d GPA: %,.2f Department: %s Midterm Grade: %d Final Grade: %d %n\",student[i].getFirstName(),student[i].getLastName(),student[i].getGender(),student[i].getStudentID(),student[i].getGPA(),student[i].getDepartment(),student[i].getExamGrade().getMidtermExamGrade(),student[i].getExamGrade().getFinalExamGrade());\n }\n }",
"public void setDetail(String detail) {\r\n this.detail = detail;\r\n }",
"public static boolean isArray_infos_metadata() {\n return true;\n }",
"public void setDetail(String detail) {\n this.detail = detail;\n }",
"public void setDetail(String detail) {\n this.detail = detail;\n }",
"public void setDetail(String detail) {\n this.detail = detail;\n }",
"public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}",
"@Override\n\tpublic void showPatientDetails() {\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"S.No Patient's name ID Mobile Age\");\n\t\tfor (int i = 1; i <= UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i - 1);\n\t\t\tSystem.out.print(\" \" + i + \" \" + jsnobj.get(\"Patient's name\") + \" \" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t+ \" \" + jsnobj.get(\"Mobile\") + \" \" + jsnobj.get(\"Age\") + \"\\n\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public String getDetails() {\n return toString();\n }",
"@Override\n\tpublic void showDetails(Manufacturer entity) {\n\n\t}",
"public void getDetail(int id) {\n\t\t\n\t}",
"private static void show(Comparable[] a) {\n for (int i = 0; i < a.length; i++) {\n System.out.printf(\"a[%d] = %s\\n\", i + 1, a[i].toString());\n }\n System.out.println();\n }",
"public String getAnotherDetail();",
"void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}",
"public void displayInformationObject(DataRecorderMessage infoObject) throws InvalidViewerMessageException;",
"public static String display(Object obj) throws JspTagException {\n if (obj == null) return \"\"; \n if (obj instanceof String) return obj.toString();\n /*\n if (obj instanceof Collection) {\n return \"FIXME\";\n }\n if (obj instanceof Map) {\n return \"FIXME\";\n } \n if (obj instanceof Iterator) {\n Iterator iter = (Iterator)obj;\n while (iter.hasNext()) {\n iter.next();\n }\n return \"FIXME\";\n } \n if (obj instanceof Enumeration) {\n Enumeration enum = (Enumeration)obj;\n while (enum.hasMoreElements()) {\n enum.nextElement();\n }\n return \"FIXME\";\n }\n */\n try {\n StringBuffer buf = new StringBuffer();\n int count = Array.getLength(obj);\n for (int i=0; i<count; i++) {\n buf.append(Array.get(obj, i).toString());\n if (i<count-1) buf.append(\"<font color='red'> • </font>\");\n }\n return buf.toString();\n } catch (IllegalArgumentException ex) {}\n throw new JspTagException(\"Bad Item\"); \n }",
"public abstract void displayInfo();",
"public void showInfo() {\n\t\tfor (String key : list.keySet()) {\n\t\t\tSystem.out.println(\"\\tID: \" + key + list.get(key).toString());\n\t\t}\n\t}",
"public String showDetails() {\n\t\treturn \"Person Name is : \" + name + \"\\n\" + \"Person Address is : \" + address;\n\t}",
"private static void Display(Cars[] arr) {\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\n\t\t}\n\t}",
"java.lang.String getDetails();",
"private void displayContactDetails() {\n System.out.println(\"displaying contact details :\");\n for (int i = 0; i < contactList.size(); i++) {\n System.out.println(\"contact no\" + (i + 1));\n Contact con = contactList.get(i);\n System.out.println(\"first name is :\" + con.getFirstName());\n\n System.out.println(\" last name is :\" + con.getLastName());\n\n System.out.println(\" address is :\" + con.getAddress());\n\n System.out.println(\" city name is :\" + con.getCity());\n\n System.out.println(\" state name is :\" + con.getState());\n\n System.out.println(\" zip code is :\" + con.getZip());\n\n System.out.println(\" phone number is :\" + con.getPhone());\n\n System.out.println(\" email address is :\" + con.getEmail());\n }\n }",
"public void showInfo(){\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tthis.cd.get(i).showInfo();\n\t\t}\n\t\tSystem.out.println(\"\\tToatl amount: \" + calTotalAmount());\n\t}",
"protected static void show(Comparable[] a) {\n\t\t\r\n\t\tString retStr = \"\";\r\n\t\tfor(int i=0 ; i< a.length; i++)\r\n\t\t\tretStr+=\" \"+a[i];\r\n\t\t\r\n\t\tSystem.out.println(retStr);\r\n\t\t\r\n\t}",
"public void printDetails() {\n PrintFormatter pf = new PrintFormatter();\n\n String first = \"############# Armor Details #############\";\n System.out.println(first);\n pf.formatText(first.length(), \"# Items stats for: \" + name);\n pf.formatText(first.length(), \"# Armor Type: \" + itemsType);\n pf.formatText(first.length(), \"# Slot: \" + slot);\n pf.formatText(first.length(), \"# Armor level: \" + level);\n\n if (baseStats.getHealth() > 0)\n pf.formatText(first.length(), \"# Bonus HP: \" + baseStats.getHealth());\n\n if (baseStats.getStrength() > 0)\n pf.formatText(first.length(), \"# Bonus Str: \" + baseStats.getStrength());\n\n if (baseStats.getDexterity() > 0)\n pf.formatText(first.length(), \"# Bonus Dex: \" + baseStats.getDexterity());\n\n if (baseStats.getIntelligence() > 0)\n pf.formatText(first.length(), \"# Bonus Int: \" + baseStats.getIntelligence());\n\n System.out.println(\"########################################\");\n\n }",
"abstract String getDetails();",
"public void showInfo(A a) {\n System.out.println(a.toString());\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"\\nContents of SimpleArray:\\n\" + Arrays.toString(array);\n\t}",
"@Override\r\n\tpublic String detail() {\n\t\tSystem.out.println(\"detailView.\");\r\n\t\t//javax.servlet.http.HttpSession session=request.getSession();\r\n\t\t//javax.servlet.ServletContext application=request.getServletContext();\r\n\t\t\r\n\t\t//String vId=request.getParameter(\"id\");\r\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine bean=headLineService.load(iId);\r\n\t\t\tif(bean!=null) {\r\n\t\t\t\trequest.put(\"bean\", bean);\r\n\t\t\t\treturn \"detail\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"detail\";\r\n\t}",
"public String displayDetails()\n\t{\n\t\tString displayDetail = \"\";\n\t\t \n\t\tdisplayDetail = (\"Make of your System\\t\\t=>\\t\" + make + \n\t\t\t\t\t\t\"\\nModel of your System\\t\\t=>\\t\" + model + \n\t\t\t\t\t\t\"\\nSpeed of your System\\t\\t=>\\t\" + speed + \n\t\t\t\t\t\t\"\\nMemory of your System\\t\\t=>\\t\" + memorySize + \" MB \" +\n\t\t\t\t\t\t\"\\nHard Disk of your System\\t=>\\t\" + hardDiskSize + \" GB \" +\n\t\t\t\t\t\t\"\\nPurchase Cost of your System\\t=>\\t\" + purchaseCost);\n\t\t\n\t\treturn displayDetail;\n\t}",
"@Override\n public String toString() {\n return info();\n }",
"public com.huazhu.hvip.thirdparty.entity.axis.reservation.EntityResDetail[] getListDetail() {\n return listDetail;\n }",
"private void printInfo()\n {\n if(currentRoom.getItems().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Items in room are: \" );\n ArrayList<Item> items = currentRoom.getItems();\n \n for(Item i : items)\n {\n System.out.println(i.getItemName() + i.getDescription()); \n }\n \n }\n \n \n \n if(currentRoom.getWeapons().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Weapons in room are: \" );\n \n ArrayList<Weapon> weapons = currentRoom.getWeapons();\n for(Weapon w : weapons)\n {\n System.out.println(w.getWeaponName() + w.getDescription());\n }\n \n }\n \n \n }",
"public void setDetail(byte[] detail) {\r\n this.detail = detail;\r\n }",
"public String getDetails() {\n return details;\n }",
"public boolean showDetails() {\n return showDetails;\n }",
"public String getDetails() {\n return this.details;\n }",
"public static void main(String[] args) {\n\n ArrayPractice[] ar= new ArrayPractice[1];\n ar[0]=new ArrayPractice(99,\"vivek\",\"prodct\");\n for (Object o:ar) {\n ar[0].employeeInfo();\n\n }\n\n\n\n// int[][] arr = {{2, 3}, {2, 5}, {2, 34}, {2, 5}};\n//\n//\n// for (int[] temp : arr) {\n// for (int n : temp) {\n// System.out.println(n);\n// }\n//\n// }\n// int[][] arrr = new int[4][4];\n// System.out.println(arrr[0].length);\n// String[] name = {\"Vivek\", \"Atin\"};\n//\n// greet(\"Vivek\", \"Atin\");\n// }\n// public static void greet(String... name) {\n// for(String n:name){\n// System.out.println(\"hello\"+n);\n// }\n\n\n\n\n// }\n// public class student{\n// String name;\n// Int id;\n// Int age;\n// String major;\n// float gpa;\n// public void studenDetails(){\n// studenDetails=new studentDetails();\n\n\n }",
"public void showDetails(){\r\n\t\tSystem.out.println(\"Length is : \"+getLength());\r\n\t\tSystem.out.println(\"Width is : \"+getWidth());\r\n\t\tSystem.out.println(\"Area Of Rectangle is : \"+area());\r\n\t}",
"private static void show(Comparable[] a) {\n for (Comparable a1 : a)\n System.out.print(a1 + \" \");\n\n System.out.println();\n }",
"@Override\n public Object getDetails() {\n return null;\n }",
"public String getDetailed() {\r\n return detailed;\r\n }",
"public void print(){\r\n\t\tint ListLength = this.promo.size();\r\n\t\tSystem.out.println(\"Type: \"+this.Type);\r\n\t\tSystem.out.println(\"Name: \"+this.name);\r\n\t\tSystem.out.println(\"Description: \"+this.description);\r\n\t\tSystem.out.printf(\"$%.2f\\n\", this.price);\r\n\t\tSystem.out.println(\"Featured dishes:\");\r\n\t\tfor (int i =0; i<ListLength; i++){\r\n\t\t\tSystem.out.print(\"\\t\"+(i+1) + \". \");\r\n\t\t\tSystem.out.println(this.promo.get(i).getName()); //print name of ala-carte item in promo array\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"private void displayArrays(ArrayList list){}",
"public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}",
"public static void displayArray(Horse[] arr)\n {\n for (Horse item : arr)\n {\n if (item == null)\n System.out.print(\"null \");\n else\n System.out.print(item.getName() + \" \");\n }\n System.out.println();\n }",
"private void showImageDetail() {\n }",
"public static boolean isArray_infos_size_data() {\n return false;\n }",
"private void display(Object a) {\r\n System.out.print(a.toString());\t\r\n }",
"public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}",
"public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }",
"void describeProducersInfo(JsonArrayBuilder objs) throws Exception;",
"public static <E> void showArrayList(ArrayList<E> arr)\n {\n System.out.println(\"...........................................\");\n\n for (int i = 0; i < arr.size(); i++)\n {\n System.out.format(\"\\nElement #%d = [%s]%n\", i, arr.get(i).toString());\n } //for\n\n System.out.println();\n\n\n }",
"public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }",
"public Object getDetails() {\n return null;\n }",
"public void displayFirst() {\r\n\t\tSystem.out.println(\"The first in Array: \" +this.bookArray[0]);\r\n\t\t\r\n\t\t}",
"public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }",
"public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }",
"public void printDetails()\n {\n super.printDetails();\n System.out.println(\"Body type: \" + bodyType + \" Number of doors: \" + noOfDoors + \" Number of seats: \" + noOfSeats);\n System.out.println();\n }",
"private static <T> void show(Comparable<T>[] a) {\n\t\tfor(int i=0; i<a.length; i++) \r\n\t\t\tSystem.out.print(a[i] + \" \");\r\n\t\tSystem.out.println();\r\n\t}",
"@Override\n\tpublic Iphone detail(Iphone iphone) {\n\t\treturn null;\n\t}",
"public static void main(String[] args) {\n \n Account obj[] = new Account[2] ;\n obj[0] = new Account(5,10);\n obj[1] = new Account(6,15);\n \n System.out.println(\"For Array Element 0\");\n obj[0].showData();\n\n System.out.println(\"For Array Element 1\");\n obj[1].showData();\n }",
"public static <T extends Comparable<? super T>> void show(T[] a) {\n for (int i = 0; i < a.length; i++)\n System.out.print(a[i] + \" \");\n System.out.println();\n }",
"@Override\n\tpublic String[][] getResultDetail(String id) {\n\t\treturn null;\n\t}",
"public void hideDetails () {\n\t\tdetailDisplay.show(\"empty\");\n\t}",
"public static void show(Comparable[] a) {\n StringBuilder s= new StringBuilder();\n s.append(\"[\");\n for (int i = 0; i < a.length-1; i++) {\n s.append(a[i] + \", \");\n }\n s.append(a[a.length-1] + \"]\\n\");\n System.out.println(s.toString());\n }",
"@Override\n\t//for log purposes only\n\tpublic String toString() {\n\t\treturn \"[\" + id + \", \" + business_id + \", \" + \"image\" + \", \" + details\n\t\t\t\t+\",\"+ category +\",\"+ price + \"]\";\n\t}",
"public static boolean isArray_infos_noise() {\n return true;\n }",
"@Override\n public void showInfo() {\n System.out.println(\"Garage {\");\n System.out.println(\"\\tGarage is \" + (isBig ? \"big\" : \"small\"));\n int i = 0;\n for (T car : carsInGarage) {\n System.out.println(\"\\tCar №\" + i + \": \" + car.getShortInfo());\n i++;\n }\n System.out.println(\"}\");\n }",
"public String getDetails() {\n\t\treturn details;\n\t}",
"public String getDetails() {\n\t\treturn details;\n\t}",
"public String getDetails() {\n if(details == null)\n return \"\";\n else return details;\n }",
"final String [] getPersonalInfo(Object value) {\n int countInfo = 3; //Cound of the personal information fields\n String toString [] = new String[countInfo];\n //Extract some information\n toString[0] = (String) ((AbstractPerson) value).getFirstName();\n toString[1] = (String) ((AbstractPerson) value).getLastName();\n toString[2] = (String) ((AbstractPerson) value).getEmail();\n return toString;\n }"
] | [
"0.6771041",
"0.66763866",
"0.64535505",
"0.6450324",
"0.6450324",
"0.6446504",
"0.6416611",
"0.6416611",
"0.6416611",
"0.6416611",
"0.63843954",
"0.6364362",
"0.6109446",
"0.61056054",
"0.6084386",
"0.6068853",
"0.6058066",
"0.6048963",
"0.6020425",
"0.6019132",
"0.60142046",
"0.60026735",
"0.5961332",
"0.5958897",
"0.59304243",
"0.59125787",
"0.58851725",
"0.588502",
"0.5881387",
"0.5874464",
"0.5870465",
"0.5867898",
"0.5867898",
"0.5867898",
"0.584898",
"0.584216",
"0.58145523",
"0.57994515",
"0.57705516",
"0.5759095",
"0.5758326",
"0.57508194",
"0.57351553",
"0.57351404",
"0.57171816",
"0.5715371",
"0.5700172",
"0.5689567",
"0.56719667",
"0.5670919",
"0.56560296",
"0.5621245",
"0.5612636",
"0.5606547",
"0.560106",
"0.55806303",
"0.5572191",
"0.5546507",
"0.55432284",
"0.5541789",
"0.551374",
"0.5511475",
"0.5504778",
"0.5503062",
"0.55012655",
"0.5501083",
"0.54927623",
"0.549053",
"0.5487349",
"0.5459235",
"0.54580474",
"0.5456068",
"0.54527146",
"0.54492193",
"0.54484403",
"0.54443675",
"0.5443221",
"0.544031",
"0.54381037",
"0.5438077",
"0.5434295",
"0.54293346",
"0.5427644",
"0.54179245",
"0.54140073",
"0.5410057",
"0.5409159",
"0.539728",
"0.5392489",
"0.5389161",
"0.5385701",
"0.5384383",
"0.5379348",
"0.5379002",
"0.5377441",
"0.537734",
"0.53773016",
"0.53760916",
"0.53760916",
"0.53737336",
"0.5372741"
] | 0.0 | -1 |
get names of all enabled flags | static void _printAllFlagNames(Object c_, StringBuffer sb_,
StringBuffer sb2_)
{
if (c_ instanceof Component) {
if (htComponentFlags == null) {
htComponentFlags = new Hashtable();
htComponentFlags.put("Enabled", htComponentFlags);
htComponentFlags.put("Garbage", htComponentFlags);
htComponentFlags.put("GarbageDisplay", htComponentFlags);
htComponentFlags.put("Trace", htComponentFlags);
htComponentFlags.put("Debug", htComponentFlags);
htComponentFlags.put("EventExport", htComponentFlags);
htComponentFlags.put("ErrorNotice", htComponentFlags);
}
}
else if (c_ instanceof Port) {
if (htPortFlags == null) {
htPortFlags = new Hashtable();
htPortFlags.put("EventExport", htPortFlags);
htPortFlags.put("SendTrace", htPortFlags);
htPortFlags.put("DataTrace", htPortFlags);
}
}
PropertyDescriptor[] pds_ =
drcl.comp.Util.getAllPropertyDescriptors(c_);
if (pds_ == null) return;
Vector v_ = new Vector();
for (int i=0; i<pds_.length; i++) {
PropertyDescriptor pd_ = pds_[i];
if (pd_.getWriteMethod() == null) continue;
Method read_ = pd_.getReadMethod();
String name_ = pd_.getDisplayName();
if (read_ == null) continue;
if (!name_.endsWith("Enabled")) continue;
name_ = name_.substring(0,1).toUpperCase() + name_.substring(1);
if (!read_.getName().equals("is" + name_)) continue;
if (!read_.getReturnType().equals(boolean.class)) continue;
if (!name_.equals("Enabled"))
name_ = name_.substring(0, name_.length()-7);
if (c_ instanceof Component && htComponentFlags.containsKey(name_)
|| c_ instanceof Port && htPortFlags.containsKey(name_))
continue;
try {
if (((Boolean)read_.invoke(c_, null)).booleanValue())
sb_.append(name_ + " ");
else if (sb2_ != null)
sb2_.append(name_ + " ");
}
catch (Exception e_)
{}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<E> getActiveFlags();",
"public String getFlags() {\r\n \t\treturn flags;\r\n \t}",
"java.lang.String getEnabled();",
"public int getFlags();",
"public int getFlags();",
"com.google.protobuf.ByteString\n getEnabledBytes();",
"@Override\n public Set<String> getNames() {\n // TODO(adonovan): for now, the resolver treats all predeclared/universe\n // and global names as one bucket (Scope.PREDECLARED). Fix that.\n // TODO(adonovan): opt: change the resolver to request names on\n // demand to avoid all this set copying.\n HashSet<String> names = new HashSet<>();\n for (Map.Entry<String, Object> bind : getTransitiveBindings().entrySet()) {\n if (bind.getValue() instanceof FlagGuardedValue) {\n continue; // disabled\n }\n names.add(bind.getKey());\n }\n return names;\n }",
"public String[] getCommandFlags() throws BuildException;",
"public static int collectDefaults()\n/* */ {\n/* 131 */ int flags = 0;\n/* 132 */ for (Feature f : values()) {\n/* 133 */ if (f.enabledByDefault()) flags |= f.getMask();\n/* */ }\n/* 135 */ return flags;\n/* */ }",
"@Nullable\n public Set<NameFlag> getFlags() {\n return flags;\n }",
"public static synchronized String[] getModeNames() {\n\n\tString names[] = new String[registryModes.size()];\n\n\tint i = 0;\n\n for (Enumeration e = registryModes.keys(); e.hasMoreElements();) {\n CaselessStringKey key = (CaselessStringKey)e.nextElement();\n\n\t names[i++] = key.getName();\n\t}\n\n\tif (i <= 0)\n\t return null;\n\n\treturn names;\n }",
"public List<String> getAllEnabledCourierCode();",
"protected Set<String> getEnablementParameterNames() {\n return _enablementParameters.keySet();\n }",
"long getFlags();",
"public byte[] getFlags() {\n return flags;\n }",
"public String getToolFlags() throws BuildException ;",
"public java.lang.String getReservedFlags() {\n return reservedFlags;\n }",
"boolean hasFlags();",
"String[] getManagedAdditionalStates();",
"public java.lang.String getEnabled() {\n java.lang.Object ref = enabled_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n enabled_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEnabled() {\n java.lang.Object ref = enabled_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n enabled_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getEnabledBytes() {\n java.lang.Object ref = enabled_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n enabled_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getEnableFlag() {\n\t\treturn enableFlag;\n\t}",
"public com.google.protobuf.ByteString\n getEnabledBytes() {\n java.lang.Object ref = enabled_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n enabled_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"String getMiscModesString();",
"public List<String> getOptionsNames();",
"public static synchronized String[] getModeNames(Class descriptorClass) {\n\n\tString names[] = new String[registryModes.size()];\n\n\tint i = 0;\n\n for (Enumeration e = registryModes.elements(); e.hasMoreElements();) {\n RegistryMode mode = (RegistryMode)e.nextElement();\n\n\t if (mode.getDescriptorClass() == descriptorClass)\n\t\tnames[i++] = mode.getName();\n\t}\n\n\tif (i <= 0)\n\t return null;\n\n\tString matchedNames[] = new String[i];\n\n\tfor (int j = 0; j < i; j++)\n\t matchedNames[j] = names[j];\n\n\treturn matchedNames;\n }",
"public ArrayList<Flag> getFlags()\r\n {\r\n\tif(flags.isEmpty()) {\r\n\t flags.add(Flag.NONE);\r\n\t}\r\n\treturn new ArrayList<Flag>(flags);\r\n }",
"public long getFlags() {\n }",
"boolean hasEnabled();",
"public String[] getStatusVariableNames();",
"public abstract int flags();",
"public int[] enabledEvents() {\n boolean[] userRecordableEvts0 = userRecordableEvts;\n\n int[] enabledEvts = new int[len];\n int enabledEvtsLen = 0;\n\n for (int type = 0; type < len; type++) {\n if (userRecordableEvts0[type])\n enabledEvts[enabledEvtsLen++] = type;\n }\n\n return U.unique(enabledEvts, enabledEvtsLen, inclEvtTypes, inclEvtTypes.length);\n }",
"public static String[] names() {\n return ListableValuesHelper.names(LogicalFragmentBenchmarked.values());\n }",
"boolean getEnabled();",
"boolean getEnabled();",
"boolean getEnabled();",
"EnumSet<ViewExecutionFlags> getFlags();",
"public int getFlags() {\n return flags;\n }",
"public static int collectDefaults()\n {\n int flags = 0;\n for (JsonWriteFeature f : values()) {\n if (f.enabledByDefault()) {\n flags |= f.getMask();\n }\n }\n return flags;\n }",
"public static Collection<FieldAccessFlag> getFlags()\n\t{\n\t\treturn Lists.newArrayList(PUBLIC, PRIVATE, PROTECTED, STATIC, FINAL, VOLATILE, TRANSIENT, ENUM,\n\t\t\tSYNTHETIC);\n\t}",
"public String getEnabled() {\r\n\t\treturn enabled;\r\n\t}",
"private ArrayList<String> getCheckboxes() {\n ArrayList<CheckBox> checkBoxes = new ArrayList<>();\n String[] names = {\"PNEU\",\"OIL\",\"BATTERY\",\"AC\",\"WIPER\",\"COMPLETE\",\"GEOMETRY\"}; //LINK NA DB ?\n checkBoxes.addAll(Arrays.asList(pneuCB, oilCB, batCB, acCB, wipCB, comCB, geoCB));\n ArrayList<String> result = new ArrayList<>();\n for (int i = 0; i < checkBoxes.size(); i++) {\n if(checkBoxes.get(i).isSelected()){\n result.add(names[i]);\n }\n }\n return result;\n }",
"IntsRef getFlags();",
"public String[] getOpenDialogueFilterNames();",
"private Set<Glyph> retrieveFlags ()\r\n {\r\n Set<Glyph> foundFlags = new HashSet<>();\r\n\r\n for (Glyph glyph : getSystem().getInfo().getGlyphs()) {\r\n Shape shape = glyph.getShape();\r\n\r\n if (ShapeSet.Flags.contains(shape)) {\r\n if (glyph.getTranslations().contains(this)) {\r\n foundFlags.add(glyph);\r\n }\r\n }\r\n }\r\n\r\n return foundFlags;\r\n }",
"public synchronized Iterator<String> getAllOptions() {\n\t\tSet<String> names = optionTable.keySet();\n\t\tIterator<String> itr = names.iterator();\n\t\treturn itr;\n\t}",
"@Input\n public List<String> getNativeLibrariesAndDexPackagingModeNames() {\n ImmutableList.Builder<String> listBuilder = ImmutableList.builder();\n getManifests()\n .get()\n .getAsFileTree()\n .getFiles()\n .forEach(\n manifest -> {\n if (manifest.isFile()\n && manifest.getName()\n .equals(SdkConstants.ANDROID_MANIFEST_XML)) {\n ManifestAttributeSupplier parser =\n new DefaultManifestParser(manifest, () -> true, true, null);\n String nativeLibsPackagingMode =\n PackagingUtils.getNativeLibrariesLibrariesPackagingMode(\n parser.getExtractNativeLibs())\n .toString();\n listBuilder.add(nativeLibsPackagingMode);\n String dexPackagingMode =\n PackagingUtils\n .getDexPackagingMode(\n parser.getUseEmbeddedDex(),\n getDexUseLegacyPackaging().get())\n .toString();\n listBuilder.add(dexPackagingMode);\n }\n });\n return listBuilder.build();\n }",
"int getAuthAccountFlags();",
"Set<String> listCapabilities();",
"Set<String> getRunModes();",
"public static String supportedFeatures() {\n\t\tStringBuilder buf = new StringBuilder(\"Filesystem features: \");\n\n\t\tClass<Feature> c = Feature.class;\n\t\tfor (Method m : c.getDeclaredMethods()) {\n\t\t\tint mod = m.getModifiers();\n\t\t\tString name = m.getName();\n\n\t\t\tif (!name.equals(\"supportedFeatures\") && Modifier.isStatic(mod) && Modifier.isPublic(mod)) {\n\t\t\t\ttry {\n\t\t\t\t\tboolean ret = (Boolean)m.invoke(null);\n\t\t\t\t\tif (ret) {\n\t\t\t\t\t\tbuf.append(m.getName());\n\t\t\t\t\t\tbuf.append(\" \");\n\t\t\t\t\t}\n\t\t\t\t} catch (IllegalArgumentException ignored) {\n\t\t\t\t} catch (IllegalAccessException ignored) {\n\t\t\t\t} catch (InvocationTargetException ignored) {\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tbuf.append(\"\\n\");\n\t\treturn buf.toString();\n\t}",
"public boolean[] getBooleanList();",
"public abstract List<MODE> getModes();",
"@Override\n public String[] getOptions() {\n\n Vector<String> result = new Vector<String>();\n\n Collections.addAll(result, super.getOptions());\n\n result.add(\"-a\");\n result.add(\"\" + getNumAttributes());\n\n if (getClassFlag()) {\n result.add(\"-c\");\n }\n\n return result.toArray(new String[result.size()]);\n }",
"public List<S> getAvailableStates();",
"protected List getAllowableCheckinModes() throws DfException\r\n {\n IDfSessionManager smgr = this.getSessionManager();\r\n /*-dbg-*/Lg.dbg(\"getting app config\");\r\n String docbase = this.getSession().getDocbaseName();\r\n /*-dbg-*/Lg.dbg(\"get doctype/appname\");\r\n String doctype = this.getTypeName();\r\n /*-dbg-*/Lg.dbg(\"doc type: %s\",doctype);\r\n String appname = this.getString(\"m_application\");\r\n /*-dbg-*/Lg.dbg(\"app name: %s\",appname);\r\n MdtConfigService cs = MdtConfigService.getConfigService(smgr, docbase);\r\n /*-dbg-*/Lg.dbg(\"get lcname\");\r\n String lcname = this.getPolicyName();\r\n /*-dbg-*/Lg.dbg(\" --lc: %s\",lcname);\r\n /*-dbg-*/Lg.dbg(\"get state\");\r\n String statename = this.getCurrentStateName();\r\n /*-dbg-*/Lg.dbg(\" --state: %s\",statename);\r\n \r\n /*-dbg-*/Lg.dbg(\"get app's configuration from ConfigService\");\r\n Map config = (Map)cs.getAppConfig(appname);\r\n try { \r\n /*-dbg-*/Lg.dbg(\"get lc defs\");\r\n Map lifecycles = (Map)config.get(\"Lifecycles\");\r\n /*-dbg-*/Lg.dbg(\"get lc for docment\");\r\n Map lcycle = (Map)lifecycles.get(lcname);\r\n /*-dbg-*/Lg.dbg(\"get state defs\");\r\n Map states = (Map)lcycle.get(\"States\");\r\n /*-dbg-*/Lg.dbg(\"get state\");\r\n Map statedef = (Map)states.get(statename);\r\n /*-dbg-*/Lg.dbg(\"get checkin config for state\");\r\n Map checkininfo = (Map)statedef.get(\"Checkin\");\r\n /*-dbg-*/Lg.dbg(\"get state list\");\r\n List allowablemodes = (List)checkininfo.get(\"AllowableModes\");\r\n return allowablemodes;\r\n } catch (NullPointerException npe) {\r\n /*-dbg-*/Lg.dbg(\"state %s for lifecycle %s not configured for checkin controls, returning null\",statename,lcname); \r\n return null;\r\n } \r\n }",
"public int getApplicationFlags() {\n return getActivityInfo().flags;\n }",
"public String[] getNames() {\n\t\tString[] names = new String[functions.size()];\n\t\tint index = 0;\n\t\tfor (Enumeration en = functions.keys(); en.hasMoreElements(); index++) {\n\t\t\tnames[index] = (String) en.nextElement();\n\t\t}\n\t\treturn names;\n\t}",
"public Collection<String> getRequireFeature();",
"String[] getAllStatus() {\n String[] toReturn = new String[allStates.length];\n for (int i = 0; i < toReturn.length; i++) {\n toReturn[i] = context.getString(allStates[i]);\n }\n return toReturn;\n }",
"public static boolean[] getSensorStates() {\n\t\tboolean[] retVal = new boolean[mSensors.size()];\n\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tretVal[x] = mSensors.get(x).mEnabled;\n\t\t}\n\n\t\treturn retVal;\n\t}",
"public int getFlags() {\n Object value = library.getObject(entries, FLAGS);\n if (value instanceof Number) {\n return ((Number) value).intValue();\n }\n return 0;\n }",
"@Override\n\tpublic int getFlags() {\n\t\treturn heldObj.getFlags();\n\t}",
"@Test\n public void getFeatureFlagsTest() throws ApiException {\n String projectKey = null;\n String env = null;\n String tag = null;\n FeatureFlags response = api.getFeatureFlags(projectKey, env, tag);\n\n // TODO: test validations\n }",
"public String osFlagsToString() {\n String result = \"\";\n if ((osFlags & FLAG_OS_RECOVERY) != 0) {\n result += \"Recovery,\";\n }\n if ((osFlags & FLAG_OS_SIGNED_MCU) != 0) {\n result += \"Signed MCU,\";\n }\n if ((osFlags & FLAG_OS_ONBOARDED) != 0) {\n result += \"Onboarded,\";\n }\n if ((osFlags & FLAG_TRUST_ISSUER) != 0) {\n result += \"Trust issuer,\";\n }\n if ((osFlags & FLAG_TRUST_CUSTOMCA) != 0) {\n result += \"Trust Custom CA,\"; \n }\n if ((osFlags & FLAG_HSM_INITIALIZED) != 0) {\n result += \"Personalized,\";\n }\n if ((osFlags & FLAG_PIN_VALIDATED) != 0) {\n result += \"PIN ready,\";\n }\n if (result.length() == 0) {\n return result;\n }\n else {\n return result.substring(0, result.length() - 1);\n }\n }",
"abstract protected EnumSet<Parser.Flag> getParserFlags();",
"public String getEnable() {\r\n return enable;\r\n }",
"public List<MclnState> getAvailableStates();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"public @Flags int getFlags() {\n return mFlags;\n }",
"public TreeMap<String,CheckOutMode>\n getModes()\n {\n TreeMap<String,CheckOutMode> modes = new TreeMap<String,CheckOutMode>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pModeFields.get(name);\n modes.put(name, CheckOutMode.values()[field.getSelectedIndex()]);\n }\n return modes;\n }",
"@XmlTransient\n public List<FlagDataTypeConfig> getFlagConfigs() {\n return flagCfg;\n }",
"public int getEnabledLevel()\r\n {\r\n return this.enabled;\r\n }",
"@Nullable\n public Map<String, List<String>> getCustomFlags() {\n return mCustomFlags;\n }",
"public String isEnabled() {\n return this.isEnabled;\n }",
"public String getQuestionFlags() \n {\n return questionFlags;\n }",
"public String getOutputFlag();",
"public Set<String> enumerateRegisters() {\r\n\t\treturn this.registers.keySet();\r\n\t}",
"@DISPID(79)\r\n\t// = 0x4f. The runtime will prefer the VTID if present\r\n\t@VTID(77)\r\n\tboolean enabled();",
"Set<ICapability> getAllCapabilities();",
"java.util.Enumeration getPropertyNames();",
"public String[] getAllInputExtensions();",
"public static final\n List<String> ccListAllBooleanFieldName(Class<?> pxClass){\n return ccListAllFieldName(pxClass, boolean.class);\n }",
"boolean[] bitwiseChangeList();",
"public boolean getEnabled(){\r\n\t\treturn enabled;\r\n\t}",
"public boolean[] getControlKeyStates() {\r\n return controlKeyStates;\r\n }",
"public String[] getStateNames() {\n List<String> st = new ArrayList<>();\n for (AState s : states) {\n st.add(s.getName());\n }\n return st.toArray(new String[st.size()]);\n }",
"public short getFlags() {\n\treturn flags;\n }",
"public final Enumeration getKeys() {\n/* 130 */ return getBundle().getKeys();\n/* */ }",
"public Collection<String> getProvideFeature();",
"private boolean[] getState(){\n int [] ids = new int[]{\n R.id.box1, R.id.box2, R.id.box3, R.id.box4, R.id.box5, R.id.box6,\n R.id.box7, R.id.box8, R.id.box9\n };\n\n boolean[] enabled = new boolean[ids.length];\n\n for (int i = 0; i<ids.length; i++)\n {\n ImageButton btn = (ImageButton)findViewById(ids[i]);\n enabled[i] = btn.isEnabled();\n }\n\n return enabled;\n }",
"public static String[] getAttributeNames()\n\t{\n\t\tList<String> attributeNames = new ArrayList<String>();\n\t\tfor ( PwdPolicy attr : PwdPolicy.values() )\n\t\t{\n\t\t\tattributeNames.add( attr.getAttribute() );\n\t\t}\n\t\tString[] result = attributeNames.toArray( new String[attributeNames.size()] );\n\t\tlogger.log( loglevel, \"Returning attribute names: \"+Arrays.toString(result) );\n\t\treturn result;\n\t}"
] | [
"0.6671666",
"0.64224046",
"0.63599086",
"0.63503057",
"0.63503057",
"0.62913424",
"0.6198848",
"0.61828196",
"0.61613697",
"0.6143124",
"0.6116512",
"0.6022108",
"0.6008003",
"0.5998938",
"0.5959213",
"0.5955131",
"0.5953045",
"0.5935458",
"0.59346104",
"0.589708",
"0.5886586",
"0.587989",
"0.5863862",
"0.5846701",
"0.584647",
"0.58414537",
"0.580276",
"0.5788837",
"0.5787495",
"0.5729652",
"0.5718905",
"0.5690072",
"0.5689331",
"0.56729597",
"0.56691945",
"0.56691945",
"0.56691945",
"0.56628513",
"0.5641362",
"0.56373966",
"0.56252646",
"0.56243175",
"0.5581348",
"0.5573142",
"0.5572143",
"0.55549186",
"0.555016",
"0.55446595",
"0.5536523",
"0.5521664",
"0.5507239",
"0.55033374",
"0.55030215",
"0.54958457",
"0.5487329",
"0.54813296",
"0.5474854",
"0.5469439",
"0.54620045",
"0.5461589",
"0.54485637",
"0.5437876",
"0.54366475",
"0.54336387",
"0.54225314",
"0.5415777",
"0.54059225",
"0.54035634",
"0.53966016",
"0.53826356",
"0.53826356",
"0.53826356",
"0.53826356",
"0.53826356",
"0.53826356",
"0.53826356",
"0.53826356",
"0.53671277",
"0.5362672",
"0.5360047",
"0.53531307",
"0.53511065",
"0.53509474",
"0.5347013",
"0.5326681",
"0.5321955",
"0.5317003",
"0.5316573",
"0.5313463",
"0.53012544",
"0.52992105",
"0.5294523",
"0.52919227",
"0.5290148",
"0.5289676",
"0.5286649",
"0.52737945",
"0.52582103",
"0.5256784",
"0.5247612"
] | 0.6447447 | 1 |
displays candidates by "ls" and returns the common prefix | public static String autocomplete(String soption_, Paths[] pathss_,
Shell shell_)
{
CommandOption option_ = new CommandOption(soption_,
false/*dont expand*/);
// set up paths
if (pathss_ == null || pathss_.length == 0) return "";
Paths p_ = pathss_[pathss_.length-1];
if (p_.paths == null || p_.paths.length == 0) return "";
String last_ = p_.paths[p_.paths.length-1];
p_.paths = new String[] {last_ + "*"};
pathss_ = new Paths[]{p_};
Object[] oo_ = toRef(soption_+'q', pathss_, true, shell_);
if (oo_ == null || oo_.length == 0) {
shell_.println("no object was matched.");
return "";
}
String[] ids_ = new String[oo_.length];
for (int i=0; i<oo_.length; i++) {
Object o_ = oo_[i];
String id_ = null;
if (o_ instanceof Component) id_ = ((Component)o_).getID();
else if (o_ instanceof Port) id_ = Util.getPortID((Port)o_);
else continue;
ids_[i] = id_;
}
String result_ = drcl.util.StringUtil.findCommonPrefix(ids_);
//java.lang.System.out.println("common prefix: " + result_
// + " for " + drcl.util.StringUtil.toString(ids_));
if (result_ == null) {
shell_.println("no object was matched.");
return "";
}
else {
int index_ = last_.lastIndexOf('/');
String path_ = index_ >= 0? last_.substring(index_+1): last_;
result_ = result_.substring(path_.length());
shell_.print(ls(soption_+'q', pathss_, shell_));
}
return result_;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\tString[] strs = {\"predlgas\", \"preskdlf;\", \"prekdsg\", \"prekdkgl;\", \"predlldf\"};\n\t\tString prefix = longestCommonPrefix(strs);\n\t\tSystem.out.println(prefix);\n\n\t}",
"public static String longestCommonPrefix(List<String> a) {\n if (a.isEmpty()) {\n return \"\";\n }\n\n int size = a.size();\n String first = a.get(0);\n if (size == 1)\n return first;\n\n /* sort the array of strings */\n a.sort(String::compareTo);\n\n /* find the minimum length from first and last string */\n int end = Math.min(first.length(), a.get(size - 1).length());\n\n /* find the common prefix between the first and\n last string */\n int i = 0;\n while (i < end && first.charAt(i) == a.get(size - 1).charAt(i))\n i++;\n\n return first.substring(0, i);\n }",
"public void showDirPath(String[] list);",
"public static String commonPrefix(Enumeration en) {\n\t\tif(null == en || !en.hasMoreElements())\n\t\t\treturn \"\";\n\t\tString common = (String) en.nextElement();\n\t\tString str = null;\n\t\tint i, len;\n\t\tchar[] ar1, ar2;\n\n\t\tar1 = common.toCharArray();\n\t\twhile(en.hasMoreElements()) {\n\t\t\tstr = (String) en.nextElement();\n\t\t\tar2 = str.toCharArray();\n\t\t\tif(str.startsWith(common))\n\t\t\t\tcontinue;\n\t\t\tlen = common.length();\n\t\t\tif(len > str.length())\n\t\t\t\tlen = str.length();\n\t\t\tfor(i = 0; i < len; i++) {\n\t\t\t\tif(ar1[i] != ar2[i])\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(0 == i)\n\t\t\t\treturn \"\";\n\t\t\tcommon = common.substring(0, i);\n\t\t\tar1 = common.toCharArray();\n\t\t}\n\t\tif(-1 != (i = common.indexOf('#')))\n\t\t\tcommon = common.substring(0, i);\n\t\tif(-1 != (i = common.indexOf('@')))\n\t\t\tcommon = common.substring(0, i);\n\t\treturn common;\n\t}",
"public String ls()\n\t{\n\t\tString toReturn = \"\";\n\t\tIterable<Position<FileElement>> kids = fileSystem.children(currentFileElement);\n\t\tif (kids == null) return \"Nothing to list\";\n\t\t{\n\t\t\tfor (Position<FileElement> fe : kids)\n\t\t\t{\n\t\t\t\ttoReturn += fe.toString() + \", \";\n\t\t\t}\n\t\t}\n\t\treturn toReturn;\n\t}",
"public static void main(String[] args) {\n\t\tScanner input=new Scanner(System.in);\n\t\tSystem.out.print(\"Enter the first string:\");\n\t\tString s1=input.nextLine();\n\t\tSystem.out.print(\"Enter the second string:\");\n\t\tString s2=input.nextLine();\n\t\tfor(int i=0;i<s1.length();i++) {\n\t\t\tif(s1.charAt(i)!=s2.charAt(i)) {\n\t\t\t\tif(i==0) {\n\t\t\t\t\tSystem.out.println(s1+\" and \"+s2+\"have no common prefix\");\n\t\t\t\t\tbreak;}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"The common prefix is \"+s1.substring(0,i));\n\t\t\t\t\tbreak;}\n\t\t\t}\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n String[] strs = new String[3];\n strs[0]=\"abv\";\n strs[1]=\"abcd\";\n strs[2]=\"ab\";\n String ans = longestCommonPrefix(strs);\n System.out.println(ans);\n }",
"public abstract String getPrefix();",
"private String longestCommonPrefixVS(String[] strs){\n\t\tif (strs == null || strs.length == 0) return \"\";\n\t\t for (int i = 0; i < strs[0].length() ; i++){\n\t\t char c = strs[0].charAt(i);\n\t\t for (int j = 1; j < strs.length; j ++) {\n\t\t if (i == strs[j].length() || strs[j].charAt(i) != c)\n\t\t return strs[0].substring(0, i);\n\t\t }\n\t\t }\n\t\t return strs[0];\n\t}",
"String getPrefix();",
"String getPrefix();",
"String getPrefix();",
"String getPrefix();",
"public static void main(String[] args) {\n \tString[] s={\"ABCDEFG\",\"ABCEFG\",\"ABCEFA\"};\n \tSystem.out.println(longestCommonPrefix(s));\n\t}",
"@Override\r\n\tpublic String ShowListCMD() {\n\t\treturn \"dir\";\r\n\t}",
"public void printFileNames() {\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()) {\n System.out.println(f);\n }\n }",
"public String getPrefix();",
"public String getPrefix();",
"void getProcNamesWithPrefix(Future<Set<String>> procNames, String baseDir, String appId, String clusterId, String procPrefix);",
"private String longestCommonPrefixHS(String[] strs){\n\t\tif (strs.length == 0) return \"\";\n\t\tString prefix = strs[0];\n\t\tfor (int i = 1; i < strs.length; i++){\n\t\t\twhile (strs[i].indexOf(prefix) != 0) {\n\t\t\t\tprefix = prefix.substring(0, prefix.length() - 1);\n\t\t\t\tif (prefix.isEmpty()) return \"\";\n\t\t\t}\n\t\t}\n\t\treturn prefix;\n\t}",
"private String longestCommonPrefix(String[] strs, int left, int right) {\n if (left == right) {\n return strs[left];\n } else {\n int mid = left + (right - left) / 2;\n String leftPrefix = longestCommonPrefix(strs, left, mid);\n String rightPrefix = longestCommonPrefix(strs, mid + 1, right);\n return commonPrefix(leftPrefix, rightPrefix);\n }\n }",
"private String commonPrefix(String leftPrefix, String rightPrefix) {\n if (leftPrefix == null || rightPrefix == null) {\n return \"\";\n }\n\n int end = Math.min(leftPrefix.length(), rightPrefix.length());\n\n for (int i = 0; i < end; i++) {\n if (leftPrefix.charAt(i) != rightPrefix.charAt(i)) {\n return leftPrefix.substring(0, i);\n }\n }\n\n // a concise way to avoid ternary expression\n return leftPrefix.substring(0, end);\n }",
"protected String getStrainBackupBoxPrefix(Db db)\n\t{\n\t\tString sql = \"exec spMet_getStrainCollectionBackupBoxPrefix '\" + getStrainType() + \" Strain'\";\n\t\tString prefix = db.getHelper().getDbValue(sql, db);\n\t\treturn prefix;\n\t}",
"public String[] GetAllFileNames() {\n \tFile dir = new File(fileStorageLocation.toString());\n \tString[] matchingFiles = dir.list(new FilenameFilter() {\n \t public boolean accept(File dir, String name) {\n \t return name.startsWith(\"1_\");\n \t }\n \t});\n \t\n \tfor (int i=0; i < matchingFiles.length; i++)\n \t{\n \t\tmatchingFiles[i] = matchingFiles[i].replaceFirst(\"1_\", \"\");\n \t}\n \t\n return matchingFiles;\n }",
"public static String getPrefix() {\n return getConfiguration().getPath(\"General.Prefix\").getString();\n }",
"public String getOutputPrefix();",
"private static String files()\n\t{\n\t\tString path = dirpath + \"\\\\Server\\\\\";\n\t\tFile folder = new File(path);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tString msg1 = \"\";\n\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\n\t\t{\n\t\t\tif (listOfFiles[i].isFile())\n\t\t\t{\n\t\t\t\tmsg1 = msg1 + \"&\" + listOfFiles[i].getName();\n\t\t\t}\n\t\t}\n\t\tmsg1 = msg1 + \"#\" + path + \"\\\\\";\n\t\treturn msg1;\n\t}",
"private static String longestCommonPrefix(String[] strs) {\n\t\tif (strs == null || strs.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tint minLen = Integer.MAX_VALUE;\n\t\tfor (String str : strs) {\n\t\t\tif (minLen > str.length()) {\n\t\t\t\tminLen = str.length();\n\t\t\t}\n\t\t}\n\t\tif (minLen == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tfor (int j = 0; j < minLen; j++) {\n\t\t\tchar prev = '0';\n\t\t\tfor (int i = 0; i < strs.length; i++) {\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tprev = strs[i].charAt(j);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (prev != strs[i].charAt(j)) {\n\t\t\t\t\treturn strs[i].substring(0, j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strs[0].substring(0, minLen);\n\t}",
"public static String longestCommonPrefixNOOOOO(String[] strs) {\n HashSet<Character> set1 = new HashSet<>();\n for(int i=0; i<strs.length; i++){\n HashSet<Character> set2 = new HashSet<>();\n for(int j=0; j<strs[i].length(); j++){\n set2.add(strs[i].charAt(j));\n }\n if(i==0){\n set1=set2;\n }else{\n set1.retainAll(set2);\n }\n }\n StringBuilder sb = new StringBuilder();\n for(Character c : set1) sb.append(c);\n return sb.toString();\n }",
"public String longestCommonPrefix(String[] strs) {\n\n\t\tif (strs.length == 0)\n\t\t\treturn \"\";\n\n\t\tString prefix = strs[0];\n\t\tfor (int i = 1; i < strs.length; i++)\n\t\t\twhile (strs[i].indexOf(prefix) != 0) {\n\t\t\t\tprefix = prefix.substring(0, prefix.length() - 1);\n\t\t\t\tif (prefix.isEmpty())\n\t\t\t\t\treturn \"\";\n\t\t\t}\n\t\treturn prefix;\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String[] text = scanner.nextLine().toLowerCase(Locale.ROOT).split(\" \");\n System.out.println(\"Long prefix is: \" + longPrefix(text));\n }",
"public String longestCommonPrefix(String[] strs) {\n\t\tif (strs == null || strs.length == 0)\n\t\t\treturn \"\";\n\t\tint minLen = Integer.MAX_VALUE;\n\t\tfor (String str : strs)\n\t\t\tminLen = Math.min(minLen, str.length());\n\t\tint low = 1;\n\t\tint high = minLen;\n\t\twhile (low <= high) {\n\t\t\tint middle = (low + high) / 2;\n\t\t\tif (isCommonPrefix(strs, middle))\n\t\t\t\tlow = middle + 1;\n\t\t\telse\n\t\t\t\thigh = middle - 1;\n\t\t}\n\t\treturn strs[0].substring(0, (low + high) / 2);\n\t}",
"public String longestCommonPrefix(String[] strs) {\n if (strs == null && strs.length == 0) {\n return \"\";\n }\n\n String prefix = strs[0];\n\n for (int i = 1; i < strs.length; i++) {\n while (strs[i].indexOf(prefix) != 0) {\n prefix = prefix.substring(0, prefix.length() - 1);\n if (prefix.isEmpty()) {\n return \"\";\n }\n }\n }\n\n return prefix;\n }",
"@Override\n public String toString() {\n return \"ls [PATH ...]:\\n\" + \"\\tList the contents.\\n\" + \"\\tNote:\\n\"\n + \"\\t1.If no PATH given, print contents of current directory.\\n\"\n + \"\\t2.If PATH specifies a directory, print its contents(file or \"\n + \"directory).\\n\" + \"\\t3.If PATH specifies a file, print its name.\";\n }",
"public static String getLocalFilePrefix()\r\n/* 186: */ throws IOException\r\n/* 187: */ {\r\n/* 188:155 */ if (CryptoApplet.testMode) {\r\n/* 189:156 */ return \"test-mode-\";\r\n/* 190: */ }\r\n/* 191:158 */ String username = BrowserHandler.getField(BrowserHandler.getUsernameField());\r\n/* 192:159 */ String host = CryptoApplet.getHostname().replaceAll(\"https?://\", \"\").replaceAll(\":\", \"\").replaceAll(\"/\", \"\");\r\n/* 193:160 */ String prefix = username + host;\r\n/* 194:161 */ return prefix + \"-\";\r\n/* 195: */ }",
"public String longestCommonPrefix(String[] strs) {\n if (strs == null || strs.length == 0) return \"\";\n for (int i = 0; i < strs[0].length() ; i++){\n char c = strs[0].charAt(i);\n for (int j = 1; j < strs.length; j ++) {\n if (i == strs[j].length() || strs[j].charAt(i) != c)\n return strs[0].substring(0, i); \n }\n }\n return strs[0];\n}",
"public static String longestCommonPrefix(String[] strs) {\n \tif(strs==null){\n \t\treturn null;\n \t}\n \tif(strs.length==0){\n \t\treturn \"\";\n \t}\n \tint prefix_count=strs[0].length();\n \tchar[] s=strs[0].toCharArray();\n \tfor(int i=1;i<strs.length;i++){\n \t\tchar[] str=strs[i].toCharArray();\n \t\tint count=0;\n \t\twhile (count<str.length && count<prefix_count){\n \t\t\tif(str[count]!=s[count]){\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\telse{\n \t\t\t\tcount++;\n \t\t\t}\n \t\t}\n \t\tprefix_count=count;\n \t}\n \treturn strs[0].substring(0, prefix_count);\n }",
"public static String commonPrefix(Vector v) {\n\t\treturn commonPrefix(v.elements());\n\t}",
"public void displayDirectoryList(String[] myFileNamesList) {\r\n //-----------------------------------\r\n String appDirecotry = APP_INSTANCE.getAppDirectory();\r\n\r\n //-----------------------------------\r\n System.out.println(\"/// \");\r\n System.out.println(\"/// DIRECTORY: \"+appDirecotry.replace(\"\\\\\", \"/\")+\" (SORTED IN ASCENDING ORDER) \");\r\n System.out.println(\"///\");\r\n System.out.println(\"///\");\r\n System.out.println(\"/// ------------------ START OF (SORTED) DIRECTORY FILES LIST -------------------\");\r\n\r\n //-----------------------------------\r\n Iterator<String> iterator = Arrays.asList(myFileNamesList).iterator();\r\n iterator.forEachRemaining(x -> System.out.println(\"/// \\t\\t\"+x));\r\n\r\n //-----------------------------------\r\n System.out.println(\"/// ------------------- END OF (SORTED) DIRECTORY FILES LIST --------------------\");\r\n System.out.println(\"///\");\r\n }",
"private String[] nlstHelper(String args) {\n // Construct the name of the directory to list.\n String filename = currDirectory;\n if (args != null) {\n filename = filename + fileSeparator + args;\n }\n\n // Now get a File object, and see if the name we got exists and is a\n // directory.\n File f = new File(filename);\n\n if (f.exists() && f.isDirectory()) {\n return f.list();\n } else if (f.exists() && f.isFile()) {\n String[] allFiles = new String[1];\n allFiles[0] = f.getName();\n return allFiles;\n } else {\n return null;\n }\n }",
"public void displayDirectoryList() {\r\n //-----------------------------------\r\n String appDirecotry = APP_INSTANCE.getAppDirectory();\r\n\r\n //-----------------------------------\r\n\r\n System.out.println(\"/// FILE LIST OF DIRECTORY: \"+appDirecotry);\r\n System.out.println(\"/// ------------------ START OF DIRECTORY FILES LIST -------------------\");\r\n\r\n //-----------------------------------\r\n getCurrentDirectoryFiles(appDirecotry).forEach(listItemFile-> {\r\n intProperty = (intProperty +1 );\r\n System.out.println(\"/// [\"+intProperty+\"] \"+listItemFile.getName());\r\n });\r\n\r\n //-----------------------------------\r\n System.out.println(\"/// ------------------- END OF DIRECTORY FILES LIST --------------------\");\r\n }",
"public String listPath(List<String> arg) {\n String output = \"\";\n for (int path = 0; path < arg.size(); path++) {\n Directory tDir = Directory.getDir(arg.get(path));\n if (tDir == null) {\n output +=\n \"Error: The input path \" + arg.get(path) + \" doesn't exist!\\n\\n\";\n } else if (tDir.isFile) {\n output += tDir.getName();\n } else {\n for (int j = 0; j < tDir.getSubContent().size(); j++) {\n if (!tDir.getSubContent().get(j).isFile) {\n output += tDir.getSubContent().get(j).getName();\n Directory dir = tDir.getSubContent().get(j);\n if (!dir.getSubContent().isEmpty()) {\n output += \" : \";\n for (int k = 0; k < tDir.getSubContent().get(j).getSubContent()\n .size(); k++) {\n if (k != tDir.getSubContent().get(j).getSubContent().size()\n - 1) {\n output += tDir.getSubContent().get(j).getSubContent().get(k)\n .getName() + \", \";\n } else {\n output += tDir.getSubContent().get(j).getSubContent().get(k)\n .getName() + \"\\n\";\n }\n }\n } else {\n output += \"\\n\";\n }\n } else {\n output += tDir.getSubContent().get(j).getName() + \"\\n\";\n }\n }\n }\n }\n return output;\n }",
"public String longestCommonPrefix(String[] strs) {\n\t\tif(strs.length == 0) return \"\";\n\t\tString min = strs[0];\n\t\tfor(int i =0 ; i< strs.length; i++){\n\t\t\tif(min.length() > strs[i].length()) min = strs[i];\n\t\t}\n\t\t\n\t\tint x = 0;\n\t\t\n\t\t\twhile(x < min.length()){\n\t\t\t\tfor(String s: strs){\n\t\t\t\t\tif(min.equals(s)) continue;\n\t\t\t\t\telse if(s.charAt(x) != min.charAt(x)) return s.substring(0,x);\n\t\t\t}\n\t\t\t\tx++;\n\t\t}\n\t\treturn min.substring(0,x);\n\t}",
"public static String longestCommonPrefix(String a, String b){\r\n int l = Math.min(a.length(), b.length());\r\n for (int i = 0; i < l; i++){\r\n if (a.charAt(i) != b.charAt(i))\r\n return a.substring(0,i);\r\n }\r\n return a.substring(0,l);\r\n }",
"private void constructPrefix()\n\t{\n\t\tFile directory = new File(this.rootDirectory);\n\t\tString[] allFiles = directory.list();\n\t\t\n\t\tfor (String file : allFiles)\n\t\t{\n\t\t\t// first, handle the wildcard case. Note that 'prefix' denotes a string not existing in the current files. \n\t\t\t// e.g. existing files {abc, dd}; the following program tries to find {b#, c#, e#, ...}.\n\t\t\tfor (int i = 0; i <= file.length(); i++) // pay attention to the loop condition\n\t\t\t{\n\t\t\t\tString prefix = file.substring(0, i);\n\t\t\t\t\n\t\t\t\tfor (int j = 0; j < this.alphabet.length(); j++)\n\t\t\t\t{\n\t\t\t\t\tString tempPrefix = prefix.substring(0, prefix.length()) + this.alphabet.substring(j, j + 1);\n\t\t\t\t\t\n\t\t\t\t\tif (isPrefix(tempPrefix, allFiles) == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tString prefixKey = tempPrefix + SPECIAL_AFTER;\n\t\t\t\t\t\tbyte[] macValue = generateMAC(prefixKey);\n\t\t\t\t\t\tthis.prefix.put(prefixKey, macValue); // add all prefixes into the prefix set using 'TreeMap'\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// second, handle the sub-filename case.\n\t\t\t// e.g. existing files {abc, dd}; the following program tries to find {a@, ab@, d@}.\n\t\t\tfor (int i = 0; i < file.length() - 1; i++)\t//pay attention to the loop condition\n\t\t\t{\n\t\t\t\tString prefix = file.substring(0, i + 1);\n\t\t\t\tif (isExistingFile(prefix, allFiles) == false)\n\t\t\t\t{\n\t\t\t\t\tString prefixKey = prefix + SPECIAL_PREVIOUS;\n\t\t\t\t\tbyte[] macValue = generateMAC(prefixKey);\n\t\t\t\t\tthis.prefix.put(prefixKey, macValue);\t// add all prefixes into the prefix set using 'TreeMap'\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tbyte[] macValue = generateMAC(file);\n\t\t\tthis.existingFile.put(file, macValue); // add all filenames into the existing file set using 'TreeMap'\t\t\t\n\t\t}\n\t}",
"java.util.List<java.lang.String>\n getFileNamesList();",
"java.util.List<java.lang.String>\n getFileNamesList();",
"public static Set<String> getFullLocaleNameSet(String bundlePrefix, ClassLoader loader)\n/* */ {\n/* 416 */ return getAvailEntry(bundlePrefix, loader).getFullLocaleNameSet();\n/* */ }",
"public void initial_list_sync(){\n \tFile file = new File(sync_directory_conf);\n \tif(file.exists()){\n \t\tArrayList<String> sync_directory_list = new ArrayList<String>();\n sync_directory_list = read_from_file.readFromFile(sync_directory_conf);\n text_sync_directory_path.setText(sync_directory_list.get(0));\n \t}else{\n \t\treturn;\n \t}\n \t\t\n }",
"String getVersionNamePrefix();",
"java.lang.String getFileNames(int index);",
"java.lang.String getFileNames(int index);",
"public String getLogCollectionPrefix();",
"private JList getLbPrefixList() {\n if (lbPrefixList == null) {\n lbPrefixList = new JList();\n lbPrefixList.setModel(getPlm());\n lbPrefixList.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent e) {\n if (e.getKeyCode() == KeyEvent.VK_ENTER) {\n getBtnOK().doClick();\n return;\n }\n if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n getBtnCancel().doClick();\n return;\n }\n char c = e.getKeyChar();\n int pos = plm.getSelection(c);\n if (pos > -1) {\n lbPrefixList.setSelectedIndex(pos);\n JScrollBar sb = getSpPrefixList().getVerticalScrollBar();\n sb.setValue((sb.getMaximum() - sb.getMinimum())\n / lbPrefixList.getModel().getSize() * pos);\n\n }\n }\n });\n lbPrefixList.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent e) {\n if (e.getClickCount() > 1)\n getBtnOK().doClick();\n }\n });\n }\n return lbPrefixList;\n }",
"public String getPrefixCode() { return sharedPreferences.getString(PREFIX_CODE, \"\"); }",
"public void findMatchingDirectories(CompleteOperation completion) {\n completion.doAppendSeparator(false);\n \n //if incDir is empty, just list cwd\n if(incDir.trim().isEmpty()) {\n completion.addCompletionCandidates( listDirectory(cwd, null));\n }\n else if(startWithHome()) {\n if(isHomeAndIncDirADirectory()) {\n if(endWithSlash()) {\n completion.addCompletionCandidates(\n listDirectory(new File(Config.getHomeDir()+incDir.substring(1)), null));\n }\n else\n completion.addCompletionCandidate(Config.getPathSeparator());\n }\n else if(isHomeAndIncDirAFile()) {\n completion.addCompletionCandidate(\"\");\n //append when we have a file\n completion.doAppendSeparator(true);\n }\n //not a directory or file, list what we find\n else {\n listPossibleDirectories(completion);\n }\n }\n else if(!startWithSlash()) {\n if(isCwdAndIncDirADirectory()) {\n if(endWithSlash()) {\n completion.addCompletionCandidates(\n listDirectory(new File(cwd.getAbsolutePath() +\n Config.getPathSeparator()+incDir), null));\n }\n else\n completion.addCompletionCandidate(Config.getPathSeparator());\n }\n else if(isCwdAndIncDirAFile()) {\n completion.addCompletionCandidate(\"\");\n //append when we have a file\n completion.doAppendSeparator(true);\n }\n //not a directory or file, list what we find\n else {\n listPossibleDirectories(completion);\n }\n }\n else if(startWithSlash()) {\n if(isIncDirADirectory()) {\n if(endWithSlash()) {\n completion.addCompletionCandidates(\n listDirectory(new File(incDir), null));\n }\n else\n completion.addCompletionCandidate(Config.getPathSeparator());\n }\n else if(isIncDirAFile()) {\n completion.addCompletionCandidate(\"\");\n //append when we have a file\n completion.doAppendSeparator(true);\n }\n //not a directory or file, list what we find\n else {\n listPossibleDirectories(completion);\n }\n }\n \n }",
"String ls(String pRoot) throws RemoteException;",
"protected String getStrainBoxPrefix(Db db)\n\t{\n\t\tString sql = \"exec spMet_getStrainCollectionBoxPrefix '\" + getStrainType() + \" Strain'\";\n\t\tString prefix = dbHelper.getDbValue(sql, db);\n\t\treturn prefix;\n\t}",
"public void printFilenames(){\n\t\tSystem.out.println(\"\\nAgent list of files: \" + this.filenames.size());\n\t\tfor(int i = 0;i<filenames.size();i++){\n\t\t\tSystem.out.println(i+1+ \") \" + filenames.get(i));\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}",
"List<String> getListPaths();",
"public String longestCommonPrefix(String[] strs) {\n \n\t\tif(strs==null || strs.length==0||strs[0].length()==0)\n\t\t\treturn \"\";\n\t\t\n \tfor (int j = 0; j < strs[0].length(); j++) {\n \t\t\tfor (int i = 1; i < strs.length; i++) {\n\t\t\t\tif (j >= strs[i].length()) \n\t\t\t\t\treturn strs[0].substring(0, strs[i].length());\n\t\t\t\tif (strs[i].charAt(j) != strs[0].charAt(j))\n \t\t\treturn strs[0].substring(0, j);\n\t\t\t}\n\t\t}\n\t\treturn strs[0];\n \t}",
"public static void showfiles()\n\t{\n File curDir = new File(\".\");\n String[] fileNames = curDir.list();\n ArrayList<String> data = new ArrayList<String>();\n\n //Find files which may have data. (aka, are in the .dat format)\n for(String s:fileNames)\n if(s.endsWith(\".dat\"))\n data.add(s);\n\n\t\tdata.trimToSize();\n\t\t\n\t\tclearScreen();\n\n\t\tSystem.out.println(\"\\t\\t\\tTHE BOOK SEARCH PROGRAM\");\n\n\t\t\n\t\tfor(int i = 0; i < 80; i++)\n\t\tSystem.out.print(\"-\");\n\t\n\n\t\tSystem.out.println(\"\\nWhat file is your book data stored in?\\n\");\n\t\n\t\tSystem.out.println(\"Here are the .dat file(s) in the current directory:\\n\");\n\n\t \tfor(int i = 0; i < data.size(); i++)\n\t\tSystem.out.print(\"[ \" + data.get(i) + \" ]\\t\");\n\t\tSystem.out.println(\"\\n\");\n\n\n\t}",
"private void findRecordings(){\n File[] files = new File(\"Concatenated/\").listFiles();\n _records.clear();\n _versionNum = 1;\n for (File file : files){\n if (file.isFile()){\n String nameOnFile = file.getName().substring(file.getName().lastIndexOf('_')+1,file.getName().lastIndexOf('.')).toUpperCase();\n if (nameOnFile.equals(_name.toUpperCase())){\n _records.add(file.getName());\n _versionNum++;\n }\n }\n }\n }",
"GetPrefix fileContent();",
"GetPrefix allContent();",
"public String longestCommonPrefix_solution1(String[] strs) {\n if (strs.length == 0)\n return \"\";\n\n String prefix = strs[0];\n for (int i = 0; i < strs.length; i++) {\n while (strs[i].indexOf(prefix) != 0) {\n prefix = prefix.substring(0, prefix.length() - 1); // String.substring: 左闭右开[left inclusive, right exclusive]\n if (prefix.isEmpty())\n return \"\";\n }\n }\n return prefix;\n }",
"public static String longestCommonPrefix(String[] strs) {\n\n if (strs == null || strs.length == 0) {\n return \"\" ;\n }\n String longestPrefix=\"\";\n int index=0;\n for (String str : strs) {\n if (str == null || str.length()==0) {\n return \"\";\n }\n if (index == 0) {\n longestPrefix = str ;\n index++;\n continue;\n }\n longestPrefix = findCommonPreFix(longestPrefix,str);\n index ++;\n }\n return longestPrefix ;\n }",
"public abstract List<String> getDirs( );",
"public String longestCommonPrefix1(String[] strs) {\n if (null == strs || strs.length == 0) return \"\";\n\n String pre = strs[0]; //Take the first String as pre\n for (int i = 1; i < strs.length; i++) {\n /**\n * \"indexOf\"\n * This means pre is not the prefix in current string,\n * hence, shorten it by one and continue\n */\n while (strs[i].indexOf(pre) != 0) {\n pre = pre.substring(0, pre.length() - 1);\n if (pre.isEmpty()) {\n return \"\";\n }\n }\n }\n\n return pre;\n }",
"@NonNull\n Single<List<String>> getFolderNames();",
"public void listMyFiles(){\n\t\tpeer.removeFiles();\n\t\tint count = localModel.getRowCount();\n\t\tif (count > 0){\n\t\t\tfor (int i = count-1; i >= 0; i--){\n\t\t\t\tlocalModel.removeRow(i);\n\t\t\t}\n\t\t}\n\t\tFile folder = fileChooser.getSelectedFile();\n\t\tpeer.setFolder(folder.getAbsolutePath());\n shareFolder = folder.getAbsolutePath();\n\t\tconsole(\"\\\"\" + folder.getAbsolutePath() + \"\\\" set as Shared Directory.\");\n\t\tmyFiles = folder.listFiles();\n\t\tfor(File file : myFiles){\n\t\t\tlocalModel.addRow(new Object[]{file.getName(),file.length()});\n\t\t\ttry {\n\t\t\t\tpeer.addFile(file.getName(),file.length());\n\t\t\t} catch (UnknownHostException e1) {e1.printStackTrace();}\n\t\t}\n\t}",
"private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}",
"public List<String> autocomplete(String prefix) {\r\n\r\n ArrayList<String> result = new ArrayList<String>();\r\n result.add(\"England\");\r\n result.add(\"France\");\r\n result.add(\"Germany\");\r\n result.add(\"Italy\");\r\n result.add(\"Spain\");\r\n\r\n return result;\r\n }",
"public JScrollPane getFileNameList() {\r\n\t\tthis.displayFileNames = new JList<String>(this.loadFileNames());\r\n\t\tthis.displayFileNames.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n\t\tthis.displayFileNames.addListSelectionListener(this);\r\n\t\tthis.displayFileNames.setVisibleRowCount(6);\r\n\t\tthis.fileNameListContainer = new JScrollPane(this.displayFileNames);\r\n\t\treturn this.fileNameListContainer;\r\n\t}",
"public String find()\n\t{\n\t\tFile f = new File(ampath);\n\t\tString fdir = f.getParent();\n\t\tFile fs = new File (fdir);\n\t\tString cplpath = null;\n\t\tboolean found = false;\n\t\t\n\t\tFile [] files = fs.listFiles();\n\t\t\n\t\tfor (int i=0; i<files.length; i++) {\n\t\t\tif(files[i].getName().equalsIgnoreCase(cplfilename)){\n\t\t\t\tfound = true;\n\t\t\t\tcplpath = files[i].getPath();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//Searching in Subfolder for CPL-File\n\t\t\tif (files[i].isDirectory()) {\n\t\t\t\tFile f2 = new File(files[i].getPath());\n\t\t\t\tFile [] files2 = f2.listFiles();\n\t\t\t\tfor(int j=0; j<files2.length; j++) {\n\t\t\t\t\tif(files2[j].getName().equalsIgnoreCase(cplfilename)){\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tcplpath = files2[i].getPath();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Returns CPL-File as String\n\t\tif (found == false) {\n\t\t\tSystem.out.println(\"CPL-File not found\");\n\t\t\treturn \"CPL-File not found\";\n\t\t}\n\t\telse {\n\t\t\treturn cplpath;\n\t\t}\n\t\t\n\t}",
"@Override\n public int compare(String o1, String o2) {\n\n if (o1.equals(o2)) {\n return 0;\n }\n\n String prefix = Strings.commonPrefix(o1, o2);\n if (prefix.length() == 0) {\n // No common prefix\n return o1.compareTo(o2);\n }\n\n if (o1.length() == prefix.length()) {\n return -1;\n }\n\n return o1.compareTo(o2);\n\n }",
"public List<String> suggestions(FacesContext pContext,\n UIComponent pComponent, String pPrefix) {\n \n if (StringUtil.isEmptyOrNull(pPrefix)) {\n pPrefix = \"*\";\n }\n \n List<String> suggestionList = new ArrayList<String>();\n List<Software> softResults = Collections.emptyList();\n List<PN> PNResults = Collections.emptyList();\n List<TypePC> lTypePCResults = Collections.emptyList();\n \n if (!StringUtil.isEmptyOrNull(pPrefix)) {\n \n switch (getReferenceTypeChosen()) {\n \n case SOFTWARE:\n softResults = softBean.suggestionListSoftware(pPrefix);\n for (Software s : softResults) {\n suggestionList.add(s.getCompleteName());\n }\n break;\n \n case MANUFACTURERPN_TYPEARTICLE:\n PNResults = articleBean.suggestionListManufacturerPN(pPrefix);\n for (PN pn : PNResults) {\n suggestionList.add(pn.getIdentifier());\n }\n break;\n \n case AIRBUSPN_TYPEARTICLE:\n PNResults = articleBean.suggestionListAirbusPN(pPrefix);\n for (PN pn : PNResults) {\n suggestionList.add(pn.getIdentifier());\n }\n break;\n \n case TYPEPC:\n lTypePCResults = articleBean.suggestionListTypePC(pPrefix);\n for (TypePC lType : lTypePCResults) {\n suggestionList.add(lType.getLabel());\n }\n break;\n \n default:\n \n }\n }\n \n Collections.sort(suggestionList);\n return suggestionList;\n \n }",
"public static void main(String[] args) {\n List<String> res = lcs(\"LCLC\",\"CLCL\");\r\n for(String s:res){\r\n \t System.out.print(s +\",\");\r\n }\r\n\t}",
"public String getPrefixString() {\n/* 105 */ return this.prefix;\n/* */ }",
"static Vector __common__(CommandOption option_, Paths[] pathss_,\r\n boolean sort_, Shell shell_)\r\n {\r\n option_.sort = sort_;\r\n Vector v_ = new Vector(); // store Directory\r\n for (int i=0; i<pathss_.length; i++) {\r\n // append \"*\" if a path ends with \"/\"\r\n if (pathss_[i].paths != null && option_.expand)\r\n // expand used here??\r\n for (int j=0; j<pathss_[i].paths.length; j++) {\r\n String path_ = pathss_[i].paths[j];\r\n if (path_.length() > 1 && path_.charAt(path_.length()-1)\r\n == '/')\r\n pathss_[i].paths[j] = path_ + \"*\";\r\n }\r\n Directory[] tmp_ = Common.resolveOnePaths(pathss_[i], option_,\r\n shell_);\r\n \r\n if (tmp_ == null) continue;\r\n for (int j=0; j<tmp_.length; j++) {\r\n v_.addElement(tmp_[j]);\r\n }\r\n }\r\n return v_;\r\n }",
"public static void main(String[] args) {\nFile files=new File(\"C:\\\\Users\\\\k74\");\nString filenames[]=files.list();\nfor(String filename :filenames)\n\tSystem.out.println(filename);\n\t}",
"public static void main(String[] args){\n System.out.println(linuxRules(\"/c/d/////././../e/\"));\n// System.out.println(linuxRules(\"/c/d/////././../e/..\"));\n// System.out.println(linuxRules(\"/c/d/////././../ed/..\"));\n// System.out.println(linuxRules(\"/c/d/////././../ed/.\"));\n /* String[] strs = new String[]{\"flower\",\"ooow\",\"flight\",\"flosh\"};\n System.out.println(longestCommonPrefix(strs));*/\n /* System.out.println( findRealParentheses(\"()[]{}\"));\n System.out.println( findRealParentheses(\"))[]{}\"));\n System.out.println( findRealParentheses(\"()[]{(}\"));\n System.out.println( findRealParentheses(\"[()[]]{}\"));*/\n /*Integer[] firstList = new Integer[]{1, 5, 6};\n Integer[] secondList = new Integer[]{1, 3, 4, 6};\n int i = 0;\n Integer[] combileList = combine(firstList, secondList);\n while (i < combileList.length) {\n System.out.println(combileList[i]);\n i++;\n }*/\n /* Integer[] original = new Integer[]{0,0,1,1,1,2,2,3,3,4};\n System.out.println(deleteCommonItem(original));*/\n /* Integer[] original = new Integer[]{3,2,3,1,4,5,3,2,1};\n System.out.println(deleteAssignItem(original, 3));*/\n// System.out.println(indexOf(\"hello\", \"ll\"));\n// System.out.println(indexOf(\"aaaaa\", \"aab\"));\n\n /* System.out.println(longest(\"abcabcbb\"));\n System.out.println(longest(\"bbbbb\"));\n System.out.println(longest(\"pwwkew\"));*/\n\n /*System.out.println(longestPalindromeStr(\"babad\"));\n System.out.println(longestPalindromeStr(\"cyyoacmjwjubfkzrrbvquqkwhsxvmytmjvbborrtoiyotobzjmohpadfrvmxuagbdczsjuekjrmcwyaovpiogspbslcppxojgbfxhtsxmecgqjfuvahzpgprscjwwutwoiksegfreortttdotgxbfkisyakejihfjnrdngkwjxeituomuhmeiesctywhryqtjimwjadhhymydlsmcpycfdzrjhstxddvoqprrjufvihjcsoseltpyuaywgiocfodtylluuikkqkbrdxgjhrqiselmwnpdzdmpsvbfimnoulayqgdiavdgeiilayrafxlgxxtoqskmtixhbyjikfmsmxwribfzeffccczwdwukubopsoxliagenzwkbiveiajfirzvngverrbcwqmryvckvhpiioccmaqoxgmbwenyeyhzhliusupmrgmrcvwmdnniipvztmtklihobbekkgeopgwipihadswbqhzyxqsdgekazdtnamwzbitwfwezhhqznipalmomanbyezapgpxtjhudlcsfqondoiojkqadacnhcgwkhaxmttfebqelkjfigglxjfqegxpcawhpihrxydprdgavxjygfhgpcylpvsfcizkfbqzdnmxdgsjcekvrhesykldgptbeasktkasyuevtxrcrxmiylrlclocldmiwhuizhuaiophykxskufgjbmcmzpogpmyerzovzhqusxzrjcwgsdpcienkizutedcwrmowwolekockvyukyvmeidhjvbkoortjbemevrsquwnjoaikhbkycvvcscyamffbjyvkqkyeavtlkxyrrnsmqohyyqxzgtjdavgwpsgpjhqzttukynonbnnkuqfxgaatpilrrxhcqhfyyextrvqzktcrtrsbimuokxqtsbfkrgoiznhiysfhzspkpvrhtewthpbafmzgchqpgfsuiddjkhnwchpleibavgmuivfiorpteflholmnxdwewj\"));*/\n\n /* int[] rec1 = {7,8,13,15};\n int[] rec2 = {10,8,12,20};\n System.out.println(isRectangleOverlap(rec1, rec2));*/\n /* 输入: A = [1,2,3,0,0,0], m = 3; B = [2,5,6], n = 3\n 输出: [1,2,2,3,5,6]*/\n\n// System.out.println(validPalindrome(\"lcuppucul\") );\n// System.out.println(maxPower(\"t\") );\n// System.out.println(CheckPermutation(\"abc\", \"bca\") );\n// System.out.println(reverseOnlyLetters(\"Test1ng-Leet=code-Q!\") );\n// System.out.println(countSegments(\", , , , a, eaefa\") );\n\n// System.out.println(reverseWords(\"the sky is blue\") );\n }",
"public Component getFileList() {\n final String fileListName;\n if (LookAndFeel.isMotif() || LookAndFeel.isGTK()) {\n fileListName = UIManager.getString(\"FileChooser.filesLabelText\", getLocale());\n } else {\n fileListName = UIManager.getString(\"FileChooser.filesListAccessibleName\", getLocale());\n }\n return innerSearcher.\n findComponent(new ComponentChooser() {\n @Override\n public boolean checkComponent(Component comp) {\n return ((comp instanceof JList && fileListName.equals(comp.getAccessibleContext().getAccessibleName()))\n || comp instanceof JTable);\n }\n\n @Override\n public String getDescription() {\n return \"JList or JTable used to show list of files\";\n }\n\n @Override\n public String toString() {\n return \"JFileChooserOperator.getFileList.ComponentChooser{description = \" + getDescription() + '}';\n }\n });\n }",
"public static void main(String[] args) {\n\t\tPractise014 p = new Practise014();\n//\t\tSystem.out.println(p.longestCommonPrefix_bruteforce(new String[] {\"abc\", \"abcde\", \"abdef\"}));\n//\t\tSystem.out.println(p.longestCommonPrefix_bruteforce(new String[] {\"c\", \"c\"}));\n//\t\t\n//\t\tSystem.out.println(p.longestCommonPrefix_horizontal(new String[] {\"abc\", \"abcde\", \"abdef\"}));\n//\t\tSystem.out.println(p.longestCommonPrefix_vertical(new String[] {\"abc\", \"abcde\", \"abdef\"}));\n\t\t\n\t\tSystem.out.println(p.longestCommonPrefix_divideAndConquer(new String[] {\"abc\", \"abcde\", \"abdef\"}));\n\t}",
"public static String[] getFilenamesUsed(String prefix) {\n\t\tString ar[] = new String[EXTENSIONS.length];\n\t\tfor (int i=0; i<EXTENSIONS.length; i++)\n\t\t\tar[i] = new String(prefix+EXTENSIONS[i]);\n\t\treturn ar;\n\t}",
"public String longestCommonPrefixApproach2(String[] strs) {\n\t\tif (strs == null || strs.length == 0) return \"\";\n\t\tfor (int i = 0; i < strs[0].length() ; i++){\n\t\t\tchar c = strs[0].charAt(i);\n\t\t\tfor (int j = 1; j < strs.length; j ++) {\n\t\t\t\tif (i == strs[j].length() || strs[j].charAt(i) != c)\n\t\t\t\t\treturn strs[0].substring(0, i); \n\t\t\t}\n\t\t}\n\t\treturn strs[0];\n\t}",
"public List<String> getAllWordsStartingWith(String prefix) {\n prefix = prefix.toUpperCase();\n TrieNode node = root;\n List<String> li = new ArrayList<>();\n for (int i = 0; i < prefix.length(); i++) {\n char ch = prefix.charAt(i);\n if (node.get(ch) == null) {\n return li;\n }\n node = node.get(ch);\n }\n\n dfs(node, li, prefix);\n return li;\n }",
"private DefaultListModel<String> loadFileNames(){\r\n\t\tthis.fileNamesListModel.clear();\r\n\t\tfor(FileModel model : FileData.getAllFileModels()) {\r\n\t\t\tthis.fileNamesListModel.addElement(model.getName());\r\n\t\t}\r\n\t\treturn this.fileNamesListModel;\r\n\t}",
"public String getStrainPrefix(Db db)\n\t{\n\t\tString prefix = dbHelper.getDbValue(\"exec spMet_getStrainPrefix '\" \n\t\t\t\t+ getStrainType() + \"'\", db);\n\t\tString suffix = dbHelper.getDbValue(\"exec spMet_getIDSuffix\", db);\n\t\tif(WtUtils.isNullOrBlank(suffix))\n\t\t\tsuffix = \"\";\n\t\telse\n\t\t\tsuffix = suffix + \"-\";\n\t\treturn prefix + \"-\" + suffix;\n\t}",
"java.util.Optional<String> getPrefix();",
"public String showPlayListNames(){\n String namePlayList = \"\";\n for(int i = 0; i<MAX_PLAYLIST; i++){\n if(thePlayLists[i] != null){\n namePlayList += \"[\"+(i+1)+\"]\"+thePlayLists[i].getNamePlayList()+\"\\n\";\n }\n }\n return namePlayList;\n }",
"public String longestCommonPrefix_solution2(String[] strs) {\n if (strs == null || strs.length == 0) return \"\";\n for (int i = 0; i < strs[0].length() ; i++){\n char c = strs[0].charAt(i);\n for (int j = 1; j < strs.length; j ++) {\n if (i == strs[j].length() || strs[j].charAt(i) != c)\n return strs[0].substring(0, i);\n }\n }\n return strs[0];\n }",
"private String longestPrefix(String[] inputs){\n\t\tif(inputs == null || inputs.length == 0)\n\t\t\treturn \"\";\n\t\tif(inputs.length == 1)\n\t\t\treturn inputs[0];\n\t\tString prefix = inputs[0];\n\t\t\n\t\tfor(int i=0; i< inputs.length; i++){\n\t\t\twhile(inputs[i].indexOf(prefix) != 0){\n\t\t\t\tprefix = prefix.substring(0, prefix.length()-1);\n\t\t\t\tif(prefix.isEmpty())\n\t\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\t\t\n\t\treturn prefix;\n\t}",
"public String getPrefix()\n\t{\n\t\t//local constants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the prefix of the name.\n\t\treturn prefix;\n\n\t}",
"private static String optionsListing() {\n\t\tString result = \"\\nUsage: java -jar comtor.jar -dir dirname\\n\\n\";\n\t\tresult += \"Options:\\n\";\n\t\t\n\t\tresult += \"-dir dirname\\t\\tSpecified the pathname of the directory in which COMTOR will \"; \n\t\tresult += \"search for Java source code\\n\\t\\t\\tfiles (packaged and non-packaged).\\n\\n\";\n\t\t\n\t\tresult += \"-help | --help\\t\\tThis help message\\n\";\n\t\tresult += \"\\n\\n\";\n\t\treturn result;\n\t}",
"public String getPrefix(Player player) {\n \t\treturn getValue(player, \"prefix\");\n \t}",
"@VisibleForTesting\n String[] getPrefixesForFolders(Path folder1, Path folder2) {\n String separator = File.separator;\n String folder1Name = folder1.getFileName().toString();\n String folder2Name = folder2.getFileName().toString();\n if (!folder1Name.equals(folder2Name)) {\n return new String[]{ folder1Name + separator, folder2Name + separator };\n }\n\n String folder1Parent = getParentName(folder1);\n String folder2Parent = getParentName(folder2);\n if (folder1Parent != null && folder2Parent != null && !folder1Parent.equals(folder2Parent)) {\n return new String[]{ folder1Parent + \"…\" + separator, folder2Parent + \"…\" + separator };\n }\n\n String folder1Root = PathUtils.toStringNullSafe(folder1.getRoot());\n String folder2Root = PathUtils.toStringNullSafe(folder2.getRoot());\n if (folder1Root != null && folder2Root != null\n && !folder1Root.startsWith(\".\") && !folder1Root.equals(folder2Root)) {\n return new String[]{ folder1Root + \"…\" + separator, folder2Root + \"…\" + separator };\n }\n return new String[]{ \"folder1\" + separator, \"folder2\" + separator };\n }",
"public List<String> getAutoComplete(String prefix) {\r\n List<String> words = dict.getAutoComplete(prefix); //get list of words from prefix\r\n System.out.println();\r\n System.out.println(\"Autocomplete words : \");\r\n for (String s : words) {\r\n System.out.println(s);\r\n }\r\n return words;\r\n }",
"public List<String> getLoggerNames();",
"@Test\n public void testNoPrefixMatch(){\n List<String> items = getCompletions(\"noPrefixMatch.py\", \"json/noPrefixMatch.json\", CompletionType.BASIC);\n\n assertEquals(\"expected 2 Kite items + 2 IDE items\", 4, items.size());\n assertEquals(\"[]int {}\", items.get(0));\n assertEquals(\"values, []int\", items.get(1));\n }"
] | [
"0.5966129",
"0.5620162",
"0.555986",
"0.5544589",
"0.550618",
"0.54225373",
"0.5407865",
"0.5374623",
"0.53480667",
"0.53372014",
"0.53372014",
"0.53372014",
"0.53372014",
"0.533518",
"0.5333007",
"0.53146046",
"0.5254075",
"0.5254075",
"0.52177775",
"0.52064943",
"0.51992106",
"0.51427364",
"0.5138683",
"0.51325166",
"0.51306856",
"0.51275593",
"0.51225376",
"0.50980777",
"0.5081353",
"0.5079533",
"0.50660044",
"0.5050816",
"0.5048662",
"0.5047962",
"0.5045115",
"0.5029409",
"0.5018323",
"0.50159365",
"0.501386",
"0.5013636",
"0.50050104",
"0.5002237",
"0.49918035",
"0.49894005",
"0.49864846",
"0.4976812",
"0.49633783",
"0.49554613",
"0.49459663",
"0.49381533",
"0.49353382",
"0.49353382",
"0.49305803",
"0.49304605",
"0.4915454",
"0.4910728",
"0.490478",
"0.4904523",
"0.49017924",
"0.48980713",
"0.4885357",
"0.48658523",
"0.4862411",
"0.4851427",
"0.48445123",
"0.48298067",
"0.48214436",
"0.48170668",
"0.48111102",
"0.48081243",
"0.4806286",
"0.48037344",
"0.4802714",
"0.4795326",
"0.47924417",
"0.47721618",
"0.4763672",
"0.4758808",
"0.4755855",
"0.47543103",
"0.47514415",
"0.474721",
"0.47386187",
"0.4732494",
"0.47287467",
"0.4725626",
"0.4717409",
"0.47107068",
"0.47048697",
"0.46897238",
"0.46872634",
"0.46872604",
"0.46836126",
"0.46792722",
"0.46662137",
"0.46650097",
"0.46556413",
"0.46521723",
"0.46440217",
"0.46377587"
] | 0.55860585 | 2 |
explores the neighboring information | public static void explore(String soption_, Paths[] pathss_, Shell shell_)
{
try {
CommandOption option_ = new CommandOption(soption_, false/*expand*/);
if (pathss_ == null || pathss_.length < 1) {
shell_.println("Error: no staring component is given.");
return;
}
// exploration starting component
Component[] startingPoint_ = null;
Object[] tmp_ = toRef(soption_+"q", new Paths[]{pathss_[0]},
true/*sort*/, shell_);
if (tmp_ != null) {
Vector vtmp_ = new Vector();
for (int i=0; i<tmp_.length; i++) {
Object o_ = tmp_[i];
if (o_ instanceof Component)
vtmp_.addElement(o_);
}
if (vtmp_.size() > 0) {
startingPoint_ = new Component[vtmp_.size()];
vtmp_.copyInto(startingPoint_);
}
}
if (startingPoint_ == null) {
if (!option_.quiet)
shell_.println("Error: can't find the specified starting"
+ " component.");
return;
}
// look for "-transparent", "-excluded" and "stop" option
int len_ = pathss_.length;
int j=len_, k=len_, m = len_; // mark where transparent, excluded and stop begin
for (int i=1; i<len_; i++) {
String[] paths_ = pathss_[i].paths;
if (paths_ == null || paths_.length == 0) continue;
if (paths_[0].equals("-transparent")) {
j = i; if (k < len_ && m < len_) break;
}
else if (paths_[0].equals("-excluded")) {
k = i; if (j < len_ && m < len_) break;
}
else if (paths_[0].equals("-stop")) {
if (!option_.flat) option_.flat = true;
m = i; if (j < len_ && k < len_) break;
}
}
// make transparent and exclude paths
Component[] transparent_ = null;
Component[] excluded_ = null;
Component[] stop_ = null;
if (j<len_) {
int end_ = k>j? k: len_; // exclusive
if (m > j && m < end_) end_ = m;
Paths[] tmppathss_ = new Paths[end_-j];
java.lang.System.arraycopy(pathss_, j, tmppathss_, 0, end_-j);
tmp_ = toRef(soption_, tmppathss_, false/*sort*/, shell_);
LinkedList v_ = new LinkedList();
if (tmp_ != null) {
for (int i=0; i<tmp_.length; i++)
if (tmp_[i] instanceof Component) v_.add(tmp_[i]);
}
transparent_ = (Component[])v_.toArray(new Component[v_.size()]);
}
if (k<len_) {
int end_ = j>k? j: len_; // exclusive
if (m > k && m < end_) end_ = m;
Paths[] tmppathss_ = new Paths[end_-k];
java.lang.System.arraycopy(pathss_, k, tmppathss_, 0, end_-k);
tmp_ = toRef(soption_, tmppathss_, false/*sort*/, shell_);
LinkedList v_ = new LinkedList();
if (tmp_ != null) {
for (int i=0; i<tmp_.length; i++)
if (tmp_[i] instanceof Component) v_.add(tmp_[i]);
}
excluded_ = (Component[])v_.toArray(new Component[v_.size()]);
}
if (m<len_) {
int end_ = j>m? j: len_; // exclusive
if (k > m && k < end_) end_ = k;
Paths[] tmppathss_ = new Paths[end_-m];
java.lang.System.arraycopy(pathss_, m, tmppathss_, 0, end_-m);
tmp_ = toRef(soption_, tmppathss_, false/*sort*/, shell_);
LinkedList v_ = new LinkedList();
if (tmp_ != null) {
for (int i=0; i<tmp_.length; i++)
if (tmp_[i] instanceof Component) v_.add(tmp_[i]);
}
stop_ = (Component[])v_.toArray(new Component[v_.size()]);
}
// call Util.explore()
Hashtable ht_ = null;
if (option_.flat) {
ht_ = drcl.comp.Util.exploreFlat(startingPoint_[0], transparent_,
excluded_, stop_, !option_.quiet);
}
else {
if (startingPoint_.length == 1)
ht_ = drcl.comp.Util.explore(startingPoint_[0], transparent_,
excluded_, !option_.quiet);
else
ht_ = drcl.comp.Util.explore(startingPoint_, transparent_,
excluded_, !option_.quiet);
}
StringBuffer sb_ = new StringBuffer();
Component[] cc_ = new Component[ht_.size()];
j=0;
for (Enumeration e_ = ht_.keys(); e_.hasMoreElements(); ) {
cc_[j++] = (Component)e_.nextElement();
}
drcl.util.StringUtil.sort(cc_, true/*accending order*/);
sb_.append("-----------------\n");
for (j=0; j<cc_.length; j++) {
Component c_ = cc_[j];
Util.Link[] ll_ = (Util.Link[])ht_.get(c_);
sb_.append(c_ + ":\n");
for (int i=0; i<ll_.length; i++)
sb_.append(" neighbor " + (i+1) + ": " + ll_[i] + "\n");
}
if (sb_.length() == 0) {
shell_.println(startingPoint_ + " has no neighbor.");
}
else
shell_.println(sb_.toString());
}
catch (Exception e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }",
"private void recalculateNeighbours(int x, int y) {\r\n\t\tTile t = map.getTile(x, y + 1, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x, y + 1, false);\r\n\t\t}\r\n\t\tt = map.getTile(x + 1, y, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x + 1, y, false);\r\n\t\t}\r\n\t\tt = map.getTile(x, y - 1, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x, y - 1, false);\r\n\t\t}\r\n\t\tt = map.getTile(x - 1, y, 0);\r\n\t\tif (t != null) {\r\n\t\t\tt.toMap(this, x - 1, y, false);\r\n\t\t}\r\n\t}",
"public static LinkedList2 generateNeighbors(LocNode state) {\n\t \n\t \n\t\n\t LinkedList2 Neighbors = new LinkedList2();\n\t \n\n\t\n\tchar [][] Matrix = state.getData(); \n\t\n\t\n\t\n\tchar [][] Neighbor = copyMatrix(Matrix);\n\n\t\t\n\t\tfor(int i=0 ;i<size ;i++ ) {\n\t\tfor (int j=0 ;j<size ;j++) {\n\t\t\tif (Neighbor[i][j]=='-'||Neighbor[i][j]=='v') {\n\t\t\t\tNeighbor[i][j]='c';\n\t\t\t\t\n\t\t\t\t\n\t updateVisibility(i,j,Neighbor);\n\t \n\t Neighbors.insert(Neighbor, calculateOpjectiveFunction(Neighbor));\n\t \n\t \n\t \n\t\t\t\tNeighbor = copyMatrix(Matrix);\n\t\n\t\t\t\n\t\t\t}\n\t\t}\t\n\t\t}\n\t\t\n\tLinkedList2 ApplyingRemoveAction=removeOneCamera(state.data);\n\t\n\n\tif(!ApplyingRemoveAction.empty()){\n\t\t\n\t\tApplyingRemoveAction.findFirst();\n\t\twhile(!ApplyingRemoveAction.last()) {\n\t\t\t Neighbors.insert(ApplyingRemoveAction.retrieve_data(), ApplyingRemoveAction.retrieve_opjectiveFunctoin());\n\t\t\t ApplyingRemoveAction.findNext();\n\t\t}\n\t\t\n\t\t Neighbors.insert(ApplyingRemoveAction.retrieve_data(), ApplyingRemoveAction.retrieve_opjectiveFunctoin());\n\t}\n\t\t\n\t\t\n\t return Neighbors;\n\t \n\t \n}",
"private void setNeighboringMines(){\n\t\t//cycle the board\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++){\n\t\t\t\tint neighborCount = 0;\n\t\t\t\tif(!board[r][c].isMine()) {\n\t\t\t\t\t//checks if there is mines touching\n\t\t\t\t\tneighborCount = neighboringMines(r, c);\n\t\t\t\t\tif (neighborCount > 0) {\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(true);\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines\n\t\t\t\t\t\t\t\t(neighborCount);\n\t\t\t\t\t} else if (neighborCount == 0) {\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines(0);\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(false);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public List<SearchNode> expand() {\n\n List<SearchNode> neighbours = new ArrayList<>();\n\n if (this.getX() > 0) {\n SearchNode left = new SearchNode(this.getX() - 1, this.getY(), this.getDepth() + 1);\n neighbours.add(left);\n }\n if (this.getX() < 14) {\n SearchNode right = new SearchNode(this.getX() + 1, this.getY(), this.getDepth() + 1);\n neighbours.add(right);\n }\n if (this.getY() > 0) {\n SearchNode up = new SearchNode(this.getX(), this.getY() - 1, this.getDepth() + 1);\n neighbours.add(up);\n }\n if (this.getY() < 14) {\n SearchNode down = new SearchNode(this.getX(), this.getY() + 1, this.getDepth() + 1);\n neighbours.add(down);\n }\n\n return neighbours;\n }",
"NBLK(int[][] origMap) {\r\n\r\n\t\t\r\n\t\t// suppose it's a matrix for numberlink\r\n\t\tn_row = origMap.length;\r\n\t\tn_col = origMap[0].length;\r\n\t\tlength = n_row * n_col;\r\n\t\tadjaMatrix=new int[length][length];\r\n\t\tStartPoint=new HashMap<Integer, Node>();\r\n\t\tEndPoint=new HashMap<Integer, Node>();\r\n\t\tnowMap= new HashMap<Integer,LinkedList<Integer>>();\r\n\t\t\r\n\t\tpaths=new HashMap<Integer, Stack<Node>>();\r\n\t\tallNodes= new HashMap<Integer,Node>();\r\n\t\t\r\n\t\t\r\n\t\tlastPath=0;\r\n\t\t\r\n\t\tcount=0;\r\n\t\tfor (int i = 0; i < n_row; i++) {\r\n\t\t\tfor (int j = 0; j < n_col; j++) {\r\n\t\t\t\tif (origMap[i][j] > -1) {\r\n\t\t\t\t\t//we can use that point to represent a blocked point (i,j) as matrix[i][j]=-1\r\n\t\t\t\t\tint index = i * n_col + j;\r\n\t\t\t\t\tNode n = new Node(i, j, index, origMap[i][j]);\r\n\t\t\t\t\tallNodes.put(index, n);\r\n\t\t\t\t\tLinkedList<Integer> neibors = new LinkedList<Integer>();\r\n\r\n\t\t\t\t\tif (i > 0 && origMap[i-1][j] > -1) {\r\n\t\t\t\t\t\t//left\r\n\t\t\t\t\t\tadjaMatrix[index][(i - 1) * n_col + j] = 1;\r\n\t\t\t\t\t\tadjaMatrix[(i - 1) * n_col + j][index] = 1;\r\n\t\t\t\t\t\tneibors.addLast((i - 1) * n_col + j);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (i < n_row - 1 && origMap[i+1][j] > -1) {\r\n\t\t\t\t\t\t//right\r\n\t\t\t\t\t\tadjaMatrix[index][(i + 1) * n_col + j] = 1;\r\n\t\t\t\t\t\tadjaMatrix[(i + 1) * n_col + j][index] = 1;\r\n\t\t\t\t\t\tneibors.addLast((i + 1) * n_col + j);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (j > 0 && origMap[i][j-1] > -1) {\r\n\t\t\t\t\t\t//top\r\n\t\t\t\t\t\tadjaMatrix[index][i * n_col + j - 1] = 1;\r\n\t\t\t\t\t\tadjaMatrix[i * n_col + j - 1][index] = 1;\r\n\t\t\t\t\t\tneibors.addLast(i * n_col + j - 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (j < n_col - 1 && origMap[i][j+1] > -1) {\r\n\t\t\t\t\t\t//bottom\r\n\t\t\t\t\t\tadjaMatrix[index][i * n_col + j + 1] = 1;\r\n\t\t\t\t\t\tadjaMatrix[i * n_col + j + 1][index] = 1;\r\n\t\t\t\t\t\tneibors.addLast(i * n_col + j + 1);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnowMap.put(index, neibors);\r\n\t\t\t\t\tif (origMap[i][j] > 0) {\r\n\r\n\t\t\t\t\t\tif (!StartPoint.containsKey(origMap[i][j])) {\r\n\t\t\t\t\t\t\tStartPoint.put(origMap[i][j], n);\r\n\t\t\t\t\t\t\tStack<Node> tp = new Stack<Node>();\r\n\t\t\t\t\t\t\ttp.push(n);\r\n\t\t\t\t\t\t\tpaths.put(origMap[i][j], tp);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tEndPoint.put(origMap[i][j], n);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tvoid createNeighbourhood() {\n\t\t\n\t}",
"public void uncover ()\n {\n for (DancingNode i=this.U; i!=this; i=i.U) // go up the column\n {\n for (DancingNode j=i.L; j!=i; j=j.L) // go left across the row \n {\n j.C.size++;\n j.relinkUD();\n }\n }\n this.relinkLR();\n }",
"public void retrace(){\n\t\t//look at the sPath stack\n\t\tPoint temp = sPath.peek();\n\t\t// find neighbor with lowest score\n\t\tPoint lNeighbor = backtrack(temp);\n\t\t// coordinates of lNeighbor\n\t\tint x = (int) lNeighbor.getX();\n\t\tint y = (int) lNeighbor.getY();\n\t\t// score of neighbor\n\t\tint score = topology[x][y];\n\t\t// if there is no more neighbor then lNeighbor = temp\n\t\t// then we reach the Start then\n\t\twhile(score!=0){\n\t\t\t// push that neighbor on the stack\n\t\t\tsPath.push(lNeighbor);\n\t\t\t// update temp and lNeighbor\n\t\t\ttemp = sPath.peek();\n\t\t\tlNeighbor = backtrack(temp);\n\t\t\t// coordinates of lNeighbor\n\t\t\tx = (int) lNeighbor.getX();\n\t\t\ty = (int) lNeighbor.getY();\n\t\t\t// score of neighbor\n\t\t\tscore = topology[x][y];\n\t\t}\n\t\t// we have to do that until we see the start with score 0\n\t\t// the last lNeighbor is the S with score = 0, push it to the stack\n\t\tsPath.push(lNeighbor);\n\t\twhile(!sPath.isEmpty()){\n\t\t\tPoint track = sPath.pop();\n\t\t\tSystem.out.println(\"(\"+(int)track.getX()+\",\"+(int)track.getY()+\")\");\n\t\t}\n\t}",
"public void createNodesOfPixels() {\n makeGrayscale();\n WritableImage pixelPop = copyImage(holderImg);\n PixelReader pr = pixelPop.getPixelReader();\n for (int i = 0; i < h; i++) {\n for (int j = 0; j < w; j++) {\n Color color = pr.getColor(j, i);\n if (color.equals(Color.WHITE)) {\n pathNodes[(i * w) + j] = new GraphNodeAL(i);\n }\n }\n }\n\n for (int i = 0; i < pathNodes.length; i++) {\n if (pathNodes[i] != null) {\n if ((i - w) >= 0 && pathNodes[i - w] != null) { // pixel above\n pathNodes[i].connectToNodeDirected(pathNodes[i - w], 1);\n }\n if ((i + w) < pathNodes.length && pathNodes[i + w] != null) { // pixel below\n pathNodes[i].connectToNodeDirected(pathNodes[i + w], 1);\n }\n if ((i - 1) >= 0 && pathNodes[i - 1] != null && ((i - 1) % w) != 0) { // pixel left\n pathNodes[i].connectToNodeDirected(pathNodes[i - 1], 1);\n }\n if ((i + 1) < pathNodes.length && pathNodes[i + 1] != null && ((i + 1) % w) != 0) { // pixel right\n pathNodes[i].connectToNodeDirected(pathNodes[i + 1], 1);\n }\n }\n }\n }",
"public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}",
"private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}",
"private void dijkstras() {\n LinkedList<Integer> openNodeList = new LinkedList<Integer>();\n openNodeList.add(grid.length - 1);\n Integer curGrid = -1;\n\n while ( openNodeList.size() > 0 ) {\n curGrid = getBestGrid(openNodeList,curGrid);\n\n for ( int i = 0; i < grid[curGrid].edges.size() - 1; i++ ) {\n Integer tmp = grid[curGrid].edges.get(i).arrayIndex;\n if ( !grid[tmp].bFinalized && !openNodeList.contains(tmp)) {\n //System.out.println(\"Adding:\\t\" + tmp + \":\\t\" + grid[tmp].cost);\n grid[tmp].setHead(curGrid);\n grid[tmp].cost = grid[curGrid].cost + grid[curGrid].edges.get(i).Exposure;\n openNodeList.add(tmp);\n }\n }\n\n grid[curGrid].bFinalized = true;\n openNodeList.removeFirstOccurrence(curGrid);\n }\n }",
"private void setNeighbors()\r\n {\r\n for (int x = 0; x < length+2; ++x)\r\n {\r\n for (int y = 0; y < width+2; ++y)\r\n {\r\n // North\r\n if (!this.board[x][y].northwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y-1]);\r\n }\r\n // South\r\n if (!this.board[x][y].southwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y+1]);\r\n }\r\n // East\r\n if (!this.board[x][y].eastwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x+1][y]);\r\n }\r\n // West\r\n if (!this.board[x][y].westwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x-1][y]);\r\n }\r\n }\r\n }\r\n }",
"@Override\n public Iterable<WorldState> neighbors() {\n Queue<WorldState> neighbor = new ArrayDeque<>();\n int xDim = 0, yDim = 0;\n int[][] tiles = new int[_N][_N];\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n tiles[i][j] = _tiles[i][j];\n if (_tiles[i][j] == 0) {\n xDim = i;\n yDim = j;\n }\n }\n }\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n if (Math.abs(i - xDim) + Math.abs(j - yDim) == 1) {\n tiles[i][j] = _tiles[xDim][yDim];\n tiles[xDim][yDim] = _tiles[i][j];\n neighbor.add(new Board(tiles));\n // System.out.println(new Board(tiles));\n tiles[xDim][yDim] = _tiles[xDim][yDim];\n tiles[i][j] = _tiles[i][j];\n }\n }\n }\n return neighbor;\n }",
"public void findNeighbours(ArrayList<int[]> visited , Grid curMap) {\r\n\t\tArrayList<int[]> visitd = visited;\r\n\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS cur pos:\" +Arrays.toString(nodePos));\r\n\t\t//for(int j=0; j<visitd.size();j++) {\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +Arrays.toString(visited.get(j)));\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS getvstd\" +Arrays.toString(visited.get(j)));\r\n\t\t//}\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +visited);\r\n\t\tCell left=curMap.getCell(0, 0);\r\n\t\tCell right=curMap.getCell(0, 0);\r\n\t\tCell upper=curMap.getCell(0, 0);\r\n\t\tCell down=curMap.getCell(0, 0);\r\n\t\t//the getStart() method returns x,y coordinates representing the point in x,y axes\r\n\t\t//so if either of [0] or [1] coordinate is zero then we have one less neighbor\r\n\t\tif (nodePos[1]> 0) {\r\n\t\t\tupper=curMap.getCell(nodePos[0], nodePos[1]-1) ; \r\n\t\t}\r\n\t\tif (nodePos[1] < M-1) {\r\n\t\t\tdown=curMap.getCell(nodePos[0], nodePos[1]+1);\r\n\t\t}\r\n\t\tif (nodePos[0] > 0) {\r\n\t\t\tleft=curMap.getCell(nodePos[0] - 1, nodePos[1]);\r\n\t\t}\r\n\t\tif (nodePos[0] < N-1) {\r\n\t\t\tright=curMap.getCell(nodePos[0]+1, nodePos[1]);\r\n\t\t}\r\n\t\t//for(int i=0;i<visitd.size();i++) {\r\n\t\t\t//System.out.println(Arrays.toString(visitd.get(i)));\t\r\n\t\t//}\r\n\t\t\r\n\t\t//check if the neighbor is wall,if its not add to the list\r\n\t\tif(nodePos[1]>0 && !upper.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] - 1}))) {\r\n\t\t\t//Node e=new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1},curMap);\r\n\t\t\t//if(e.getVisited()!=true) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1}, curMap)); // father of the new nodes is this node\r\n\t\t\t//}\r\n\t\t}\r\n\t\tif(nodePos[1]<M-1 &&!down.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] + 1}))){\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] + 1}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]>0 && !left.isWall() && (!exists(visitd,new int[] {nodePos[0] - 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] - 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]<N-1 && !right.isWall() && (!exists(visitd,new int[] {nodePos[0] + 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] + 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\t//for(int i=0; i<NodeChildren.size();i++) {\r\n\t\t\t//System.out.println(\"Paidia sth find:\" + Arrays.toString(NodeChildren.get(i).getNodePos()));\r\n\t\t//}\r\n\t\t\t\t\t\t\r\n\t}",
"public void changingNeighbor() {\n }",
"void diplayNeighborPoints() {\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tif (point[i].position.dist(P) < 10) {\n\t\t\t\tmyParent.pushStyle();\n\t\t\t\tmyParent.fill(255, 255, 0);\n\t\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5); // draw\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// point\n\t\t\t\tmyParent.text(\"left neighbor\", point[neighbor(i)[0]].x, point[neighbor(i)[0]].y);\n\t\t\t\tmyParent.text(\"right neighbor\", point[neighbor(i)[1]].x, point[neighbor(i)[1]].y);\n\t\t\t\tmyParent.text(\"opposite\", point[neighbor(i)[2]].x, point[neighbor(i)[2]].y);\n\t\t\t\t// neighbor(int sourcePointId)\n\t\t\t\tmyParent.noFill();\n\t\t\t\tmyParent.popStyle();\n\t\t\t}\n\t\t}\n\n\t\tif (state == State.SCALE_PORPORTIONALLY_POINT || state == State.SCALE_FREE_POINT)\n\t\t\tdisplayLineBetweenCurrentAndOppositePoints();\n\t}",
"public void updateNeighbours(int i) {\n if (currentState[i] != 0) {\n int ix0 = (i - STEPX) & MASKX;\n int iy0 = (i - STEPY) & MASKY;\n int iz0 = (i - STEPZ) & MASKZ;\n\n int ix1 = (i) & MASKX;\n int iy1 = (i) & MASKY;\n int iz1 = (i) & MASKZ;\n\n int ix2 = (i + STEPX) & MASKX;\n int iy2 = (i + STEPY) & MASKY;\n int iz2 = (i + STEPZ) & MASKZ;\n\n ++nextState[ix0 | iy0 | iz0];\n ++nextState[ix0 | iy0 | iz1];\n ++nextState[ix0 | iy0 | iz2];\n ++nextState[ix0 | iy1 | iz0];\n ++nextState[ix0 | iy1 | iz1];\n ++nextState[ix0 | iy1 | iz2];\n ++nextState[ix0 | iy2 | iz0];\n ++nextState[ix0 | iy2 | iz1];\n ++nextState[ix0 | iy2 | iz2];\n\n ++nextState[ix1 | iy0 | iz0];\n ++nextState[ix1 | iy0 | iz1];\n ++nextState[ix1 | iy0 | iz2];\n ++nextState[ix1 | iy1 | iz0];\n\n //!\t\t++nextState[ix1|iy1|iz1];\n ++nextState[ix1 | iy1 | iz2];\n ++nextState[ix1 | iy2 | iz0];\n ++nextState[ix1 | iy2 | iz1];\n ++nextState[ix1 | iy2 | iz2];\n\n ++nextState[ix2 | iy0 | iz0];\n ++nextState[ix2 | iy0 | iz1];\n ++nextState[ix2 | iy0 | iz2];\n ++nextState[ix2 | iy1 | iz0];\n ++nextState[ix2 | iy1 | iz1];\n ++nextState[ix2 | iy1 | iz2];\n ++nextState[ix2 | iy2 | iz0];\n ++nextState[ix2 | iy2 | iz1];\n ++nextState[ix2 | iy2 | iz2];\n }\n }",
"private void resize() {\n int newSize = (xs.length * 3) / 2;\n int[] newXs = new int[newSize];\n int[] newYs = new int[newSize];\n int[] newIn = new int[newSize];\n int[] newOut = new int[newSize];\n int[][] newRoads = new int[newSize][newSize];\n int[][] newDist = new int[newSize][newSize];\n boolean[] newVal = new boolean[newSize];\n System.arraycopy(xs, 0, newXs, 0, nodeCount);\n System.arraycopy(ys, 0, newYs, 0, nodeCount);\n System.arraycopy(inDegree, 0, newIn, 0, nodeCount);\n System.arraycopy(outDegree, 0, newOut, 0, nodeCount);\n System.arraycopy(invalid, 0, newVal, 0, nodeCount);\n for (int i = 0; i < nodeCount; i++) {\n System.arraycopy(roads[i], 0, newRoads[i], 0, nodeCount);\n System.arraycopy(distances[i], 0, newDist[i], 0, nodeCount);\n }\n xs = newXs;\n ys = newYs;\n inDegree = newIn;\n outDegree = newOut;\n roads = newRoads;\n distances = newDist;\n invalid = newVal;\n }",
"public void setNeighbors(){\t\t\t\t\n\t\tint row = position[0];\n\t\tint column = position[1];\t\t\n\t\tif(column+1 < RatMap.SIDELENGTH){\n\t\t\teastCell = RatMap.getMapCell(row,column+1);\t\t\t\n\t\t}else{\n\t\t\teastCell = null;\n\t\t}\t\n\t\tif(row+1 < RatMap.SIDELENGTH){\n\t\t\tnorthCell = RatMap.getMapCell(row+1,column);\n\t\t}else{\n\t\t\tnorthCell = null;\n\t\t}\t\n\t\tif(column-1 > -1){\n\t\t\twestCell = RatMap.getMapCell(row, column-1);\t\t\t\n\t\t}else{\n\t\t\twestCell = null;\n\t\t}\n\t\tif(row-1 > -1){\n\t\t\tsouthCell = RatMap.getMapCell(row-1, column);\n\t\t}else{\n\t\t\tsouthCell = null;\n\t\t}\n\t}",
"public void crossover(){\n \t\n \t//int cut2 = ((NODELENGTH * 3 + 1) / 3) + cut;\n \tfor (int g = 0; g < (wallpapers.size() - 1); g += 2){\n \t\tint cut = getCutPoint();\n \t\tint[] parent1 = wallpapers.get(g);\n \t\tint[] parent2 = wallpapers.get(g + 1);\n \t\t\n \t\tint[] child1 = new int[parent1.length];\n \t\tint[] child2 = new int[parent2.length];\n \t\tfor (int i = 0; i < (cut); i++){\n \t\t\tchild1[i] = parent1[i];\n \t\t\tchild2[i] = parent2[i];\n \t\t}\n \t\tfor (int j = cut; j < parent1.length; j++){\n \t\t\tchild1[j] = parent2[j];\n \t\t\tchild2[j] = parent1[j];\n \t\t}\n \t\t\n \t\t\n \t\twallpapers.set(g, child1);\n \t\twallpapers.set(g + 1, child2);\n \t}\n \tfor (int d = 0; d < (wallpapers.size() * 2); d++){\n \t\tif (d < wallpapers.size()){\n \t\t\ttemp_wallpapers.add(wallpapers.get(d));\n \t\t}\n \t\telse {\n \t\t\ttemp_wallpapers.add(node());\n \t\t}\n \t}\n \twallpapers.clear();\n \tfor (int u = 0; u < temp_wallpapers.size(); u++){\n\t\t\twallpapers.add(u, temp_wallpapers.get(u));\n\t\t}\n \ttemp_wallpapers.clear();\n }",
"void ompleBlocsHoritzontals() {\r\n\r\n for (int i = 0; i < N; i = i + SRN) // for diagonal box, start coordinates->i==j \r\n {\r\n ompleBloc(i, i);\r\n }\r\n }",
"private void expandCapacity() {\n T[] tempVertices = (T[])(new Object[vertices.length * 2]);\n int[][] tempEdges = new int[vertices.length * 2][vertices.length * 2];\n \n for (int i = 0; i < n; i++) {\n tempVertices[i] = vertices[i];\n for (int j = 0; j < n; j++) {\n tempEdges[i][j] = edges[i][j];\n }\n }\n \n vertices = tempVertices;\n edges = tempEdges;\n }",
"void retract()\n\t\t{\n\t\t\tsides = sides-1;\n\t\t\t\n\t\t\tDimension[] dime2 = new Dimension[d.length - 1];\n\t\t\t\n\t\t\tfor (int i=0; i< d.length-1; i++)\n\t\t\t{\n\t\t\t\tdime2[i]= d[i];\n\t\t\t}\n\t\t\t\n\t\t\td = new Dimension[d.length - 1];\n\t\t\tfor(int i = 0; i< dime2.length; i++)\n\t\t\t{\n\t\t\t\td[i] = dime2[i];\n\t\t\t}\n\t\t\t\t\n\t\t}",
"public List<Location> neighbors (Location pos);",
"private void connectToOpenNeighbors(int currentSite)\n {\n int aboveSite = currentSite - gridSize;\n int leftOfSite = currentSite - 1;\n int rightOfSite = currentSite + 1;\n int belowSite = currentSite + gridSize;\n\n if (aboveSite > 0) {\n if (grid[aboveSite]) {\n uf.union(currentSite, aboveSite);\n }\n }\n\n if (rightOfSite % gridSize != 0 && rightOfSite < totalSites) {\n if (grid[rightOfSite]) {\n uf.union(currentSite, rightOfSite);\n }\n }\n\n if (leftOfSite % gridSize != gridSize-1 && leftOfSite > 0) {\n if (grid[leftOfSite]) {\n uf.union(currentSite, leftOfSite);\n }\n }\n\n if (belowSite < totalSites) {\n if (grid[belowSite]) {\n uf.union(currentSite, belowSite);\n }\n }\n }",
"public void generateNeighborhood(TSPSolution s){\r\n\t\tint [] rounte = new int[problem.city_num+1];\r\n\t\tfor(int i=0;i<problem.city_num;i++) rounte[i] = s.route[i];\r\n\t\trounte[problem.city_num] = rounte[0];\r\n\t\tint [] pos = new int[problem.city_num];\r\n\t\tproblem.calculatePosition(rounte, pos);\r\n\t\tint pos1 = 0;\r\n\t\tint pos2 = 0;\r\n\t\tfor(int k=0;k<problem.city_num;k++){\r\n\t\t\tint i = k;\r\n\t\t\tpos1 = i;\r\n\t\t\tint curIndex = rounte[i];\r\n\t\t\tint nextIndex = rounte[i+1];\r\n\t\t\tArrayList<Integer> candidate = problem.candidateList.get(curIndex);\r\n\t\t\tIterator<Integer> iter = candidate.iterator();\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tint next = iter.next();\r\n\t\t\t\tpos2 = pos[next];\r\n\t\t\t\tint curIndex1 = rounte[pos2];\r\n\t\t\t\tint nextIndex1 = rounte[pos2+1];\r\n\t\t\t\tif(curIndex == nextIndex1) continue;\r\n\t\t\t\tif(curIndex == curIndex1) continue;\r\n\t\t\t\tif(nextIndex == nextIndex1) continue;\r\n\t\t\t\tif(curIndex1 == nextIndex) continue;\r\n\t\t\t\tint betterTimes = 0;\r\n\t\t\t\tTSPSolution solution = new TSPSolution(problem.city_num, problem.obj_num, -1);\r\n\t\t\t\tfor(int j=0;j<problem.obj_num;j++){\r\n\t\t\t\t\tint gain = problem.disMatrix[j*problem.city_num*problem.city_num+curIndex*problem.city_num+curIndex1] +\r\n\t\t\t\t\t\t\tproblem.disMatrix[j*problem.city_num*problem.city_num+nextIndex*problem.city_num+nextIndex1] - \r\n\t\t\t\t\t\t\t(problem.disMatrix[j*problem.city_num*problem.city_num+curIndex*problem.city_num+nextIndex]+\r\n\t\t\t\t\t\t\tproblem.disMatrix[j*problem.city_num*problem.city_num+curIndex1*problem.city_num+nextIndex1]);\r\n\t\t\t\t\tif(gain<0) betterTimes++;\r\n\t\t\t\t\tsolution.object_val[j] = s.object_val[j] + gain;\r\n\t\t\t\t}\r\n\t\t\t\tif(betterTimes==0) continue;\r\n\t\t\t\tsolution.route = s.route.clone();\r\n\r\n\t\t\t\tif(problem.kdSet.add(solution)){\r\n\t\t\t\t\tproblem.converse(pos1, pos2, solution.route, 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void mutate() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tpopulationArray.set(i, populationArray.get(i).generateNeighbor());\n\t\t}\n\t}",
"static void drawTopo() {\n\t\tif (currentStage[currentSlice-1]>2)\n\t\t{\n\t\t\tfloat x1,y1,x2,y2;\n\t\t\tint N = pop.N;\n\t\t\tArrayList balloons = pop.BallList;\n\n\t\t\tfor (int i=0;i<N;i++)\n\t\t\t{\n\t\t\t\tPoint P1 = ((Balloon)(balloons.get(i))).getPoint();\n\t\t\t\tx1 = (float)(P1.getX());\n\t\t\t\ty1 = (float)(P1.getY());\n\n\t\t\t\tfor (int j=0;j<i;j++)\n\t\t\t\t{\n\t\t\t\t\tif (pop.topo[i][j]==true)\n\t\t\t\t\t{\n\t\t\t\t\t\t// label connection between cells (potential neighbours)\n\t\t\t\t\t\tjava.awt.geom.GeneralPath Tshape = new GeneralPath();\n\t\t\t\t\t\tPoint P2 = ((Balloon)(balloons.get(j))).getPoint();\n\t\t\t\t\t\tx2 = (float)(P2.getX());\n\t\t\t\t\t\ty2 = (float)(P2.getY());\n\t\t\t\t\t\tTshape.moveTo(x1, y1);\n\t\t\t\t\t\tTshape.lineTo(x2, y2);\n\t\t\t\t\t\tRoi XROI = new ShapeRoi(Tshape);\n\t\t\t\t\t\tXROI.setStrokeWidth(1);\n\t\t\t\t\t\tXROI.setStrokeColor(Color.green);\n\t\t\t\t\t\tOL.add(XROI);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void calculateGlobals() {\n if (!edge.getIncomingLinks().isEmpty()) {\n this.source = edge.getIncomingLinks().get(0);\n } else\n throw new RuntimeException(\"edge hs no source : \" + edge.getId());\n if (!edge.getOutgoingLinks().isEmpty()) {\n this.target = edge.getOutgoingLinks().get(0);\n } else\n throw new RuntimeException(\"edge hs no target : \" + edge.getId());\n\n this.sourceGeometry = source.getGeometry();\n this.targetGeometry = target.getGeometry();\n\n // get relative centers of elements\n this.sourceRelativCenterX = this.sourceGeometry.getWidth() / 2;\n this.sourceRelativCenterY = this.sourceGeometry.getHeight() / 2;\n this.targetRelativCenterX = this.targetGeometry.getWidth() / 2;\n this.targetRelativCenterY = this.targetGeometry.getHeight() / 2;\n\n // get parent adjustments\n double sourceParentAdjustmentX = 0;\n double sourceParentAdjustmentY = 0;\n LayoutingElement parent = this.source.getParent();\n while (parent != null) {\n sourceParentAdjustmentX += parent.getGeometry().getX();\n sourceParentAdjustmentY += parent.getGeometry().getY();\n parent = parent.getParent();\n }\n\n double targetParentAdjustmentX = 0;\n double targetParentAdjustmentY = 0;\n parent = this.target.getParent();\n while (parent != null) {\n targetParentAdjustmentX += parent.getGeometry().getX();\n targetParentAdjustmentY += parent.getGeometry().getY();\n parent = parent.getParent();\n }\n\n // get absolute coordinates\n double sourceAbsoluteX = this.sourceGeometry.getX() + sourceParentAdjustmentX;\n this.sourceAbsoluteY = this.sourceGeometry.getY() + sourceParentAdjustmentY;\n this.sourceAbsoluteX2 = this.sourceGeometry.getX2() + sourceParentAdjustmentX;\n this.sourceAbsoluteY2 = this.sourceGeometry.getY2() + sourceParentAdjustmentY;\n\n this.targetAbsoluteX = this.targetGeometry.getX() + targetParentAdjustmentX;\n this.targetAbsoluteY = this.targetGeometry.getY() + targetParentAdjustmentY;\n this.targetAbsoluteY2 = this.targetGeometry.getY2() + targetParentAdjustmentY;\n\n this.sourceAbsoluteCenterX = sourceAbsoluteX + this.sourceRelativCenterX;\n this.sourceAbsoluteCenterY = this.sourceAbsoluteY + this.sourceRelativCenterY;\n this.targetAbsoluteCenterX = this.targetAbsoluteX + this.targetRelativCenterX;\n this.targetAbsoluteCenterY = this.targetAbsoluteY + this.targetRelativCenterY;\n\n // layout hints\n this.sourceJoin = this.source.isJoin();\n this.sourceSplit = this.source.isSplit();\n this.targetJoin = this.target.isJoin();\n this.target.isSplit();\n this.backwards = this.sourceAbsoluteCenterX > this.targetAbsoluteCenterX;\n }",
"private void updateGrid() {\n\t\tfor (Neighbor neighbor : upsetNeighbors) {\n\t\t\tClear vacated_cell = new Clear(neighbor.getCoordsX(), neighbor.getCoordsY());\n\t\t\tgrid.setGridIndex(vacated_cell, vacated_cell.getCoordsX(), vacated_cell.getCoordsY());\n\t\t\tCell new_location = availableSpaces.get((int) (Math.random() * (availableSpaces.size() - 1)));\n\t\t\tint new_x = new_location.getCoordsX();\n\t\t\tint new_y = new_location.getCoordsY();\n\t\t\tif (neighbor.getClass().equals(Group1.class))\n\t\t\t\tgrid.setGridIndex(new Group1(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\telse\n\t\t\t\tgrid.setGridIndex(new Group2(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\tavailableSpaces.remove(new_location);\n\t\t\tavailableSpaces.add(vacated_cell);\n\t\t}\n\t}",
"protected Complex selfAdmittance()\r\n\t\t{\r\n\t\t\treturn neighbours.get(this);\r\n\t\t}",
"void oracle(){\n if (this.neighbors < 1){\n if (!isAlive()){\n observer.deleteCell(id);\n }\n }\n }",
"protected void alter_for_neighbour_switch() {\n\t\tint this_l, tother_l, ns_i, ns_j, ns_n;\n\t\t\n\t\t// Let the user know...\n\t\tSystem.out.println(\" H THIS IS IN N_SWITCH (nn comparison) mode, for structure \"+INIT_NPHASE);\n\t\tSystem.out.println(\" H en_shift = \"+EN_SHIFT);\n\t\t\n\t\t// Check that there is room at the inn:\n\t\tif( n > MAX_NNS ) {\n\t\t\tthrow( new LSSimException(LSSimException.PARAM,\n\t\t\t\"neighbour switch needs \"+n+\" neighbours in MAX_NNS!\\n\"));\n\t\t}\n\t\t\n\t\t// Make both structures the same:\n\t\tthis_l = INIT_NPHASE;\n\t\ttother_l = 1 - this_l;\n\t\tfor( ns_i = 0; ns_i < n; ns_i++ ) {\n\t\t\tlatt[tother_l][ns_i].x = latt[this_l][ns_i].x;\n\t\t\tlatt[tother_l][ns_i].y = latt[this_l][ns_i].y;\n\t\t\tlatt[tother_l][ns_i].z = latt[this_l][ns_i].z;\n\t\t\t// copy nn lists as well!\n\t\t\tns_n = 0; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\twhile ( ns_j != NO_MORE_NNS ) {\n\t\t\t\tnns[tother_l][ns_i][ns_n] = nns[this_l][ns_i][ns_n];\n\t\t\t\tns_n++; ns_j = nns[this_l][ns_i][ns_n];\n\t\t\t}\n\t\t\tnns[tother_l][ns_i][ns_n] = NO_MORE_NNS;\n\t\t}\n\t\t\n\t\t// Alter the neighbour list for structure 1;\n\t\tmake_it_order_n_squared(1);\n\t}",
"private void smoothAdjacentCollapsibles(TECarpentersBlock TE, int src_quadrant)\n \t{\n \t\tTECarpentersBlock TE_XN = TE.worldObj.getBlockId(TE.xCoord - 1, TE.yCoord, TE.zCoord) == blockID ? (TECarpentersBlock)TE.worldObj.getBlockTileEntity(TE.xCoord - 1, TE.yCoord, TE.zCoord) : null;\n \t\tTECarpentersBlock TE_XP = TE.worldObj.getBlockId(TE.xCoord + 1, TE.yCoord, TE.zCoord) == blockID ? (TECarpentersBlock)TE.worldObj.getBlockTileEntity(TE.xCoord + 1, TE.yCoord, TE.zCoord) : null;\n \t\tTECarpentersBlock TE_ZN = TE.worldObj.getBlockId(TE.xCoord, TE.yCoord, TE.zCoord - 1) == blockID ? (TECarpentersBlock)TE.worldObj.getBlockTileEntity(TE.xCoord, TE.yCoord, TE.zCoord - 1) : null;\n \t\tTECarpentersBlock TE_ZP = TE.worldObj.getBlockId(TE.xCoord, TE.yCoord, TE.zCoord + 1) == blockID ? (TECarpentersBlock)TE.worldObj.getBlockTileEntity(TE.xCoord, TE.yCoord, TE.zCoord + 1) : null;\n \t\tTECarpentersBlock TE_XZNN = TE.worldObj.getBlockId(TE.xCoord - 1, TE.yCoord, TE.zCoord - 1) == blockID ? (TECarpentersBlock)TE.worldObj.getBlockTileEntity(TE.xCoord - 1, TE.yCoord, TE.zCoord - 1) : null;\n \t\tTECarpentersBlock TE_XZNP = TE.worldObj.getBlockId(TE.xCoord - 1, TE.yCoord, TE.zCoord + 1) == blockID ? (TECarpentersBlock)TE.worldObj.getBlockTileEntity(TE.xCoord - 1, TE.yCoord, TE.zCoord + 1) : null;\n \t\tTECarpentersBlock TE_XZPN = TE.worldObj.getBlockId(TE.xCoord + 1, TE.yCoord, TE.zCoord - 1) == blockID ? (TECarpentersBlock)TE.worldObj.getBlockTileEntity(TE.xCoord + 1, TE.yCoord, TE.zCoord - 1) : null;\n \t\tTECarpentersBlock TE_XZPP = TE.worldObj.getBlockId(TE.xCoord + 1, TE.yCoord, TE.zCoord + 1) == blockID ? (TECarpentersBlock)TE.worldObj.getBlockTileEntity(TE.xCoord + 1, TE.yCoord, TE.zCoord + 1) : null;\n \t\t\n \t\tint height = Collapsible.getQuadHeight(TE, src_quadrant);\n \t\t\n \t\tswitch (src_quadrant)\n \t\t{\n \t\tcase Collapsible.QUAD_XZNN:\n \t\t\tif (TE_ZN != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_ZN, Collapsible.QUAD_XZNP, height);\n \t\t\t}\n \t\t\tif (TE_XZNN != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_XZNN, Collapsible.QUAD_XZPP, height);\n \t\t\t}\n \t\t\tif (TE_XN != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_XN, Collapsible.QUAD_XZPN, height);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase Collapsible.QUAD_XZNP:\n \t\t\tif (TE_XN != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_XN, Collapsible.QUAD_XZPP, height);\n \t\t\t}\n \t\t\tif (TE_XZNP != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_XZNP, Collapsible.QUAD_XZPN, height);\n \t\t\t}\n \t\t\tif (TE_ZP != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_ZP, Collapsible.QUAD_XZNN, height);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase Collapsible.QUAD_XZPN:\n \t\t\tif (TE_XP != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_XP, Collapsible.QUAD_XZNN, height);\n \t\t\t}\n \t\t\tif (TE_XZPN != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_XZPN, Collapsible.QUAD_XZNP, height);\n \t\t\t}\n \t\t\tif (TE_ZN != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_ZN, Collapsible.QUAD_XZPP, height);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase Collapsible.QUAD_XZPP:\n \t\t\tif (TE_ZP != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_ZP, Collapsible.QUAD_XZPN, height);\n \t\t\t}\n \t\t\tif (TE_XZPP != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_XZPP, Collapsible.QUAD_XZNN, height);\n \t\t\t}\n \t\t\tif (TE_XP != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE_XP, Collapsible.QUAD_XZNP, height);\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n \t}",
"private void setNeighbors() {\n\t\tfor (int i = 0; i < getNumRows(); i++) {\n\t\t\tfor (int j = 0; j < getNumCols(); j++) {\n\t\t\t\tCell c = getCurrentGrid()[i][j];\n\t\t\t\tsetNeighborsForCell(c);\n\t\t\t}\n\t\t}\n\t}",
"public void setAdjacent()\r\n {\n \t\r\n adjacentTiles = new Tile[6];\r\n \r\n \r\n //Driver.map[VERT][HOR]\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos > 1) //topleft\r\n {\r\n \ttopLeft = Driver.map[verticalPos + 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \ttopLeft = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length - 2) //top\r\n {\r\n \ttop = Driver.map[verticalPos + 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \ttop = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos < Driver.map[0].length) //topright\r\n {\r\n \ttopRight = Driver.map[verticalPos + 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \ttopRight = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos < Driver.map[0].length) //bottomright\r\n {\r\n \tbottomRight = Driver.map[verticalPos - 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \tbottomRight = null;\r\n }\r\n \r\n if(verticalPos > 2) //bottom\r\n {\r\n \tbottom = Driver.map[verticalPos - 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \tbottom = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos > 1) //botttomLeft\r\n {\r\n \tbottomLeft = Driver.map[verticalPos - 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \tbottomLeft = null;\r\n }\r\n \t\r\n \r\n adjacentTiles[0] = topLeft;\r\n adjacentTiles[1] = top;\r\n adjacentTiles[2] = topRight;\r\n adjacentTiles[3] = bottomRight;\r\n adjacentTiles[4] = bottom;\r\n adjacentTiles[5] = bottomLeft;\r\n \r\n \r\n// System.out.print(\"main tile \" + getHor() + \", \" + getVert() + \" \");\r\n// for(int i = 0; i < adjacentTiles.length; i++)\r\n// {\r\n// \tif( adjacentTiles[i] != null)\r\n// \t\tSystem.out.print(adjacentTiles[i].getHor() + \", \" + adjacentTiles[i].getVert() + \" | \");\r\n// \telse\r\n// \t\tSystem.out.print(\"null \");\r\n// }\r\n// System.out.println();\r\n \r\n }",
"void removeNeighbors();",
"public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private ArrayList<Integer> setUnvisitedNeighbors(int currentIndex) {\n\t\t\n\t\tint row = currentIndex / width;\t\t\t\t\t\t\t\t\t\t\t\t//number of row\n\t\tint column = currentIndex % width;\t\t\t\t\t\t\t\t\t\t\t//number of column\n\t\t\n\t\tArrayList<Integer> neighbors = new ArrayList<Integer>();\n\t\t\n\t\tif(row != 0 && !cells[currentIndex - width].visited ) {\t\t\t\t\t\t// cell has upper neighbor\n\t\t\tint upperIndex = ((row - 1) * width) + column;\n\t\t\tneighbors.add(upperIndex);\n\t\t}\n\t\tif(row != height - 1 && !cells[currentIndex + width].visited ) {\t\t\t//cell has lower neighbor\n\t\t\tint lowerIndex = ((row + 1) * width) + column;\n\t\t\tneighbors.add(lowerIndex);\n\t\t}\n\t\tif(column != 0 && !cells[currentIndex - 1].visited) {\t\t\t\t\t\t//cell has left neighbor\n\t\t\tint leftIndex = currentIndex - 1;\n\t\t\tneighbors.add(leftIndex);\n\t\t}\n\t\tif(column != width - 1 && !cells[currentIndex + 1].visited) {\t\t\t\t//cell has right neighbor\n\t\t\tint rightIndex = currentIndex + 1;\n\t\t\tneighbors.add(rightIndex);\n\t\t}\n\t\treturn neighbors;\n\t}",
"private void updateTempVisiblePoints() {\n for (int[] point : tempVisiblePoints) {\n point[3] -= 1;\n if (point[3] <= 0) {\n map.setPointHidden(point[0], point[1]);\n }\n }\n }",
"void B_time()\n {\n System.out.println(\"Ghost current position: ( \"+X+\",\"+Y+\")\");\n double[][] dup = new double[n][n];\n //int temp = rand.nextInt(10);\n for (int i = 0; i < n; i++)\n {\n for (int j = 0; j < n; j++)\n {\n double x = 0;\n //*****SIDEWAYS****\n\n if( (j-1 >= 0) && (j-1 < n))\n {\n double a = side_neighbour(i,j-1);\n x += arr[i][j-1] * sw * (1.0/a);\n }\n if( (j+1 >= 0) && (j+1 < n))\n {\n double a = side_neighbour(i,j+1);\n x += arr[i][j+1] * sw * (1.0/a);\n }\n if( (i-1 >= 0) && (i-1 < n))\n {\n double a = side_neighbour(i-1,j);\n x += arr[i-1][j] * sw * (1.0/a);\n }\n if( (i+1 >= 0) && (i+1 < n))\n {\n double a = side_neighbour(i+1,j);\n x += arr[i+1][j] * sw * (1.0/a);\n }\n\n //*****CORNERS****\n if( (i-1 >= 0) && (i-1 < n) && (j-1 >= 0) && (j-1 < n))\n {\n double a = corner_neighbours(i-1,j-1);\n x += arr[i-1][j-1] * c *(1.0/a);\n }\n if( (i+1 >= 0) && (i+1 < n) && (j+1 >= 0) && (j+1 < n))\n {\n double a = corner_neighbours(i+1,j+1);\n x += arr[i+1][j+1] * c *(1.0/a);\n }\n if( (i-1 >= 0) && (i-1 < n) && (j+1 >= 0) && (j+1 < n))\n {\n double a = corner_neighbours(i-1,j+1);\n x += arr[i-1][j+1] * c * (1.0/a);\n }\n if( (i+1 >= 0) && (i+1 < n) && (j-1 >= 0) && (j-1 < n))\n {\n double a = corner_neighbours(i+1,j-1);\n x += arr[i+1][j-1] * c * (1.0/a);\n }\n\n double a = corner_neighbours(i,j);\n x += arr[i][j] * c * (1.0/a);\n\n //arr[i][j] = x;\n dup[i][j] = x;\n }\n }\n\n\n\n arr = dup;\n B_print();\n curr_pos(X,Y);\n\n }",
"void renewNeighbourClusters() {\n neighbourClusters = new HashMap<Cluster, Integer>();\n\n for (Person p : members) {\n for (Person x : p.getFriends()) {\n if (!members.contains(x)) {\n Cluster xC = x.getCluster();\n if (!neighbourClusters.containsKey(xC)) {\n neighbourClusters.put(xC, 1);\n } else {\n neighbourClusters.put(xC, neighbourClusters.get(xC) + 1);\n }\n }\n }\n }\n\n }",
"public void populateNeighbors(Cell[][] cells) {\n\t\tint limitHoriz = cells[0].length;\n\t\tint limitVert = cells.length;\n\t\t// above left\n\t\tif (myRow > 0 && myRow < limitVert - 1) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) {\n\t\t\t\tneighbors.add(cells[myRow][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol +1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol +1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol+1]);\n\t\t\t\t// ADD 8 cells to neighbors (see the diagram from the textbook)\n\t\t\t}\n\t\t\tif (myCol == 0) { // left edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow+1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow+1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol+1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // right edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow +1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow -1][myCol]);\n\t\t\t}\n\t\t}\n\t\tif (myRow == 0) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) { // top edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow][myCol + 1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow+1][myCol -1]);\n\t\t\t}\n\t\t\tif (myCol == 0) { // top left corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow][myCol + 1]);\n\t\t\t\tneighbors.add(cells[myRow + 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow + 1][myCol+1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // top right corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t}\n\t\t}\n\t\tif (myRow == limitVert - 1) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) { // bottom edge\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow][myCol +1]);\n\t\t\t}\n\t\t\tif (myCol == 0) { // bottom left corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow][myCol +1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // bottom right corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t}\n\t\t}\n\t}",
"private void backwardIteration() {\n\t\t// variables declaration\n\t\tint ortho;\n\t\tint diago;\n\t\tint diag2;\n\t\tint newVal;\n\n\t\t// Process last line: consider only the pixel just after (on the right)\n\t\tfor (int i = width - 2; i > 0; i--) {\n\t\t\tif (maskProc.getPixel(i, height - 1) != maskLabel)\n\t\t\t\tcontinue;\n\n\t\t\tnewVal = buffer.get(i + 1, height - 1) + weights[0];\n\t\t\tupdateIfNeeded(i, height - 1, newVal);\n\t\t}\n\n\t\t// last pixel of penultimate line: consider the 3 pixels below\n\t\tif (maskProc.getPixel(width - 1, height - 2) == maskLabel) {\n\t\t\tortho = buffer.get(width - 1, height - 1);\n\t\t\tdiago = buffer.get(width - 2, height - 1);\n\t\t\tdiag2 = buffer.get(width - 3, height - 1);\n\t\t\tnewVal = min3w(ortho, diago, diag2);\n\t\t\tupdateIfNeeded(width - 1, height - 2, newVal);\n\t\t}\n\n\t\t// penultimate pixel of penultimate line: consider right pixel, and the 4 pixels below\n\t\tif (maskProc.getPixel(width - 2, height - 2) == maskLabel) {\n\t\t\tortho = min(buffer.get(width - 1, height - 2), buffer.get(width - 2, height - 1));\n\t\t\tdiago = min(buffer.get(width - 1, height - 1), buffer.get(width - 3, height - 1));\n\t\t\tdiag2 = buffer.get(width - 4, height - 1);\n\t\t\tnewVal = min3w(ortho, diago, diag2);\n\t\t\tupdateIfNeeded(width - 2, height - 2, newVal);\n\t\t}\n\n\t\t// Process regular pixels of penultimate line\n\t\tfor (int i = width - 3; i > 0; i--) {\n\t\t\tif (maskProc.getPixel(i, height - 2) != maskLabel)\n\t\t\t\tcontinue;\n\n\t\t\t// minimum distance of neighbor pixels\n\t\t\tortho = min(buffer.get(i + 1, height - 2), buffer.get(i, height - 1));\n\t\t\tdiago = min(buffer.get(i - 1, height - 1), buffer.get(i + 1, height - 1));\n\t\t\tdiag2 = min(buffer.get(i - 2, height - 1), buffer.get(i + 2, height - 1));\n\t\t\t\n\t\t\t// compute new distance of current pixel\n\t\t\tnewVal = min3w(ortho, diago, diag2);\n\n\t\t\t// modify current pixel if needed\n\t\t\tupdateIfNeeded(i, height - 2, newVal);\n\t\t}\n\n\t\t// Process regular lines\n\t\tfor (int j = height - 3; j >= 0; j--) {\n\n\t\t\t// process last pixel of the current line: consider pixels\n\t\t\t// down, down-left and (-2,+1)\n\t\t\tif (maskProc.getPixel(width - 1, j) == maskLabel) {\n\t\t\t\tortho = buffer.get(width - 1, j + 1);\n\t\t\t\tdiago = buffer.get(width - 2, j + 1);\n\t\t\t\tdiag2 = buffer.get(width - 3, j + 1);\n\t\t\t\tnewVal = min3w(ortho, diago, diag2);\n\t\t\t\tupdateIfNeeded(width - 1, j, newVal);\n\t\t\t}\n\n\t\t\n\t\t\t// process penultimate pixel of current line\n\t\t\tif (maskProc.getPixel(width - 2, j) == maskLabel) {\n\n\t\t\t\t// minimum distance of neighbor pixels\n\t\t\t\tortho = min(buffer.get(width - 1, j), buffer.get(width - 2, j + 1));\n\t\t\t\tdiago = min(buffer.get(width - 3, j + 1), buffer.get(width - 1, j + 1));\n\t\t\t\tdiag2 = min3(\n\t\t\t\t\t\tbuffer.get(width - 3, j + 2), \n\t\t\t\t\t\tbuffer.get(width - 1, j + 2), \n\t\t\t\t\t\tbuffer.get(width - 4, j + 1));\n\t\t\t\t\n\t\t\t\t// compute new distance of current pixel\n\t\t\t\tnewVal = min3w(ortho, diago, diag2);\n\n\t\t\t\t// modify current pixel if needed\n\t\t\t\tupdateIfNeeded(width - 2, j, newVal);\n\t\t\t}\n\n\t\t\t// Process pixels in the middle of the current line\n\t\t\tfor (int i = width - 3; i > 1; i--) {\n\t\t\t\t// process only pixels inside structure\n\t\t\t\tif (maskProc.getPixel(i, j) != maskLabel)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// minimum distance of neighbor pixels\n\t\t\t\tortho = min(buffer.get(i + 1, j), buffer.get(i, j + 1));\n\t\t\t\tdiago = min(buffer.get(i - 1, j + 1), buffer.get(i + 1, j + 1));\n\t\t\t\tdiag2 = min(\n\t\t\t\t\t\tmin(buffer.get(i - 1, j + 2), buffer.get(i + 1, j + 2)),\n\t\t\t\t\t\tmin(buffer.get(i - 2, j + 1), buffer.get(i + 2, j + 1)));\n\t\t\t\t\n\t\t\t\t// compute new distance of current pixel\n\t\t\t\tnewVal = min3w(ortho, diago, diag2);\n\n\t\t\t\t// modify current pixel if needed\n\t\t\t\tupdateIfNeeded(i, j, newVal);\n\t\t\t}\n\n\t\t\t// process second pixel of current line: consider pixels right,\n\t\t\t// down-right and down\n\t\t\tif (maskProc.getPixel(1, j) == maskLabel) {\n\t\t\t\tortho = min(buffer.get(2, j), buffer.get(1, j + 1));\n\t\t\t\tdiago = min(buffer.get(0, j + 1), buffer.get(2, j + 1));\n\t\t\t\tdiag2 = min3(buffer.get(3, j + 2), buffer.get(2, j + 1), buffer.get(0, j + 1));\n\t\t\t\tnewVal = min3w(ortho, diago, diag2);\n\t\t\t\tupdateIfNeeded(1, j, newVal);\n\t\t\t}\n\n\t\t\t// process first pixel of current line: consider pixels right,\n\t\t\t// down-right and down\n\t\t\tif (maskProc.getPixel(0, j) == maskLabel) {\n\t\t\t\tortho = min(buffer.get(1, j), buffer.get(0, j + 1));\n\t\t\t\tdiago = buffer.get(1, j + 1);\n\t\t\t\tdiag2 = min(buffer.get(2, j + 2), buffer.get(1, j + 1));\n\t\t\t\tnewVal = min3w(ortho, diago, diag2);\n\t\t\t\tupdateIfNeeded(0, j, newVal);\n\t\t\t}\n\n\t\t} // end of processing for current line\n\t\t \n\t}",
"public void getNeighbors(){\n // North \n if(this.row - this.value>=0){\n this.north = adjacentcyList[((this.row - this.value)*col_size)+col];\n }\n // South\n if(this.row + value<row_size){\n this.south = adjacentcyList[((this.row+this.value)*row_size)+col];\n }\n // East\n if(this.col + this.value<col_size){\n this.east = adjacentcyList[((this.col+this.value)+(this.row)*(col_size))];\n }\n // West\n if(this.col - this.value>=0){\n this.west = adjacentcyList[((this.row*col_size)+(this.col - this.value))];\n }\n }",
"public Stack<Position> getAllNeighborPosition(Position p){\n Stack<Position> stackP=new Stack<Position>();\n Position up=new Position(p.getRow()-1,p.getCol());\n stackP.add(up);\n Position down=new Position(p.getRow()+1,p.getCol());\n stackP.add(down);\n Position right=new Position(p.getRow(),p.getCol()+1);\n stackP.add(right);\n Position left=new Position(p.getRow(),p.getCol()-1);\n stackP.add(left);\n return stackP;\n }",
"private final void relaxNeighbors(_Node unsettledNode)\r\n {\r\n for (_Edge destinationEdge : map.getDestinations(unsettledNode))\r\n {\r\n \tif (isSettled(destinationEdge.getEndNode())) continue;\r\n \tint shortDist = getShortestDistance(unsettledNode) + destinationEdge.getWeight();// map.getDistance(unsettledNode, destinationEdge.getEndNode());\r\n if (shortDist <= getShortestDistance(destinationEdge.getEndNode()))\r\n {\r\n setShortestDistance(destinationEdge.getEndNode(), shortDist);\r\n setPredecessor(destinationEdge.getEndNode(),unsettledNode);\r\n }\r\n } \r\n }",
"private Deque<MazeRoom> getUnvisitedNeighbors(MazeRoom target) {\n\t\tDeque<MazeRoom> unvisitedRooms = new LinkedList<MazeRoom>();\n\t\tint x = target.getCol();\n\t\tint y = target.getRow();\n\n\t\tif (x > 0 && !visited[y][x - 1]) {\n\t\t\tunvisitedRooms.add(theGrid[y][x - 1]);\n\t\t}\n\n\t\tif (x + 1 < theGrid.length && !visited[y][x + 1]) {\n\t\t\tunvisitedRooms.add(theGrid[y][x + 1]);\n\t\t}\n\t\tif (y > 0 && !visited[y - 1][x]) {\n\t\t\tunvisitedRooms.add(theGrid[y - 1][x]);\n\t\t}\n\t\tif (y + 1 < theGrid.length && !visited[y + 1][x]) {\n\t\t\tunvisitedRooms.add(theGrid[y + 1][x]);\n\t\t}\n\t\treturn unvisitedRooms;\n\t}",
"private ArrayList<GridPiece> getDirectNeighbors(GridPiece piece) {\n neighbors.clear();\n\n //Top\n if (game.gridMap.size() > piece.row + 1) {\n neighbors.add(game.gridMap.get(piece.row + 1).get(piece.column));\n }\n //Bottom\n if (piece.row > 0) {\n neighbors.add(game.gridMap.get(piece.row - 1).get(piece.column));\n }\n\n //Right\n if (game.gridMap.get(0).size() > piece.column + 1) {\n neighbors.add(game.gridMap.get(piece.row).get(piece.column + 1));\n }\n\n //Left\n if (piece.column > 0) {\n neighbors.add(game.gridMap.get(piece.row).get(piece.column - 1));\n }\n\n return neighbors;\n }",
"public Collection<N> neighbors();",
"private void expandNode() {\r\n\t\t\t// Dijkstra's algorithm to handle separately\r\n\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\tCell u;\r\n\t\t\t\t// 11: while Q is not empty:\r\n\t\t\t\tif (graph.isEmpty()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// 12: u := vertex in Q (graph) with smallest distance in dist[]\r\n\t\t\t\t// ;\r\n\t\t\t\t// 13: remove u from Q (graph);\r\n\t\t\t\tu = graph.remove(0);\r\n\t\t\t\t// Add vertex u in closed set\r\n\t\t\t\tclosedSet.add(u);\r\n\t\t\t\t// If target has been found ...\r\n\t\t\t\tif (u.row == targetPos.row && u.col == targetPos.col) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Counts nodes that have expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[u.row][u.col] = CLOSED;\r\n\t\t\t\t// 14: if dist[u] = infinity:\r\n\t\t\t\tif (u.dist == INFINITY) {\r\n\t\t\t\t\t// ... then there is no solution.\r\n\t\t\t\t\t// 15: break;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t// 16: end if\r\n\t\t\t\t}\r\n\t\t\t\t// Create the neighbors of u\r\n\t\t\t\tArrayList<Cell> neighbors = createSuccesors(u, false);\r\n\t\t\t\t// 18: for each neighbor v of u:\r\n\t\t\t\tfor (Cell v : neighbors) {\r\n\t\t\t\t\t// 20: alt := dist[u] + dist_between(u, v) ;\r\n\t\t\t\t\tint alt = u.dist + distBetween(u, v);\r\n\t\t\t\t\t// 21: if alt < dist[v]:\r\n\t\t\t\t\tif (alt < v.dist) {\r\n\t\t\t\t\t\t// 22: dist[v] := alt ;\r\n\t\t\t\t\t\tv.dist = alt;\r\n\t\t\t\t\t\t// 23: previous[v] := u ;\r\n\t\t\t\t\t\tv.prev = u;\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[v.row][v.col] = FRONTIER;\r\n\t\t\t\t\t\t// 24: decrease-key v in Q;\r\n\t\t\t\t\t\t// (sort list of nodes with respect to dist)\r\n\t\t\t\t\t\tCollections.sort(graph, new CellComparatorByDist());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// The handling of the other four algorithms\r\n\t\t\t} else {\r\n\t\t\t\tCell current;\r\n\t\t\t\tif (dfs.isSelected() || bfs.isSelected()) {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms DFS and BFS\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET ...\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms A* and Greedy\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET,\r\n\t\t\t\t\t// for which f(Si) ≤ f(Sj) for all other\r\n\t\t\t\t\t// open states Sj ...\r\n\t\t\t\t\t// (sort first OPEN SET list with respect to 'f')\r\n\t\t\t\t\tCollections.sort(openSet, new CellComparatorByF());\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t}\r\n\t\t\t\t// ... and add it to CLOSED SET.\r\n\t\t\t\tclosedSet.add(0, current);\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[current.row][current.col] = CLOSED;\r\n\t\t\t\t// If the selected node is the target ...\r\n\t\t\t\tif (current.row == targetPos.row && current.col == targetPos.col) {\r\n\t\t\t\t\t// ... then terminate etc\r\n\t\t\t\t\tCell last = targetPos;\r\n\t\t\t\t\tlast.prev = current.prev;\r\n\t\t\t\t\tclosedSet.add(last);\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Count nodes that have been expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Here is the 4rd step of the algorithms\r\n\t\t\t\t// 4. Create the successors of Si, based on actions\r\n\t\t\t\t// that can be implemented on Si.\r\n\t\t\t\t// Each successor has a pointer to the Si, as its predecessor.\r\n\t\t\t\t// In the case of DFS and BFS algorithms, successors should not\r\n\t\t\t\t// belong neither to the OPEN SET nor the CLOSED SET.\r\n\t\t\t\tArrayList<Cell> succesors;\r\n\t\t\t\tsuccesors = createSuccesors(current, false);\r\n\t\t\t\t// Here is the 5th step of the algorithms\r\n\t\t\t\t// 5. For each successor of Si, ...\r\n\t\t\t\tfor (Cell cell : succesors) {\r\n\t\t\t\t\t// ... if we are running DFS ...\r\n\t\t\t\t\tif (dfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the beginning of the list\r\n\t\t\t\t\t\t// OPEN SET\r\n\t\t\t\t\t\topenSet.add(0, cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are runnig BFS ...\r\n\t\t\t\t\t} else if (bfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the end of the list OPEN SET\r\n\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are running A* or Greedy algorithms (step 5\r\n\t\t\t\t\t\t// of A* algorithm) ...\r\n\t\t\t\t\t} else if (aStar.isSelected() || guloso.isSelected()) {\r\n\t\t\t\t\t\t// ... calculate the value f(Sj) ...\r\n\t\t\t\t\t\tint dxg = current.col - cell.col;\r\n\t\t\t\t\t\tint dyg = current.row - cell.row;\r\n\t\t\t\t\t\tint dxh = targetPos.col - cell.col;\r\n\t\t\t\t\t\tint dyh = targetPos.row - cell.row;\r\n\t\t\t\t\t\tif (diagonal.isSelected()) {\r\n\t\t\t\t\t\t\t// with diagonal movements\r\n\t\t\t\t\t\t\t// calculate 1000 times the Euclidean distance\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + (int) ((double) 1000 * Math.sqrt(dxg * dxg + dyg * dyg));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = (int) ((double) 1000 * Math.sqrt(dxh * dxh + dyh * dyh));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// without diagonal movements\r\n\t\t\t\t\t\t\t// calculate Manhattan distances\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + Math.abs(dxg) + Math.abs(dyg);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = Math.abs(dxh) + Math.abs(dyh);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcell.f = cell.g + cell.h;\r\n\t\t\t\t\t\t// ... If Sj is neither in the OPEN SET nor in the\r\n\t\t\t\t\t\t// CLOSED SET states ...\r\n\t\t\t\t\t\tint openIndex = isInList(openSet, cell);\r\n\t\t\t\t\t\tint closedIndex = isInList(closedSet, cell);\r\n\t\t\t\t\t\tif (openIndex == -1 && closedIndex == -1) {\r\n\t\t\t\t\t\t\t// ... then add Sj in the OPEN SET ...\r\n\t\t\t\t\t\t\t// ... evaluated as f(Sj)\r\n\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t// Else ...\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// ... if already belongs to the OPEN SET, then ...\r\n\t\t\t\t\t\t\tif (openIndex > -1) {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (openSet.get(openIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\topenSet.remove(openIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// ... if already belongs to the CLOSED SET,\r\n\t\t\t\t\t\t\t\t// then ...\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (closedSet.get(closedIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\tclosedSet.remove(closedIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"private void findLargestNNIPointsIndexPair(float ratioInh, float ratioAct) {\n ArrayList<Point> pts0 = new ArrayList<Point>();\n ArrayList<Point> pts1 = new ArrayList<Point>();\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n int newNListSize;\n if (ratioInh > ratioAct) {\n newNListSize = (int) (size * ratioInh);\n pts0 = cnvIndexList2Points(layoutPanel.activeNList);\n pts1 = cnvIndexList2Points(layoutPanel.inhNList);\n } else {\n newNListSize = (int) (size * ratioAct);\n pts0 = cnvIndexList2Points(layoutPanel.inhNList);\n pts1 = cnvIndexList2Points(layoutPanel.activeNList);\n }\n double len = Math.sqrt((double) size / (double) newNListSize);\n\n ArrayList<Point> union = new ArrayList<Point>(pts0);\n union.addAll(pts1);\n double maxNNI = calcNearestNeighborIndex(union);\n ArrayList<Point> maxPts0 = pts0;\n ArrayList<Point> maxPts1 = pts1;\n for (int xShift = (int) Math.floor(-len / 2); xShift <= Math\n .ceil(len / 2); xShift++) {\n for (int yShift = (int) Math.floor(-len / 2); yShift <= Math\n .ceil(len / 2); yShift++) {\n if (xShift == 0 && yShift == 0) {\n continue;\n }\n int xShift0 = (int) Math.ceil((double) xShift / 2);\n int xShift1 = (int) Math.ceil((double) -xShift / 2);\n int yShift0 = (int) Math.ceil((double) yShift / 2);\n int yShift1 = (int) Math.ceil((double) -yShift / 2);\n // System.out.println(\"xShift = \" + xShift + \", xShift0 = \" +\n // xShift0 + \", xShift1 = \" + xShift1);\n ArrayList<Point> sftPts0 = getShiftedPoints(pts0, xShift0,\n yShift0);\n ArrayList<Point> sftPts1 = getShiftedPoints(pts1, xShift1,\n yShift1);\n union = new ArrayList<Point>(sftPts0);\n union.addAll(sftPts1);\n double nni = calcNearestNeighborIndex(union);\n if (nni > maxNNI) {\n maxNNI = nni;\n maxPts0 = sftPts0;\n maxPts1 = sftPts1;\n }\n }\n }\n\n if (ratioInh > ratioAct) {\n layoutPanel.activeNList = cnvPoints2IndexList(maxPts0);\n layoutPanel.inhNList = cnvPoints2IndexList(maxPts1);\n } else {\n layoutPanel.inhNList = cnvPoints2IndexList(maxPts0);\n layoutPanel.activeNList = cnvPoints2IndexList(maxPts1);\n }\n }",
"private void f0() \n\t{\n\t\tint elements = 0;\n\t\t\n\t\tfor(int i=0;i<f2.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<f2[0].length;j++)\n\t\t\t{\n\t\t\t\tif(f2[i][j])\n\t\t\t\t\telements++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(elements > 0){\n\t\t\tneighbors = new Neighbor[elements];\n\t\t\tint cy = (f2.length-1)/2; \n\t\t\tint cx = (f2[0].length-1)/2;\n\t\t\tint index=0;\n\t\t\t\n\t\t\tfor(int i=0;i<f2.length;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<f2[0].length;j++)\n\t\t\t\t{\n\t\t\t\t\tif(f2[i][j]){\n\t\t\t\t\t\tneighbors[index++] = new Neighbor(i-cy,j-cx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//No elements i.e all elements are false in the neighborhood buffer.\n\t\t\tneighbors = null;\n\t\t}\n\t\t\t\n\t}",
"public void step(){\n //System.out.println(\"step\");\n //display();\n Cell[][] copy = new Cell[world.length][world.length];\n for(int r = 0; r<world.length;r++){\n for(int c=0; c<world[r].length;c++){\n copy [r][c] = new Cell();\n copy[r][c].setState(world[r][c].isAlive());\n }\n }\n\n for(int r = 0; r<world.length;r++){\n for(int c=0; c<world[r].length;c++){ \n int n = getNumberOfLiveNeighbours(r,c);\n if(world[r][c].isAlive()){\n if(n<2||n>3){\n copy[r][c].setState(false);\n }\n }else{\n if(n==3){\n copy[r][c].setState(true);\n }\n }\n }\n }\n for(int r = 0; r<world.length;r++){\n for(int c=0; c<world[r].length;c++){\n world[r][c].setState(copy[r][c].isAlive());\n }\n }\n }",
"public void clearZeros(GridElement original){\n\t\tStack<GridElement> zerosToClear = new Stack<>();\n\t\tzerosToClear.push(original);\n\t\t\n\t\twhile(!zerosToClear.isEmpty()){\n\t\t\tGridElement temp = zerosToClear.pop();\n\t\t\tint x = temp.getxPosition();\n\t\t\tint y = temp.getyPosition();\n\t\t\t\n\t\t\t//up left\n\t\t\tif (x > 0 && y > 0){\n\t\t\t\tJButton upLeftButton = grid[x-1][y-1].getButton();\n\t\t\t\tupLeftButton.setText(neighborCounts[x-1][y-1] + \"\");\n\t\t\t\thandleButton(upLeftButton);\n\t\t\t\tif(neighborCounts[x-1][y-1] == 0 && upLeftButton.isEnabled()){\n\t\t\t\t\tzerosToClear.push(grid[x-1][y-1]);\n\t\t\t\t}\n\t\t\t\tupLeftButton.setEnabled(false);\n\t\t\t}\n\t\t\t//up\n\t\t\tif (y > 0){\n\t\t\t\tJButton upButton = grid[x][y-1].getButton();\n\t\t\t\tupButton.setText(neighborCounts[x][y-1] + \"\");\n\t\t\t\thandleButton(upButton);\n\t\t\t\tif(neighborCounts[x][y-1] == 0 && upButton.isEnabled()){\n\t\t\t\t\tzerosToClear.push(grid[x][y-1]);\n\t\t\t\t}\n\t\t\t\tupButton.setEnabled(false);\n\t\t\t}\n\t\t\t//up right\n\t\t\tif (x < width-1 && y > 0){\n\t\t\t\tJButton upRightButton = grid[x+1][y-1].getButton();\n\t\t\t\tupRightButton.setText(neighborCounts[x+1][y-1] + \"\");\n\t\t\t\thandleButton(upRightButton);\n\t\t\t\tif(neighborCounts[x+1][y-1] == 0 && upRightButton.isEnabled()){\n\t\t\t\t\tzerosToClear.push(grid[x+1][y-1]);\n\t\t\t\t}\n\t\t\t\tupRightButton.setEnabled(false);\n\t\t\t}\n\t\t\t//left\n\t\t\tif (x > 0){\n\t\t\t\tJButton leftButton = grid[x-1][y].getButton();\n\t\t\t\tleftButton.setText(neighborCounts[x-1][y] + \"\");\n\t\t\t\thandleButton(leftButton);\n\t\t\t\tif(neighborCounts[x-1][y] == 0 && leftButton.isEnabled()){\n\t\t\t\t\tzerosToClear.push(grid[x-1][y]);\n\t\t\t\t}\n\t\t\t\tleftButton.setEnabled(false);\n\t\t\t}\n\t\t\t//right\n\t\t\tif (x < width-1){\n\t\t\t\tJButton rightButton = grid[x+1][y].getButton();\n\t\t\t\trightButton.setText(neighborCounts[x+1][y] + \"\");\n\t\t\t\thandleButton(rightButton);\n\t\t\t\tif(neighborCounts[x+1][y] == 0 && rightButton.isEnabled()){\n\t\t\t\t\tzerosToClear.push(grid[x+1][y]);\n\t\t\t\t}\n\t\t\t\trightButton.setEnabled(false);\n\t\t\t}\n\t\t\t//down left\n\t\t\tif (x > 0 && y < height-1){\n\t\t\t\tJButton downLeftButton = grid[x-1][y+1].getButton();\n\t\t\t\tdownLeftButton.setText(neighborCounts[x-1][y+1] + \"\");\n\t\t\t\thandleButton(downLeftButton);\n\t\t\t\tif(neighborCounts[x-1][y+1] == 0 && downLeftButton.isEnabled()){\n\t\t\t\t\tzerosToClear.push(grid[x-1][y+1]);\n\t\t\t\t}\n\t\t\t\tdownLeftButton.setEnabled(false);\n\t\t\t}\n\t\t\t//down\n\t\t\tif (y < height-1){\n\t\t\t\tJButton downButton = grid[x][y+1].getButton();\n\t\t\t\tdownButton.setText(neighborCounts[x][y+1] + \"\");\n\t\t\t\thandleButton(downButton);\n\t\t\t\tif(neighborCounts[x][y+1] == 0 && downButton.isEnabled()){\n\t\t\t\t\tzerosToClear.push(grid[x][y+1]);\n\t\t\t\t}\n\t\t\t\tdownButton.setEnabled(false);\n\t\t\t}\n\t\t\t//down right\n\t\t\tif (x < width-1 && y < height-1){\n\t\t\t\tJButton downRightButton = grid[x+1][y+1].getButton();\n\t\t\t\tdownRightButton.setText(neighborCounts[x+1][y+1] + \"\");\n\t\t\t\thandleButton(downRightButton);\n\t\t\t\tif(neighborCounts[x+1][y+1] == 0 && downRightButton.isEnabled()){\n\t\t\t\t\tzerosToClear.push(grid[x+1][y+1]);\n\t\t\t\t}\n\t\t\t\tdownRightButton.setEnabled(false);\n\t\t\t}\n\t\t}\n\t}",
"Set<Edge> getIncomingNeighborEdges(boolean onUpwardPass) {\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID < v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn _outgoingEdges;\n\t\t\t\treturn outgoingEdges;\n\t\t}",
"private List<CellIndex> getNeighbours( CellIndex index )\r\n {\n List<CellIndex> neighbours = new ArrayList<World.CellIndex>();\r\n if( index.x % EnvSettings.getMAX_X() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x - 1, index.y, index.z ) );\r\n }\r\n if( index.x % EnvSettings.getMAX_X() != EnvSettings.getMAX_X() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x + 1, index.y, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y - 1, index.z ) );\r\n }\r\n if( index.y % EnvSettings.getMAX_Y() != EnvSettings.getMAX_Y() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y + 1, index.z ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != 0 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z - 1 ) );\r\n }\r\n if( index.z % EnvSettings.getMAX_Z() != EnvSettings.getMAX_Z() - 1 )\r\n {\r\n neighbours.add( new CellIndex( index.x, index.y, index.z + 1 ) );\r\n }\r\n return neighbours;\r\n }",
"public int infectNeighbours(Map map);",
"@Override\n protected KPMPSolution nextNeighbour() {\n List<KPMPSolutionWriter.PageEntry> edgePartition = bestSolution.getEdgePartition().stream().map(KPMPSolutionWriter.PageEntry::clone).collect(toCollection(ArrayList::new));\n KPMPSolution neighbourSolution = new KPMPSolution(bestSolution.getSpineOrder(), edgePartition, bestSolution.getNumberOfPages());\n edge = edgePartition.get(index);\n originalPageIndex = edge.page;\n newPageIndex = pageCounter;\n edgePartition.get(index).page = newPageIndex;\n index++;\n numberOfIterations++;\n return neighbourSolution;\n }",
"private void updateOriginalEdgesInMirror() {\n for (Edge edge : originalGraph.edges()) {\n if (!directEdgeMap.containsKey(edge)) {\n constructMirrorEdge(edge);\n }\n MirrorEdge mirrorEdge = directEdgeMap.get(edge);\n updateMirrorEdgeBends(edge, mirrorEdge);\n updateMirrorEdgeSegments(mirrorEdge);\n originalAttributesToMirror(edge);\n }\n }",
"public void fillEdges() {\n\t\tfor (int y = 0; y < mapSize; y++) {\n\t\t\tfor (int x = 0; x < mapSize; x++) {\n\t\t\t\tCoordinates coordinates = new Coordinates(x, y);\n\t\t\t\tint vertexSrc = coordinateToVertex(coordinates);\n\n\t\t\t\tif (deletedVertices.contains(vertexSrc)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tDirection[] directions = Direction.values();\n\n\t\t\t\tfor (Direction direction : directions) {\n\t\t\t\t\tCoordinates destCoordinates = new Coordinates(x, y);\n\n\t\t\t\t\tdestCoordinates = destCoordinates.addCoordinates(direction.coordinates());\n\n\t\t\t\t\tif (destCoordinates.areCorrect(mapSize)) {\n\t\t\t\t\t\tint vertexDest = coordinateToVertex(destCoordinates);\n\t\t\t\t\t\tif (!deletedVertices.contains(vertexDest)) {\n\t\t\t\t\t\t\taddEdge(vertexSrc, vertexDest);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void updateNeighborhood(){\n\t\tList<AnimalEntity> holdingCell = new ArrayList<AnimalEntity>();\n\t\t\n\t\t//add all entities to cell\n\t\tfor(int key: creatureEntities.keySet()){\n\t\t\tfor(AnimalEntity entity: creatureEntities.get(key)){\n\t\t\t\tholdingCell.add(entity);\n\t\t\t}\n\t\t}\n\t\t//clear the neighborhood\n\t\tfor(int key: creatureEntities.keySet()){\n\t\t\tcreatureEntities.get(key).clear();\n\t\t}\n\t\t//add them back\n\t\tfor(AnimalEntity entity: holdingCell){\n\t\t\taddAnimal(entity);\n\t\t}\n\t}",
"private void expandNode(final Node previewNode) {\n\t\tif (this.debugOut)\n\t\t\tSystem.out.println(\"@expandNode (\" + previewNode.getTile().getPosVector() + \"): \");\n\t\tDirection dir[];\n\t\tdir = Direction.values();\n\t\tfor (int i = 3; i >= 0; i--) {\n\n\t\t\tVector2 newPos = calcNewPos(previewNode.getTile().getPosVector(), dir[i]);\n\t\t\tif (this.debugOut)\n\t\t\t\tSystem.out.print(\"Pos \" + newPos + \" got: \");\n\n\t\t\tif (newPos.getX() >= this.state.getCurrViewSizeLimit().getX()\n\t\t\t\t\t|| newPos.getY() >= this.state.getCurrViewSizeLimit().getY() || newPos.getX() < 0\n\t\t\t\t\t|| newPos.getY() < 0) {\n\t\t\t\tif (this.debugOut) {\n\t\t\t\t\tSystem.out.println(\"OUT (out of level/array limits)\");\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Ignore walls and pits\n\t\t\t// preview node cant be a wall or something\n\t\t\t// make no sense @see PacmanSuche\n\n\t\t\tNode successor = new Node(state.getTile(newPos), previewNode);\n\t\t\tTileType sucType = successor.getTile().getTileType();\n\n\t\t\tif (sucType == TileType.WALL || sucType == TileType.PIT) {\n\t\t\t\tthis.closedList.add(successor);\n\t\t\t\tif (this.debugOut)\n\t\t\t\t\tSystem.out.println(\"OUT (wall/pit)\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (this.closedList.contains(successor)) {\n\t\t\t\tif (this.debugOut)\n\t\t\t\t\tSystem.out.println(\"OUT (is already in closedList)\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tevaluateNode(successor);\n\t\t\tif (this.debugOut)\n\t\t\t\tSystem.out.print(\"[\" + successor.getValue() + \"]\");\n\t\t\taddNode(successor);\n\t\t}\n\t}",
"private void asignNeighbours(String split [], String planetName){\n\t\tdouble length = Double.parseDouble(split[1]);\n\t\tboolean danger = Boolean.parseBoolean(split[2]);\n\t\t\n\t\tif(factoryMap.containsKey(planetName)&&factoryMap.containsKey(split[0])){\n\t\t\tfactoryMap.get(planetName).addNeghbour(new Path(length, factoryMap.get(split[0]), danger));\t\n\t\t}\n\t\tif(factoryMap.containsKey(planetName) && galaxy.containsKey(split[0])){\n\t\t\tfactoryMap.get(planetName).addNeghbour(new Path(length, galaxy.get(split[0]), danger));\t\n\t\t}\n\t\tif(galaxy.containsKey(planetName) && factoryMap.containsKey(split[0])){\n\t\t\tgalaxy.get(planetName).addNeghbour(new Path(length, factoryMap.get(split[0]), danger));\t\n\t\t}\n\t\tif(galaxy.containsKey(planetName) && galaxy.containsKey(split[0])){\n\t\t\tgalaxy.get(planetName).addNeghbour(new Path(length, galaxy.get(split[0]), danger));\n\t\t}\n\t}",
"public void printVisitedCells()\r\n\t{\r\n\t\tSystem.out.print(\"+ +\");\r\n\t\tfor (int i = 1; i < this.getWidth(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"-+\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t\tfor (int i = 0; i < this.getHeight(); i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\t// if cells are connected, no wall is printed in between them\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.WEST))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"|\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(c.getDiscoveryTime() != -1)\r\n\t\t\t\t\tSystem.out.print(c.getDiscoveryTime() % 10);\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"|\");\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\tSystem.out.print(\"+\");\r\n\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.SOUTH) || c == this.getCellAt(getHeight()-1, getWidth()-1))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"+\");\r\n\t\t}\r\n\t}",
"public void step() {\n\n if (n8) {\n // Your code here\n \n \n //by here, after your code, the cellsNext array should be updated properly\n }\n\n if (!n8) { // neighbours-4\n // your code here\n\n //by here, after your code, the cellsNext array should be updated properly\n }\n\n // Flip the arrays now.\n stepCounter++;\n\ttmp = cellsNow;\n cellsNow = cellsNext;\n\tcellsNext = tmp;\n\n }",
"private void addAllNeighbours(@NonNull final Location searchLoc) {\n for (int x = -1; x < 2; x++) {\n for (int y = -1; y < 2; y++) {\n if ((x == 0) && (y == 0)) {\n continue;\n }\n final long foundKey = Location.getKey(searchLoc.getScX() + x, searchLoc.getScY() + y,\n searchLoc.getScZ());\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }\n \n final long foundKey = Location.getKey(searchLoc.getScX(), searchLoc.getScY(), searchLoc.getScZ() + 1);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }",
"public ArrayList<ArrayList<ModuleElement>> getAllShortestRoutes(Biochip grid, ModuleElement dest){\n\t\tArrayList<ArrayList<ModuleElement>> route_list = new ArrayList<ArrayList<ModuleElement>>(); \n\t\tArrayList<ModuleElement> crt_route = new ArrayList<ModuleElement>();\n\t\tdouble crt_value = grid.getCell(dest.x, dest.y).value; \n\t\tcrt_route.add(dest);\n\t\troute_list.add(crt_route);\n\t\t//this.printGrid(grid);\n\t\t//System.out.println(grid.getCell(dest.x, dest.y).value); \n\t\t//System.out.println(\"Get sh_route for dest = \" + dest.x + dest.y + \"crt_value=\" + crt_value); \n\n\t\twhile(crt_value>0){\n\t\t\tArrayList<ArrayList<ModuleElement>> new_route_list = new ArrayList<ArrayList<ModuleElement>>(); \n\t\t\tcrt_value --; \n\t\t\tfor (int k=0; k<route_list.size();k++){\n\t\t\t\t//System.out.println(\"k=\" + k); \n\t\t\t\tcrt_route = route_list.get(k); \n\t\t\t\tint i = crt_route.get(crt_route.size()-1).x;\n\t\t\t\tint j = crt_route.get(crt_route.size()-1).y;\n\t\t\t\t// neighbors\n\t\t\t\tif (j+1<grid.width){\n\t\t\t\t\tCell right_n = grid.getCell(i, j+1);\n\t\t\t\t\tArrayList<ModuleElement> r_route = this.createNewRoute(grid, crt_route, right_n, crt_value); \n\t\t\t\t\tif (r_route!=null) new_route_list.add(r_route); \t\n\t\t\t\t}\n\t\t\t\tif (j-1>=0) {\n\t\t\t\t\tCell left_n = grid.getCell(i, j-1);\n\t\t\t\t\tArrayList<ModuleElement> l_route = this.createNewRoute(grid, crt_route, left_n, crt_value); \n\t\t\t\t\tif (l_route!=null) new_route_list.add(l_route); \n\t\t\t\t} \n\t\t\t\tif (i-1>=0) {\n\t\t\t\t\tCell up_n = grid.getCell(i-1, j);\n\t\t\t\t\tArrayList<ModuleElement> u_route = this.createNewRoute(grid, crt_route, up_n, crt_value); \n\t\t\t\t\tif (u_route!=null) new_route_list.add(u_route); \n\t\t\t\t} \n\t\t\t\tif (i+1<grid.height) {\n\t\t\t\t\tCell down_n = grid.getCell(i+1, j);\n\t\t\t\t\tArrayList<ModuleElement> d_route = this.createNewRoute(grid, crt_route, down_n, crt_value); \n\t\t\t\t\tif (d_route!=null) new_route_list.add(d_route); \t\n\t\t\t\t} \n\t\t\t\t//System.out.println(\"new_route_list = \" + new_route_list); \n\t\t\t}\n\t\t\troute_list = new_route_list; \n\t\t}\n\t\t\n\t\treturn route_list; \n\t}",
"public void gray_sweep(FTBitmapRec target) {\nDebug(0, DebugTag.DBG_SWEEP, TAG, \"gray_sweep\");\n int yindex;\n\n if (num_cells == 0) {\n return;\n }\n num_gray_spans = 0;\n FTTrace.Trace(7, TAG, \"gray_sweep: start \"+ycount);\n for (yindex = 0; yindex < ycount; yindex++) {\n TCellRec cell = ycells[yindex];\n int cover = 0;\n int x = 0;\n\n for ( ; cell != null; cell = cell.getNext()) {\n int area;\n\nDebug(0, DebugTag.DBG_SWEEP, TAG, String.format(\"cell->next: %d\", cell.getNext() == null ? -1 : cell.getNext().getSelf_idx()));\nDebug(0, DebugTag.DBG_SWEEP, TAG, String.format(\"gray_sweep 1: cell.x: %d x: %d, yindex: %d, cover: %x\", cell.getX(), x, yindex, cover));\n if (cell.getX() > x && cover != 0) {\n gray_hline(x, yindex, cover * (RasterUtil.ONE_PIXEL() * 2), cell.getX() - x );\n }\n cover += cell.getCover();\n area = cover * (RasterUtil.ONE_PIXEL() * 2) - cell.getArea();\n if (area != 0 && cell.getX() >= 0) {\n gray_hline(cell.getX(), yindex, area, 1 );\n }\n x = cell.getX() + 1;\n }\n if (cover != 0) {\n gray_hline(x, yindex, cover * (RasterUtil.ONE_PIXEL() * 2), count_ex - x);\n }\n }\n if (num_gray_spans > 0) {\n gray_render_span(span_y, num_gray_spans, gray_spans);\n }\n if (num_gray_spans > 0) {\n FTSpanRec span;\n int spanIdx = 0;\n int n;\n StringBuffer str = new StringBuffer(\"\");\n\n str.append(String.format(\"y = %3d \", span_y));\n for (n = 0; n < num_gray_spans; n++, spanIdx++) {\n span = gray_spans[spanIdx];\n str.append(String.format(\" [%d..%d]:0x%02x \",\n span.getX(), span.getX() + span.getLen() - 1, span.getCoverage() & 0xFF));\n }\n FTTrace.Trace(7, TAG, str.toString());\n }\n FTTrace.Trace(7, TAG, \"gray_sweep: end\");\n }",
"Neighbors() {\n HashMap<Integer, Double> neighbors = new HashMap<>();\n }",
"public HashSet<Position> getNeighborPos() { return neighborPos; }",
"private void setAllUnvisited(){\n\t\tfor(int i = 0; i < this.getDimension(); i++)\n\t\t\tthis.getGraph().setUnvisited(i);\n\t\tthis.visited = 0;\n\t}",
"public void traspose() {\n for (int row = 0; row < this.numberOfRows(); row++) {\n for (int col = row; col < this.numberOfCols(); col++) {\n double value = this.get(row, col);\n this.set(row, col, this.get(col, row));\n this.set(col, row, value);\n }\n }\n }",
"public abstract List<AStarNode> getNeighbours();",
"private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }",
"void reset() {\n\t\t\t_orderID = UNMARKED;\n\t\t\t_outgoingEdges.clear();\n\t\t\t//TODO when do we call this? when should we mark all edges as received?\n\t\t\tfor(Edge e : _neighborEdges.keySet()) {\n\t\t\t\t_neighborEdges.put(e, false);\n\t\t\t}\n\t\t}",
"private void resizeAndTransfer() {\r\n Node<K, V>[] newData = new Node[data.length * 2];\r\n\r\n for (int i = 0; i < data.length; i++) {\r\n if (data[i] != null) {\r\n addExistingElement(new Node(data[i].key, data[i].value), newData);\r\n Node currentElement = data[i];\r\n while (currentElement.next != null) {\r\n currentElement = currentElement.next;\r\n addExistingElement(new Node(currentElement.key, currentElement.value), newData);\r\n }\r\n }\r\n }\r\n data = newData;\r\n }",
"public void Mirror() {\n\t\t\r\n\t}",
"public void hunt() {\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(cells[i].visited == false) {\n\t\t\t\t\n\t\t\t\tint currentIndex = i;\n\t\t\t\t\n\t\t\t\tArrayList<Integer> neighbors = setVisitedNeighbors(i);\n\t\t\t\tint nextIndex = getRandomVisitedNeighborIndex(neighbors);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(neighbors.size() != 0 ) {\n\t\t\t\t\tcells[currentIndex].visited = true;\n\t\t\t\t\t\n\t\t\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\t\t\tbreak; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO not visited neighbors \n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is right \n\t\t\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\tkill(nextIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected Cell[] getNeighbours() {\r\n\t\treturn this.neighbours;\r\n\t}",
"private Stack<Cell> rebuildMovements(PDMatrix mat, Point p, Movement m)\n\t{\n\t\tStack<Cell> cell = new Stack<Cell>();\n\t\tm = m.inverse();\n\t\tdo {\n\t\t\tp = m.applyTo(p);\n\t\t\tCell last = mat.get(p);\n\t\t\tcell.add(last);\n\t\t\tm = last.NextDir(m);\n\t\t}\n\t\twhile(mat.get(p) != Cell.START);\n\t\treturn cell;\n\t}",
"public void reinitiallizeDistanceFunctionInside() {\n\t\tint i, j;\r\n\t\tfor (i = 0; i < _levelSet.length; i++) {\r\n\t\t\tfor (j = 0; j < _levelSet[i].length; j++) {\r\n\t\t\t\tint iPlus = imposeBorder(i + 1, _iSize);\r\n\t\t\t\tint iMinus = imposeBorder(i - 1, _iSize);\r\n\t\t\t\tint jPlus = imposeBorder(j + 1, _iSize);\r\n\t\t\t\tint jMinus = imposeBorder(j - 1, _iSize);\r\n\t\t\t\tif (_levelSet[i][j] <= 0) // // the check for points in region\r\n\t\t\t\t\t// // the check for points in border\r\n\t\t\t\t\tif (MatrixMath.anyNeighborIsOutside(_levelSet, i, j, iPlus,\r\n\t\t\t\t\t\t\tiMinus, jPlus, jMinus)) {\r\n\t\t\t\t\t\t// points in border are placed in narrowband\r\n\t\t\t\t\t\t// _narrowBandInside.add(new Location(i, j));\r\n\t\t\t\t\t\t_narrowBandInside.add(new Location(i, j));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// and location in distance matrix is set to infinite\r\n\t\t\t\t\t\t_levelSet[i][j] = Double.NEGATIVE_INFINITY;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// iterate until narrow band is empty\r\n\t\t// OrderByLevelSetValue comparator = new OrderByLevelSetValue();\r\n\t\t// while (_narrowBandInside.size() > 0) {\r\n\t\twhile (_narrowBandInside.size() > 0) {\r\n\t\t\t// get the maximum value\r\n\t\t\t// Location maxVal = _narrowBandInside.last();\r\n\t\t\tLocation maxVal = _narrowBandInside.last();\r\n\t\t\t// System.out.println(\"maxVal \" + maxVal);\r\n\t\t\t// System.out.println(\"_narrowBandInside.contains(maxVal) \"\r\n\t\t\t// + _narrowBandInside.contains(maxVal));\r\n\t\t\t// System.out.println(\"maxVal.compareTo(maxVal) \"\r\n\t\t\t// + maxVal.compareTo(maxVal));\r\n\r\n\t\t\t// get the neighbors that are still in _faraway\r\n\t\t\tint iPlus = imposeBorder(maxVal.i + 1, _iSize);\r\n\t\t\tint iMinus = imposeBorder(maxVal.i - 1, _iSize);\r\n\t\t\tint jPlus = imposeBorder(maxVal.j + 1, _iSize);\r\n\t\t\tint jMinus = imposeBorder(maxVal.j - 1, _iSize);\r\n\t\t\ttransferNeighborInside(iPlus, maxVal.j);\r\n\t\t\ttransferNeighborInside(iMinus, maxVal.j);\r\n\t\t\ttransferNeighborInside(maxVal.i, jPlus);\r\n\t\t\ttransferNeighborInside(maxVal.i, jMinus);\r\n\t\t\t// remove the value from the narrowband\r\n\t\t\t// _narrowBandInside.remove(maxVal);\r\n\t\t\t_narrowBandInside.remove(maxVal);\r\n\t\t}\r\n\t\t// done\r\n\t}",
"private neighbor_t(Builder builder) {\n super(builder);\n }",
"public Iterable<Board> neighbors() {\n LinkedList<Board> states = new LinkedList<>();\n LinkedList<int[]> neighbors = neighborFinder();\n int[] curr_loc = blankFinder();\n\n for(int[] temp : neighbors){\n tiles[curr_loc[0]][curr_loc[1]] = tiles[temp[0]][temp[1]];\n tiles[temp[0]][temp[1]] = 0;\n states.add(new Board(deepCopy(tiles)));\n tiles[temp[0]][temp[1]] = tiles[curr_loc[0]][curr_loc[1]];\n tiles[curr_loc[0]][curr_loc[1]] = 0;\n\n }\n return states;\n }",
"public void resetCoordinates(){\n pos=0;\n if(this.pIndex<2){\n this.coordinates[0]=TILE_SIZE*15-DICE_SIZE;}\n else{\n this.coordinates[0]=0;}\n if(this.pIndex%3==0){\n this.coordinates[1]=0;}\n else{\n this.coordinates[1]=TILE_SIZE*15-DICE_SIZE;} \n }",
"private void graphInfo() {\n \n this.distances = new double[this.cities.size()][this.cities.size()];\n \n City c1, c2;\n \n // take the city\n for (int i = 0; i < this.cities.size(); i++) {\n // go through all the other cities\n c1 = this.cities.get(i);\n for (int j = 0; j < this.cities.size(); j++) {\n c2 = this.cities.get(j);\n this.distances[i][j] = c1.to(c2);\n }\n }\n \n }",
"private void createEdges() {\n int edgeSize = windowSize - 1;\n BufferedImage edgedImage = new BufferedImage(image.getWidth() + edgeSize, image.getHeight() + edgeSize, BufferedImage.TYPE_INT_ARGB);\n int[] edgeData = ((DataBufferInt) edgedImage.getRaster().getDataBuffer()).getData();\n\n // set every pixels in edged image to -1 to use for checking unassigned pixels when filling edges\n for (int i = 0; i < edgeData.length; i++) {\n edgeData[i] = -1;\n }\n\n // draw original image onto center of edged image\n edgedImage.getGraphics().drawImage(image, edgeSize/2, edgeSize/2, null);\n edgedImage.getGraphics().dispose();\n\n\n //TODO - get this working after program works to improve speed\n// byte[] edgedData = ((DataBufferByte) edgedImage.getRaster().getDataBuffer()).getData();\n// byte[] originalData = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();\n//\n // copy image into larger, edged image. currently not working,\n// for (int i = windowSize / 2 * 3, originalI = 0; i < image.getHeight() - windowSize / 2; i++, originalI++) {\n// for (int j = windowSize / 2 * 3, originalJ = 0; j < image.getWidth() - windowSize / 2; j++, originalJ++) {\n// edgedData[i + j * edgedImage.getWidth()] = originalData[originalI + originalJ * image.getWidth()];\n// }\n// }\n\n image = edgedImage;\n fillEdges();\n }",
"protected void enlarge ()\n {\n // The new capacity of the graph\n int newLength = 1 + vertices.length + ENLARGE_VALUE * vertices.length / 100;\n\n E[] newVertices = (E[]) new Object[newLength];\n Node[] newAdjacencySequences = new Node[newLength];\n \n for (int index = 0; index <= lastIndex; index++)\n {\n newVertices[index] = vertices[index];\n vertices[index] = null;\n newAdjacencySequences[index] = adjacencySequences[index];\n adjacencySequences[index] = null;\n }\n\n vertices = newVertices;\n adjacencySequences = newAdjacencySequences;\n }",
"void reset(boolean preparingForUpwardPass) {\n\t\t\t_orderID = UNMARKED;\n\t\t\t_outgoingEdges.clear();\n\t\t\t//TODO when do we call this? when should we mark all edges as received?\n\t\t\tfor(Edge e : getIncomingNeighborEdges(preparingForUpwardPass)) {\n\t\t\t\t_neighborEdges.put(e, false);\n\t\t\t}\n\t\t}",
"@Override\n\tpublic List<Cell> calcNeighbors(int row, int col) {\n\t\tList<Cell> neighborLocs = new ArrayList<>();\n\t\tint shift_constant = 1 - 2*((row+col) % 2);\n\t\tif(!includesDiagonals) {\n\t\t\tfor(int a = col - 1; a <= col + 1; a++) {\n\t\t\t\tif(a == col)\n\t\t\t\t\taddLocation(row + shift_constant,a,neighborLocs);\n\t\t\t\telse \n\t\t\t\t\taddLocation(row,a,neighborLocs);\n\t\t\t}\n\t\t\treturn neighborLocs;\n\t\t}\n\t\tfor(int b = col - 2; b <= col + 2; b++) {\n\t\t\tfor(int a = row; a != row + 2*shift_constant; a += shift_constant) {\n\t\t\t\tif(a == row && b == col)\n\t\t\t\t\tcontinue;\n\t\t\t\taddLocation(a,b,neighborLocs);\n\t\t\t}\n\t\t}\n\t\tfor(int b = col -1; b <= col + 1; b++) {\n\t\t\taddLocation(row - shift_constant,b,neighborLocs);\n\t\t}\n\t\treturn neighborLocs;\n\t}",
"@Override\n public void collapse() {\n Grid2DByte weatherGrid = getWeatherGrid();\n if (weatherGrid == null) {\n return;\n }\n\n // make a histogram, indicating what is and what isn't\n // used in the weather keys\n boolean[] used = new boolean[keys.length];\n int[] invMapping = new int[keys.length];\n for (int i = 0; i < used.length; i++) {\n invMapping[i] = i;\n used[i] = false;\n }\n\n // process the grid\n for (int i = 0; i < weatherGrid.getXdim(); i++) {\n for (int j = 0; j < weatherGrid.getYdim(); j++) {\n used[0xFF & weatherGrid.get(i, j)] = true;\n }\n } // indicate used\n\n // clear the invmapping if not used\n for (int i = 0; i < used.length; i++) {\n if (!used[i]) {\n invMapping[i] = -1;\n }\n }\n\n // eliminate duplicate keys\n int nk = 0;\n List<WeatherKey> tmpKeys = new ArrayList<WeatherKey>();\n for (int i = 0; i < used.length; i++) {\n if (used[i]) {\n tmpKeys.add(keys[i]);\n invMapping[i] = nk;\n for (int j = i + 1; j < used.length; j++) {\n if (keys[i].equals(keys[j])) {\n invMapping[j] = nk; // key index\n used[j] = false; // to prevent reprocessing\n }\n }\n nk++;\n }\n }\n WeatherKey[] newKeys = tmpKeys.toArray(new WeatherKey[tmpKeys.size()]);\n\n // anything to do?\n if (Arrays.equals(newKeys, keys)) {\n return;\n }\n\n // now remap the data\n for (int i = 0; i < weatherGrid.getXdim(); i++) {\n for (int j = 0; j < weatherGrid.getYdim(); j++) {\n weatherGrid.set(i, j,\n (byte) invMapping[0xFF & weatherGrid.get(i, j)]);\n }\n }\n\n // store the grid\n setWeatherGrid(weatherGrid);\n keys = newKeys;\n }",
"public ArrayList<Tile> getNeighbouringTiles(Tile t, int size) {\r\n ArrayList<Tile> neighbours = new ArrayList<>();\r\n for (int i=-size ; i<=size ; i++) {\r\n for (int j=-size; j<=size; j++) {\r\n Tile candidate = this.getTileAt(t.getX()+i,t.getY()+j);\r\n if (candidate!=null) {//gestion du résultat négatif de getTileAt\r\n neighbours.add(candidate);\r\n }\r\n }\r\n }\r\n neighbours.remove(this.getTileAt(t.getX(),t.getY()));//on ne garde pas la position du joueur lui-même\r\n return neighbours;\r\n }",
"private void expand() {\n int capacity = newCapacity();\n IntIntMap h = new IntIntMap(capacity);\n for (int i = 0; i < entries.length; i += 2) {\n if (entries[i] != EMPTY) {\n h.put(entries[i], entries[i + 1]);\n }\n }\n this.entries = h.entries;\n this.threshold = h.threshold;\n this.modulo = h.modulo;\n this.modulo2 = h.modulo2;\n }",
"public void hideInnerMaze(){\n for(int i = 0; i < 20; i ++){\n for(int j = 0; j < 15; j ++){\n if(maze[i][j] == VISIBLESPACE){\n maze[i][j] = NOTVISIBLESPACE;\n }\n }\n }\n\n //SET OUTER WALL TO VISIBLE\n for(int i = 0; i < 20; i ++){\n maze[i][0] = VISIBLEWALL;\n maze[i][14] = VISIBLEWALL;\n }\n for(int i = 0; i < 15; i ++){\n maze[0][i] = VISIBLEWALL;\n maze[19][i] = VISIBLEWALL;\n }\n }",
"public static void neighborhoodMaxLowMem(String szinputsegmentation,String szanchorpositions,\n int nbinsize, int numleft, int numright, int nspacing, \n\t\t\t\t\tboolean busestrand, boolean busesignal, String szcolfields,\n\t\t\t\t\tint noffsetanchor, String szoutfile,Color theColor, \n\t\t\t\t\t String sztitle,String szlabelmapping, boolean bprintimage, \n boolean bstringlabels, boolean bbrowser) throws IOException\n {\n\n\n\tboolean bchrommatch = false;//added in 1.23 to check for chromosome matches\n\t//an array of chromosome names\n\tArrayList alchromindex = new ArrayList();\n\n\tString szLine;\n\n\t//stores the largest index value for each chromosome\n\tHashMap hmchromMax = new HashMap();\n\n\t//maps chromosome names to index values\n\tHashMap hmchromToIndex = new HashMap();\n\tHashMap hmLabelToIndex = new HashMap(); //maps label to an index\n\tHashMap hmIndexToLabel = new HashMap(); //maps index string to label\n\t//stores the maximum integer label value\n\tint nmaxlabel=0;\n\tString szlabel =\"\";\n\tBufferedReader brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\n\tboolean busedunderscore = false;\n //the number of additional intervals to the left and right to include\n \n \t//the center anchor position\n\tint numintervals = 1+numleft+numright;\n\n\n\t//this loops reads in the segmentation \n\twhile ((szLine = brinputsegment.readLine())!=null)\n\t{\n\t //added v1.24\n\t if (bbrowser)\n\t {\n\t\tif ((szLine.toLowerCase(Locale.ENGLISH).startsWith(\"browser\"))||(szLine.toLowerCase(Locale.ENGLISH).startsWith(\"track\")))\n\t\t{\n\t\t continue;\n\t\t}\n\t }\n\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t //added in v1.24\n\t int numtokens = st.countTokens();\n\t if (numtokens == 0)\n\t { \n\t //skip blank lines\n\t continue;\n\t }\n\t else if (numtokens < 4)\n\t {\n\t throw new IllegalArgumentException(\"Line \"+szLine+\" in \"+szinputsegmentation+\" only had \"+numtokens+\" token(s). Expecting at least 4\");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t //int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize; \n\t st.nextToken().trim();\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t if (nunderscoreindex >=0)\n\t {\n\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t slabel = (short) (Short.parseShort(szprefix));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t if (busedunderscore)\n\t\t {\n\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t }\n\t\t }\n\t\t }\n\t }\n\n\t if (!busedunderscore)\n\t {\n\t //handle string labels\n\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\n\t if (objshort == null)\n\t {\n\t\t nmaxlabel = hmLabelToIndex.size()+1;\n\t\t slabel = (short) nmaxlabel;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+nmaxlabel, szlabel);\n\t\t }\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t }\n\t catch (NumberFormatException ex2)\n\t {\n\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t }\n\t }\n\t \n\t //alsegments.add(new SegmentRec(szchrom,nbegin,nend,slabel));\n\n\t if (slabel > nmaxlabel)\n\t {\n\t nmaxlabel = slabel;\n\t }\n\t }\n\n\t Integer objMax = (Integer) hmchromMax.get(szchrom);\n\t if (objMax == null)\n\t {\n\t\t//System.out.println(\"on chrom \"+szchrom);\n\t\thmchromMax.put(szchrom,Integer.valueOf(nend));\n\t\thmchromToIndex.put(szchrom, Integer.valueOf(hmchromToIndex.size()));\n\t\talchromindex.add(szchrom);\n\t }\n\t else\n\t {\n\t\tint ncurrmax = objMax.intValue();\n\t\tif (ncurrmax < nend)\n\t\t{\n\t\t hmchromMax.put(szchrom, Integer.valueOf(nend));\t\t \n\t\t}\n\t }\n\t}\n\tbrinputsegment.close();\n\n\t//stores a tally for each position relative to an anchor how frequently the label was observed\n\tdouble[][] tallyoverlaplabel = new double[numintervals][nmaxlabel+1]; \n\n\t//stores a tally for the total signal associated with each anchor position\n\tdouble[] dsumoverlaplabel = new double[numintervals];\n\n //a tally on how frequently each label occurs\n double[] tallylabel = new double[nmaxlabel+1];\n\n\n\tint numchroms = alchromindex.size();\n\n //short[][] labels = new short[numchroms][];\n\n\t//allocates space store all the segment labels for each chromosome\n\tfor (int nchrom = 0; nchrom < numchroms; nchrom++)\n\t{\n \t //stores all the segments in the data\n\t //ArrayList alsegments = new ArrayList();\n\t brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\t String szchromwant = (String) alchromindex.get(nchrom);\n\t //System.out.println(\"processing \"+szchromwant);\n\t int nsize = ((Integer) hmchromMax.get(alchromindex.get(nchrom))).intValue()+1;\n\t short[] labels = new short[nsize];\n\t //this loops reads in the segmentation \n\n\n\t //short[] labels_nchrom = labels[nchrom];\n\t for (int npos = 0; npos < nsize; npos++)\n {\n labels[npos] = -1;\n }\n\t\t\n\t while ((szLine = brinputsegment.readLine())!=null)\n\t {\n\t //int numlines = alsegments.size();\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n\t if (!szchromwant.equals(szchrom))\n\t\t continue;\n\n\t bchrommatch = true;\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize;\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel = -1;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t\t if (nunderscoreindex >=0)\n\t\t {\n\t\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix));\n\t\t busedunderscore = true;\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t\t busedunderscore = true;\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t\t if (busedunderscore)\n\t\t\t {\n\t\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t\t }\n\t\t }\n\t\t }\n\t\t }\n\n\t\t if (!busedunderscore)\n\t\t {\n\t //handle string labels\n\t\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\t\t slabel = ((Short) objshort).shortValue();\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t\t }\n\t }\n\t }\n\n\t //this loop stores into labels the full segmentation\n\t //and a count of how often each label occurs\n\t //for (int nindex = 0; nindex < numlines; nindex++)\n\t //{\n\t //SegmentRec theSegmentRec = (SegmentRec) alsegments.get(nindex);\n\t //int nchrom = ((Integer) hmchromToIndex.get(theSegmentRec.szchrom)).intValue();\n\t //short[] labels_nchrom = labels[nchrom];\n\t //int nbegin = theSegmentRec.nbegin;\n\t //int nend = theSegmentRec.nend;\n\t //short slabel = theSegmentRec.slabel;\n\t for (int npos = nbegin; npos <= nend; npos++)\n\t {\n\t labels[npos] = slabel;\n\t }\n\n\t if (slabel >= 0)\n\t {\n\t tallylabel[slabel]+=(nend-nbegin)+1; \n\t }\t \n\t }\n\t brinputsegment.close();\n\n\n\t RecAnchorIndex theAnchorIndex = getAnchorIndex(szcolfields, busestrand, busesignal);\n\n \t //reads in the anchor position \n BufferedReader brcoords = Util.getBufferedReader(szanchorpositions);\n\t while ((szLine = brcoords.readLine())!=null)\n {\n\t if (szLine.trim().equals(\"\")) continue;\n\t String[] szLineA = szLine.split(\"\\\\s+\");\n\n String szchrom = szLineA[theAnchorIndex.nchromindex]; \n\t if (!szchrom.equals(szchromwant)) \n continue;\n\n\t int nanchor = (Integer.parseInt(szLineA[theAnchorIndex.npositionindex])-noffsetanchor);\n\t boolean bposstrand = true;\n\t if (busestrand)\n\t {\n\t String szstrand = szLineA[theAnchorIndex.nstrandindex];\t \n\t if (szstrand.equals(\"+\"))\n\t {\n\t bposstrand = true;\n\t }\n else if (szstrand.equals(\"-\"))\n {\n \t bposstrand = false;\n\t }\n\t else\n\t {\n \t throw new IllegalArgumentException(szstrand +\" is an invalid strand. Strand should be '+' or '-'\");\n\t\t }\t \n\t }\n\n\t double damount;\n\n\t if ((busesignal)&&(theAnchorIndex.nsignalindex< szLineA.length))\n\t {\n\t damount = Double.parseDouble(szLineA[theAnchorIndex.nsignalindex]);\n\t }\n\t else\n {\n\t damount = 1;\n\t }\n\n\t //updates the tallys for the given anchor position\n\t //Integer objChrom = (Integer) hmchromToIndex.get(szchrom);\n //if (objChrom != null)\n\t //{\n\t // int nchrom = objChrom.intValue();\n\t\t //short[] labels_nchrom = labels[nchrom];\n\n\t if (bposstrand)\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= -numleft; noffset <= numright; noffset++)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]] += damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t }\n\t else\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= numright; noffset >= -numleft; noffset--)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]]+=damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t //}\n\t\t }\n\t }\n brcoords.close(); \t \n\t}\n\n\tif (!bchrommatch)\n\t{\n\t throw new IllegalArgumentException(\"No chromosome name matches found between \"+szanchorpositions+\n \" and those in the segmentation file.\");\n\t}\n\n\toutputneighborhood(tallyoverlaplabel,tallylabel,dsumoverlaplabel,szoutfile,nspacing,numright,\n numleft,theColor,ChromHMM.convertCharOrderToStringOrder(szlabel.charAt(0)),sztitle,0,\n szlabelmapping,szlabel.charAt(0), bprintimage, bstringlabels, hmIndexToLabel);\n }",
"public Iterable<Board> neighbors() {\n int[] pos = zeroPosition();\n int x = pos[0];\n int y = pos[1];\n\n Stack<Board> q = new Stack<>();\n if (x > 0) {\n q.push(twinBySwitching(x, y, x-1, y));\n }\n\n if (x < dimension() - 1) {\n q.push(twinBySwitching(x, y, x+1, y));\n }\n\n if (y > 0) {\n q.push(twinBySwitching(x, y, x, y-1));\n }\n\n if (y < dimension() - 1) {\n q.push(twinBySwitching(x, y, x, y+1));\n }\n\n return q;\n }",
"public ArrayList<Block> getAdj (Block b) { // gets the adjacent blocks\n\t\tArrayList<Block> neighbors = new ArrayList<Block> ();\n\t\tif (b.x+1 < size) neighbors.add(get(b.x+1, b.y, b.z));\n\t\tif (b.x-1 > -1) neighbors.add(get(b.x-1, b.y, b.z));\n\t\tif (b.y+1 < size) neighbors.add(get(b.x, b.y+1, b.z));\n\t\tif (b.y-1 > -1) neighbors.add(get(b.x, b.y-1, b.z));\n\t\tif (b.z+1 < size) neighbors.add(get(b.x, b.y, b.z+1));\n\t\tif (b.z-1 > -1) neighbors.add(get(b.x, b.y, b.z-1));\n\t\treturn neighbors;\n\t}",
"private void processNeighbors() {\n for(int i = 0; i < this.nextAvailPort; i++) {\n if(this.ports[i] == null) { continue; }\n System.out.println(this.ports[i].getRemoteRouterDesc().simulatedIPAddress);\n }\n }",
"public void hreflect() {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n int h= 0;\n int k= rows-1;\n //invariant: rows 0..h-1 and k+1.. have been inverted\n while (h < k) {\n // Swap row h with row k\n // invariant: pixels 0..c-1 of rows h and k have been swapped\n for (int c= 0; c != cols; c= c+1) {\n currentIm.swapPixels(h, c, k, c);\n }\n \n h= h+1; k= k-1;\n }\n }"
] | [
"0.6344813",
"0.62172586",
"0.6193897",
"0.6144508",
"0.61161673",
"0.60254645",
"0.5973376",
"0.59419924",
"0.5899482",
"0.5861588",
"0.58598655",
"0.5831046",
"0.5810666",
"0.5807404",
"0.57691944",
"0.5763683",
"0.5724518",
"0.5688666",
"0.5675273",
"0.5654342",
"0.5654311",
"0.5609472",
"0.5606604",
"0.5604409",
"0.559371",
"0.55893314",
"0.55791354",
"0.5565585",
"0.55570906",
"0.55435014",
"0.55409634",
"0.55384696",
"0.55367017",
"0.55364585",
"0.55326843",
"0.55247957",
"0.55232877",
"0.55225945",
"0.5521851",
"0.5506538",
"0.55032885",
"0.54950595",
"0.5492519",
"0.5484526",
"0.5481705",
"0.548102",
"0.5467892",
"0.5465762",
"0.54650104",
"0.5464115",
"0.5462574",
"0.5461359",
"0.5453808",
"0.54301554",
"0.5413406",
"0.5412419",
"0.5410477",
"0.5391938",
"0.5379508",
"0.5377529",
"0.5359621",
"0.5358055",
"0.5342459",
"0.53351814",
"0.5327653",
"0.53269094",
"0.5325958",
"0.531466",
"0.5313428",
"0.5309478",
"0.5305502",
"0.53049666",
"0.53019863",
"0.5293084",
"0.5288684",
"0.52880275",
"0.528332",
"0.5274254",
"0.52740365",
"0.5265618",
"0.5262594",
"0.5261561",
"0.526141",
"0.5258461",
"0.5257481",
"0.5254771",
"0.5254455",
"0.5243493",
"0.5236762",
"0.5233578",
"0.52332056",
"0.52281314",
"0.5226807",
"0.52266335",
"0.5222364",
"0.52211386",
"0.5217883",
"0.5212354",
"0.52010095",
"0.51894677",
"0.51834506"
] | 0.0 | -1 |
This class is contains all the meta data details of a service. It's peers, dependencies, and all other meta data related to the service. | public GoogleTranslateMeta() {
// add a cool description
addDescription("used as a general template");
// add dependencies if necessary
// addDependency("com.twelvemonkeys.common", "common-lang", "3.1.1");
setAvailable(false);
setCloudService(true);
addCategory("translation", "programming");
addDependency("com.google.cloud", "google-cloud-translate", "2.2.0");
addDependency("com.google.auth", "google-auth-library-credentials", "1.3.0");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setupServiceAndMetadata() throws ServiceException {\n \t\t\tfinal MetadataRetrieve retrieve = getMetadata().getOmeMeta().getRoot();\n \n \t\t\tservice = getContext().getService(OMEXMLService.class);\n \t\t\tfinal OMEXMLMetadata originalOMEMeta = service.getOMEMetadata(retrieve);\n \t\t\toriginalOMEMeta.resolveReferences();\n \n \t\t\tfinal String omexml = service.getOMEXML(originalOMEMeta);\n \t\t\tomeMeta = service.createOMEXMLMetadata(omexml);\n \t\t}",
"private String generateMetadata() {\n ServiceMetadata metadata = new ServiceMetadata();\n\n // Populate metadata using setX() methods\n metadata.setName(this.getClass().getName());\n metadata.setAllow(Discriminators.Uri.ANY);\n metadata.setDescription(\"Mallet Topic Modeling Trainer\");\n metadata.setVersion(\"1.0.0-SNAPSHOT\");\n metadata.setVendor(\"http://www.lappsgrid.org\");\n metadata.setLicense(Discriminators.Uri.APACHE2);\n\n // JSON for input information\n IOSpecification requires = new IOSpecification();\n requires.addFormat(Discriminators.Uri.TEXT); // Plain text (form)\n requires.addLanguage(\"en\"); // Source language\n\n // JSON for output information\n IOSpecification produces = new IOSpecification();\n produces.addFormat(Discriminators.Uri.LAPPS); // LIF (form)\n produces.addLanguage(\"en\"); // Target language\n\n // Embed I/O metadata JSON objects\n metadata.setRequires(requires);\n metadata.setProduces(produces);\n\n // Serialize the metadata into LEDS string and return\n Data<ServiceMetadata> data = new Data<>(Discriminators.Uri.META, metadata);\n return data.asPrettyJson();\n }",
"public ServiceMetadata getServiceMetadata() {\n\t\treturn serviceMetadata;\n\t}",
"public boolean isMetaService() {\n return metaService;\n }",
"public void setMetaService(boolean metaService) {\n this.metaService = metaService;\n }",
"Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}",
"private ApiInfo metaData() {\n return new ApiInfoBuilder()\n .title(\"Spring Boot REST API\")\n .description(\"\\\"Spring Boot REST API for Vertica Developer Training\\\"\")\n .version(\"1.0.0\")\n .license(\"Apache License Version 2.0\")\n .licenseUrl(\"https://www.apache.org/licenses/LICENSE-2.0\\\"\")\n .contact(new Contact(\"Thingtrack\", \"https://www.thingtrack.com\", \"miguel@thingtrack.com\"))\n .build();\n }",
"ServiceInfo(ServiceInfo info)\n {\n if (info != null)\n {\n this.type = info.type;\n this.name = info.name;\n this.port = info.port;\n this.weight = info.weight;\n this.priority = info.priority;\n this.text = info.text;\n }\n }",
"public ServiceInfo() {\n }",
"public https.LnpSdStructure[] getService_details() {\n return service_details;\n }",
"public ServiceCompte() {\n\t\tsuper();\n\t}",
"go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder();",
"go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder();",
"go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServiceOrBuilder();",
"private ApiInfo metaData() {\n return new ApiInfoBuilder()\n .title(\"Spring Boot REST API\")\n .description(\"Spring Boot REST API for Testing Project\")\n .version(\"v1.0\")\n .contact(new Contact(\"Blagovest Anev\", \"https://www.linkedin.com/in/blagovestanev/\", \"blagovestanev@gmail.com\"))\n .build();\n }",
"public MsvmSummaryInformation(IJIDispatch objectDispatcher, SWbemServices service) {\n\t\tsuper(objectDispatcher, service);\n\t}",
"public interface Service {\n // Service-specific methods go here\n }",
"private ApiInfo metadata() {\n\t\treturn new ApiInfoBuilder().title(\"# Online Home Decor Store #\")\n\t\t\t\t.description(\"Suppliers and Categories operations are present\").build();\t\n\t}",
"@Override\n\tpublic String printServiceInfo() {\n\t\treturn serviceName;\n\t}",
"public interface ConsulService {\n\n /**\n * Deregisters a node, service, or check\n */\n public void deregister(SvcInfo svcInfo);\n\n /**\n * Lists known datacenters\n * @return\n */\n public List<String> getDatacenters();\n\n /**\n * Lists nodes in a given DC\n * @return\n */\n public List<Node> getNodes();\n\n /**\n * Lists services in a given DC\n */\n public Map<String, List<String>> getServices();\n\n /**\n * Lists the nodes in a given service\n * @return\n */\n public List<CatalogService> getService(String service);\n\n /**\n * Lists the services provided by a node\n */\n public CatalogNode getNode(String node);\n \n\n\n /**\n * Returns the health info of a node\n */\n public List<HealthCheck> getNodeChecks(String node);\n\n /**\n * Returns the checks of a service\n */\n public List<HealthCheck> getServiceChecks(String service);\n\n /**\n * Returns the nodes and health info of a service\n */\n public List<ServiceHealth> getServiceInstances(String service);\n\n /**\n * Returns the checks in a given state\n */\n public List<HealthCheck> getChecksByState(String state);\n\n}",
"private void dumpService(ServiceExt service)\n {\n log(\"* Service Information\");\n log(\"*\");\n log(\"* Service Name: \" + service.getName());\n log(\"* Service Number: \" + service.getServiceNumber());\n log(\"* Service MinorNumber: \" + service.getMinorNumber());\n assertNotNull(\"Service ServiceType cannot be null\", service.getServiceType());\n log(\"* Service Type: \" + service.getServiceType());\n log(\"* Service hasMultipleInstances: \" + service.hasMultipleInstances());\n assertNotNull(\"Service Locator cannot be null\", service.getLocator());\n log(\"* Service Locator: \" + service.getLocator());\n assertNotNull(\"Service Handle cannot be null\", service.getServiceHandle());\n log(\"* Service Handle: \" + service.getServiceHandle());\n log(\"*\");\n }",
"public interface MetadataService extends CrudService<Metadata, Integer>{\n\tMetadata createContentOfMetadata(Metadata metadata);\n}",
"com.cmpe275.grpcComm.MetaData getMetaData();",
"public interface MetaInformationService extends BasicEcomService{\n\n public String listMetaInformationTypesForPage(String page);\n public Integer getTotalPagesForMetaInformationTypes();\n public Integer getTotalPagesForSearchedMetaInformationTypes(String metaType);\n public String listSearchedMetaInformationTypesForPage(String metaType,String page);\n\n\n}",
"public void setService (String service) {\n\t this.service = service;\n\t}",
"public Services(){\n ID = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n state = STATUS_IN_PROGRESS;\n name = \"\";\n date = \"\";\n description = \"\";\n note = \"\";\n mileage = 000000;\n }",
"ServiceInfo(String type, String name)\n {\n if (!type.endsWith(\".\"))\n {\n throw new IllegalArgumentException(\"type must be fully qualified DNS name ending in '.': \" + type);\n }\n\n this.type = type;\n this.name = name;\n }",
"public interface TearcherInfoService extends Service<TearcherInfo> {\n\n}",
"public ModelService(ModelService source) {\n if (source.Id != null) {\n this.Id = new String(source.Id);\n }\n if (source.Cluster != null) {\n this.Cluster = new String(source.Cluster);\n }\n if (source.Name != null) {\n this.Name = new String(source.Name);\n }\n if (source.Runtime != null) {\n this.Runtime = new String(source.Runtime);\n }\n if (source.ModelUri != null) {\n this.ModelUri = new String(source.ModelUri);\n }\n if (source.Cpu != null) {\n this.Cpu = new Long(source.Cpu);\n }\n if (source.Memory != null) {\n this.Memory = new Long(source.Memory);\n }\n if (source.Gpu != null) {\n this.Gpu = new Long(source.Gpu);\n }\n if (source.GpuMemory != null) {\n this.GpuMemory = new Long(source.GpuMemory);\n }\n if (source.CreateTime != null) {\n this.CreateTime = new String(source.CreateTime);\n }\n if (source.UpdateTime != null) {\n this.UpdateTime = new String(source.UpdateTime);\n }\n if (source.ScaleMode != null) {\n this.ScaleMode = new String(source.ScaleMode);\n }\n if (source.Scaler != null) {\n this.Scaler = new Scaler(source.Scaler);\n }\n if (source.Status != null) {\n this.Status = new ServiceStatus(source.Status);\n }\n if (source.AccessToken != null) {\n this.AccessToken = new String(source.AccessToken);\n }\n if (source.ConfigId != null) {\n this.ConfigId = new String(source.ConfigId);\n }\n if (source.ConfigName != null) {\n this.ConfigName = new String(source.ConfigName);\n }\n if (source.ServeSeconds != null) {\n this.ServeSeconds = new Long(source.ServeSeconds);\n }\n if (source.ConfigVersion != null) {\n this.ConfigVersion = new String(source.ConfigVersion);\n }\n if (source.ResourceGroupId != null) {\n this.ResourceGroupId = new String(source.ResourceGroupId);\n }\n if (source.Exposes != null) {\n this.Exposes = new ExposeInfo[source.Exposes.length];\n for (int i = 0; i < source.Exposes.length; i++) {\n this.Exposes[i] = new ExposeInfo(source.Exposes[i]);\n }\n }\n if (source.Region != null) {\n this.Region = new String(source.Region);\n }\n if (source.ResourceGroupName != null) {\n this.ResourceGroupName = new String(source.ResourceGroupName);\n }\n if (source.Description != null) {\n this.Description = new String(source.Description);\n }\n if (source.GpuType != null) {\n this.GpuType = new String(source.GpuType);\n }\n if (source.LogTopicId != null) {\n this.LogTopicId = new String(source.LogTopicId);\n }\n }",
"public Map<String, Object> toMetadataHash() {\n\t\tMap<String, Object> hash = new LinkedHashMap<String, Object>();\n\t\thash.put(\"environment\", appService.getEnvironment());\n\t\thash.put(\"app\", appService.toMetadataHash());\n\t\thash.put(\"api\", apiService.toMetadataHash());\n\t\thash.put(\"sso\", ssoService.toMetadataHash());\n\t\thash.put(\"connec\", connecService.toMetadataHash());\n\t\thash.put(\"webhook\", webhookService.toMetadataHash());\n\n\t\treturn hash;\n\t}",
"public EdmDataServices getMetadata() {\n try {\n final EdmDataServices metadata = super.getMetadata();\n \n // here we decorate the metadata so we can properly get things routed to registered service-operation handlers\n EdmDataServices result = new EdmDataServicesDecorator() {\n protected EdmDataServices getDelegate() { return metadata; } // most is passed thru to the super-class metadata\n public EdmFunctionImport findEdmFunctionImport(String functionImportName) {\n Map.Entry<EdmFunctionImport,ServiceOperationHandler> descriptor = _functionDescriptors.get(functionImportName);\n return descriptor != null ? descriptor.getKey() : null;\n }\n };\n return result;\n } catch (Throwable ex) {\n _log.error(\"failed to getMetadata()\", ex);\n throw new RuntimeException(ex.toString(), ex);\n }\n }",
"public MetaDataManager createMetaDataManager() throws ServiceException {\r\n initialize(); \r\n return new MetaDataManager(multiDomainMetaService); \r\n\t}",
"public MqttBrokerMeta() {\n\n addDescription(\n \"This is an Mqtt client based on the Paho Mqtt client library. Mqtt is a machine-to-machine (M2M)/'Internet of Things' connectivity protocol. See http://mqtt.org\");\n addCategory(\"cloud\", \"network\");\n\n addDependency(\"io.moquette\", \"moquette-broker\", \"0.15\");\n exclude(\"com.fasterxml.jackson.core\", \"*\");\n exclude(\"io.netty\", \"*\");\n exclude(\"org.slf4j\", \"slf4j-log4j12\");\n\n addDependency(\"com.fasterxml.jackson.core\", \"jackson-core\", \"2.14.0\");\n addDependency(\"com.fasterxml.jackson.core\", \"jackson-databind\", \"2.14.0\");\n addDependency(\"com.fasterxml.jackson.core\", \"jackson-annotations\", \"2.14.0\");\n\n addDependency(\"io.netty\", \"netty-all\", \"4.1.82.Final\");\n\n \n\n setCloudService(false);\n\n }",
"public ServiceDetails getServiceDetails()\n {\n return data.serviceDetails;\n }",
"public void setService(String service) {\n this.service = service;\n }",
"public interface Service extends WrappedIndividual {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#hasMicroService\n */\n \n /**\n * Gets all property values for the hasMicroService property.<p>\n * \n * @returns a collection of values for the hasMicroService property.\n */\n Collection<? extends MService> getHasMicroService();\n\n /**\n * Checks if the class has a hasMicroService property value.<p>\n * \n * @return true if there is a hasMicroService property value.\n */\n boolean hasHasMicroService();\n\n /**\n * Adds a hasMicroService property value.<p>\n * \n * @param newHasMicroService the hasMicroService property value to be added\n */\n void addHasMicroService(MService newHasMicroService);\n\n /**\n * Removes a hasMicroService property value.<p>\n * \n * @param oldHasMicroService the hasMicroService property value to be removed.\n */\n void removeHasMicroService(MService oldHasMicroService);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#hasSCF\n */\n \n /**\n * Gets all property values for the hasSCF property.<p>\n * \n * @returns a collection of values for the hasSCF property.\n */\n Collection<? extends SCF> getHasSCF();\n\n /**\n * Checks if the class has a hasSCF property value.<p>\n * \n * @return true if there is a hasSCF property value.\n */\n boolean hasHasSCF();\n\n /**\n * Adds a hasSCF property value.<p>\n * \n * @param newHasSCF the hasSCF property value to be added\n */\n void addHasSCF(SCF newHasSCF);\n\n /**\n * Removes a hasSCF property value.<p>\n * \n * @param oldHasSCF the hasSCF property value to be removed.\n */\n void removeHasSCF(SCF oldHasSCF);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#performAt\n */\n \n /**\n * Gets all property values for the performAt property.<p>\n * \n * @returns a collection of values for the performAt property.\n */\n Collection<? extends Facility> getPerformAt();\n\n /**\n * Checks if the class has a performAt property value.<p>\n * \n * @return true if there is a performAt property value.\n */\n boolean hasPerformAt();\n\n /**\n * Adds a performAt property value.<p>\n * \n * @param newPerformAt the performAt property value to be added\n */\n void addPerformAt(Facility newPerformAt);\n\n /**\n * Removes a performAt property value.<p>\n * \n * @param oldPerformAt the performAt property value to be removed.\n */\n void removePerformAt(Facility oldPerformAt);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#produces\n */\n \n /**\n * Gets all property values for the produces property.<p>\n * \n * @returns a collection of values for the produces property.\n */\n Collection<? extends Computer> getProduces();\n\n /**\n * Checks if the class has a produces property value.<p>\n * \n * @return true if there is a produces property value.\n */\n boolean hasProduces();\n\n /**\n * Adds a produces property value.<p>\n * \n * @param newProduces the produces property value to be added\n */\n void addProduces(Computer newProduces);\n\n /**\n * Removes a produces property value.<p>\n * \n * @param oldProduces the produces property value to be removed.\n */\n void removeProduces(Computer oldProduces);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#uses\n */\n \n /**\n * Gets all property values for the uses property.<p>\n * \n * @returns a collection of values for the uses property.\n */\n Collection<? extends Equipment> getUses();\n\n /**\n * Checks if the class has a uses property value.<p>\n * \n * @return true if there is a uses property value.\n */\n boolean hasUses();\n\n /**\n * Adds a uses property value.<p>\n * \n * @param newUses the uses property value to be added\n */\n void addUses(Equipment newUses);\n\n /**\n * Removes a uses property value.<p>\n * \n * @param oldUses the uses property value to be removed.\n */\n void removeUses(Equipment oldUses);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}",
"public String getServiceDescription()\n {\n return serviceDescription;\n }",
"public Map<String, Object> getMetadata() {\n return metadata;\n }",
"public ServiceInfo(QName name, QName portType, Class serviceClass)\n {\n this.name = name;\n this.portType = portType;\n this.serviceClass = serviceClass;\n }",
"public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }",
"Metadata getMetaData();",
"@Override\r\n\tpublic Map<String, Object> getMetadata() {\n\t\treturn null;\r\n\t}",
"public MetaData getMetaData();",
"public mService() {\n super(\"fetchImageService\");\n }",
"public String getTypeOfService(){\n\t\treturn typeOfService;\n\t}",
"public void setService(String service) {\n this.service = service;\n }",
"public void setService(String service) {\n this.service = service;\n }",
"public void setService(String service) {\n this.service = service;\n }",
"public Service(){\n\t\t\n\t}",
"public interface NameServiceDependencies\n extends ServiceDependencies\n {\n /**\n * Return the AcceptorDependencies.\n *\n * @return AcceptorDependencies\n */\n public AcceptorDependencies getAcceptorDependencies();\n }",
"com.cmpe275.grpcComm.MetaDataOrBuilder getMetaDataOrBuilder();",
"public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Initializes a MetadataStore, including allocation of resources.\n * </pre>\n */\n default void createMetadataStore(\n com.google.cloud.aiplatform.v1.CreateMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateMetadataStoreMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific MetadataStore.\n * </pre>\n */\n default void getMetadataStore(\n com.google.cloud.aiplatform.v1.GetMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.MetadataStore>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetMetadataStoreMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists MetadataStores for a Location.\n * </pre>\n */\n default void listMetadataStores(\n com.google.cloud.aiplatform.v1.ListMetadataStoresRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListMetadataStoresResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListMetadataStoresMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a single MetadataStore and all its child resources (Artifacts,\n * Executions, and Contexts).\n * </pre>\n */\n default void deleteMetadataStore(\n com.google.cloud.aiplatform.v1.DeleteMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteMetadataStoreMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates an Artifact associated with a MetadataStore.\n * </pre>\n */\n default void createArtifact(\n com.google.cloud.aiplatform.v1.CreateArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific Artifact.\n * </pre>\n */\n default void getArtifact(\n com.google.cloud.aiplatform.v1.GetArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists Artifacts in the MetadataStore.\n * </pre>\n */\n default void listArtifacts(\n com.google.cloud.aiplatform.v1.ListArtifactsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListArtifactsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListArtifactsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a stored Artifact.\n * </pre>\n */\n default void updateArtifact(\n com.google.cloud.aiplatform.v1.UpdateArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes an Artifact.\n * </pre>\n */\n default void deleteArtifact(\n com.google.cloud.aiplatform.v1.DeleteArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Purges Artifacts.\n * </pre>\n */\n default void purgeArtifacts(\n com.google.cloud.aiplatform.v1.PurgeArtifactsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getPurgeArtifactsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a Context associated with a MetadataStore.\n * </pre>\n */\n default void createContext(\n com.google.cloud.aiplatform.v1.CreateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific Context.\n * </pre>\n */\n default void getContext(\n com.google.cloud.aiplatform.v1.GetContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists Contexts on the MetadataStore.\n * </pre>\n */\n default void listContexts(\n com.google.cloud.aiplatform.v1.ListContextsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListContextsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListContextsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a stored Context.\n * </pre>\n */\n default void updateContext(\n com.google.cloud.aiplatform.v1.UpdateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a stored Context.\n * </pre>\n */\n default void deleteContext(\n com.google.cloud.aiplatform.v1.DeleteContextRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Purges Contexts.\n * </pre>\n */\n default void purgeContexts(\n com.google.cloud.aiplatform.v1.PurgeContextsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getPurgeContextsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds a set of Artifacts and Executions to a Context. If any of the\n * Artifacts or Executions have already been added to a Context, they are\n * simply skipped.\n * </pre>\n */\n default void addContextArtifactsAndExecutions(\n com.google.cloud.aiplatform.v1.AddContextArtifactsAndExecutionsRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.aiplatform.v1.AddContextArtifactsAndExecutionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getAddContextArtifactsAndExecutionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds a set of Contexts as children to a parent Context. If any of the\n * child Contexts have already been added to the parent Context, they are\n * simply skipped. If this call would create a cycle or cause any Context to\n * have more than 10 parents, the request will fail with an INVALID_ARGUMENT\n * error.\n * </pre>\n */\n default void addContextChildren(\n com.google.cloud.aiplatform.v1.AddContextChildrenRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.AddContextChildrenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getAddContextChildrenMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Remove a set of children contexts from a parent Context. If any of the\n * child Contexts were NOT added to the parent Context, they are\n * simply skipped.\n * </pre>\n */\n default void removeContextChildren(\n com.google.cloud.aiplatform.v1.RemoveContextChildrenRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.RemoveContextChildrenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getRemoveContextChildrenMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves Artifacts and Executions within the specified Context, connected\n * by Event edges and returned as a LineageSubgraph.\n * </pre>\n */\n default void queryContextLineageSubgraph(\n com.google.cloud.aiplatform.v1.QueryContextLineageSubgraphRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryContextLineageSubgraphMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates an Execution associated with a MetadataStore.\n * </pre>\n */\n default void createExecution(\n com.google.cloud.aiplatform.v1.CreateExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific Execution.\n * </pre>\n */\n default void getExecution(\n com.google.cloud.aiplatform.v1.GetExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists Executions in the MetadataStore.\n * </pre>\n */\n default void listExecutions(\n com.google.cloud.aiplatform.v1.ListExecutionsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListExecutionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListExecutionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a stored Execution.\n * </pre>\n */\n default void updateExecution(\n com.google.cloud.aiplatform.v1.UpdateExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes an Execution.\n * </pre>\n */\n default void deleteExecution(\n com.google.cloud.aiplatform.v1.DeleteExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Purges Executions.\n * </pre>\n */\n default void purgeExecutions(\n com.google.cloud.aiplatform.v1.PurgeExecutionsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getPurgeExecutionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds Events to the specified Execution. An Event indicates whether an\n * Artifact was used as an input or output for an Execution. If an Event\n * already exists between the Execution and the Artifact, the Event is\n * skipped.\n * </pre>\n */\n default void addExecutionEvents(\n com.google.cloud.aiplatform.v1.AddExecutionEventsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.AddExecutionEventsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getAddExecutionEventsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Obtains the set of input and output Artifacts for this Execution, in the\n * form of LineageSubgraph that also contains the Execution and connecting\n * Events.\n * </pre>\n */\n default void queryExecutionInputsAndOutputs(\n com.google.cloud.aiplatform.v1.QueryExecutionInputsAndOutputsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryExecutionInputsAndOutputsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a MetadataSchema.\n * </pre>\n */\n default void createMetadataSchema(\n com.google.cloud.aiplatform.v1.CreateMetadataSchemaRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.MetadataSchema>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateMetadataSchemaMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific MetadataSchema.\n * </pre>\n */\n default void getMetadataSchema(\n com.google.cloud.aiplatform.v1.GetMetadataSchemaRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.MetadataSchema>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetMetadataSchemaMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists MetadataSchemas.\n * </pre>\n */\n default void listMetadataSchemas(\n com.google.cloud.aiplatform.v1.ListMetadataSchemasRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListMetadataSchemasResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListMetadataSchemasMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves lineage of an Artifact represented through Artifacts and\n * Executions connected by Event edges and returned as a LineageSubgraph.\n * </pre>\n */\n default void queryArtifactLineageSubgraph(\n com.google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryArtifactLineageSubgraphMethod(), responseObserver);\n }\n }",
"public String serviceInfo(){\n String msj = \"\";\n\n msj = \"Nombre del servicio: \" + serviceName;\n msj = \"Costo: \" + cost;\n msj = \"Fecha de realizacion: \" + date;\n msj = \"La ID de la mascota es: \" + petID;\n msj = \"La ID del cliente es: \" + clientID;\n\n return msj;\n }",
"private void getMetadata() {\n masterRoot = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n masterMetadata = new MetadataDoris(masterRoot);\n masterOrbit = new OrbitsDoris();\n masterOrbit.setOrbit(masterRoot);\n \n // SLAVE METADATA\n // hash table or just map for slaves - now it supports only a single sourceSlave image\n slaveRoot = sourceProduct.getMetadataRoot().getElement(AbstractMetadata.SLAVE_METADATA_ROOT).getElementAt(0);\n slaveMetadata = new MetadataDoris(slaveRoot);\n slaveOrbit = new OrbitsDoris();\n slaveOrbit.setOrbit(slaveRoot);\n }",
"public Map<String, String> getMetadata() {\n return metadata;\n }",
"public Map<String, String> getMetadata() {\n return metadata;\n }",
"ClassOfService getClassOfService();",
"public Map getMetadata() {\n return metadata;\n }",
"public interface ServiceManagerInterface {\n\n /**\n * add a Service\n * @param servicePackage the service package to register\n * @param configuration The configuration of the client\n * @param profile the client profile\n * @return The added service description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription addService(\n AGServicePackageDescription servicePackage,\n AGParameter[] configuration,\n ClientProfile profile)\n throws IOException, SoapException;\n\n /**\n * gets the service manager description\n * @return service manager description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceManagerDescription getDescription()\n throws IOException, SoapException;\n\n /**\n * gets the url of the node service\n * @return url of node service\n * @throws IOException\n * @throws SoapException\n */\n String getNodeServiceUrl()\n throws IOException, SoapException;\n\n /**\n * gets the available services\n * @return a vector of available services\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription[] getServices()\n throws IOException, SoapException;\n\n /**\n * test whether the service manager is valid\n * @return the 'valid' state\n * @throws IOException\n * @throws SoapException\n */\n int isValid() throws IOException, SoapException;\n\n /**\n * removes a service from the service manager\n * @param serviceDescription the description of the service to be removed\n * @throws IOException\n * @throws SoapException\n */\n void removeService(AGServiceDescription serviceDescription)\n throws IOException, SoapException;\n\n /**\n * removes all services from the service manager\n * @throws IOException\n * @throws SoapException\n */\n void removeServices() throws IOException, SoapException;\n\n /**\n * sets the url for node service\n * @param nodeServiceUri\n * @throws IOException\n * @throws SoapException\n */\n void setNodeServiceUrl(String nodeServiceUri)\n throws IOException, SoapException;\n\n /**\n * shuts down the service manager\n * @throws IOException\n * @throws SoapException\n */\n void shutdown() throws IOException, SoapException;\n\n /**\n * stops all services on service manager\n * @throws IOException\n * @throws SoapException\n */\n void stopServices() throws IOException, SoapException;\n\n /**\n * gets the version number of the service manager\n * @return string with version of service manager\n * @throws IOException\n * @throws SoapException\n */\n String getVersion() throws IOException, SoapException;\n\n\n /**\n * Requests to join a bridge\n * @param bridgeDescription The description of the bridge\n * @throws IOException\n * @throws SoapException\n */\n void joinBridge(BridgeDescription bridgeDescription)\n throws IOException, SoapException;\n\n /**\n * Sets the streams of this service manager\n *\n * @param streamDescriptionList a vector of stream descriptions\n * @throws IOException\n * @throws SoapException\n */\n void setStreams(StreamDescription[] streamDescriptionList)\n throws IOException, SoapException;\n /**\n * adds a stream\n * @param argname stream description of new stream\n * @throws IOException\n * @throws SoapException\n */\n void addStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Removes a stream\n * @param argname The stream to remove\n * @throws IOException\n * @throws SoapException\n */\n void removeStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Sets the point of reference for network traffic\n * @param url The url of the point of reference server\n * @throws IOException\n * @throws SoapException\n */\n void setPointOfReference(String url)\n throws IOException, SoapException;\n\n /**\n * Sets the encryption\n * @param encryption The encryption\n * @throws IOException\n * @throws SoapException\n */\n void setEncryption(String encryption)\n throws IOException, SoapException;\n /**\n * Instructs the client to run automatic bridging\n * @throws IOException\n * @throws SoapException\n */\n void runAutomaticBridging()\n throws IOException, SoapException;\n\n /**\n * Determines if a service is enabled\n * @param service The service to get the status of\n * @return True if enabled, false otherwise\n * @throws IOException\n * @throws SoapException\n */\n boolean isServiceEnabled(AGServiceDescription service)\n throws IOException, SoapException;\n\n /**\n * Enables or disables a service\n * @param service The service to control\n * @param enabled True to enable, false to disable\n * @throws IOException\n * @throws SoapException\n */\n void enableService(AGServiceDescription service, boolean enabled)\n throws IOException, SoapException;\n\n /**\n * Gets the configuration parameters of a service\n * @param service The service to get the configuration of\n * @return The parameters\n * @throws IOException\n * @throws SoapException\n */\n AGParameter[] getServiceConfiguration(AGServiceDescription service)\n throws IOException, SoapException;\n /**\n * Sets the configuration parameters for a service\n * @param service The service to configure\n * @param config The new parameters\n * @throws IOException\n * @throws SoapException\n */\n void setServiceConfiguration(AGServiceDescription service,\n AGParameter[] config)\n throws IOException, SoapException;\n\n /**\n * Sets the client profile\n * @param profile The new profile\n * @throws IOException\n * @throws SoapException\n */\n void setClientProfile(ClientProfile profile)\n throws IOException, SoapException;\n}",
"public MetaDataContract()\n {\n }",
"Map<String, Object> getAllMetadata();",
"public String getTypeOfService(){\n\treturn typeOfService;\n}",
"public ComponentDescriptor() {\r\n\t\t// initialize empty collections\r\n\t\tconstructorParametersTypes = new LinkedList<List<Class<?>>>();\r\n//\t\trequiredProperties = new HashMap<String, MetaProperty>();\r\n//\t\toptionalProperties = new HashMap<String, MetaProperty>();\r\n\t}",
"protected ServiceBundler getServices() {\n return services;\n }",
"public String getServiceName(){\n return serviceName;\n }",
"@SuppressWarnings(\"unchecked\")\n\t@GetMapping(\"/rest/info\")\n\tpublic Map<String, Map<String, String>> rest() {\n\t\tMap<String, Map<String, String>> ret = new HashMap<>();\n\n\t\t// Call remote service with RestTemplate\n\t\tMap<String, Map<String, String>> middleResult = restTemplate.getForObject(\n\t\t\t\t\"http://MetadataMiddleService/metadata/service/middle/info\", Map.class);\n\n\t\tif (middleResult != null) {\n\t\t\tret.putAll(middleResult);\n\t\t}\n\n\t\t// Get Custom Metadata From Context\n\t\tMetadataContext context = MetadataContextHolder.get();\n\t\tMap<String, String> customMetadataMap = context.getFragmentContext(MetadataContext.FRAGMENT_TRANSITIVE);\n\n\t\tcustomMetadataMap.forEach((key, value) -> {\n\t\t\tLOG.info(\"Metadata Middle Custom Metadata (Key-Value): {} : {}\", key, value);\n\t\t});\n\n\t\tret.put(\"frontend-transitive-metadata\", customMetadataMap);\n\n\t\t// Get All Disposable metadata from upstream service\n\t\tMap<String, String> upstreamDisposableMetadatas = MetadataContextHolder.getAllDisposableMetadata(true);\n\t\tupstreamDisposableMetadatas.forEach((key, value) -> {\n\t\t\tLOG.info(\"Upstream Custom Disposable Metadata (Key-Value): {} : {}\", key, value);\n\t\t});\n\n\t\tret.put(\"frontend-upstream-disposable-metadata\", upstreamDisposableMetadatas);\n\n\t\t// Get All Disposable metadata from upstream service\n\t\tMap<String, String> localDisposableMetadatas = MetadataContextHolder.getAllDisposableMetadata(false);\n\t\tlocalDisposableMetadatas.forEach((key, value) -> {\n\t\t\tLOG.info(\"Local Custom Disposable Metadata (Key-Value): {} : {}\", key, value);\n\t\t});\n\n\t\tret.put(\"frontend-local-disposable-metadata\", localDisposableMetadatas);\n\n\t\treturn ret;\n\t}",
"public MetadataResponse() {\n data = new HashMap<String, Object>();\n }",
"public Map<String, Object> getMetaData() {\n\t\treturn metaData;\n\t}",
"public io.dstore.engine.MetaInformation.Builder addMetaInformationBuilder() {\n return getMetaInformationFieldBuilder().addBuilder(\n io.dstore.engine.MetaInformation.getDefaultInstance());\n }",
"public io.dstore.engine.MetaInformation.Builder addMetaInformationBuilder() {\n return getMetaInformationFieldBuilder().addBuilder(\n io.dstore.engine.MetaInformation.getDefaultInstance());\n }",
"public io.dstore.engine.MetaInformation.Builder addMetaInformationBuilder() {\n return getMetaInformationFieldBuilder().addBuilder(\n io.dstore.engine.MetaInformation.getDefaultInstance());\n }",
"public io.dstore.engine.MetaInformation.Builder addMetaInformationBuilder() {\n return getMetaInformationFieldBuilder().addBuilder(\n io.dstore.engine.MetaInformation.getDefaultInstance());\n }",
"public io.dstore.engine.MetaInformation.Builder addMetaInformationBuilder() {\n return getMetaInformationFieldBuilder().addBuilder(\n io.dstore.engine.MetaInformation.getDefaultInstance());\n }",
"private Iterable<Service> loadServiceData() {\n return services;\n }",
"public String getService(){\n\t\t return service;\n\t}",
"public Map<String, ServiceNode> getServices() {\n\t\treturn serviceMap;\n\t}",
"public edu.ustb.sei.mde.morel.resource.morel.IMorelMetaInformation getMetaInformation();",
"public java.util.List<? extends io.dstore.engine.MetaInformationOrBuilder> \n getMetaInformationOrBuilderList() {\n return metaInformation_;\n }",
"public java.util.List<? extends io.dstore.engine.MetaInformationOrBuilder> \n getMetaInformationOrBuilderList() {\n return metaInformation_;\n }",
"public java.util.List<? extends io.dstore.engine.MetaInformationOrBuilder> \n getMetaInformationOrBuilderList() {\n return metaInformation_;\n }",
"public java.util.List<? extends io.dstore.engine.MetaInformationOrBuilder> \n getMetaInformationOrBuilderList() {\n return metaInformation_;\n }",
"public java.util.List<? extends io.dstore.engine.MetaInformationOrBuilder> \n getMetaInformationOrBuilderList() {\n return metaInformation_;\n }",
"@Override\n protected MetaData makeMetaData() {\n return new MetaData();\n }",
"public interface Service {\n\n}",
"public interface Service {\n\n}",
"InstancePublishInfo getInstancePublishInfo(Service service);",
"public void setServiceName(String serviceName){\n this.serviceName = serviceName;\n }",
"@JsonProperty(\"service\")\n public void setService(String service) {\n this.service = service;\n }",
"public interface ServiceRequest<T> extends Serializable {\r\n\t\r\n\t/**\r\n\t * Gets the service name for this request\r\n\t * @return the valid service name\r\n\t */\r\n\tpublic String getServiceName();\r\n\t\r\n\t/**\r\n\t * Gets the service version.\r\n\t * @return the service version as string\r\n\t */\r\n\tpublic String getServiceVersion();\r\n\t\r\n\t/**\r\n\t * Set the version of the service for this request.\r\n\t * @param serviceVersion\r\n\t */\r\n\tpublic void setServiceVersion(String serviceVersion);\r\n\t \r\n\t/**\r\n\t * Gets the request body data aka paylod for the request\r\n\t * @return the request data\r\n\t */\r\n\tpublic T getRequestData();\r\n\t\r\n\t/**\r\n\t * Returns the security context around this request.\r\n\t * @return the security context for this request\r\n\t */\r\n\tpublic SecurityContext getSecurityContext();\r\n\t\r\n\t/**\r\n\t * Returns all headers.\r\n\t * @return the array of headers\r\n\t */\r\n\tpublic Header[] getHeaders();\r\n\t\r\n\t/**\r\n\t * Returns the header object if the header with a specified key is present.\r\n\t * @param key The key for which value has to be returned\r\n\t * @return the value of the specified key\r\n\t */\r\n\tpublic Header getHeaderByKey(String key);\t\r\n}",
"@JsonProperty(\"service\")\n public String getService() {\n return service;\n }",
"public InfoTransferService(String name) {\n super(name);\n }",
"public interface SerService {\n\n List<SService> findwithPageInfo(Integer pageNo, Integer pageSize);\n\n PageInfo<SService> getPageInfo(Integer pageSize);\n\n SService findById(Integer id);\n\n void modi(SService sService);\n\n void add(SService sService, String samePasswd);\n\n void setStateS(Integer id);\n\n void delS(Integer id);\n\n\n List<SService> findS(String osUsername, String unixHost, String status, Integer accountId);\n\n void updateCost(SService sService);\n}",
"com.appscode.api.kubernetes.v1beta2.Meta getMeta();",
"@Override\r\n\t\t\tpublic Object getKey() {\n\t\t\t\treturn service;\r\n\t\t\t}",
"private RFSServiceSummary processService(Service service) {\n \t\tIMonitoringSummary serviceSummary = monitoringStateModel\n \t\t\t\t.summary(service);\n\t\tserviceSummary.addContextObject(new ObjectContext<DateTimeRange>(\n\t\t\t\tgetPeriod()));\n \t\tserviceSummary.compute(new NullProgressMonitor());\n \n \t\tif (serviceSummary instanceof RFSServiceSummary) {\n \n \t\t\tfinal ReportingEngine engine = (ReportingEngine) getEngine();\n \t\t\tengine.setService(service);\n \t\t\tengine.setServiceSummary((RFSServiceSummary) serviceSummary);\n \t\t\tengine.setJobMonitor(getJobMonitor());\n \t\t\tengine.setDataProvider(this.getDataProvider());\n \t\t\tengine.setPeriod(getPeriod());\n \t\t\tengine.execute();\n \t\t\tif (engine.getFailures().size() > 0) {\n \t\t\t\t// Don't add anmy\n \t\t\t\tthis.getFailures().addAll(engine.getFailures());\n \t\t\t}\n \t\t\treturn (RFSServiceSummary) serviceSummary;\n \t\t}\n \t\treturn null;\n \t}",
"public abstract void dataFromEOJ(Service service);",
"ServiceOrder(String carVIN, int techID, int dealershipID, String serviceDate){\n serviceNumber++;\n this.carVIN = carVIN;\n this.techID = techID;\n this.dealershipID = dealershipID;\n this.serviceDate = serviceDate;\n this.serviceDesc = \"None\";\n this.partsUsed = \"None\";\n this.partsCost = 0;\n this.totalCost = 0;\n this.laborHours = 0;\n }",
"@Override\n\tpublic BaseServic<Banco> getService() {\n\t\treturn service;\n\t}",
"@Override\n\tpublic Meta_data get_Meta_data() {\n\t\tMeta_data meta_data = new Meta_data_layer(elements);\n\t\treturn meta_data;\n\t}",
"public interface Service {\n\t/**\n\t * Method stub to get the service appointment.\n\t *\n\t * @return The service appointment.\n\t */\n\tabstract public Date getServiceAppointment();\n\n\t/**\n\t * Method stub to get the servicing interval.\n\t *\n\t * @return The servicing interval.\n\t */\n\tabstract public int getServiceInterval();\n\n\t/**\n\t * Method stub to set the service appointment.\n\t *\n\t * @param serviceAppointment The service appointment as Date object.\n\t */\n\tabstract public void setServiceAppointment(Date serviceAppointment);\n\n\t/**\n\t * Method stub to set the servicing interval.\n\t *\n\t * @param serviceIntervalDays Servicing interval in days.\n\t */\n\tabstract public void setServiceInterval(int serviceIntervalDays);\n}",
"public interface SummaryService {\n\n\tlong getOrphanCount(List<Exoplanet> exoplanets);\n\n\tString findPlanetWithHottestStar(List<Exoplanet> exoplanets);\n\n\tList<TimelineEntry> createTimeline(List<Exoplanet> exoplanets);\n}"
] | [
"0.63393354",
"0.62800586",
"0.6123398",
"0.59176487",
"0.5907315",
"0.5870082",
"0.58214146",
"0.58161414",
"0.58155966",
"0.57889634",
"0.57765603",
"0.5722108",
"0.5722108",
"0.5722108",
"0.5674385",
"0.5630852",
"0.561178",
"0.5599738",
"0.55986977",
"0.55833274",
"0.5582516",
"0.5579651",
"0.5577825",
"0.5551231",
"0.5548008",
"0.5543426",
"0.5535646",
"0.5513252",
"0.55003035",
"0.5445736",
"0.54361033",
"0.5423835",
"0.54098535",
"0.5407901",
"0.5387527",
"0.53849405",
"0.538477",
"0.5376886",
"0.53563446",
"0.5345539",
"0.5342295",
"0.53317803",
"0.53302824",
"0.53286314",
"0.5325013",
"0.53225404",
"0.53225404",
"0.53225404",
"0.5306738",
"0.5298113",
"0.5294959",
"0.527594",
"0.5275042",
"0.5273402",
"0.5270944",
"0.5270944",
"0.52700675",
"0.52548385",
"0.52438974",
"0.524058",
"0.5239958",
"0.5233976",
"0.5226347",
"0.522554",
"0.52247345",
"0.5220365",
"0.520979",
"0.5209671",
"0.5209061",
"0.5209061",
"0.5209061",
"0.5209061",
"0.5209061",
"0.5203327",
"0.5174388",
"0.5168778",
"0.5165517",
"0.5159994",
"0.5159994",
"0.5159994",
"0.5159994",
"0.5159994",
"0.5157109",
"0.5156654",
"0.5156654",
"0.5146353",
"0.51381195",
"0.51333946",
"0.5133283",
"0.5129741",
"0.5127333",
"0.51213217",
"0.5121222",
"0.51209706",
"0.5116844",
"0.51145935",
"0.5113752",
"0.5112045",
"0.5106225",
"0.51042795",
"0.51039684"
] | 0.0 | -1 |
int rowcount = tblSupplier.getRowCount(); | public void populateTable() {
DefaultTableModel dtm = (DefaultTableModel)tblSalesPersonCommision.getModel();
dtm.setRowCount(0);
// for(OrderList orderlist:salesperson.getOrderlistcatalog().getSalesPersonOrder()){
// for(Order order:salesperson.getOrderListSalesPerson().getOrderList()){
// for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){
// for(SalesPerson salesperson :business.getEmployeedirectory().getSalesPersonList()){
for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){
Object [] row = new Object[4];
// row[0]=.getCustomer().getCustomerId();
// row[1]= market.getCustomer().getCustomerName();
row[0]=orderlist;
row[1]=orderlist.getOrdertotalprice();
row[2]=orderlist.getSalespersoncomission();
row[3]=orderlist.getTotalorderlistquantity();
//3 tcomission = tcomission + orderlist.getSalespersoncomission();
//3 totalquantity = totalquantity + orderlist.getTotalorderlistquantity();
//3 totalorderprice = totalorderprice + orderlist.getOrdertotalprice();
// row[0]=order;
// row[1]=order.getAmountprice();
dtm.addRow(row);
// }
// }
}
//2 salesperson.getOrderlistcatalog().setTotalquantitypersalesperson(totalquantity);
//2 salesperson.getOrderlistcatalog().setTotalcommision(tcomission);
//2 salesperson.getOrderlistcatalog().setTotalorderlistcsatalogprice(totalorderprice);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowsCount();",
"public int getRowCount();",
"int rowCount();",
"private int numRows(){\n return attrTable.getModel().getRowCount();\n }",
"double getRowCount();",
"@Override\n\tpublic int getRowCnt() {\n\t\treturn invBaseStockDao.getRowCnt();\n\t}",
"public abstract int getNumOfRows();",
"private int getJTableNumberOfRows() {\n\n\t\tint count = 0; /* create a integer object for rows count */\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(DATABASE_URL, UserName_SQL, Password_SQL);\n\t\t\tstatement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT COUNT(*) as numberOfRows FROM invoice\");\n\t\t\tresultSet.next();\n\t\t\tcount = resultSet.getInt(\"numberOfRows\");\n\t\t\tresultSet.close();\n\t\t} // end try\n\t\tcatch (SQLException sqlException) {\n\t\t\tsqlException.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} // end catch\n\t\tfinally // ensure statement and connection are closed properly\n\t\t{\n\t\t\ttry {\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t} // end try\n\t\t\tcatch (Exception exception) {\n\t\t\t\texception.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t} // end catch\n\t\t} // end finally\n\t\treturn count; /* return the result of rows count */\n\t}",
"public static int getTableRowCount() {\n\t\treturn TABLE_ROW_COUNT;\n\t}",
"public abstract int getNumRows();",
"@Override\r\n public int getRowCount() {\n return this.rowData.size();\r\n }",
"public int getRowCount() { return this.underlying.getRowCount(); }",
"public int getRowCount() {\n return 0;\n }",
"public int totalRowsCount();",
"public static int getRowCount(){\n \n int row=0;\n boolean empty=false; //row is not empty \n do{\n String b = (String) jTable1.getValueAt(row, 0);\n if (b != null && b.length() != 0) {\n row++; //row count\n } else {\n empty = true;\n }\n }while (!empty);\n return row; //returns row value\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public static int RowCount()\r\n\t{\r\n\t\treturn wrksheet.getRows();\r\n\t}",
"int getRowsAmount();",
"public int getRowCount() \n\t{ return rowcounter; }",
"int getRows();",
"int getRows();",
"public int getRowsCount() {\n return rows_.size();\n }",
"@Override\n\tpublic int getRowCount() {\n\t\treturn rh.size();\n\t}",
"public int getRowCount() {\r\n\t\treturn(noOfRows);\r\n\t}",
"public int getRowCount() {\r\n int currentRowCount = this.table.getRowCount();\r\n if (currentRowCount > rowCount) {\r\n rowCount = currentRowCount;\r\n }\r\n return rowCount;\r\n }",
"@Override\n\t\tpublic int getRowCount() \n\t\t{\n\t\t\treturn tables.size();\n\t\t}",
"@Override\n\tpublic int getRowCount() {\n\t\treturn rowData.size();\n\t}",
"int countRows() throws IOException {\n Scan s = new Scan();\n ResultScanner rs = tbl.getScanner(s);\n int i = 0;\n while(rs.next() !=null) {\n i++;\n }\n return i;\n }",
"@Override\r\n\tpublic int getRowCount() {\n\t\treturn rowData.length;\r\n\t}",
"public int getRowCount()\r\n\t{\r\n\t\treturn rowCount;\r\n\t}",
"public int getRowCount()\n\t{\n\t\treturn datas.size();\n\t}",
"public int getRowsCount() {\n return rows_.size();\n }",
"public int findRowCount () throws DataAccessException;",
"int tableSize();",
"public int getRowCount() {\n return _data.size();\n }",
"public int getNumRows() {\n\t\treturn NUM_ROWS; \n\t}",
"@Override\n public int getRowCount() {\n return data.length-1; \n }",
"public int getTotalRows();",
"public int getNumRows () {\n\t\treturn numrows_;\n\t}",
"public static int getRowCount() {\n ResultSet rs = null;\n int rows = 0;\n try (\n Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);) {\n rs = stmt.executeQuery(\"SELECT * FROM sensors\");\n rs.last();\n rows = rs.getRow();\n\n } catch (SQLException e) {\n System.err.println(e);\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBExecute.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n }\n return rows;\n }",
"int getTotalsRowCount();",
"public int getRowCount(){\n return dataEntries.length;\n }",
"int getColumnCount();",
"int getColumnCount();",
"public int getRowCount() {\n\t\treturn this.records.size();\n\t}",
"public int getNrow(){\r\n \treturn this.nrow;\r\n \t}",
"public int getRowCount()\n\t{\n\t\treturn m_data.rows.size();\n\t}",
"public int getRowSize() {\n \t\treturn this.rows;\n \t}",
"public int getRowCount() {\n\t\treturn rowcount;\n\t}",
"public int getRows();",
"public int getRows();",
"public int getNumberOfRows() {\n return this.numberOfRows;\n }",
"public int getRowCount() {\n\t\treturn(data.size());\n\t}",
"public int getRowCount() {\n\t\treturn(data.length);\n\t}",
"int totalRows(){\n return row;\n }",
"public int getRowCount()\n {\n return numRows;\n }",
"public int getRowCount() {\r\n return this.rowCount;\r\n }",
"@Test\n public void testGetRowCount() {\n System.out.println(\"getRowCount\");\n int expResult = 3;\n int result = testLibraryLibraryTableModel.getRowCount();\n assertEquals(expResult, result);\n\n }",
"public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }",
"public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }",
"public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }",
"public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }",
"public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }",
"public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }",
"@Override\n\tpublic int getNumRows() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int getRowCount() {\n\t\treturn rowCount;\n\t}",
"@Override\n\tpublic int getRowCount() {\n\t\treturn rowCount;\n\t}",
"public int rowCount() {\n\t\treturn n_;\n\t}",
"public int getRowCount(Object rp) throws SQLException {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic int getRowCount() {\n\t\treturn records.size();\n\t}",
"@Override\n\tpublic int getRowCount() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int getRowCount() {\n\t\treturn 0;\n\t}",
"@Override\n\t\t\tpublic int getRow() {\n\t\t\t\treturn count;\n\t\t\t}",
"public int getActualRowCount() {\r\n int ret = 0;\r\n if (rows != null) ret = rows.size();\r\n return ret;\r\n }",
"@Override \n\tpublic int getRowCount() {\n\t\treturn depenses.size();\n\t}",
"public int getRowCount() {\n return this.rowCount;\n }",
"@Override\n\tpublic int getRowCount() {\n\t\tint i = 0;\n\t\tfor(i=0;;i++){\n\t\t\tif(dataAll[i][0]==null)\n\t\t\t\tbreak;\n\t\t}\n\t\treturn i;\n\t}",
"public static int rowCount() {\n\t return sheet.getPhysicalNumberOfRows();\n\t}",
"public int getRowCount() {\r\n return this.data.length;\r\n }",
"public int resultCount(){\n\n int c = 0;\n\n try{\n if(res.last()){\n c = res.getRow();\n res.beforeFirst();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return c;\n }",
"@Override\n public int getRowCount() {\n return (model == null) ? 0 : model.getRowCount(); \n }",
"private int getRowCount(ResultSet rs) {\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif(rs != null) {\r\n\t\t\t\t\r\n\t\t\t\trs.last();\r\n\t\t\t\t\r\n\t\t\t\treturn rs.getRow(); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn 0;\r\n\t}",
"public int numberOfRows() {\n\t\treturn rowCount;\n\t}",
"public int getNumRows() { return numRows; }",
"@Override\n public int getRowCount() {\n return this.data.length;\n }",
"@Override\r\n public int getRowCount() {\n if (leitores != null) {\r\n return leitores.size();\r\n }\r\n return 0;\r\n }",
"@Override\r\n\tpublic int getRowCount() {\n\t\treturn 25;\r\n\t}",
"@Override\n public int getRowCount() {\n return this.filas.size();\n \n }",
"private int getRowCount(String table) {\n return getIntFromQuery(\"SELECT COUNT(*) from \" + table, null);\n }"
] | [
"0.79068595",
"0.79068595",
"0.79068595",
"0.79068595",
"0.79068595",
"0.79068595",
"0.79068595",
"0.77565825",
"0.7727286",
"0.77093935",
"0.73702407",
"0.73565376",
"0.73347145",
"0.7329534",
"0.72429216",
"0.7234028",
"0.7205613",
"0.7196532",
"0.71858245",
"0.7182542",
"0.7165155",
"0.712615",
"0.7122186",
"0.7122186",
"0.7122186",
"0.7122186",
"0.7122186",
"0.7122186",
"0.7113178",
"0.7109336",
"0.70918137",
"0.70678765",
"0.70678765",
"0.7060459",
"0.70525223",
"0.7030612",
"0.701993",
"0.7019828",
"0.7017345",
"0.69762766",
"0.695979",
"0.69480187",
"0.6944305",
"0.69388354",
"0.69370955",
"0.69234324",
"0.69188774",
"0.6885999",
"0.6885557",
"0.688357",
"0.6879893",
"0.68768716",
"0.6863255",
"0.68528265",
"0.6850761",
"0.6850761",
"0.68480426",
"0.68460757",
"0.68393904",
"0.6839046",
"0.68384844",
"0.6837364",
"0.6837364",
"0.68229693",
"0.6820856",
"0.6813804",
"0.6804192",
"0.68028206",
"0.6801207",
"0.68008536",
"0.6799275",
"0.6799275",
"0.6799275",
"0.6799275",
"0.6799275",
"0.6799275",
"0.67889947",
"0.6783332",
"0.6783332",
"0.677389",
"0.6773687",
"0.6772377",
"0.67711407",
"0.67711407",
"0.67680365",
"0.67626756",
"0.6754231",
"0.675289",
"0.6752264",
"0.67511696",
"0.6741627",
"0.6724787",
"0.6715361",
"0.67070615",
"0.66974175",
"0.6678304",
"0.6676835",
"0.66723555",
"0.66700786",
"0.66649455",
"0.6662829"
] | 0.0 | -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() {
jLabel3 = new javax.swing.JLabel();
lblSalesPersonName = new javax.swing.JLabel();
btnBack = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
tblSalesPersonCommision = new javax.swing.JTable();
jLabel4 = new javax.swing.JLabel();
txtComission = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
txttotalOrderQuantity = new javax.swing.JTextField();
setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel3.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N
jLabel3.setText("SALES CONSOLE");
add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 0, 180, 40));
add(lblSalesPersonName, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 0, 170, 40));
btnBack.setText("<< Back");
btnBack.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnBackActionPerformed(evt);
}
});
add(btnBack, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 510, 210, 50));
tblSalesPersonCommision.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"OrderList No", "Order List Amount", "salesperson commission", "Order quantity"
}
) {
boolean[] canEdit = new boolean [] {
false, false, false, false
};
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
jScrollPane1.setViewportView(tblSalesPersonCommision);
if (tblSalesPersonCommision.getColumnModel().getColumnCount() > 0) {
tblSalesPersonCommision.getColumnModel().getColumn(0).setResizable(false);
tblSalesPersonCommision.getColumnModel().getColumn(1).setResizable(false);
tblSalesPersonCommision.getColumnModel().getColumn(2).setResizable(false);
tblSalesPersonCommision.getColumnModel().getColumn(3).setResizable(false);
}
add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 140, 790, 190));
jLabel4.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N
jLabel4.setText("Total Order Quantity");
add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 420, 180, 40));
txtComission.setEditable(false);
txtComission.setEnabled(false);
add(txtComission, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 380, 100, 40));
jLabel5.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N
jLabel5.setText("Total Comission");
add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 380, 180, 40));
add(txttotalOrderQuantity, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 430, 100, 40));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public PatientUI() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Oddeven() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public Magasin() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public kunde() {\n initComponents();\n }",
"public MusteriEkle() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public frmVenda() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public FrmMenu() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public sinavlar2() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
] | [
"0.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.6942394",
"0.6935541",
"0.693223",
"0.6928088",
"0.6924428",
"0.69241494",
"0.691142",
"0.69106644",
"0.6893475",
"0.68921363",
"0.68898267",
"0.6889822",
"0.6888889",
"0.68830574",
"0.68813944",
"0.6881165",
"0.6877479",
"0.68752235",
"0.68747437",
"0.6871299",
"0.6859591",
"0.6856115",
"0.6855173",
"0.6855125",
"0.6854962",
"0.68530196",
"0.6852737",
"0.6852737",
"0.6843147",
"0.68370813",
"0.68366593",
"0.68283623",
"0.68281215",
"0.6825811",
"0.6823924",
"0.6823443",
"0.68169594",
"0.68156785",
"0.6809513",
"0.68092215",
"0.68091464",
"0.68080777",
"0.6806839",
"0.6802871",
"0.6795172",
"0.67944115",
"0.67920417",
"0.6790103",
"0.6789442",
"0.67882615",
"0.67874336",
"0.6782333",
"0.67663395",
"0.67655057",
"0.6765026",
"0.6756117",
"0.6755023",
"0.67517287",
"0.6751031",
"0.6743606",
"0.6738867",
"0.6737393",
"0.6735563",
"0.67327684",
"0.67275465",
"0.67266476",
"0.6719547",
"0.67160183",
"0.6713876",
"0.6713717",
"0.67084426",
"0.6706528",
"0.670407",
"0.67005676",
"0.670017",
"0.66990566",
"0.6697206",
"0.6694092",
"0.6691282",
"0.6689802"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void mouseReleased(MouseEvent arg0) {
setWest();
if(arg0.getClickCount()==2 && jT.getSelectedColumn()==0) {
if(DB.ID=="") {
if(con_msg("좋아요를 하시려면 로그인을 해주세요.", "좋아요")) {
dispose();
return;
}
}
int row=jT.getSelectedRow();
try {
if(((ImageIcon)(jT.getValueAt(row, 0))).getIconHeight()==10)
DB.stmt.execute("insert into rating values("+jT.getValueAt(row, 1)+", '"+DB.ID+"', 0, '')");
else
DB.stmt.execute("delete from rating where member_r='"+DB.ID+"' and music_r="+jT.getValueAt(row, 1)+" and kinds=0");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
updateTable(dTM, jT);
setWest();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void actionPerformed(ActionEvent arg0) {
if(arg0.getSource().equals(jB[0])) {
String sql="";
if(genre.getSelectedIndex()!=0)
sql=" and genre='"+genre.getSelectedItem()+"'";
addRow(dTM,"select album, music_no, title, singer, genre, date from music where title like '%"+text.getText()+"%'"+sql);
if(dTM.getRowCount()==0) {
err_msg("검색된 항목이 없습니다.");
addRow(dTM, "select album, music_no, title, singer, genre, date from music");
genre.setSelectedIndex(0);
text.setText("");
}
updateTable(dTM, jT);
setWest();
}
if(arg0.getSource().equals(jB[1])) {
setVisible(false);
int row=jT.getSelectedRow();
new OneLine(new Object[] {jT.getValueAt(row, 2), jT.getValueAt(row, 3), jT.getValueAt(row, 1)}).addWindowListener(new Before(thisForm));
}
if(arg0.getSource().equals(jB[2])) {
try {
int row=jT.getSelectedRow();
ResultSet rs=DB.stmt.executeQuery("select * from rating where kinds=1 and music_r="+jT.getValueAt(row, 1)+" and member_r='"+DB.ID+"'");
if(rs.next())
return;
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
if(MainFrame.POINT==-1) {
if(con_msg("구매를 하시려면 로그인을 해주세요.", "구매")) {
dispose();
return;
};
}
int row=jT.getSelectedRow();
if(con_msg("제목 : "+jT.getValueAt(row, 2)+"를 구매하시겠습니까?", "구매 확인")) {
if(MainFrame.POINT==0) {
if(con_msg("포인트가 부족합니다.\n포인트를 충전하시겠습니까?", "포인트 부족")) {
setVisible(false);
new Pay().addWindowListener(new Before(thisForm));
}
return;
}
try {
DB.stmt.execute("insert into rating values("+jT.getValueAt(row, 1)+", '"+DB.ID+"', 1, '')");
DB.stmt.execute("update music set album=album+1 where music_no="+jT.getValueAt(row, 1));
DB.stmt.execute("update member set point=point-100 where id='"+DB.ID+"'");
MainFrame.POINT-=100;
MainFrame.PJL.setText("잔여포인트 : "+MainFrame.POINT);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
updateTable(dTM, jT);
setWest();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Cart cart = new Cart();
Store store = new Store();
DigitalVideoDisc dvd1 = null;
try {
dvd1 = new DigitalVideoDisc("The Lion King",
"Animation", 19.95f, "1/1/2021", "Roger Allers", -1);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
DigitalVideoDisc dvd2 = null;
try {
dvd2 = new DigitalVideoDisc("Star Wars",
"Science Fiction", 24.95f, "1/1/2021", "George Lucas", 87);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
DigitalVideoDisc dvd3 = null;
try {
dvd3 = new DigitalVideoDisc("Aladin",
"Animation", 18.99f, "1/1/2021/", "Someone", 100);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
// List<String> authors = new ArrayList<String>();
// authors.add("Dr.Nguyen Thieu Huy");
// Book b = new Book("Lecture on Algebra", "Textbook", 10.0f, "1/1/2021", authors);
DigitalVideoDisc[] dvdList = {dvd1, dvd2, dvd3};
for (DigitalVideoDisc dvd : dvdList) {
try {
store.addMedia(dvd);
} catch (LimitExceededException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
}
// store.addMedia(b);
Scanner sc = new Scanner(System.in);
int input1;
boolean notDone1 = true;
while (notDone1) {
System.out.println("\n\n\n\n\n");
showMenu();
input1 = Integer.valueOf(sc.nextLine());
switch (input1) {
//view store
case 1:
boolean notDone2 = true;
int input2;
while (notDone2) {
System.out.println("\n\n\n\n\n");
System.out.println("Items available in store:");
store.printStore();
storeMenu();
input2 = Integer.valueOf(sc.nextLine());
switch (input2) {
//see a media's details
case 1:
System.out.println("Title of the media: ");
String title;
title = sc.nextLine();
if (store.searchByTitle(title)) {
Media m = store.getMediaByTitle(title);
//play?
System.out.println("Play this media?(y/n)");
String play = sc.nextLine();
if (play.equals("y")) {
if (m.getClass().equals(DigitalVideoDisc.class)) {
DigitalVideoDisc item = (DigitalVideoDisc) m;
try {
item.play();
} catch (PlayerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
}
else if (m.getClass().equals(CompactDisc.class)) {
CompactDisc item = (CompactDisc) m;
try {
item.play();
} catch (PlayerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
}
}
else if (play.equals("n")) {
System.out.println("Decided not to play this media");
}
else {
System.out.println("Invalid answer");
}
//add to cart?
System.out.println("Add this media to cart?(y/n)");
String addToCart = sc.nextLine();
if (addToCart.equals("y")) {
try {
cart.addMedia(m);
} catch (LimitExceededException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
cart.printList();
}
else if (addToCart.equals("n")) {
System.out.println("Decided not to add this media to cart");
}
else {
System.out.println("Invalid answer");
}
}
break;
//add a media to cart
case 2:
System.out.println("Title of the media: ");
String title1;
title1 = sc.nextLine();
if (store.searchByTitle(title1)) {
Media m = store.getMediaByTitle(title1);
try {
cart.addMedia(m);
} catch (LimitExceededException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
cart.printList();
}
break;
//play a media
case 3:
System.out.println("Title of the media: ");
String title2;
title2 = sc.nextLine();
if (store.searchByTitle(title2)) {
Media m = store.getMediaByTitle(title2);
if (m.getClass().equals(DigitalVideoDisc.class)) {
DigitalVideoDisc item = (DigitalVideoDisc) m;
try {
item.play();
} catch (PlayerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
}
else if (m.getClass().equals(CompactDisc.class)) {
CompactDisc item = (CompactDisc) m;
try {
item.play();
} catch (PlayerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
}
else System.out.println("Media not playable");
}
break;
//see current cart
case 4:
cart.printList();
break;
//exit
case 0:
notDone2 = false;
System.out.println("Exiting");
break;
//default
default:
System.out.println("Not an available option. Please choose again\n");
}
}
break;
//update store
case 2:
boolean notDone3 = true;
int input3;
while (notDone1) {
System.out.println("\n\n\n\n\n");
updateStoreMenu();
input3 = Integer.valueOf(sc.nextLine());
switch (input3) {
case 1:
System.out.println("Options: ");
System.out.println("_________________________________");
System.out.println("1. DVD");
System.out.println("2. Book");
System.out.println("3. CD");
System.out.println("0. Exit");
System.out.println("_________________________________");
System.out.println("Please choose a number: 0-1-2-3");
int input4 = Integer.valueOf(sc.nextLine());
switch (input4) {
case 1:
String titledvd;
String category;
float cost;
String dateAdded;
String director;
int length;
System.out.println("Title:");
titledvd = sc.nextLine();
System.out.println("Category:");
category = sc.nextLine();
System.out.println("Cost:");
cost = Float.valueOf(sc.nextLine());
System.out.println("dateAdded:");
dateAdded = sc.nextLine();
System.out.println("director:");
director = sc.nextLine();
System.out.println("Length:");
length = Integer.valueOf(sc.nextLine());
DigitalVideoDisc dvd = null;
try {
dvd = new DigitalVideoDisc(titledvd, category, cost, dateAdded, director,
length);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
try {
store.addMedia(dvd);
} catch (LimitExceededException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
break;
case 2:
String titlebook;
String categorybook;
float costbook;
String dateAddedbook;
String author;
int lengthbook;
System.out.println("Title:");
titlebook = sc.nextLine();
System.out.println("Category:");
categorybook = sc.nextLine();
System.out.println("Cost:");
costbook = Float.valueOf(sc.nextLine());
System.out.println("dateAdded:");
dateAddedbook = sc.nextLine();
System.out.println("author:");
author = sc.nextLine();
List<String> authors = new ArrayList<String>();
authors.add(author);
Book book = null;
try {
book = new Book(titlebook, categorybook, costbook, dateAddedbook, authors);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
try {
store.addMedia(book);
} catch (LimitExceededException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
break;
case 3:
String titlecd;
String categorycd;
float costcd;
String dateAddedcd;
String artist;
int lengthcd;
String directorcd;
System.out.println("Title:");
titlecd = sc.nextLine();
System.out.println("Category:");
categorycd = sc.nextLine();
System.out.println("Cost:");
costcd = Float.valueOf(sc.nextLine());
System.out.println("dateAdded:");
dateAddedcd = sc.nextLine();
System.out.println("director:");
directorcd = sc.nextLine();
System.out.println("artist:");
artist = sc.nextLine();
System.out.println("Length:");
lengthcd = Integer.valueOf(sc.nextLine());
ArrayList<Track> tracks = new ArrayList<Track>();
Track track = new Track(titlecd, lengthcd);
tracks.add(track);
CompactDisc cd = null;
try {
cd = new CompactDisc(titlecd, categorycd, costcd, dateAddedcd, lengthcd, directorcd,
artist, tracks);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
try {
store.addMedia(cd);
} catch (LimitExceededException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
break;
case 0:
System.out.println("Exiting");
notDone3 = true;
break;
default:
System.out.println("Not an available option.");
}
//remove media
case 2:
System.out.println("Title of the media: ");
String title5;
title5 = sc.nextLine();
if (store.searchByTitle(title5)) {
Media m = store.getMediaByTitle(title5);
try {
store.removeMedia(m);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
}
break;
case 0:
System.out.println("Exiting");
break;
default:
System.out.println("Invalid option");
}
}
break;
//see current cart
case 3:
int input4;
boolean notDone4 = true;
while (notDone4) {
System.out.println("\n\n\n\n\n");
cartMenu();
input4 = Integer.valueOf(sc.nextLine());
switch (input4) {
//filter media
case 1:
System.out.println("Filter by id(1) or by name(2):");
int filter = Integer.valueOf(sc.nextLine());
if (filter == 1) {
System.out.println("Id: ");
int id = Integer.valueOf(sc.nextLine());
cart.searchByID(id);
}
else if (filter == 2) {
System.out.println("Title of the media: ");
String title8;
title8 = sc.nextLine();
cart.searchByTitle(title8);
}
break;
//sort media
case 2:
System.out.println("Sort by TitleCost(1) or CostTitle(2):");
int sort = Integer.valueOf(sc.nextLine());
if (sort == 1) {
cart.sortByTitleCost();
cart.printList();
}
else if (sort == 2) {
cart.sortByCostTitle();
cart.printList();
}
else {
System.out.println("Invalid option");
}
break;
//remove media from cart
case 3:
System.out.println("Title of the media: ");
String title7;
title7 = sc.nextLine();
if (cart.searchByTitle(title7)) {
Media m = store.getMediaByTitle(title7);
try {
cart.removeMedia(m);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
}
break;
//play a media
case 4:
cart.printList();
System.out.println("Title of the media: ");
String title5;
title5 = sc.nextLine();
if (cart.searchByTitle(title5)) {
Media m = cart.getMediaByTitle(title5);
if (m.getClass().equals(DigitalVideoDisc.class)) {
DigitalVideoDisc item = (DigitalVideoDisc) m;
try {
item.play();
} catch (PlayerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
}
else if (m.getClass().equals(CompactDisc.class)) {
CompactDisc item = (CompactDisc) m;
try {
item.play();
} catch (PlayerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
JFrame f = new JFrame();
JOptionPane.showMessageDialog(f, e.getMessage(), "Error", JOptionPane.WARNING_MESSAGE);
}
}
else System.out.println("Media not playable");
}
break;
//place order
case 5:
System.out.println("An order is created");
cart.emptyCart();
break;
case 0:
notDone4 = false;
System.out.println("Exiting");
break;
default:
System.out.println("Not an available option. Please choose again\n");
}
}
break;
//exit
case 0:
notDone1 = false;
System.out.println("Exiting");
break;
default:
System.out.println("Not an available option. Please choose again\n");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
int k;
Scanner ob1=new Scanner(System.in);
System.out.println("enter array's size: ");
int n=ob1.nextInt();
int[] array=new int[n];
System.out.println("enter array's elements: ");
for(int i=0;i<n;i++) {
array[i]=ob1.nextInt();
}
// System.out.println(array);
int min_number=notCountains(array);
System.out.println("min number is "+min_number);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
map personlite and person to the same DB | @Override
public ESPath getPath(CharSequence dataspaceIsIgnored, Class type, CharSequence id, Object status) {
if (type == PersonLite.class)
type = Person.class;
String stype = type == NGO.class ? "charity" : type.getSimpleName().toLowerCase();
String index = stype;
KStatus ks = (KStatus) status;
if (ks == null)
ks = KStatus.PUBLISHED;
switch (ks) {
case PUBLISHED:
case ARCHIVED: // lets keep archived in the published index.
case PUB_OR_ARC: // ...which means PUB_OR_ARC = PUB here
break;
case DRAFT:
case PENDING:
case REQUEST_PUBLISH:
case MODIFIED:
index += ".draft";
break;
case PUB_OR_DRAFT:
case ALL_BAR_TRASH:
String i1 = index;
String i2 = index + ".draft";
ESPath esp = new ESPath(new String[] { i1, i2 }, stype, id);
return esp;
case TRASH:
index += ".trash";
break;
default:
throw new IllegalArgumentException(type + " " + status);
}
return new ESPath(index, stype, id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void lookupAndSaveNewPerson();",
"private void convertAuthorsToPerson() {\n List<Object[]> authors = jdbcTemplate.query(\"SELECT * FROM T_AUTHORS\", new AuthorRowMapper());\n\n String query = \"INSERT INTO \" + IDaoPersons.TABLE + \"(NAME, FIRST_NAME, NOTE, THE_COUNTRY_FK, TYPE) VALUES (?,?,?,?,?)\";\n\n for (Object[] author : authors) {\n jdbcTemplate.update(query, author[0], author[1], author[2], author[3], IAuthorsService.PERSON_TYPE);\n }\n\n jdbcTemplate.update(\"DROP TABLE IF EXISTS T_AUTHORS\");\n }",
"public person mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tperson p=new person();\r\n\t\t\tp.setId(rs.getInt(\"id\"));//here setid is mapped to name \"id\".\r\n\t\t\tp.setName(rs.getString(\"name\"));//here name setname mapped or means \"name\" .similarly,the following mapping is done with sql.\r\n\t\t\tp.setLocation(rs.getString(\"location\"));\r\n\t\t\tp.setDate(rs.getTimestamp(\"birthdate\"));\r\n\t\t\t\r\n\t\t\treturn p;\r\n\t\t}",
"public interface PersonMapper {\n public void add(Person user);\n public Person getUser(int id);\n}",
"@Mapper\npublic interface PersonMapper {\n\n PersonDO selectPersonById(Integer id);\n\n List<PersonDO> selectAll();\n\n void insert(PersonDO personDO);\n\n Long update(PersonDO personDO);\n\n Long delete(Integer id);\n}",
"LawPerson selectByPrimaryKey(Long personId);",
"Mapper<T, T2> relate(Customizable customizable);",
"public static void toPersonObject() {\n\t\t\n\t\t// queries \n\t\tString getPersonQuery = \"SELECT * FROM Persons\";\n\t\tString getEmailQuery = \"SELECT (email) FROM Emails e WHERE e.personID=?;\";\n\t\t\n\t\t// Create connection and prepare Sql statement \n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet personRs = null;\n\t\tResultSet emailRs = null;\n\n\t\t// result\n\t\tPerson p = null;\n\t\tAddress a = null;\n\t\tString personCode=null, lastName=null, firstName=null;\n\t\n\t\ttry {\t\n\t\t\tconn = ConnectionFactory.getOne();\n\t\t\tps = conn.prepareStatement(getPersonQuery);\n\t\t\tpersonRs = ps.executeQuery();\n\t\t\twhile(personRs.next()) {\n\t\t\t\tpersonCode = personRs.getString(\"personCode\");\n\t\t\t\tlastName = personRs.getString(\"lastName\");\n\t\t\t\tfirstName = personRs.getString(\"firstName\");\n\t\t\t\tint addressID = personRs.getInt(\"addressID\");\n\t\t\t\tint personID = personRs.getInt(\"id\");\n\t\t\t\t\n\t\t\t\ta = ProcessDatabase.toAddressObjectFromDB(addressID);\n\t\t\t\t// create a set to store email and deposite to create an object \n\t\t\t\tArrayList<String> emails = new ArrayList<String>();\n\t\t\t\tString email = null;\n\t\t\t\t//seperate query to get email Address \n\t\t\t\tps = conn.prepareStatement(getEmailQuery);\n\t\t\t\tps.setInt(1, personID);\n\t\t\t\temailRs = ps.executeQuery();\n\t\t\t\twhile(emailRs.next()) {\n\t\t\t\t\temail = emailRs.getString(\"email\");\n\t\t\t\t\temails.add(email);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//create a person Object \n\t\t\t\t//Person(String personCode, String lastName, String firstName, Address address, Set<String> emails)\n\t\t\t\tp = new Person(personCode,lastName,firstName,a,emails);\n\t\t\t\t\n\t\t\t\t//add to Person list \n\t\t\t\tDataConverter.getPersons().add(p);\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\t//log error to logger\n\t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t\t}\n\t\t\n\t}",
"public Person addPerson(Person person) {\n \tqueryExecutor.insertPerson(person);\n \t//personMap.put(person.getName(), person);\n return person;\n }",
"Person fetchPersonById(Person person);",
"public void CreatePerson(Person p){\n\t\tWeddingConnectionPoolManager con = new WeddingConnectionPoolManager(); \n\t\t Person p1 = new Person(p.getId(), p.getFirstName(), p.getLastName(), p.getRelationship(),\n\t\t\t\t p.getAddress(), p.getPhone(), p.getEmail(), p.getComment(), user.getId());\n\t\t System.out.println(\"p1 : \" + p1);\n\t\t System.out.println(\"p : \" + p);\n\t\t// TODO - should to iterate on the results that returns when calling to \"getpersons\" method.\n\t\tPersonDBManager.getInstance().CreateNewPerson(con.getConnectionFromPool(), p1);\t\n\t}",
"private static void mapDbNames()\r\n { \r\n if (dbMap == null) {\r\n dbMap = new HashMap<String, String>();\r\n dbMap.put(\"tuition\", \"tuition\");\r\n dbMap.put(\"utilities\", \"utilities\");\r\n dbMap.put(\"fuel\", \"gas\");\r\n dbMap.put(\"registration\", \"Vehicle Registration\");\r\n dbMap.put(\"repair\", \"car repair\");\r\n dbMap.put(\"clothing\", \"clothing\");\r\n // maps asst types to the way they're currently in the database\r\n // used in the where clause for where tcf_assistance.description = ?\r\n }\r\n }",
"public People savePeople(People people);",
"@Mapper\npublic interface RecruitMapper {\n\n /**\n * 根据招募表主键ID查询\n * @param id\n * @return\n */\n public Recruit getRecruitById(String id);\n\n /**\n * 根据商家ID查询对应招募信息\n * @param owner\n * @return\n */\n public List<Recruit> getRecruitListByOwner(String owner);\n\n public int insertRecruit(Recruit recruit);\n\n public int updateRecruit(Recruit recruit);\n}",
"RelatedPerson<Person, Person> relatePerson(String person1, String person2, String relation);",
"public void setPersonId(long personId);",
"@Override\n public void savePerson() {\n this.personDao.savePerson();\n }",
"public static void main(String[] args) {\n Person.insertToPeopleMap(new Person(39105153322l,\"Romas\",\"Garkas\"));\n Person.insertToPeopleMap(new Person(38512013245l,\"Arnas\",\"Lionginas\"));\n Person.insertToPeopleMap(new Person(48603142299l,\"Maryte\",\"Melninkaite\"));\n Person.insertToPeopleMap(new Person(49009103377l,\"Dalia\",\"Morka\"));\n Person.insertToPeopleMap(new Person(49009103377l,\"Milda\",\"Morkiene\"));\n\n\n for (Map.Entry<Long, List<Person>> personEntry : Person.getPeople().entrySet()){\n for (Person person : personEntry.getValue()){\n System.out.println(\"A.K.: \" + person.getCitizenCode() + \" Vardas: \" + person.getName() + \" Pavarde: \" + person.getSurname());\n }\n }\n }",
"public void dummyUsersToDB(){\n\t\tUser nick = new User(db,\"Nick\",9);\n\t\tUser lin = new User(db,\"Lin\",10);\n\t\tUser evan = new User(db,\"Evan\",8);\n\t\tUser karthik = new User(db,\"Karthik\",10);\n\t\tUser bernadette = new User(db,\"Bernadette\",8);\n\t\tUser james = new User(db,\"James\",7);\n\t}",
"@Mapper(componentModel = \"spring\", uses = {UserMapper.class, })\npublic interface PeopleMapper extends EntityMapper <PeopleDTO, People> {\n\n @Mapping(source = \"user.id\", target = \"userId\")\n @Mapping(source = \"user.firstName\", target = \"userFirstName\")\n @Mapping(source = \"user.lastName\", target = \"userLastName\")\n PeopleDTO toDto(People people);\n\n @Mapping(source = \"userId\", target = \"user\")\n @Mapping(target = \"seminarsPresenteds\", ignore = true)\n @Mapping(target = \"seminarsAttendeds\", ignore = true)\n @Mapping(target = \"specialGuestAts\", ignore = true)\n People toEntity(PeopleDTO peopleDTO);\n default People fromId(Long id) {\n if (id == null) {\n return null;\n }\n People people = new People();\n people.setId(id);\n return people;\n }\n\n default String peopleName(People people) {\n String name = \"\";\n if (people == null) {\n return null;\n }\n if (people.getUser() == null) {\n return null;\n }\n String firstName = people.getUser().getFirstName();\n if (firstName != null) {\n name += firstName;\n }\n String lastName = people.getUser().getLastName();\n if (lastName != null) {\n name += \" \" + lastName;\n }\n return name;\n }\n}",
"public Person updatePerson(Person pr){\t\n\t\tPerson old_p = new Person(pr.getId());\n\t\tPerson new_p = new Person(pr.getId(), pr.getFirstName(), pr.getLastName(),\n\t\t\t\tpr.getRelationship(),pr.getAddress(),pr.getPhone(),pr.getEmail(),pr.getComment(),pr.getUser_id());\n\t\tSystem.out.println(\"new_p : \" +new_p);\n\t\tWeddingConnectionPoolManager con = new WeddingConnectionPoolManager();\n\t\ttry {\n\t\t\told_p = PersonDBManager.getInstance().GetPersonByID(con.getConnectionFromPool(), old_p.getId());\n\t\t\tSystem.out.println(\"old_p :\" + old_p);\n\t\t\tif(old_p !=null){\n\t\t\tSystem.out.println(\"second new_p to update :\" +new_p);\n\t\t\tPersonDBManager.getInstance().UpdateAPerson(con.getConnectionFromPool(), new_p);\n\t\t\tExpensesDBManager.getInstance().updatePersonParamOnExpensesTable(con.getConnectionFromPool(),\n\t\t\t\t\tnew_p.getFirstName(), new_p.getLastName(), new_p.getId(), new_p.getUser_id());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"GetPersonByID Not Found\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn old_p;\n\t\t\n\t}",
"private void loadExistingPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Load existing Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), BCrypt.hashpw(\"admin\", BCrypt\r\n\t\t\t\t\t.gensalt()), \"te@te.te\", \"Vorname\", \"Nachname\",\r\n\t\t\t\t\t\"Organisation\", \"Abteilung\", \"Fachrichtung\", \"Strasse\",\r\n\t\t\t\t\t\"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tList<IPerson> possiblePersons = PersistenceService.getService()\r\n\t\t\t\t\t.getPersonsFromDB(\"admin\");\r\n\t\t\tIPerson p2 = null;\r\n\t\t\tfor (IPerson p : possiblePersons) {\r\n\t\t\t\tif (BCrypt.checkpw(\"admin\", p.getPassword()))\r\n\t\t\t\t\tp2 = p;\r\n\t\t\t}\r\n\r\n\t\t\t// Person p2=Person.getPerson(3);\r\n\r\n\t\t\tSystem.out.println(\"Person p1: \" + p1.toString());\r\n\t\t\tif (p2 != null)\r\n\t\t\t\tSystem.out.println(\"Person p2: \" + p2.toString());\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Person p2 nicht geladen.\");\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Patient loaded!!\");\r\n\t}",
"private static void mapDbAsstIDs()\r\n {\r\n if (dbIdMap == null) {\r\n dbIdMap = new HashMap<String, Integer>();\r\n dbIdMap.put(\"repair\", 1);\r\n dbIdMap.put(\"fuel\", 2);\r\n dbIdMap.put(\"tuition\", 3);\r\n dbIdMap.put(\"clothing\", 4);\r\n dbIdMap.put(\"registration\", 5);\r\n dbIdMap.put(\"utilities\", 21);\r\n }\r\n }",
"public DaoResult createPerson(final Person person) {\n if (findPersonByFacebookId(person.getFacebookId()) != null) {\n return DaoResult.RECORD_ALREADY_EXIST;\n }\n //if no, find the city from City table, and create\n CityDataHandler cityDataHandler = new CityDataHandler();\n City fromCity = cityDataHandler.findCity(person.getFrom().getName());\n if (fromCity != null) {\n person.setFrom(fromCity);\n }\n City toCity = cityDataHandler.findCity(person.getTo().getName());\n if (toCity != null) {\n person.setTo(toCity);\n }\n\n EntityManager entityManager = CarPoolBuddyEntityManagerFactory.getInstance().makeEntityManager();\n EntityTransaction tx = entityManager.getTransaction();\n try {\n tx.begin();\n entityManager.persist(person);\n tx.commit();\n } finally {\n if (tx.isActive()) {\n tx.rollback();\n }\n entityManager.close();\n }\n\n //check if inserted\n if (findPersonByFacebookId(person.getFacebookId()) != null) {\n return DaoResult.RECORD_CREATED_SUCCESSFULLY;\n } else {\n return DaoResult.RECORD_CREATION_FAILED;\n }\n }",
"public static void main(String[] args) throws SQLException {\n StandAloneDataSource ds = new StandAloneDataSource(\"jdbc:postgresql://localhost:9999/NACID/\", \"postgres\", \"postgres\");\n ApplicationsDB db = new ApplicationsDB(ds, new NomenclaturesDB(ds));\n List<PersonRecord> persons = db.selectRecords(SQL, PersonRecord.class);\n List<CountryRecord> countries = db.selectRecords(CountryRecord.class,null);\n Map<Integer, CountryRecord> countriesMap = new HashMap<Integer, CountryRecord>();\n for (CountryRecord c:countries) {\n countriesMap.put(c.getId(), c);\n }\n Set<Integer> ids = new HashSet<Integer>();\n for (PersonRecord p:persons) {\n List<PersonRecord> personsByCivilIdType = db.selectRecords(PersonRecord.class, \"civil_id = ? and civil_id_type = ? order by id\", p.getCivilId(), p.getCivilIdType());\n for (int i = 0; i < personsByCivilIdType.size(); i++) {\n PersonRecord pr = personsByCivilIdType.get(i);\n ids.add(pr.getId());\n }\n }\n persons = db.selectRecords(PersonRecord.class, \"id in ( \" + StringUtils.join(ids, \",\") + \") order by civil_id, civil_id_type\");\n for (PersonRecord p:persons) {\n CountryRecord birthCountry = countriesMap.get(p.getBirthCountryId());\n CountryRecord citizenship = countriesMap.get(p.getCitizenshipId());\n System.out.println(p.getFName() + \"\\t\" + p.getSName() + \"\\t\" + p.getLName() + \"\\t\" + p.getCivilIdType() + \"\\t`\" + p.getCivilId() + \"\\t\" + (birthCountry == null ? \"\" : birthCountry.getName()) + \"\\t\" + (citizenship == null ? \"\" : citizenship.getName()) + \"\\t\" + p.getBirthDate() + \"\\t\" + p.getBirthCity());\n }\n System.out.println(StringUtils.join(persons, \"\\n\"));\n }",
"@Mapper\npublic interface NationReferenceMapper {\n\n @Insert(\"insert into t_timezerg_nation_reference values (#{id},#{nid},#{rid})\")\n int add(NationReference nationReference);\n\n @Select(\"select * from t_timezerg_nation_reference where nid = #{nid} and rid = #{rid}\")\n NationReference selectByNidAndRid(NationReference nationReference);\n\n @Select(\"select * from t_timezerg_nation_reference where id = #{id}\")\n NationReference selectById(String id);\n\n @Delete(\"delete from t_timezerg_nation_reference where rid = #{rid}\")\n void deleteByRid(String rid);\n\n @Delete(\"delete from t_timezerg_nation_reference where nid = #{nid}\")\n void deleteByNid(String nid);\n\n @Delete(\"delete from t_timezerg_nation_reference where id = #{id}\")\n void deleteById(String id);\n\n @Select(\"SELECT nr.*,n.title FROM t_timezerg_nation_reference nr LEFT JOIN t_timezerg_nation n ON nr.nid = n.id WHERE nr.rid = #{rid}\")\n List<HashMap> selectByRid(String rid);\n\n @Select(\"SELECT nr.*,r.title FROM t_timezerg_nation_reference nr LEFT JOIN t_timezerg_reference r ON nr.rid = r.id WHERE nr.nid = #{nid}\")\n List<HashMap> selectByNid(String nid);\n\n}",
"public void savePerson(Person person) {\n\t\t\n\t}",
"private void initDatabaseWithDefaultInfo(Realm realm) {\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n realm.delete(Person.class);\n }\n });\n\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n Gift birthdayGift = realm.createObject(Gift.class);\n birthdayGift.setName(\"Amazon Gift Card\");\n birthdayGift.setCost(25.0f);\n birthdayGift.setGiftedToMe(true);\n birthdayGift.setOccasion(\"Birthday\");\n\n Person person = realm.createObject(Person.class);\n person.setName(\"Damon Graham\");\n person.setAge(43);\n person.setBithday(new LocalDate(1972, 2, 8).toDate());\n person.getGifts().add(birthdayGift);\n\n Person person2 = realm.createObject(Person.class);\n person2.setName(\"Aubry Hawkins\");\n person2.setAge(36);\n person2.setBithday(new LocalDate(1980, 10, 22).toDate());\n person2.getGifts().add(birthdayGift);\n }\n });\n }",
"Name findNameByPersonPrimary(int idPerson);",
"public void createPersonMap(String personName, String bankName, PersonEntity personEntity) {\n\n personEntitiesMap.put(personName + \"_\" + bankName, personEntity);\n }",
"@SuppressWarnings({\"unchecked\"})\n Map findNameFromNameAndPhoneticNameByIdPerson(int idPerson);",
"@Override\n public void update(Person p) throws SQLException, ClassNotFoundException\n {\n\n BasicDBObject query = new BasicDBObject();\n query.put(\"Id\", p.getId()); // old data, find key Id\n\n BasicDBObject newDocument = new BasicDBObject();\n\n// newDocument.put(\"Id\", p.getId()); // new data\n newDocument.put(\"FName\", p.getFName()); // new data\n newDocument.put(\"LName\", p.getLName()); // new data\n newDocument.put(\"Age\", p.getAge()); // new data\n System.out.println(newDocument);\n\n BasicDBObject updateObj = new BasicDBObject();\n updateObj.put(\"$set\", newDocument);\n System.out.println(updateObj);\n\n table.update(query, updateObj);\n }",
"@Mapper\npublic interface EmployeeMapper {\n\n int deleteByPrimaryKey(Long id);\n\n int insert(Employee record);\n\n int insertSelective(Employee record);\n\n Employee selectByPrimaryKey(Long id);\n\n int updateByPrimaryKeySelective(Employee record);\n\n int updateByPrimaryKey(Employee record);\n\n List<Employee> selectByExample(Employee example);\n\n Employee selectByEmployeeNo(String employeeNo);\n\n List<Employee> selectByUsername(String username);\n\n List<Employee> selectAll();\n}",
"@Override\n\tpublic void savePersonRelation(PersonRelation personRelation) {\n\t\t\n\t}",
"public Person updatePerson(Person person) {\n \tqueryExecutor.updatePerson(person);\n \t\n \t//personMap.put(person.getName(), person);\n return person;\n }",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"MappedDatatype createMappedDatatype();",
"public interface UserMapper {\n\n User selectByPrimaryKey(Integer id);\n}",
"@Override\n\tpublic void save(Person person) {\n\t\t\n\t}",
"public interface FolgersDatabase {\n\n\t/** Removes all entries from the whole databse */\n\tpublic void clearDatabase();\n\t\n\t/**\n\t * @param person the {@link Person} to be inserted into the database\n\t * @return true if insertion was successful <br>\n\t * false if not\n\t */\n\tpublic boolean insertIntoPerson(Person person);\n\t\n\t/**\n\t * @param tweet the {@link Tweet} to be inserted into the database\n\t * @return true if insertion was successful <br>\n\t * false if not\n\t */\n\tpublic boolean insertTweet(Tweet tweet);\n\t\n\t/**\n\t * Gets all people from the database that are marked as replacable with their twitter-ids\n\t * @return A map containg the original names as keys and the the twitter-ids as the corresponding values\n\t */\n\tpublic Map<CharSequence, CharSequence> getReplacableNames();\n}",
"public void setSuggestions(ArrayList<PersonDTO>persons){\n personsMap=new HashMap<>();\n for(PersonDTO person:persons){\n personsMap.put(person.getName()+\" \"+person.getSurname(),person);\n }\n }",
"private MyPersonModelProvider(String inputdata) {\n\t\t\tList<String> contents = UtilFile.readFile(inputdata);\n\t\t\tList<List<String>> tableContents = UtilFile.convertTableContents(contents);\n\n\t\t\tpersons = new ArrayList<MyPerson>();\n\t\t\tfor (List<String> iList : tableContents) {\n\t\t\t\tpersons.add(new MyPerson(iList.get(0), iList.get(1), iList.get(2), Boolean.valueOf(iList.get(3))));\n\t\t\t}\n\t\t}",
"private void init(){\r\n\t\tString fullName = this.person_.getFirstName()+\" \"+this.person_.getLastName();\r\n\t\tboolean alreadyExists = PersonModel.exists(fullName);\r\n\t\t\r\n\t\tif(alreadyExists == true){\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t//need to create person\r\n\t\t\tPersonModel pm = new PersonModel(fullName);\r\n\t\t\tpm.save();\r\n\t\t}\r\n\r\n\t}",
"public interface UserDao {\n public User getByNickname(Map map);\n public int insertUser(Map map);\n public User getById(Map map);\n\n\n\n}",
"public void personIdentity(String name, String string) {\n\t\t\r\n\t}",
"public interface NameDAO {\n /**\n * Retrieves all names from the Name table given idPerson and for Parent.\n * <p/>\n * This method is used for updating the CSUP_PERSON_OUTBOUND table\n * @param idPerson\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n Object[] findDistinctNameByIdPersonAndRelPA(int idPerson);\n\n /**\n * Retrieves all names from the Name table given idPerson.\n * <p/>\n * This method is used for updating the CSUP_PERSON_OUTBOUND table\n * @param idPerson\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n Name findDistinctNameByIdPerson(int idPerson);\n \n /**\n * This selects a row from Name where indNamePrimary = 'Y'\n *\n * @param idPerson\n * @return\n */\n Name findNameByPersonPrimary(int idPerson);\n\n /**\n * Gets dtNameEndDate field given idName.\n * <p/>\n *\n * @param idName\n * @return\n */\n Date findNameDtNameEndDateByIdName(int idName);\n\n /**\n * Retrieves the rows from Name and PhoneticName tables for the given idPerson and for indNamePrimary = 'Y' and\n * cdPhkNameType = 'NA'\n *\n * @param idPerson\n * @return List of objects/rows\n */\n @SuppressWarnings({\"unchecked\"})\n Map findNameFromNameAndPhoneticNameByIdPerson(int idPerson);\n\n /**\n * Retrieves all aliases for a specified stage ID, considering closure and end dating.\n * <p/>\n *\n * @param idStage\n * @return keys idPerson, nmNameFirst, nmNameMiddle, nmNameLast, cdNameSuffix, dtNameEndDate, dtNameStartDate, idName,\n * indNameInvalid, indNamePrimary, dtLastUpdate\n */\n @SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdStage(int idStage);\n\n /**\n * Gets name fields given idPerson and dtSysTsQuery.\n * <p/>\n *\n * @param idPerson\n * @param dtSysTsQuery\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n Name findNameByIdPersonDtSysTsQuery(int idPerson, Date dtSysTsQuery);\n\n /**\n * This gets list of Person ID for the given first, middle and last names and filters\n * out the Adopted Person if the Sealed Indicator attribute of the user is N \n * @param first\n * @param middle\n * @param last\n * @param indSealed\n * @return List of Person ID\n */\n List<Integer> findPrimaryIdPersonsByFirstLastMiddle(String first, String last, String middle, String indSealed);\n \n /**\n * This gets list of Person ID for the given first and last names and filters\n * out the Adopted Person if the Sealed Indicator attribute of the user is N \n *\n * @param first\n * @param last\n * @return List of Person ID\n */\n @SuppressWarnings({\"unchecked\"})\n List<Integer> findPrimaryIdPersonsByFirstLast(String first, String last, String indSealed);\n \n /**\n * Counts the number of Name ID for the given ID Person and dtSysTsQuery.\n *\n * @param idPerson\n * @param dtSysTsQuery\n * @return\n */\n @SuppressWarnings({\"unchecked\"}) \n long countNameIdName(int idPerson, Date dtSysTsQuery);\n\n /**\n * Retrieve Name information given idPerson and maxDate.\n * <p/>\n *\n * @param idPerson\n * @param maxDate\n * @return Name\n */\n Name findNameByIdPersonAndMaxDate(int idPerson, Date maxDate);\n\n /**\n * This gets a count of idName based on idPerson and maxDate.\n *\n * @param idPerson\n * @param maxDate\n * @return Integer\n */\n long countIdNameByIdPersonAndMaxDate(int idPerson, Date maxDate);\n\n long countNameIdNameByNmFull(String first, String mid, String last);\n\n /**\n * Retrieves valid names from the Name table given idPerson and dtSysTsQuery.\n * <p/>\n *\n * @param idPerson\n * @param dtSysTsQuery\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdPersonAndDtNameStartDate(int idPerson, Date dtSysTsQuery);\n\n /**\n * Retrieves all names from the Name table given idPerson.\n * <p/>\n *\n * @param idPerson\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdPerson(int idPerson);\n\n /**\n * Inserts into Name table\n *\n * @param idName\n * @param idPerson\n * @param indNameInvalid\n * @param nmNameFirst\n * @param nmNameMiddle\n * @param nmNameLast\n * @param indNamePrimary\n * @param cdNameSuffix\n * @param dtDtNameStartDate\n * @return\n */\n int insertName(int idPerson, String indNameInvalid, String nmNameFirst, String nmNameMiddle, String nmNameLast,\n String indNamePrimary, String cdNameSuffix, Date dtDtNameStartDate);\n\n /**\n * Updates Name table\n *\n * @param idName\n * @param dtDtNameEndDate\n * @param tsLastUpdate\n * @return\n */\n \n int updateName(int idName, Date dtDtNameEndDate, Date tsLastUpdate);\n\n /**\n * Updates table Name field nmNameLast given idName and idPerson\n * <p/>\n *\n * @param nmNameLast\n * @param idName\n * @param idPerson\n */\n \n \n int updateNameNmNameLast(String nmNameLast, int idName, int idPerson);\n\n /**\n * Inserts into Name table\n *\n * @param nmNameLast\n * @param idPerson\n * @return\n */\n int insertName(String nmNameLast, int idPerson);\n\n /**\n * Insert a row into the Name table.The primary key used is SEQ_NAME.\n *\n * @param idPerson\n * @param nmNameFirst\n * @param nmNameMiddle\n * @param nmNameLast\n * @param cdNameSuffix\n * @param indNamePrimary\n * @param indNameInvalid\n * @param dtNameStartDate\n * @param dtNameEndDate\n * @return\n */\n int insertName(int idPerson, String nmNameFirst, String nmNameMiddle, String nmNameLast,\n String cdNameSuffix, String indNamePrimary, String indNameInvalid,\n Date dtNameStartDate, Date dtNameEndDate\n );\n\n /**\n * Partial insert of Name table using the supplied parameters(column values). (Note that the insert is done using\n * straight SQL)\n *\n * @param cdNameSuffix\n * @param dtNameEndDate\n * @param idName\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @return int The number of entities effected by the 'insert' operation.\n */\n int insertName(String cdNameSuffix, Date dtNameEndDate, int idName, int idPerson, String indNameInvalid,\n String indNamePrimary, String nmNameFirst, String nmNameLast, String nmNameMiddle);\n\n /**\n * Partial insert of Name table using the supplied parameters(column values). (Note that the insert is done using\n * straight SQL)\n *\n * @param cdNameSuffix\n * @param idName\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @return int The number of entities effected by the 'insert' operation.\n */\n int insertName(String cdNameSuffix, int idName, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle);\n\n /**\n * Partial update of Name table using the supplied parameters(column values).\n *\n * @param cdNameSuffix\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @param idName\n * @param lastUpdate\n * @return int The number of entities effected by the 'update' operation.\n */\n int updateNameIncludingDtNameEndDate(String cdNameSuffix, int idPerson, String indNameInvalid,\n String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName,\n Date lastUpdate);\n\n /**\n * Partial update of Name table using the supplied parameters(column values).\n *\n * @param cdNameSuffix\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @param idName\n * @param lastUpdate\n * @return int The number of entities effected by the 'update' operation.\n */\n int updateName(String cdNameSuffix, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName, Date lastUpdate);\n\n /**\n * Delete {@link gov.georgia.dhr.dfcs.sacwis.db.Name} objects.\n *\n * @param idName\n * @param dtLastUpdate\n * @return The number of rows deleted.\n */\n int deleteName(int idName, Date dtLastUpdate);\n /**\n * This gets a count of idName.\n *\n * @param idPerson\n * @return\n */\n long countNameIdNameByIdPerson(int idPerson);\n \n /**\n * Inserts or updates a Name record\n * @param name\n * @return\n */\n int saveOrUpdateName(Name name) ;\n}",
"@Override\n public void put(Object o, Person person) {\n \n }",
"public static void addUserToDb(Person person) {\n\n //converting person's data for SQL database\n String name = person.getName();\n int height = person.getHeight();\n double weight = person.getWeight();\n double waist = person.getWaistCircumference();\n int multiplier = person.getMultiplier();\n double calorieRate = person.getCalorieRate();\n String lastDate = getTodaysDate();\n\n //using data to create a query\n String dbQuery = \"INSERT INTO users(username, userheight, userweight, userwaist, usermultiplier, usercaloryrate, lastdate) \" +\n \"VALUES ('\" + name + \"', \" + height + \", \" + weight + \", \" + waist + \", \" +\n multiplier + \", \" + calorieRate + \", '\" + lastDate + \"')\";\n\n //sending a query and effectively adding user to the DB. Setting sql generated ID to the java object\n int personsId = DbConnector.addingNewRecordToDb(dbQuery);\n person.setId(personsId);\n }",
"public interface ArticleMapper {\n public int insert(Article article);\n public Article getArticleByID(int articleId);\n public Article getArticleByNo(String articleNo);\n}",
"@Override\n\tprotected Mapping getMapping() {\n\t\treturn new Mapping()\n\t\t\t.add(\"firstname\", driver.getFirstName())\n\t\t\t.add(\"lastname\", driver.getLastName())\n\t\t\t.add(\"dateofbirth\", driver.getDateOfBirth())\n\t\t\t.add(\"gender\", driver.getGender())\n\t\t\t.add(\"age\", computeAge())\n\t\t\t.add(\"numberOfAccidents\", driver.getNumberOfAccidents())\n\t\t\t.add(\"numberOfTickets\", driver.getNumberOfTickets());\n\t}",
"public static void AddPerson(Person person)\n {\n dataWraper.addRecordTrans(person, dataWraper.tables.get(Person.class.getAnnotation(Entity.class).name()), null);\n }",
"int insertSelective(PersonRegisterDo record);",
"private static DerivedPartOfPerspectivesFK mapDerivedPartOfPerspectivesFK(ResultSet resultSet) throws SQLException {\n \t\n \t/*\n * 1. POP_PERSPECTIVE_FK => varchar(25)\n * 2. FULL_PATH => varchar(1000)\n * 3. FULL_PATH_OIDS => varchar(500)\n * 4. FULL_PATH_JSON => varchar(3000)\n * 5. POP_IS_ANCESTOR => tinyint\n * 6. EMAPA_PUBLIC_ID => varchar(25)\n * 7. EMAP_PUBLIC_ID => varchar(25)\n \t */\n return new DerivedPartOfPerspectivesFK(\n \t\tresultSet.getString(\"POP_PERSPECTIVE_FK\"), \n \t\tresultSet.getString(\"FULL_PATH\"),\n \t\tresultSet.getString(\"FULL_PATH_OIDS\"), \n \t\tresultSet.getString(\"FULL_PATH_JSON\"),\n \t\tresultSet.getInt(\"POP_IS_ANCESTOR\"), \n \t\tresultSet.getString(\"EMAPA_PUBLIC_ID\"),\n \t\tresultSet.getString(\"EMAP_PUBLIC_ID\")\n );\n }",
"PersonModel fetchPerson(String personID) {\n return mPersonMap.get(personID);\n }",
"public static void main(String[] args) {\n Personel personel = new Personel();\n personel.setPersoneladi(\"Kübra\");\n personel.setPersonelsoyadi(\"YILDIZ\");\n personel.setPersonelgiristarihi(new Date());\n \n Adres adres1= new Adres();\n adres1.setSehir(\"İSTANBUL\");\n adres1.setSemt(\"SARIYER\");\n adres1.setMahalle(\"BEBEK\");\n adres1.setPostakodu(\"56000\");\n \n personel.getAdresListesi().add(adres1);\n \n Adres adres2= new Adres();\n adres2.setSehir(\"İSTANBUL\");\n adres2.setSemt(\"BEŞİKTAŞ\");\n adres2.setMahalle(\"BEBEK\");\n adres2.setPostakodu(\"61600\");\n personel.getAdresListesi().add(adres2);\n \n SessionFactory sessionfactory = new Configuration().configure().buildSessionFactory();\n Session session = sessionfactory.openSession();\n session.beginTransaction();\n session.save(personel);\n session.getTransaction().commit();\n session.close();\n \n personel = null;\n session = sessionfactory.openSession();\n session.beginTransaction();\n personel = session.get(Personel.class, 1);\n session.close();\n\t}",
"@Mapper\npublic interface BillItemMapper {\n int deleteByPrimaryKey(String bill_item_id);\n\n int insert(BillItem record);\n\n int insertSelective(BillItem record);\n\n BillItem selectByPrimaryKey(String bill_item_id);\n\n int updateByPrimaryKeySelective(BillItem record);\n\n int updateByPrimaryKey(BillItem record);\n}",
"PersonRegisterDo selectByPrimaryKey(Long id);",
"void insertPerson(final PersonModel person) {\n DatabaseReference postRef = mDBRef.push();\n postRef.setValue(person);\n }",
"public interface PersonDao {\n boolean insertPerson(PersonDo personDo); //添加\n PersonDo queryPersonByName(String name); //添加\n// public boolean deleteById(int id); //删除\n// public boolean updatePerson(PersonDo personDo); //修改\n// public PersonDo queryById(int id); //根据ID查询\n List<PersonDo> queryPersonList(PersonDo personDo); //查询全部\n}",
"public static void upsertPerson(NodePerson p) {\n ArangoDatabase db = client.db(dbName);\n db.query(p.upsertAql(vertexColls[1]), null);\n }",
"@Override\r\n\t\tpublic Registration mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tRegistration registration = new Registration();\r\n\t\t\tregistration.setId(rs.getLong(\"id\"));\r\n\t\t\tregistration.setName(rs.getString(\"name\"));\r\n\t\t\tregistration.setAddress(rs.getString(\"address\"));\r\n\t\t\r\n\t\t\treturn registration;\r\n\t\t}",
"@Repository\npublic interface MdbArticleMapper {\n List<MdbArticle> getMdbArticles(HashMap<String,String> params);\n}",
"@Override\n\tpublic Person getPersonByLogin(Person person) {\n\t\tString hql = \"from \" + Common.TABLE_PERSON + \" where account = ? and password = ?\";\n\t\tString pro[] = new String[2];\n\t\tpro[0] = person.getAccount();\n\t\tpro[1] = person.getPassword();\n\t\tPerson p = (Person) dao.loadObject(hql,pro);\n\t\tif(p != null)\n\t\t\treturn p;\n\t\treturn null;\n\t}",
"public static Map<String, Person> GetPersons()\n {\n List<Person> persons = dataWraper.getAll(FrekenBok.class);\n Map<String, Person> personMap = new HashMap<>();\n\n persons.forEach( (i)->\n personMap.put(i.GetName(), i)\n );\n\n persons = dataWraper.getAll(LitleBoy.class);\n persons.forEach( (i)->\n personMap.put(i.GetName(), i)\n );\n\n return personMap;\n }",
"public interface DeveloperMapper {\n int add(Developer developer);\n void delete(int id);\n List<Developer> listAllDevelopers();\n Developer queryLogin(Developer developer);\n}",
"public interface UserMapper {\n int addUser(TBUser tbUser);\n int alterUser(TBUser tbUser);\n TBUser getUserByAccount(String account);\n TBUser getUserPasswordByAccount(String account);\n int alterUserPassword(TBUser tbUser);\n}",
"public interface PersonDao {\n\n public List<Person> findAll();\n\n public Person find(MultiId multiId);\n\n public List<Person> find(List<MultiId> multiIds);\n\n public MultiId save(Person person);\n\n public void delete(Person person);\n\n public List<Person> findByProfession(Profession profession);\n\n public List<Person> findYoungerThen(Date birthDate);\n\n public List<Person> findYoungerOrEqualThen(Date birthDate);\n\n public List<Person> findOlderThen(Date birthDate);\n\n public List<Person> findOlderOrEqualThen(Date birthDate);\n\n public List<Person> findByProfessionName(String professionName);\n\n}",
"@Mapper\npublic interface ImMyFriendMapper {\n /**\n * Count by example int.\n *\n * @param example the example\n * @return the int\n */\n int countByExample(ImMyFriendExample example);\n\n /**\n * Delete by example int.\n *\n * @param example the example\n * @return the int\n */\n int deleteByExample(ImMyFriendExample example);\n\n /**\n * Delete by primary key int.\n *\n * @param myFriendId the my friend id\n * @return the int\n */\n int deleteByPrimaryKey(Long myFriendId);\n\n /**\n * Insert int.\n *\n * @param record the record\n * @return the int\n */\n int insert(ImMyFriend record);\n\n /**\n * Insert selective int.\n *\n * @param record the record\n * @return the int\n */\n int insertSelective(ImMyFriend record);\n\n /**\n * Select by example list.\n *\n * @param example the example\n * @return the list\n */\n List<ImMyFriend> selectByExample(ImMyFriendExample example);\n\n /**\n * Select by primary key im my friend.\n *\n * @param myFriendId the my friend id\n * @return the im my friend\n */\n ImMyFriend selectByPrimaryKey(Long myFriendId);\n\n /**\n * Update by example selective int.\n *\n * @param record the record\n * @param example the example\n * @return the int\n */\n int updateByExampleSelective(@Param(\"record\") ImMyFriend record, @Param(\"example\") ImMyFriendExample example);\n\n /**\n * Update by example int.\n *\n * @param record the record\n * @param example the example\n * @return the int\n */\n int updateByExample(@Param(\"record\") ImMyFriend record, @Param(\"example\") ImMyFriendExample example);\n\n /**\n * Update by primary key selective int.\n *\n * @param record the record\n * @return the int\n */\n int updateByPrimaryKeySelective(ImMyFriend record);\n\n /**\n * Update by primary key int.\n *\n * @param record the record\n * @return the int\n */\n int updateByPrimaryKey(ImMyFriend record);\n}",
"@Override\n protected final Map<String, String> createFieldToPropertyMapping() {\n // get super class mapping\n final Map<String, String> mapping = super.createFieldToPropertyMapping();\n \n mapping.put(this.tableName + \".rmres_id\", \"id\");\n mapping.put(this.tableName + \".cost_rmres\", \"cost\");\n mapping.put(this.tableName + \".config_id\", \"configId\");\n mapping.put(this.tableName + \".rm_arrange_type_id\", \"arrangeTypeId\");\n mapping.put(this.tableName + \".guests_external\", \"externalGuests\");\n mapping.put(this.tableName + \".guests_internal\", \"internalGuests\");\n \n return mapping;\n }",
"@Override\n\tpublic Curso mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t/* Se declara e instancia el objeto Persona.*/\n\t\tCurso curso = new Curso();\n\t\t/* Se recoje el identificador de curso del result.*/\n\t\tcurso.setId(rs.getInt(\"id\"));\n\t\t/* Se recoje el codigo de curso del result.*/\n\t\tcurso.setCodigo(rs.getString(\"codigo\"));\n\t\t/* Se recoje el nombre de la curso del result.*/\n\t\tcurso.setNombre(rs.getString(\"nombre\"));\n\t\t\n\t\t\n\t\t/* Se devuelve el objeto Persona.*/\n\t\treturn curso;\n\t}",
"public interface MysqlUserMapper {\n List<MysqlUser> getAll();\n\n MysqlUser getOne(Long id);\n\n void insert(MysqlUser user);\n\n void update(MysqlUser user);\n\n void delete(Long id);\n}",
"public interface GirlMapper extends JpaRepository<Girl,Integer>{\n\n}",
"public void setDb(Map<Language, Map<Integer, LanguageEntry>> db) {\r\n\t\t\tthis.db = db;\r\n\t\t}",
"public static void main(String[] args) \n\t{\n\t\t Person1 p1 = new Person1(\"Fabiana\", \"Reggio\");\n\t\t\n\t\t@SuppressWarnings(\"deprecation\")\n SessionFactory sessionFactory = new Configuration().configure(\"hibernate.cfg.xml\").buildSessionFactory();\n Session session = sessionFactory.openSession();\n session.beginTransaction();\n \n session.save(p1);\n //session.save(p2);\n\t\tsession.getTransaction().commit();\n\t\t\n\t\tSystem.out.println(\"Person p1: \" + p1.getFirst_name1() + p1.getLast_name1()); \n\t\t\n\t\tsession.close();\n\t\tsessionFactory.close();\n\t}",
"@Mapper\npublic interface BillMapper {\n long countByExample(BillExample example);\n\n int deleteByExample(BillExample example);\n\n int deleteByPrimaryKey(Integer id);\n\n int insert(Bill record);\n\n int insertSelective(Bill record);\n\n List<Bill> selectByExample(BillExample example);\n\n Bill selectByPrimaryKey(Integer id);\n\n int updateByExampleSelective(@Param(\"record\") Bill record, @Param(\"example\") BillExample example);\n\n int updateByExample(@Param(\"record\") Bill record, @Param(\"example\") BillExample example);\n\n int updateByPrimaryKeySelective(Bill record);\n\n int updateByPrimaryKey(Bill record);\n}",
"@PostConstruct\r\n public void init() {\n List<Person> personList = personRepository.findAll();\r\n for(Person person:personList)\r\n personHashMap.put(person.getId(),person);\r\n }",
"@Mapper(componentModel = \"spring\", uses = {})\npublic interface EmploymentTypeMapper extends EntityMapper<EmploymentTypeDTO, EmploymentType> {\n\n\n @Mapping(target = \"people\", ignore = true)\n EmploymentType toEntity(EmploymentTypeDTO employmentTypeDTO);\n\n default EmploymentType fromId(Long id) {\n if (id == null) {\n return null;\n }\n EmploymentType employmentType = new EmploymentType();\n employmentType.setId(id);\n return employmentType;\n }\n}",
"@Mapper\npublic interface SentenceMapper {\n Long save(Sentence sentence);\n\n void update(Sentence sentence);\n}",
"public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"void addPhoneToPerson(Phone phone,int personId);",
"public interface PersonService {\r\n\r\n\t/**\r\n\t * Delete all the nodes of the person\r\n\t */\r\n\tvoid deleteAll();\r\n\r\n\t/**\r\n\t * Add Person node in the database using the JSONObject containing the data of the person\r\n\t * @param personJson\r\n\t * @return person\r\n\t */\r\n\tPerson addPerson(JSONObject person);\r\n\r\n\t/**\r\n\t * Relate nodes of the person by creating a relationship between them\r\n\t * @param person1\r\n\t * @param person2\r\n\t * @param relation\r\n\t * @return relatedPerson\r\n\t */\r\n\tRelatedPerson<Person, Person> relatePerson(String person1, String person2, String relation);\r\n\r\n\t/**\r\n\t * Find relation between the nodes of the two person.\r\n\t * @param person1\r\n\t * @param person2\r\n\t * @return strRelationship\r\n\t */\r\n\tString findRelation(String person1, String person2);\r\n\r\n\t/**\r\n\t * Finds the Person node with the given name\r\n\t * @param name\r\n\t * @return person\r\n\t */\r\n\tPerson findPerson(String name);\r\n\r\n\t/**\r\n\t * Finds the Person node and adds the image path\r\n\t * @param name\r\n\t * @param imagePath\r\n\t * @return person\r\n\t */\r\n\tPerson addImage(String name, String imagePath);\r\n\r\n}",
"public interface UserMapper {\n long insert(User user);\n\n long delete(long id);\n\n long update(User uer);\n\n User findUser(long id);\n\n List<User> findAllUsers();\n}",
"@Mapper\npublic interface TestMapper extends MyMapper<Person1> {\n //List<Person1> findAll();\n}",
"@Mapper\npublic interface PatientAdministrationMapper {\n\n /**\n * Getting all patients from database.\n *\n * @return all patients from database written to list.\n */\n @Select(\"SELECT id_patient, first_name, last_name, PESEL, id_address,\" +\n \" email, phone_number, id_firstcontact_doctor, password FROM patients;\")\n @Results({\n @Result(property = \"id\", column = \"id_patient\"),\n @Result(property = \"firstName\", column = \"first_name\"),\n @Result(property = \"lastName\", column = \"last_name\"),\n @Result(property = \"pesel\", column = \"PESEL\"),\n @Result(property = \"address\", column = \"id_address\",\n javaType = Address.class, one = @One(select = \"selectAddress\",\n fetchType = FetchType.EAGER)),\n @Result(property = \"email\", column = \"email\"),\n @Result(property = \"phoneNumber\", column = \"phone_number\"),\n @Result(property = \"password\", column = \"password\"),\n @Result(property = \"firstContactDoctor\", column = \"id_firstcontact_doctor\",\n javaType = Doctor.class, one = @One(select = \"selectFirstcontactDoctor\",\n fetchType = FetchType.EAGER))\n })\n List<Patient> getAllPatientsDataToTable();\n\n\n /**\n * Getting patient by specified id.\n * Patient containing his full address, which is taken by Join using\n * EagerLoading. So his address will be storing just in address field in\n * patient POJO class.\n *\n * @param patientId id of patient, which you want to get from database.\n * @return single patient taken from database.\n */\n @Select(\"SELECT id_patient, first_name, last_name, PESEL, id_address,\" +\n \" email, phone_number,id_firstcontact_doctor FROM patients \" +\n \"WHERE id_patient = #{patientId}\")\n @Results({\n @Result(property = \"id\", column = \"id_patient\"),\n @Result(property = \"firstName\", column = \"first_name\"),\n @Result(property = \"lastName\", column = \"last_name\"),\n @Result(property = \"pesel\", column = \"PESEL\"),\n @Result(property = \"address\", column = \"id_address\",\n javaType = Address.class, one = @One(select = \"selectAddress\",\n fetchType = FetchType.EAGER)),\n @Result(property = \"email\", column = \"email\"),\n @Result(property = \"phoneNumber\", column = \"phone_number\"),\n @Result(property = \"firstContactDoctor\", column = \"id_firstcontact_doctor\",\n javaType = Doctor.class, one = @One(select = \"selectFirstcontactDoctor\",\n fetchType = FetchType.EAGER))\n })\n Patient getPatient(int patientId);\n\n\n /**\n * Inserting specified patient object into database.\n * Before adding patient, you need to add address first, couse of constraints.\n *\n * @param patient patient to insert into database. Id is generated automatically.\n */\n @Insert(\"INSERT into patients(id_patient, first_name, last_name, PESEL, id_address, email, phone_number, \" +\n \"id_firstcontact_doctor, password) VALUES (#{id}, #{firstName}, #{lastName}, #{pesel}, #{address.addressId},\" +\n \"#{email}, #{phoneNumber}, #{firstContactDoctor.id}, #{password})\")\n @Options(useGeneratedKeys = true, keyProperty = \"id\", keyColumn = \"id_patient\")\n void addPatient(Patient patient);\n\n\n /**\n * Inserting specified address object into database.\n *\n * @param address address to insert into database. Id is generated automatically.\n */\n @Insert(\"INSERT into addresses(id_address, city, zip_code, street, number) VALUES (\" +\n \"#{addressId}, #{city}, #{zip}, #{street}, #{number})\")\n @Options(useGeneratedKeys = true, keyProperty = \"addressId\", keyColumn = \"id_address\")\n void addPatientAddressAsChild(Address address);\n\n\n /**\n * Updating patient in database.\n * Object id will be used to take existing doctor from database, and update\n * his values using data from object (all except id).\n *\n * @param patient all fields will be used for update patient, which will have\n * the same id like doctor in parameter.\n */\n @Update(\"UPDATE patients SET first_name=#{firstName}, last_name=#{lastName}, PESEL=#{pesel}, \" +\n \"email=#{email}, phone_number=#{phoneNumber} WHERE id_patient=#{id}\")\n void updatePatient(Patient patient);\n\n\n /**\n * Updating address in database.\n * Object id will be used to get address which you want update, and rest of then\n * for set new values.\n *\n * @param address object containing new data (except id).\n */\n @Update(\"UPDATE addresses SET city=#{city}, zip_code=#{zip}, street=#{street}, number=#{number} \" +\n \"WHERE id_address=#{addressId}\")\n void updatePatientAddress(Address address);\n\n\n /**\n * Updating patient firstcontact doctor using his id.\n *\n * @param patient patient, which firstcontact doctor you want update.\n * @param newDoctorId id of new patient firstcontact doctor.\n */\n @Update(\"UPDATE patients SET id_firstcontact_doctor=#{newDoctorId} WHERE id_patient=#{patient.id}\")\n void updatePatientFirstcontactDoctor(@Param(\"patient\") Patient patient,\n @Param(\"newDoctorId\") int newDoctorId);\n\n /**\n * Deleting patient specified by id\n *\n * @param patientId id of patient to remove.\n */\n @Delete(\"DELETE from patients WHERE id_patient=#{patientId}\")\n void deletePatient(int patientId);\n\n\n //TODO: it's necessary? Address should be dropped cascade. Test it.\n /**\n * Deleting address\n *\n * @param addressId id of address to remove.\n */\n @Delete(\"DELETE from addresses WHERE id_address=#{addressId}\")\n void deleteAddress(int addressId);\n\n\n\n\n\n\n\n\n\n @Select(\"SELECT id_address, city, zip_code, street, number from addresses \" +\n \"where id_address=#{addressId}\")\n @Results(value = {\n @Result(property = \"addressId\", column = \"id_address\"),\n @Result(property = \"city\", column = \"city\"),\n @Result(property = \"zip\", column = \"zip_code\"),\n @Result(property = \"street\", column = \"street\"),\n @Result(property = \"number\", column = \"number\")\n })\n Address selectAddress(int addressId);\n\n @Select(\"Select id_doctor, first_name, last_name, phone_number, id_specialization \" +\n \"from doctors where id_doctor=#{doctorId}\")\n @Results(value = {\n @Result(property = \"id\", column = \"id_doctor\"),\n @Result(property = \"firstName\", column = \"first_name\"),\n @Result(property = \"lastName\", column = \"last_name\"),\n @Result(property = \"phoneNumber\", column = \"phone_number\"),\n @Result(property = \"specialization\", column = \"id_specialization\",\n javaType = Specialization.class,\n one = @One(select = \"selectFirstcontactDoctorSpecialization\",\n fetchType = FetchType.EAGER))\n })\n Doctor selectFirstcontactDoctor(int doctorId);\n\n @Select(\"SELECT * FROM specializations \" +\n \"WHERE id_specialization=#{specializationId}\")\n @Results(value = {\n @Result(property = \"id\", column = \"id_specialization\"),\n @Result(property = \"name\", column = \"name\")\n })\n Specialization selectFirstcontactDoctorSpecialization(int specializationId);\n\n\n @Select(\"Select id_doctor, first_name, last_name, phone_number, d.id_specialization from doctors d INNER JOIN specializations AS s\\n\" +\n \"WHERE d.id_specialization = s.id_specialization AND s.name=\\\"First contact\\\"\")\n @Results(value = {\n @Result(property = \"id\", column = \"id_doctor\"),\n @Result(property = \"firstName\", column = \"first_name\"),\n @Result(property = \"lastName\", column = \"last_name\"),\n @Result(property = \"phoneNumber\", column = \"phone_number\"),\n @Result(property = \"specialization\", column = \"id_specialization\",\n javaType = Specialization.class,\n one = @One(select = \"selectFirstcontactDoctorSpecialization\",\n fetchType = FetchType.EAGER))\n })\n List<Doctor> getAllFirstContactDoctors();\n\n\n @Select(\"select * from singlevisits single JOIN admissiondays a on single.id_admission_day = a.id_admission_day \" +\n \"JOIN doctorworkingdays d on a.id_doctor_working_day = d.id_doctor_working_day \" +\n \"WHERE single.id_single_visit = #{visitId};\")\n @Results(value = {\n @Result(property = \"id\", column = \"id_single_visit\"),\n @Result(property = \"visitHour\", column = \"visit_hour\"),\n @Result(property = \"admissionDay2\", column = \"id_admission_day\",\n javaType = AdmissionDay2.class,\n one = @One(select = \"getAdmissionDay\", fetchType = FetchType.EAGER)),\n @Result(property = \"patient\", column = \"id_patient\", javaType = Patient.class,\n one = @One(select = \"getPatient\", fetchType = FetchType.EAGER))\n })\n SingleVisit getVisit(int visitId);\n\n\n @Select(\"select * from singlevisits single JOIN admissiondays a on single.id_admission_day = a.id_admission_day \" +\n \"JOIN doctorworkingdays d on a.id_doctor_working_day = d.id_doctor_working_day \" +\n \"WHERE single.id_patient = #{patientId};\")\n @Results(value = {\n @Result(property = \"id\", column = \"id_single_visit\"),\n @Result(property = \"visitHour\", column = \"visit_hour\"),\n @Result(property = \"admissionDay2\", column = \"id_admission_day\",\n javaType = AdmissionDay2.class,\n one = @One(select = \"getAdmissionDay\", fetchType = FetchType.EAGER))\n })\n List<SingleVisit> getVisitsForPatient(int patientId);\n\n\n @Select(\"select id_admission_day, a.date, d.id_doctor,\" +\n \" d.hour_from, d.hour_to, d.hour_interval, d.validate_date \" +\n \"from admissiondays a JOIN doctorworkingdays d on a.id_doctor_working_day = d.id_doctor_working_day\" +\n \" where a.id_admission_day=#{admissionDayId};\")\n @Results(value = {\n @Result(property = \"id\", column = \"id_admission_day\"),\n @Result(property = \"date\", column = \"date\"),\n @Result(property = \"doctor\", column = \"id_doctor\", javaType = Doctor.class,\n one = @One(select = \"selectFirstcontactDoctor\", fetchType = FetchType.EAGER)),\n @Result(property = \"hourFrom\", column = \"hour_from\"),\n @Result(property = \"hourTo\", column = \"hour_to\"),\n @Result(property = \"hourInterval\", column = \"hour_interval\"),\n @Result(property = \"validateDate\", column = \"validate_date\")\n })\n AdmissionDay2 getAdmissionDay(int admissionDayId);\n\n\n @Delete(\"delete from singlevisits where id_single_visit = #{visitId};\")\n void deleteVisit(int visitId);\n\n\n @Delete(\"delete from singlevisits where id_patient = #{patientId}\")\n void deleteAllVisits(int patientId);\n\n @Select(\"select name from specializations\")\n @Results(@Result(property = \"name\", column = \"name\"))\n List<Specialization> getSpecializations();\n\n\n @Select(\"SELECT id_doctor, first_name, last_name, doc.id_specialization from doctors doc \" +\n \"LEFT JOIN specializations spec on doc.id_specialization = spec.id_specialization \" +\n \"WHERE spec.name = #{specializationName};\")\n @Results({\n @Result(property = \"id\", column = \"id_doctor\"),\n @Result(property = \"firstName\", column = \"first_name\"),\n @Result(property = \"lastName\", column = \"last_name\"),\n @Result(property = \"specialization\", column = \"id_specialization\",\n javaType = Specialization.class,\n one = @One(select = \"selectFirstcontactDoctorSpecialization\",\n fetchType = FetchType.EAGER))\n })\n List<Doctor> getDoctorsForVisitSpecialization(@Param(\"specializationName\") String specializationName);\n\n\n\n @Select(\"select id_admission_day, a.date, d.id_doctor,\" +\n \" d.hour_from, d.hour_to, d.hour_interval, d.validate_date \" +\n \"from admissiondays a JOIN doctorworkingdays d on a.id_doctor_working_day = d.id_doctor_working_day\" +\n \" where d.id_doctor = #{doctorId};\")\n @Results(value = {\n @Result(property = \"id\", column = \"id_admission_day\"),\n @Result(property = \"date\", column = \"date\"),\n @Result(property = \"doctor\", column = \"id_doctor\", javaType = Doctor.class,\n one = @One(select = \"selectFirstcontactDoctor\", fetchType = FetchType.EAGER)),\n @Result(property = \"hourFrom\", column = \"hour_from\"),\n @Result(property = \"hourTo\", column = \"hour_to\"),\n @Result(property = \"hourInterval\", column = \"hour_interval\"),\n @Result(property = \"validateDate\", column = \"validate_date\")\n })\n List<AdmissionDay2> getAdmissionDaysForDoctor(int doctorId);\n\n @Select(\"select s.id_single_visit, s.id_admission_day, visit_hour, id_patient, d.id_doctor from singlevisits s \" +\n \"JOIN admissiondays a on s.id_admission_day = a.id_admission_day \" +\n \"JOIN doctorworkingdays d on a.id_doctor_working_day = d.id_doctor_working_day \" +\n \"WHERE a.date = #{date} AND id_doctor = #{admissionDay.date};\")\n @Results(value = {\n @Result(property = \"id\", column = \"id_single_visit\"),\n @Result(property = \"visitHour\", column = \"visit_hour\"),\n @Result(property = \"patient\", column = \"id_patient\", javaType = Patient.class,\n one = @One(select = \"getPatient_OnlyId\", fetchType = FetchType.EAGER)),\n @Result(property = \"admissionDay2\", column = \"id_admission_day\", javaType = AdmissionDay2.class,\n one = @One(select = \"getAdmissionDay\", fetchType = FetchType.EAGER)),\n })\n List<SingleVisit> getSingleVisitsFreeFromAdmissionDay(@Param(\"admissionDay\") AdmissionDay2 admissionDay,\n @Param(\"doctorId\") int doctorId);\n\n @Update(\"update singlevisits set visit_hour = #{visitHour}, id_admission_day=#{admissionDayId} \" +\n \"Where id_single_visit = #{singleVisitId};\")\n void updateVisitDateAndHour(@Param(\"singleVisitId\") int singleVisitId,\n @Param(\"visitHour\")LocalTime visitHour,\n @Param(\"admissionDayId\") int admissionDayId);\n\n}",
"private void migrateOldToNew(){\n\n jdbcTemplate.query(\n \"SELECT * FROM OLDcompetence\", new Object[] {},\n (rs, rowNum) -> competence.put( rs.getLong(\"competence_id\"), competenceRepository.save(new Competence(rs.getString(\"name\"))).getName()));\n\n jdbcTemplate.query(\n \"SELECT * FROM OLDrole\", new Object[] {},\n (rs, rowNum) -> role.put( rs.getLong(\"role_id\"), roleRepository.save(new Role(rs.getString(\"name\"))).getName()));\n\n //If no username can be found, a new user is created with the value of the surname row as password.\n // In real world, a safer password could be generated and sent to the user trough email.\n jdbcTemplate.query(\n \"SELECT * FROM OLDperson\", new Object[] {},\n (rs, rowNum) ->\n {\n if(rs.getString(\"username\") != null) {\n return person.put( rs.getLong(\"person_id\"), personRepository.save(new Person(rs.getString(\"name\"), rs.getString(\"surname\"),\n rs.getString(\"ssn\"), rs.getString(\"email\"), userDetailsService.saveUser(rs.getString(\"username\"),\n rs.getString(\"password\"), roleRepository.findByName(role.get( rs.getLong(\"role_id\"))).getName()))).getId());\n }\n else {\n return person.put( rs.getLong(\"person_id\"), personRepository.save(new Person(rs.getString(\"name\"), rs.getString(\"surname\"),\n rs.getString(\"ssn\"), rs.getString(\"email\"), userDetailsService.saveUser(rs.getString(\"name\"),\n rs.getString(\"surname\"), roleRepository.findByName(role.get( rs.getLong(\"role_id\"))).getName()))).getId());\n }\n }\n );\n\n jdbcTemplate.query(\n \"SELECT * FROM OLDavailability\", new Object[] {},\n (rs, rowNum) -> availability.put( availabilityRepository.save(new Availability( rs.getDate(\"from_date\"), rs.getDate(\"to_date\"))).getId(), rs.getLong(\"person_id\")));\n\n jdbcTemplate.query(\n \"SELECT * FROM OLDcompetence_profile\", new Object[] {},\n (rs, rowNum) -> competenceProfile.put( competenceProfileRepository.save(new CompetenceProfile( competenceRepository.findByName(competence.get(rs.getLong(\"competence_id\"))), rs.getDouble(\"years_of_experience\"))).getId(), rs.getLong(\"person_id\")));\n\n\n }",
"@Mapper\npublic interface RoleMapper {\n @Insert(\"insert into T_Role(rname) values (#{rolename})\")\n int insertRole(@Param(\"rolename\") String rolename);\n\n @Update(\"update T_Role set rname=#{rolename} where rid=#{rid}\")\n int updateRole(@Param(\"rolename\") String rolename, String rid);\n\n @Delete(\"delete from T_Role where rid=#{rid}\")\n int deleteRole(@Param(\"rid\")String rid);\n\n @Select(\"select * from T_Role\")\n List<Role> listRole(int pageSize, int offset);\n}",
"abstract void initPersistance();",
"private void createMapping(String guid, String localId) throws DataAccessException {\n\n String separator = \".\";\n String docNumber;\n String docid;\n String rev;\n Identifier identifier = new Identifier();\n // Ensure the strings are not null\n if (localId == null || guid == null) {\n throw new DataAccessException(new Exception(\"The given id was null\"));\n\n }\n\n // Ensure the localId syntax is correct\n int lastIndex;\n int secondToLastIndex;\n try {\n lastIndex = localId.lastIndexOf(separator);\n secondToLastIndex = localId.lastIndexOf(separator, lastIndex);\n rev = localId.substring(lastIndex + 1);\n docNumber = localId.substring(secondToLastIndex, lastIndex - 1);\n docid = localId.substring(0, secondToLastIndex - 1);\n int revAsInt = (new Integer(rev)).intValue();\n int docNumberAsInt = (new Integer(docNumber)).intValue();\n if (log.isDebugEnabled()) {\n log.debug(\"Creating mapping for - docid: \" + docid + \", docNumber: \" + docNumber\n + \", rev: \" + rev);\n }\n\n } catch (IndexOutOfBoundsException iobe) {\n throw new DataAccessException(iobe.getCause()); // bad localId syntax\n\n } catch (NumberFormatException nfe) {\n throw new DataAccessException(nfe.getCause()); // bad localId syntax\n\n }\n\n // does the mapping already exist?\n identifier.setValue(guid);\n if (hasMapping(identifier)) {\n log.info(\"The database already has a mapping for \" + guid + \". Skipping the create.\");\n return;\n\n } else {\n String sqlStatement = \"INSERT into \" + IDENTIFIER_TABLE\n + \" (guid, docid, rev) VALUES (?, ?, ?);\";\n this.jdbcTemplate.update(sqlStatement, new Object[] { guid, docid, rev }, new int[] {\n Types.VARCHAR, Types.VARCHAR, Types.INTEGER });\n log.info(\"Created mapping for \" + guid + \"and \" + localId);\n }\n\n }",
"@Test\n\tpublic void testPersonToPersonDtoMap() {\n\t\t\n\t\t// prepare \n\t\tPerson person = this.getFakePersonToMap();\n\t\tAddress address = person.getAddress();\n\t\tContactDetail contactDetail = person.getContactDetail();\n\t\t\n\t\t// sut (system / class under test)\n\t\tMapper testee = new Mapper();\n\t\t\n\t\t// act\t\t\n\t\tPersonDto personDto = testee.map(person, PersonDto.class);\n\t\t\n\t\t// tests\n\t\t// address\n\t\tassertEquals(personDto.getAddressCity(), address.getCity());\n\t\tassertEquals(personDto.getAddressCountry(), address.getCountry());\n\t\t\n\t\t// contact details\n\t\tassertEquals(personDto.getPhoneNumber1(), contactDetail.getPhoneNumber1());\n\t\tassertEquals(personDto.getPhoneNumber2(), contactDetail.getPhoneNumber2());\n\t\tassertEquals(personDto.getPhoneNumber3(), contactDetail.getPhoneNumber3());\n\t\tassertEquals(personDto.getFax(), contactDetail.getFax());\n\t\t\n\t}",
"@Override\r\n\tpublic Domain map(int index, ResultSet rs,\r\n\t\t\tStatementContext statementContext) throws SQLException {\r\n\t\treturn new Domain(Integer.toString(rs.getInt(\"dmn_dk\")), rs.getString(\"dmn_nm\"), null);\r\n\t}",
"public static Map<String, Person> getPersonMap(Gedcomx doc) {\n Map<String, Person> map = new HashMap<String, Person>();\n if (doc.getPersons() != null) {\n for (Person person : doc.getPersons()) {\n if (person.getId() != null) {\n map.put(person.getId(), person);\n map.put(\"#\" + person.getId(), person);\n }\n if (person.getIdentifiers() != null) {\n for (Identifier identifier : person.getIdentifiers()) {\n if (identifier.getValue() != null) {\n map.put(identifier.getValue().toString(), person);\n }\n }\n }\n }\n }\n return map;\n }",
"int insert(PersonRegisterDo record);",
"@Mapper\npublic interface ProjectAchievementsMapper {\n\n int deleteByPrimaryKey(String projectNum);\n int insert(ProjectAchievements record);\n int insertSelective(ProjectAchievements record);\n ProjectAchievements selectByPrimaryKey(String projectNum);\n int updateByPrimaryKeySelective(ProjectAchievements record);\n int updateByPrimaryKey(ProjectAchievements record);\n void delete();\n List<ProjectAchievements> selectProject(ProjectAchievements projectAchievements, RowBounds row);\n int selectCountProject(ProjectAchievements projectAchievements);\n List<ProjectAchievements> selectProject(ProjectAchievements projectAchievements);\n}",
"public interface PatientMapper {\n\n public List<PatientEntity> getPatientList(String Pname);\n\n public List<PatientEntity> selectAllPatients();\n\n public PatientEntity getPatientsByPname(String Pname);\n\n public void addPatient(PatientEntity patient);\n\n public void updatePatient(PatientEntity patient);\n\n public void deletePatient(String Pname);\n\n List<String> getPatientlist();\n\n @Select(\"select * from patient where Pname = #{Pname}\")\n public Map<String, Object> selectPatientByPname(String Pname);\n}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"@Mapper\npublic interface StudentMapper {\n /**\n * 获取学员密码\n * @param no\n * @return\n */\n @Select(\"SELECT no, password, schoolNo, power \" +\n \"FROM Student \" +\n \"WHERE no = #{no};\")\n public LoginInfo getStuPassword(String no);\n\n /**\n * 获取基层党组织管理员密码\n * @param no\n * @return\n */\n @Select(\"SELECT no, password, schoolNo, power \" +\n \"FROM Admin \" +\n \"WHERE no=#{no};\")\n public LoginInfo getAdminPassword(String no);\n\n /**\n * 修改学员登录密码\n * @param stuNo\n * @param password\n * @return\n */\n @Update(\"UPDATE Student \" +\n \"SET password=#{newPassword} \" +\n \"WHERE no=#{stuNo} AND \" +\n \" password=#{password};\")\n public Integer updateStuPassword(@Param(\"stuNo\")String stuNo,\n @Param(\"password\")String password,\n @Param(\"newPassword\")String newPassword);\n\n /**\n * 修改管理员登录密码\n * @param no\n * @param password\n * @param newPassword\n * @return\n */\n @Update(\"UPDATE Admin \" +\n \"SET password=#{newPassword} \" +\n \"WHERE no=#{no} AND \" +\n \" password=#{password};\")\n public Integer updateAdminPassword(@Param(\"no\")String no,\n @Param(\"password\")String password,\n @Param(\"newPassword\")String newPassword);\n\n /**\n * 获取全部身份权限\n * @return\n */\n @Select(\"SELECT * FROM Powers;\")\n public List<DBPowers> getPowers();\n\n /**\n * 获取所有基层党组织信息\n * @return\n */\n @Select(\"SELECT * FROM Schools;\")\n public List<DBSchool> getSchools();\n\n /**\n * 根据基层党委名查询编号\n * @param name\n * @return\n */\n @Select(\"SELECT no FROM Schools WHERE name=#{name};\")\n public Integer getSchoolNoByName(String name);\n\n\n /**\n * 录入学员基本信息\n * @param stu\n * @return\n */\n @Insert(\"INSERT \" +\n \"INTO Student(name, no, schoolNo, gender, \" +\n \" nation, birth, type, grade, position, \" +\n \" applyDate, beActivistDate, \" +\n \" beDevelopDate, power, password) \" +\n \"VALUES (#{name}, #{no}, #{schoolNo}, #{gender}, \" +\n \" #{nation}, #{birth}, #{type}, #{grade}, #{position}, \" +\n \" #{applyDate}, #{beActivistDate}, \" +\n \" #{beDevelopDate}, #{power}, #{password});\")\n public Integer addDBStudent(DBStudent stu);\n\n /**\n * 录入学员信息\n * @param stu\n * @return\n */\n @Insert(\"INSERT \" +\n \"INTO Student(name, no, schoolNo, gender, \" +\n \" nation, birth, type, grade, position, \" +\n \" applyDate, beActivistDate, \" +\n \" beDevelopDate, power, password) \" +\n \"VALUES(#{name}, #{no}, (SELECT no FROM Schools WHERE Schools.name=#{school}), \" +\n \" #{gender}, #{nation}, #{birth}, #{type}, #{grade}, \" +\n \" #{position}, #{applyDate}, #{beActivistDate}, #{beDevelopDate}, \" +\n \" (SELECT no FROM Powers WHERE identity=#{identity}), #{password});\")\n public Integer addStudent(Student stu);\n\n /**\n * 录入管理员信息\n * @param admin\n * @return\n */\n @Insert(\"INSERT \" +\n \"INTO Admin(no, name, schoolNo, password, power) \" +\n \"VALUES(#{no}, #{name}, \" +\n \" (SELECT no FROM Schools WHERE Schools.name=#{school}), \" +\n \" #{password}, #{power});\")\n public Integer addAdmin(Admin admin);\n\n /**\n * 录入管理员信息\n * @param admin\n * @return\n */\n @Insert(\"INSERT \" +\n \"INTO Admin(no, name, schoolNo, password, power) \" +\n \"VALUES(#{no}, #{name}, #{schoolNo}, #{password}, #{power});\")\n public Integer addDBAdmin(DBAdmin admin);\n\n /**\n * 获取全部管理员信息\n * @return\n */\n @Select(\"SELECT Admin.no, Admin.name, Schools.name school, power \" +\n \"FROM Admin, Schools \" +\n \"WHERE schoolNo=Schools.no;\")\n public List<Admin> getAllAdminInfo();\n\n /**\n * 获取某个管理员的信息\n * @param no\n * @return\n */\n @Select(\"SELECT Admin.no, Admin.name, Schools.name school, power \" +\n \"FROM Admin, Schools \" +\n \"WHERE Admin.no=#{no} AND schoolNo=Schools.no;\")\n public Admin getAdminInfo(String no);\n\n /**\n * 获取学员权限\n * @param stuNo\n * @return\n */\n @Select(\"SELECT power \" +\n \"FROM Student \" +\n \"WHERE no = #{stuNo};\")\n public Integer getStuPower(String stuNo);\n\n /**\n * 获取全部学生信息\n * @return\n */\n @Select(\"SELECT s1.no, s1.name, s2.name school, \" +\n \" s1.gender, s1.nation, s1.birth, s1.type, \" +\n \" s1.grade, s1.position, s1.applyDate, \" +\n \" s1.beActivistDate, s1.beDevelopDate, \" +\n \" s1.power, p.identity \" +\n \"FROM Student s1, Powers p, Schools s2 \" +\n \"WHERE s1.power=p.no AND \" +\n \" s1.schoolNo=s2.no;\")\n public List<Student> getAllStuInfo();\n\n /**\n * 根据学院编号获取学生信息\n * @param schoolNo\n * @return\n */\n @Select(\"SELECT s1.no, s1.name, s2.name school, \" +\n \" s1.gender, s1.nation, s1.birth, s1.type, \" +\n \" s1.grade, s1.position, s1.applyDate, \" +\n \" s1.beActivistDate, s1.beDevelopDate, \" +\n \" s1.power, p.identity \" +\n \"FROM Student s1, Powers p, Schools s2 \" +\n \"WHERE s2.no=#{schoolNo} AND \" +\n \" s1.power=p.no AND \" +\n \" s1.schoolNo=s2.no;\")\n public List<Student> getStudentInfoBySchoolNo(int schoolNo);\n\n\n /**\n * 根据学号查询学生信息\n * @param stuNo\n * @return\n */\n @Select(\"SELECT s1.no, s1.name, s2.name school, \" +\n \" s1.gender, s1.nation, s1.birth, s1.type, \" +\n \" s1.grade, s1.position, s1.applyDate, \" +\n \" s1.beActivistDate, s1.beDevelopDate, \" +\n \" s1.power, p.identity \" +\n \"FROM Student s1, Powers p, Schools s2 \" +\n \"WHERE s1.no=#{stuNo} AND \" +\n \" s1.power=p.no AND \" +\n \" s1.schoolNo=s2.no;\")\n public Student getStuInfo(String stuNo);\n\n\n /**\n * 管理员修改某个学生的基本信息\n * @param stu\n * @return\n */\n @Update(\"UPDATE Student \" +\n \"SET name=#{name}, \" +\n \" schoolNo=#{schoolNo}, \" +\n \" gender=#{gender}, \" +\n \" nation=#{nation}, \" +\n \" birth=#{birth}, \" +\n \" type=#{type}, \" +\n \" grade=#{grade}, \" +\n \" position=#{position}, \" +\n \" applyDate=#{applyDate}, \" +\n \" beActivistDate=#{beActivistDate}, \" +\n \" beDevelopDate=#{beDevelopDate}, \" +\n \" power=#{power}\" +\n \"WHERE no = #{no};\")\n public Integer updateStuInfoAdmin(DBStudent stu);\n\n\n /**\n * 自己修改用户信息\n * @param stu\n * @return\n */\n @Update(\"UPDATE Student \" +\n \"SET name=#{name}, \" +\n// \" schoolNo=#{schoolNo}, \" +\n \" gender=#{gender}, \" +\n \" nation=#{nation}, \" +\n \" birth=#{birth}, \" +\n \" type=#{type}, \" +\n \" grade=#{grade}, \" +\n \" position=#{position}, \" +\n// \" applyDate=#{applyDate}, \" +\n// \" beActivistDate=#{beActivistDate}, \" +\n// \" beDevelopDate=#{beDevelopDate}, \" +\n// \" power=#{power}\" +\n \"WHERE no = #{no};\")\n public Integer updateStuInfoSelf(DBStudent stu);\n}",
"public void save(Person p) {\n\n\t}",
"@Mapper\npublic interface UserMapper {\n\n @Select(\"SELECT * FROM User \")\n List<User> findAll();\n\n @Insert(\"INSERT INTO User(name, gender) VALUES(#{name}, #{gender})\")\n Integer insert(@Param(\"name\") String name, @Param(\"gender\") Boolean gender);\n}",
"@Override\r\n\tpublic Person getPerson(Long personId) {\n\r\n\r\n\t\tPerson person = new Person(\"bob\", String.format(\"Unit%d\", personId), \"carol\", \"alice\", \"42\");\r\n\t\tperson.setId(personId);\r\n\t\treturn person;\r\n\t}",
"public void insertPerson(Person p) throws DataAccessException {\n String sql = \"INSERT INTO persons (person_id, assoc_username, first_name, last_name, gender, \" +\n \"father_id, mother_id, spouse_id) VALUES(?,?,?,?,?,?,?,?)\";\n try(PreparedStatement stmt = conn.prepareStatement(sql)) {\n stmt.setString(1, p.getPerson_id());\n stmt.setString(2, p.getAssoc_username());\n stmt.setString(3, p.getFirst_name());\n stmt.setString(4, p.getLast_name());\n stmt.setString(5, p.getGender());\n stmt.setString(6, p.getFather_id());\n stmt.setString(7, p.getMother_id());\n stmt.setString(8, p.getSpouse_id());\n\n stmt.executeUpdate();\n } catch (SQLException e) {\n throw new DataAccessException(\"Error encountered while inserting into the database\");\n }\n }"
] | [
"0.6503306",
"0.6231934",
"0.61705774",
"0.60080963",
"0.5896654",
"0.57986546",
"0.57554996",
"0.5753817",
"0.5693786",
"0.56703633",
"0.5649123",
"0.56106377",
"0.54594356",
"0.54527974",
"0.54463446",
"0.54286027",
"0.5369391",
"0.5357398",
"0.53556514",
"0.5339373",
"0.53157604",
"0.5301778",
"0.52788997",
"0.52785504",
"0.5271021",
"0.5262122",
"0.52596927",
"0.52585095",
"0.52551776",
"0.52431214",
"0.5242306",
"0.5237326",
"0.5224458",
"0.5218229",
"0.52163917",
"0.5202779",
"0.51746",
"0.5173835",
"0.51648045",
"0.51607877",
"0.51533574",
"0.5150783",
"0.5134874",
"0.5130768",
"0.51274216",
"0.51166326",
"0.51141363",
"0.51131004",
"0.5110321",
"0.5104568",
"0.51008373",
"0.5100534",
"0.508757",
"0.5079755",
"0.5076712",
"0.50716555",
"0.5071266",
"0.5068811",
"0.50627786",
"0.5056166",
"0.5053637",
"0.50425935",
"0.5038942",
"0.50363886",
"0.5033135",
"0.5032175",
"0.50289744",
"0.50246614",
"0.50224257",
"0.5015706",
"0.5009258",
"0.50033313",
"0.500159",
"0.49832076",
"0.49817708",
"0.49803558",
"0.49737826",
"0.49684215",
"0.4965156",
"0.4965069",
"0.49646148",
"0.49636903",
"0.4961759",
"0.4961145",
"0.4951215",
"0.49475145",
"0.4944974",
"0.4939356",
"0.49372965",
"0.49370125",
"0.49249825",
"0.492384",
"0.4920137",
"0.49197233",
"0.49136364",
"0.4910764",
"0.49062628",
"0.4905414",
"0.49026865",
"0.48960218",
"0.48875484"
] | 0.0 | -1 |
/ Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. | public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
ArrayList<ArrayList<Integer>> arrlist=new ArrayList<ArrayList<Integer>>();
for(int i=1;i<=n;i++)
{
ArrayList<Integer> row=new ArrayList<Integer>();
int d=sc.nextInt();
for(int j=1;j<=d;j++)
{
row.add(sc.nextInt());
}
arrlist.add(row);
}
//ArrayList<Integer> arr=new ArrayList<Integer>();
int q=sc.nextInt();
for(int i=0;i<q;i++)
{
int x=sc.nextInt();
int y=sc.nextInt();
try
{
System.out.println(arrlist.get(x-1).get(y-1));
}
catch(Exception e)
{
System.out.println("error");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSolution s = new Solution();\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t//Scanner in = new Scanner(System.in);\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tsolve(in, out);\n\t\tout.close();\n\t\tin.close();\t\n\t}",
"public static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n\t\tProblemSolver problemSolver = new ProblemSolver();\n\t\tproblemSolver.solveTheProblem(in, out);\t\t\n\t\tout.close();\t\t\n\t}",
"public void solution() {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(solution());\r\n\t}",
"public static void main(String[] args) {\n\n Solution2.solution();\n }",
"private Solution() { }",
"private Solution() { }",
"private Solution() {\n\n }",
"public static void main(String []args) throws IOException {\n\tFastScanner in = new FastScanner(System.in);\n\tPrintWriter out = \n\t\tnew PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), false); \n\tsolve(in, out);\n\tin.close();\n\tout.close();\n }",
"private Solution() {\n }",
"public static void main(String[] args) throws IOException{\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n \tint n = Integer.parseInt(f.readLine());\r\n \t\r\n \tint[] a = new int[n];\r\n \tStringTokenizer st = new StringTokenizer(f.readLine());\r\n \tfor(int i = 0; i < n; i++) a[i] = Integer.parseInt(st.nextToken());\r\n \t\r\n \tSystem.out.println(solution(a));\r\n \r\n //out.close();\r\n }",
"public static void main(String[] args) throws IOException {\n\t\tin = new Scanner(new File(\"square.in\"));\n\t\tout = new PrintWriter(new File(\"square.out\"));\n\t\t\n\t\tinit();\n\t\tsolve();\n\t\t\n\t\tin.close();\n\t\tout.close();\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(solution(0));\n\n\t}",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNextLine()) {\n\t\t\tString input = scanner.nextLine();\n\t\t\tSystem.out.println(solve(input));\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) {\n String problem = \"Herman\";\n\n // Assign string type variable to solution string\n String result = solution(problem);\n\n //Print solution result\n System.out.println(result);\n }",
"public static void main(String[] args) {\r\n\t\tSolver m = new Solver();\r\n\t\t\r\n\r\n\r\n\t\ttry {\r\n\t\t\tm.readData(\"data/Test_case_1.in\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\r\n\t\tint answer = m.solve(\"data/Test_case_1.in\");\r\n\r\n\t\tSystem.out.println(answer);\r\n\t\t\r\n\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tSolution s = new Solution();\n\t\ts.solution(2, 4, 2, 1);\n\t}",
"public static void main(String[] args) \r\n {\r\n // TODO: Read the input from the user and call produceAnswer with an equation\r\n \tScanner in = new Scanner(System.in);\r\n \tString problem = in.nextLine();\r\n \tin.close();\r\n \tSystem.out.printf(\"Result: %s\" , produceAnswer(problem));\r\n }",
"public static void main(String[] args) {\n\t\t\tSystem.out.println(Solution(5, 83));\n\t\t\t\n\t\t}",
"public static void main(String[] args) {\n Scanner ob = new Scanner(System.in);\n Solution solution = null;\n int testcases = ob.nextInt();\n ob.nextLine();\n for (int i = 0; i < testcases; i++) {\n String numsLine = ob.nextLine();\n String[] numsLineParts = numsLine.trim().split(\" \");\n int dimensions = Integer.valueOf(numsLineParts[0]);\n int numOperations = Integer.valueOf(numsLineParts[1]);\n solution = new Solution(dimensions);\n for (int j = 0; j < numOperations; j++) {\n String line = ob.nextLine();\n String[] lineParts = line.split(\" \");\n if (lineParts[0].equals(\"UPDATE\")) {\n solution.update(Integer.valueOf(lineParts[1])-1, Integer.valueOf(lineParts[2])-1, Integer.valueOf(lineParts[3])-1, Integer.valueOf(lineParts[4]));\n }\n if (lineParts[0].equals(\"QUERY\")) {\n solution.query(Integer.valueOf(lineParts[1])-1, Integer.valueOf(lineParts[2])-1, Integer.valueOf(lineParts[3])-1, Integer.valueOf(lineParts[4])-1, Integer.valueOf(lineParts[5])-1, Integer.valueOf(lineParts[6])-1);\n }\n }\n }\n }",
"public static void main(String[] args) {\n\r\n\t\tnew Main().sol();\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tSalesmanTour ss = new SalesmanTour();\n\t\tss.input();\n\t\tSystem.out.println(ss.solve());\n\t}",
"private Solution() {\n //constructor\n }",
"public static void main(String[] args) throws IOException {\n\t\tString task = \"palsquare\"; //XXX change this\n\t\tString path = !TESTING ? task + \".in\"\n\t\t\t\t: System.getProperty(\"user.dir\") + File.separator + \"src\" + File.separator + \"test.in\";\n\t\tInputReader in = new InputReader(new FileInputStream(path));\n\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(task + \".out\")));\n\t\tsolve(in, out);\n\t\tout.close();\n\t}",
"private void generateSolution() {\n\t\t// TODO\n\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t\ttry{\r\n\t\t\tScanner sc= new Scanner(new File(inpPath));\t//new File(inpPath)\r\n\t\t\tPrintWriter out = new PrintWriter(new File(outPath));\r\n\t\t\tint cases = sc.nextInt();\r\n\t\t\tfor(int t=1;t<=cases;t++){\r\n\t\t\t\tsolve(t,sc,out);\r\n\t\t\t}\r\n\t\t\tout.flush();\r\n\t\t\tout.close();\r\n\t\t}catch(Exception ex){ex.printStackTrace();}\r\n\t\t\r\n\t}",
"public static void main(String[] args)\n\t{\n\t\tScanner in = new Scanner(System.in);\n\t\tStringBuilder answers = new StringBuilder();\n\n\t\tanswers.append(\"PERFECTION OUTPUT\\n\");\n\t\ttry\n\t\t{\n\t\t\tint value;\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\tvalue = in.nextInt();\n\t\t\t\tif (value == 0) break;\n\n\t\t\t\tanswers.append(solve(value));\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(e);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tanswers.append(\"END OF OUTPUT\");\n\n\t\tSystem.out.println(answers);\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tin = new BufferedReader(new FileReader(\"cowdance.in\"));\n\t\tout = new PrintWriter(new File(\"cowdance.out\"));\n\t\t\n\t\tinit();\n\t\tsolve();\n\t\t\n\t\tin.close();\n\t\tout.close();\n\t}",
"public static void main(String[] args) throws IOException {\n\n String path = \"D:\\\\GitHub\\\\Competetions\\\\CodeJam\\\\Code\\\\src\\\\B12016\\\\\";\n String input = \"bsmall.in\", output = \"bsmall.out\";\n FileInputStream fip = new FileInputStream(path + input);\n FileOutputStream fop = new FileOutputStream(path + output);\n in = fip;\n out = new PrintWriter(fop);\n B a = new B();\n a.solve();\n out.close();\n }",
"public static void main(String[] args) {\n\t\tSolution sol = new Solution();\n\t\tsol.test();\n\t}",
"public static void main (String args []) throws IOException\r\n\t{\n\t\tScanner in = new Scanner(new File(\"moo.in\"));\r\n\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"moo.out\")));\r\n\t\tint n = in.nextInt();\r\n//\t\tSystem.out.println(solve(n,0));\r\n\t\tout.println(solve(n,0));\r\n\t\tout.flush();\r\n\t}",
"public static void main(String[] args) {\n System.out.println(Arrays.toString(solution(\"\")));\n System.out.println(Arrays.toString(solution(\"abcdef\")));\n System.out.println(Arrays.toString(solution(\"HelloWorld\")));\n System.out.println(Arrays.toString(solution(\"abcde\")));\n System.out.println(Arrays.toString(solution(\"LovePizza\")));\n\n }",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n\t\tint t = Integer.parseInt(br.readLine());\n\t\tint a = 0, b = 0;\n\t\tfor (int i = 0; i < t; i++) {\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\ta = Integer.parseInt(st.nextToken());\n\t\t\tb = Integer.parseInt(st.nextToken());\n\t\t\tbw.write(solution(a, b) + \"\\n\");\n\t\t}\n\t\tbw.flush();\n\t\tbw.close();\n\t}",
"public static void main(String[] args) {\n Last_coding_exercises.task17();\n\n\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(Arrays.toString(solution(8, 1)));\r\n\t}",
"public static void main(String[] args) throws Exception\n\t{\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"input6.txt\"));\n\t\tSystem.setOut(new PrintStream(new File(\"output.txt\")));\n\n\t\tsolve(br);\n\t}",
"@Test\n public void test() {\n Solution solution = new Solution();\n\n }",
"@Test\n public void test() {\n Solution solution = new Solution();\n\n }",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int[] arr = new int[4];\n for (int i = 0; i < 4; i++)\n arr[i] = sc.nextInt();\n \n Q1 q1 = new Q1();\n int[] answer = q1.solution(arr);\n \n for (int i = 0; i < answer.length; i++) {\n System.out.println(answer[i]);\n }\n }",
"public static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t//BufferedReader br = new BufferedReader(new FileReader(\"input/vol2/Problem127.in\"));\n\t\tString line = \"\";\n\t\t\n\t\twhile(true) {\n\t\t\tLinkedList<String> strings = new LinkedList<String>();\n\t\t\tLinkedList<Card> deck = new LinkedList<Card>();\n\t\t\tline = br.readLine().trim();\n\t\t\tif(line.equals(\"#\"))\n\t\t\t\tbreak;\n\t\t\tCollections.addAll(strings, line.split(\" \"));\n\t\t\tline = br.readLine().trim();\n\t\t\tCollections.addAll(strings, line.split(\" \"));\n\t\t\tfor(String str : strings) {\n\t\t\t\tdeck.add(new Card(str));\n\t\t\t}\n\t\t\tTableau solution = new Tableau();\n\t\t\tfor(Card c : deck) {\n\t\t\t\t//System.out.print(\"Adding: \" + c + \" \");\n\t\t\t\tsolution.add(c);\n\t\t\t\t//System.out.println(solution);\n\t\t\t\t//solution.debug();\n\t\t\t}\n\t\t\tSystem.out.println(solution);\n\t\t}\n\t\t//System.out.println(\"Runtime: \" + (System.currentTimeMillis() - startTime) + \"ms\");\n\t}",
"public void findSolution() {\n\n\t\t// TODO\n\t}",
"public void Main(){\n }",
"public static void main(String[] args) {\n\n // create initial board from file\n In in = new In(args[0]);\n int N = in.readInt();\n int[][] tiles = new int[N][N];\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n tiles[i][j] = in.readInt();\n Board initial = new Board(tiles);\n\n // check if puzzle is solvable; if so, solve it and output solution\n if (initial.isSolvable()) {\n Solver solver = new Solver(initial);\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n\n // if not, report unsolvable\n else {\n StdOut.println(\"Unsolvable puzzle\");\n }\n}",
"public static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tNumberGame ng = new NumberGame();\n\t\tng.solve();\n\t\t//ng.test();\n\t}",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\tTest01 t = new Test01();\r\n\t\t\r\n\t\t//String st = \"1927\";\r\n\t\t//int in\t= 2;\t// n 개 제거\r\n\r\n\t\tString st = \"1231234\";\r\n\t\tint in\t= 3;\t\r\n\t\t\r\n\t\tString an = t.solution(st, in);\r\n\t\t\r\n\t\tSystem.out.println(an);\r\n\t}",
"private void testSolution(String input, String output) {\n runs++;\n\n // Load the problem & solution\n ProblemSpec problemSpec = Solution.loadProblem(input);\n Solution solution = new Solution(problemSpec);\n\n // Solve and time the solution\n long startTime = System.currentTimeMillis();\n List<State> states = solution.solve();\n long endTime = System.currentTimeMillis();\n durations.put(input, endTime - startTime);\n\n // Output the solution\n Solution.writeSolution(Formatter.format(states), output);\n\n problemSpec = Solution.loadProblem(input, output);\n if (solutionPasses(problemSpec)) {\n passes++;\n }\n\n successes++;\n }",
"public static void main(String[] args) throws IOException {\n// new Homework01();\n new Homework02();\n }",
"void run() throws IOException {\n\r\n\t\treader = new BufferedReader(new FileReader(\"input.txt\"));\r\n\r\n\t\tout = new PrintWriter(new FileWriter(\"output.txt\"));\r\n\t\ttokenizer = null;\r\n\t\tsolve();\r\n\t\treader.close();\r\n\t\tout.flush();\r\n\r\n\t}",
"public static void main(String[] args) {\n InputData inputData = new InputData();\n FindNumberOfSteps findNumberOfSteps = new FindNumberOfSteps();\n PrintResult printResult = new PrintResult();\n printResult.print(findNumberOfSteps.find(inputData.input()));\n }",
"public static void main(String[] args) throws IOException {\n\r\n \r\n \r\n }",
"public static void main(String[] args) throws IOException {\n\t\t\t\r\n\t\t\tint [] numReps= {3,1,2,2,2};\r\n\t\t\tMathModelClass.solveMe(85, 5, 2,numReps, 1);\r\n\t\r\n\t\t}",
"public static void main(String[] args) {\n\t\tString filename = \"src/y20161B/B-small-practice\";\n\t\t//String filename = \"src/y20161B/B-large-practice\";\n\n\t\tFileInputStream file;\n\t\tint T;\n\n\t\ttry {\n\t\t\tfile = new FileInputStream(filename+\".in\");\n\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(file));\n\n\t\t\tT = Integer.parseInt(in.readLine());\n\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(filename+\".out\"));\n\n\t\t\tfor (int i=0; i<T; i++) {\n\t\t\t\tint ind = i+1;\n\t\t\t\t// parser\n\t\t\t\tString buff[] = in.readLine().split(\" \");\n\t\t\t\tString C = buff[0];\n\t\t\t\tString J = buff[1];\n\t\t\t\t\n\t\t\t\t// calcul\n\t\t\t\tString res = solve(C, J);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Result \"+i+\": \"+res);\n\t\t\t\tbw.write(\"Case #\"+ind+\": \"+res+\"\\n\");\n\t\t\t}\n\t\t\tbw.close();\n\n\t\t\tin.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tint [] arr = {4,2,3,5};\r\n\t\tint [] answer = solution(arr);\r\n\t\tfor(int i=0;i<answer.length;i++)\r\n\t\t\tSystem.out.print(answer[i]+\" \");\r\n\t}",
"public static void main(String[] args) throws FileNotFoundException, IOException{\n InputStream inputStream = new FileInputStream(new File(\"./src/B-large.in\"));\n OutputStream outputStream = new FileOutputStream(new File(\"./src/B-large.out\"));\n InputReaderRevengePancakes in = new InputReaderRevengePancakes(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskRevengePancakes solver = new TaskRevengePancakes();\n solver.solve(1, in, out);\n out.close();\n }",
"public static void main(String[] args) throws IOException {\n br = new BufferedReader(new FileReader(\"input.txt\"));\r\n\r\n int T = nextInt();\r\n for (int t = 1; t <= T; t++) {\r\n nextInt();\r\n int X = nextInt();\r\n String lString = nextToken();\r\n\r\n StringBuilder s = new StringBuilder();\r\n for (; X > 0; X--) s.append(lString);\r\n char[] arr = s.toString().toCharArray();\r\n String soln = solve(arr) ? \"YES\" : \"NO\";\r\n\r\n System.out.printf(\"Case #%d: %s%n\", t, soln);\r\n }\r\n }",
"public static void main(String[] args) throws Exception\n\t{\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"input6.txt\"));\tSystem.setOut(new PrintStream(new File(\"output.txt\")));\n\t\t\n\t\tint t = Integer.parseInt(br.readLine());\n\t\tfor(int i = 1; i <= t; i++)\n\t\t\tSystem.out.println(\"Case #\"+i+\": \"+solve(br));\n\t}",
"public static void main(String[] args) {\r\n\t\tint N=1;\r\n\t\tint[][] trust = {};\r\n\t\tSolution sol = new Solution();\r\n\t\tSystem.out.println(sol.findJudge(N, trust));\r\n\t}",
"public static void main(String[] args) \n\t{\n\t\tinitialize(\"\");\n\t\t\n\t\t//making instance from file name\n\n\t\tString str = \"A-n32-k5.vrp\";\n\t\tString fileName = \"input//\" + str;\n\t\t\n\t\t\n\t\tInstance problem = new VRPInstance(fileName);\n\t\tSystem.out.println(problem.comment);\n\t\t//solve problem\n\n\t\t//Solver solver2 = new SimpleGreedySolver(problem);\n\t\t//Solver solver2 = new NearestNeighborGreedySolver(problem);\n\t\t//Solver solver = new ClarkeWrightGreedySolver(problem);\n\t\t//Solver solver = new EHSBASolver(problem);\n\t\t//solver2.solve();\n\t\t//solver2.printResult();\n\t\t\n\t\t//solver = new ClarkeWrightGreedySolver(problem);\n\t\tSolver solver3 = new EHSBASolver(problem);\n\t\tsolver3.solve();\n\t\tsolver3.printResult();\n\t\t\n\t\tSystem.out.println(\"finished.\");\n\t\t\n\t\t\n\t\t/*File folder = new File(\"input\");\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\n\t\tfor(int i = 0; i < listOfFiles.length; i++)\n\t\t{\n\t\t\n\t\t\tString str = listOfFiles[i].getName();\n\t\t\tSystem.out.println(str);\n\t\t\tif(listOfFiles[i].isFile() && str.substring(0, 1).equalsIgnoreCase(\"A\"))\n\t\t\t\tfileName = \"input\\\\\" + str;\n\t\t\telse\n\t\t\t\tcontinue;\n\n\t\t\t//fileName = \"input\\\\\" + fileName;\n\t\t\tInstance problem = new VRPInstance(fileName);\n\t\t\tSystem.out.println(problem.comment);\n\t\t\t//solve problem\n\t\n\t\t\t//Solver solver = new SimpleGreedySolver(problem);\n\t\t\t//Solver solver = new NearestNeighborGreedySolver(problem);\n\t\t\tSolver solver = new ClarkeWrightGreedySolver(problem);\n\t\t\t//Solver solver = new EHSBASolver(problem);\n\t\t\tsolver.solve();\n\t\t\tsolver.printResult();\t\n\n\t\t}*/\n\n\t\t\n\t}",
"public static void main(String[] args) {\n In in = new In(args[0]);\n int n = in.readInt();\n int[][] blocks = new int[n][n];\n for (int i = 0; i < n; i++)\n for (int j = 0; j < n; j++)\n blocks[i][j] = in.readInt();\n\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n }",
"public static void main(String[] args) {\n In in = new In(args[0]);\n int n = in.readInt();\n int[][] blocks = new int[n][n];\n for (int i = 0; i < n; i++)\n for (int j = 0; j < n; j++)\n blocks[i][j] = in.readInt();\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n }",
"public static void main(String[] args) {\n /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */\n Scanner sc = new Scanner(System.in);\n int cases = sc.nextInt();\n for(int i=0;i<cases;i++){\n \tString[] strArray = sc.next().split(\"\");\n\n \tString odd = \"\";\n \tString even = \"\";\n \t\n \tfor(int j=1;j<strArray.length;j++){\n \t\tif(j%2==0){\n\t\t\t\t\teven += strArray[j];\n \t\t}else{\n \t\t\todd += strArray[j];\n \t\t}\n \t\t\n \t}\n \t\n \tSystem.out.println(odd + \" \" + even);\n }\n }",
"public static void main(String[] args) {\n int[] arr = {10, 2, 5, 1, 8, 12};\n System.out.println(solution(arr));\n }",
"public void main(){\n }",
"public static void main(String[] args) {\n\n\t\tsolution();\n\n\t\t// int maxDivisor = Divided.getMaxDivisor(1, 3);\n\t\t// System.out.println(\"maxDivisor:\" + maxDivisor);\n\n\t}",
"public static void main() {\n \n }",
"public static void main(String[] args){\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }",
"public static void main(String[] args) {\n\r\n\t\tSystem.out.println(solution(\"ACACACA\"));\r\n\t}",
"public static void main(String[] args) {\n\t\tint A[]={2,1,0,0,0};\r\n\t\tSystem.out.println(solution(A));\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tint A[] = new int[5];\n\t\tA[0]=3;\n\t\tA[1]=1;\n\t\tA[2]=2;\n\t\tA[3]=4;\n\t\tA[4]=3;\n\t\tSolution s = new Solution();\n\t\tSystem.out.println(s.solution(A));\n\t}",
"public static void main(String args[]) {\n\n\t\tFlowers example = new Flowers();\n\t\t\n\t\texample.model();\n\n\t\tif (example.search())\n\t\t\tSystem.out.println(\"Solution(s) found\");\n\t\t\n\t}",
"public static void main(String[] args) {\n String str = \"The one-hour drama series Westworld is a dark odyssey about the dawn of artificial consciousness and the evolution of sin. Set at the intersection of the near future and the reimagined past, it explores a world in which every human appetite, no matter how noble or depraved, can be indulged.\";\n\n System.out.println(solution1(str));\n }",
"public static void main(String[] args) {\n\t\tint[] number = new int[] {1, 1, 1, 1, 1};\n\t\tint target = 3;\n\t\t\n\t\tSolution s = new Solution();\n\t\tint result = s.solution(number, target);\n\t\tSystem.out.println(result);\n\t}",
"@Test\n public void testSolution() {\n assertSolution(\"425\", \"input-day01-2018.txt\");\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tArrayList<Integer> arr = new ArrayList<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tarr.add(sc.nextInt());\n\t\t}\n\t\tint k = sc.nextInt();\n\t\tSolution sol = new Solution();\n\t\tSystem.out.println(sol.solve(arr, k));\n\t\tsc.close();\n\t}",
"public static void main(String[] args) {\n\t\tint arr[] = {9,3,9,3,9,7,9};\n\t\tSolution(arr);\n\t}",
"public static void main(String[] args) { \n \n //read in filename from user\n String filenameInput = args[0];\n \n //create new maze/graph\n Maze newMaze = new Maze(filenameInput);\n \n //call toString\n //String stringMaze = newMaze.toString();\n \n //print the string maze\n //System.out.println(stringMaze);\n \n //call findPath\n //System.out.println(newMaze.findPath());\n \n for (Vertex v : newMaze.findPath()) System.out.print(v.getName());\n \n //print solution?\n //System.out.println(newMaze.solution);\n \n \n }",
"public Main() {\n }",
"public Main() {\n }",
"public static void main(String[] args) {\n String name = \"ABAAABB\";\n\n System.out.println(solution(name));\n }",
"public static void main(String[] args) {\n\t\tint[] A = {51,31,43};\n\t\tSystem.out.println(solution(A));\n\n\t}",
"public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\r\n System.out.print(BinaryReversalMethod(s.nextLine()));\r\n s.close();\r\n }",
"public static void main(String[] args) // solve a slider puzzle (given below)\n {\n In in = new In(args[0]);\n int N = in.readInt();\n int[][] blocks = new int[N][N];\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n blocks[i][j] = in.readInt();\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n \n \t\n }\n}",
"public Main() {\n \n \n }",
"public Main() {\n }",
"public static void main()\n\t{\n\t}",
"public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(br.readLine().trim());\n\t\tint tc = Integer.parseInt(st.nextToken());\n\t\tfor (int i = 0; i < tc; i++) {\n\t\t\tst = new StringTokenizer(br.readLine().trim());\n\t\t\tint x = Integer.parseInt(st.nextToken());\n\t\t\tint y = Integer.parseInt(st.nextToken());\n\t\t\tsolve(y - x);\n\t\t}\n\t}",
"public static void main(String[] args) throws FileNotFoundException {\n Scanner scanner = new Scanner(new FileInputStream(\"/Users/guoziren/IdeaProjects/剑指offer for Java/src/main/java/com/ustc/leetcode/algorithmidea/dynamicprogramming/input.txt\"));\n }",
"public interface SASolution extends Solution {\r\n\r\n /**\r\n * Generates a neighbor solution using this solution\r\n *\r\n * @return\r\n */\r\n public SASolution getNeighborSolution();\r\n\r\n /**\r\n * Prints this solution\r\n *\r\n * @return\r\n */\r\n public String getAsString();\r\n\r\n}",
"public static void main(String[] args) throws IOException {\n\r\n }",
"public Main() {\r\n }",
"public Main() {\r\n }",
"public static void main(String[] args) {\n int lineSize = Integer.parseInt(args[0]);\n String[] input = getInput(args);\n\n WordWrap ww = new WordWrap(lineSize, input);\n Long start = System.currentTimeMillis();\n Integer[] lines = ww.solve();\n Long end = System.currentTimeMillis();\n\n System.out.println(\"solved in \"+((end-start)/1000.0) +\" seconds\");\n printResult(lines, input);\n }",
"public static void main(String[] args) {\n System.out.println(solution(new int[]{3,1,2,4,3}));\n }",
"public static void main(String[] args) {\n\t\tnew Challenge09();\r\n\t}",
"public static void main(String[] args){\n Solution solution = new Solution();\n System.out.println(solution.convertToTitle(27));\n }",
"public static void main(String[] args) {\n In in = new In(args[0]);\n int n = in.readInt();\n int[][] tiles = new int[n][n];\n for (int i = 0; i < n; i++)\n for (int j = 0; j < n; j++)\n tiles[i][j] = in.readInt();\n Board initial = new Board(tiles);\n\n // Solve the puzzle\n Solver solver = new Solver(initial);\n\n // Print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\" No solution possible \");\n else {\n StdOut.println(\" Minimum number of moves = \" + solver.moves());\n for (Board solutionboard : solver.solution())\n StdOut.println(solutionboard);\n }\n\n }",
"public static void main(String[] args) {\n\t\tSolution s = new Solution();\n\t\tint[] nums = {4,5,6,7,0,1,2};\n\t\tSystem.out.println(s.search(nums, 0));\n\t}",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> problems = new ArrayList<>();\n\t\t\n\t\t\n\t\tint noOfInputs = Integer.parseInt(in.nextLine());\n\t\t\n\t\tfor(int x=0; x<noOfInputs; x++) {\n\t\t\tproblems.add(in.nextLine());\n\t\t}\n\t\tin.close();\n\t\t\n\t\tfor(String p : problems) {\n\t\t\tint no = getFibonacciIndex(p);\n\t\t\t//System.out.print( no + \"\\n\\t\" + p + \"\\n\\t\" + getFib(no) + \"\\n\" );\n\t\t\tSystem.out.print(no + \" \");\n\t\t}\n\t\tSystem.out.println(\"\");\n\n\t}",
"public Main() {}",
"public static void main(String[] args) {\n\t\tMain m=new Main();\n\t\tSystem.out.println(m.solve(\"abcd\"));\n\t}"
] | [
"0.75269336",
"0.730384",
"0.7260763",
"0.7236459",
"0.71775794",
"0.717393",
"0.7021445",
"0.7021445",
"0.6892823",
"0.68699694",
"0.685693",
"0.68244356",
"0.6822035",
"0.68095636",
"0.6808086",
"0.6805316",
"0.6783222",
"0.67688644",
"0.67559457",
"0.6752301",
"0.675167",
"0.67334837",
"0.67179775",
"0.6705647",
"0.6694739",
"0.6652345",
"0.66509444",
"0.66279584",
"0.66238683",
"0.6621768",
"0.6614569",
"0.6605936",
"0.6601888",
"0.65854955",
"0.6519058",
"0.65006024",
"0.6495759",
"0.6469238",
"0.6469238",
"0.64608496",
"0.64563835",
"0.64420587",
"0.6414074",
"0.6392838",
"0.6384934",
"0.6364949",
"0.63462955",
"0.63406336",
"0.6340469",
"0.6331429",
"0.6329523",
"0.6325685",
"0.63149595",
"0.6309161",
"0.62965316",
"0.6270315",
"0.6267475",
"0.62558174",
"0.62488484",
"0.62417626",
"0.62303114",
"0.62296027",
"0.62291485",
"0.6220284",
"0.62153083",
"0.6211967",
"0.62019837",
"0.62000066",
"0.6196922",
"0.6191583",
"0.61852354",
"0.6180801",
"0.61689425",
"0.61683184",
"0.6165857",
"0.6160447",
"0.61592555",
"0.615898",
"0.615898",
"0.61578816",
"0.6156911",
"0.6149649",
"0.61489415",
"0.61474633",
"0.6146416",
"0.6144451",
"0.61404544",
"0.6137436",
"0.6135505",
"0.6132558",
"0.6130828",
"0.6130828",
"0.612808",
"0.6124087",
"0.6115676",
"0.61011875",
"0.6097923",
"0.6089367",
"0.6086538",
"0.6085651",
"0.60855067"
] | 0.0 | -1 |
Instantiates a new assigned author. | public AssignedAuthor() {
this.classCode = "ASSIGNED";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Author() {\n }",
"Authorizor createAuthorizor();",
"public PCreateAuthor() {\n\t\tsuper(org.jooq.SQLDialect.SYBASE, \"p_create_author\", org.jooq.test.sybase.generatedclasses.Dba.DBA);\n\t}",
"public BookAuthor(){}",
"public AuthorRecord() {\n super(Author.AUTHOR);\n }",
"public BookAuthor(int i, String n, String s, String e)\r\n {\r\n name = n;\r\n idAuthor = i;\r\n surname = s;\r\n email = e;\r\n }",
"void create(int id, int authorId, String title);",
"private Author(final String fname, final String lname) {\r\n writer = new Reader(fname, lname);\r\n this.fname = fname;\r\n this.lname = lname;\r\n publishedBooks = new ArrayList<Book>();\r\n }",
"public DefaultAuthor() {\n\t\ttopic = null;\n\t}",
"public static Author createEntity(EntityManager em) {\n Author author = new Author()\n .firstName(DEFAULT_FIRST_NAME)\n .lastName(DEFAULT_LAST_NAME);\n return author;\n }",
"@Override\n public void author_()\n {\n }",
"public void setAuthor(String author) {\n\t\tauth = author;\n\t}",
"public void setAuthor(Person author)\n {\n this.author = author;\n }",
"public static NewAuthorPG newAuthorPG(AuthorPG prototype) {\n return new AuthorPGImpl(prototype);\n }",
"public AuthorRecord(Integer id, String name, Timestamp created, Timestamp updated) {\n super(Author.AUTHOR);\n\n set(0, id);\n set(1, name);\n set(2, created);\n set(3, updated);\n }",
"public Author(int keyID, String fullName) {\n this.keyID = keyID;\n this.fullName = fullName;\n }",
"public void setAuthor(String author) {\r\n this.author = author;\r\n }",
"public void setAuthor(String author) {\n this.author = author;\n }",
"public void setAuthor(String author) {\n this.author = author;\n }",
"public void setAuthor(String author) {\n this.author = author;\n }",
"public void setAuthor(String author) {\n this.author = author;\n }",
"public void setAuthor(String author) {\n this.author = author;\n }",
"public void setAuthor(Player author){\n this.playerAuthor = author;\n }",
"Builder addAuthor(Person value);",
"public Author build() {\n return new Author(id, name, email, link, displayName, description, image);\n }",
"public AuthorController(AuthorRepository authorRepository) {\n this.authorRepository = authorRepository;\n }",
"public String getAuthorId() {\n return authorId;\n }",
"public String getCreateAuthor() {\n return createAuthor;\n }",
"public void setAuthor(String author) {\n\tthis.author = author;\n}",
"public void addAuthorAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Author\", ViewNavigator.ADD_AUTHOR_SCENE);\n\t}",
"public void setAuthor(String author) {\r\n\t\tthis.author = author;\r\n\t}",
"public AuthorNode(String id) {\n super();\n\n if (id == null) {\n throw new IllegalArgumentException(\"'id' may not be null.\");\n }\n\n this.id = id;\n }",
"public final void author() throws RecognitionException {\n Token ID1=null;\n\n try {\n // /Users/valliant/Projects/java/CFML/cfml.parsing/antlr/Javadoc.g:13:8: ( '@author' ID )\n // /Users/valliant/Projects/java/CFML/cfml.parsing/antlr/Javadoc.g:13:10: '@author' ID\n {\n match(input,7,FOLLOW_7_in_author42); \n\n ID1=(Token)match(input,ID,FOLLOW_ID_in_author44); \n\n System.out.println(\"author \"+(ID1!=null?ID1.getText():null));\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }",
"Builder addAuthor(String value);",
"public void setCreateAuthor(String createAuthor) {\n this.createAuthor = createAuthor;\n }",
"@Override\n\tpublic String author() {\n\t\treturn author;\n\t}",
"@Override\r\n\tpublic int acceptAuthorDetails(int authorId, String authorName) {\n\t\tAuthor author = new Author(authorName);\r\n\t\tauthor = authorDAO.save(author);\r\n\t\treturn author.getAuthorId();\r\n\t\t\r\n\t}",
"void setCreaedBy(Subject creator)\n {\n this.creator = creator;\n }",
"@Override\n public void author()\n {\n }",
"public Person(String associatedUserName, String firstName, String lastName, Gender gender) {\n Id = UUID.randomUUID().toString();\n AssociatedUserName = associatedUserName;\n FirstName = firstName;\n LastName = lastName;\n Gender = gender;\n }",
"public int insertAuthor(Author author);",
"Builder addAuthor(Organization value);",
"public Authors() {\n mAuthors = new TreeMap<>();\n }",
"public String getAuthor() { return author_; }",
"@Override\n\tpublic long getAuthorId() {\n\t\treturn _scienceApp.getAuthorId();\n\t}",
"public Integer getAuthorId() {\n\t\treturn authorId;\n\t}",
"public void addAuthor(Author author){\n authors.add(author);\n }",
"public adminAuthor() {\n initComponents();\n List();\n\n }",
"public void setAuthorId(String authorId) {\n this.authorId = authorId;\n }",
"public String getAuthor() {\r\n\t\treturn author;\r\n\t}",
"public void setAuthor(Author author) {\r\n if (author != null) {\r\n this.author = author;\r\n }\r\n }",
"public void setAuthor(String author)\r\n {\r\n m_author = author;\r\n }",
"public User getAuthor() {\n return author;\n }",
"public Integer getAuthorId() {\n return authorId;\n }",
"public Integer getAuthorId() {\n return authorId;\n }",
"public Author getAuthor() {\r\n return author;\r\n }",
"public static Author createUpdatedEntity(EntityManager em) {\n Author author = new Author()\n .firstName(UPDATED_FIRST_NAME)\n .lastName(UPDATED_LAST_NAME);\n return author;\n }",
"public static AuthorAcess createEntity(EntityManager em) {\n AuthorAcess authorAcess = new AuthorAcess()\n .requestLogin(DEFAULT_REQUEST_LOGIN);\n return authorAcess;\n }",
"public VAuthorDao() {\n\t\tsuper(org.jooq.test.h2.generatedclasses.tables.VAuthor.V_AUTHOR, org.jooq.test.h2.generatedclasses.tables.pojos.VAuthor.class);\n\t}",
"public String getAuthorUsername() {\n\t\treturn authorUsername;\n\t}",
"public void setAuthorId(Integer authorId) {\n this.authorId = authorId;\n }",
"public void setAuthorId(Integer authorId) {\n this.authorId = authorId;\n }",
"public Quote(String quoteBody, String author){\n this.quoteBody = quoteBody;\n this.author = author;\n }",
"public Book(String t, String a) {\n\t\ttitle = t;\n\t\tauthor = a;\n\t}",
"public Person(String firstName, String lastName) {\r\n name = new Name(firstName, lastName); \r\n id = (int )(Math.random() * 200 + 100);; \r\n }",
"public PersonContributor(String nameTitle, String nameFirst, String nameLast, String instName, String instDept,\n\t\t\t\tString emailPrimary, String emailAlt, String contactID) {\n\t\t\tthis.nameFirst = nameFirst;\n\t\t\tthis.nameTitle = nameTitle;\n\t\t\tthis.nameLast = nameLast;\n\t\t\tthis.instName = instName;\n\t\t\tthis.instDept = instDept;\n\t\t\tthis.emailPrimary = emailPrimary;\n\t\t\tthis.emailAlt = emailAlt;\n\t\t}",
"public User(String fullName, String identifier, String major) {\n\t\tthis.fullName = fullName;\n\t\tthis.identifier = identifier;\n\t\tthis.major = major;\n\t}",
"public void setCreator(User creator) {\n this.creator = creator;\n }",
"public String getAuthor() {\r\n return author;\r\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"@Override\r\n\tpublic void setAuthor(String author) {\n\t\tsuper.setAuthor(author);\r\n\t}",
"public Person(String username, String email) {\n this.username = username;\n this.email = email;\n }",
"public void setAuthor(final Author author) {\n\t\tthis.author = author;\n\t}",
"public void candidateDetails(Author authorObject);",
"public String getAuthor() {\n\t\treturn auth;\n\t}",
"public Author getAuthor() {\n\t\treturn this.author;\n\t}",
"public void setAuthors(String _authors) { authors = _authors; }",
"protected void create(AttributeList attributeList) {\n super.create(attributeList);\n SequenceImpl si = new SequenceImpl(\"CMS_AUTHOR_COPYRIGHT_S\", this.getDBTransaction());\n this.setCopyrightId(si.getSequenceNumber());\n }",
"public String getAuthor(){\n return author;\n \n }",
"public String getAuthor() {\r\n\t\treturn oAuthor;\r\n\t}",
"public void setAuthor(String value) {\n setAttributeInternal(AUTHOR, value);\n }",
"public IPerson getAuthor() {\n\t\treturn fAuthor;\n\t}",
"public String getAuthorName() {\n return authorName;\n }",
"public String getAuthorName() {\n return authorName;\n }",
"public void setAuthorName(String authorName) {\n this.authorName = authorName;\n }",
"public void setAuthorName(String authorName) {\n this.authorName = authorName;\n }",
"public IUser getAuthor() {\n\t\treturn message.getAuthor();\n\t}",
"Article createArticle();",
"public static Autor createEntity(EntityManager em) {\n Autor autor = new Autor().nombre(DEFAULT_NOMBRE).email(DEFAULT_EMAIL);\n return autor;\n }"
] | [
"0.7106265",
"0.70433354",
"0.66890985",
"0.6495866",
"0.6334921",
"0.6324026",
"0.6279123",
"0.62249684",
"0.6196907",
"0.61576647",
"0.6098765",
"0.6037337",
"0.5996829",
"0.59715134",
"0.595739",
"0.59265316",
"0.5909165",
"0.5901734",
"0.5901734",
"0.5901734",
"0.5901734",
"0.5901734",
"0.5880823",
"0.58807325",
"0.58509165",
"0.58128697",
"0.58051974",
"0.58050305",
"0.579929",
"0.5794774",
"0.57778525",
"0.57451874",
"0.5735022",
"0.5734224",
"0.5732382",
"0.5731811",
"0.57060206",
"0.56892425",
"0.56889826",
"0.568232",
"0.56620824",
"0.5656738",
"0.56322414",
"0.56260246",
"0.561643",
"0.5602504",
"0.5595307",
"0.55938774",
"0.55907166",
"0.5585072",
"0.55806077",
"0.55707437",
"0.55705744",
"0.5555774",
"0.5555774",
"0.55465245",
"0.5526896",
"0.55253094",
"0.55212015",
"0.5514091",
"0.5501928",
"0.5501928",
"0.5494059",
"0.5493782",
"0.54895765",
"0.54884785",
"0.5476673",
"0.54763025",
"0.5475109",
"0.5472524",
"0.5472524",
"0.5472524",
"0.5472524",
"0.5472524",
"0.5472524",
"0.5472524",
"0.5472524",
"0.5472524",
"0.5472524",
"0.5472524",
"0.5472524",
"0.5465868",
"0.54620194",
"0.5400458",
"0.53983325",
"0.5397444",
"0.53862906",
"0.5374381",
"0.5371541",
"0.5365826",
"0.5360267",
"0.5356125",
"0.5331795",
"0.5327836",
"0.5327836",
"0.5326482",
"0.5326482",
"0.53089786",
"0.5299916",
"0.52991825"
] | 0.73188615 | 0 |
Gets the realm code. | public Code getRealmCode() {
return realmCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getCode();",
"java.lang.String getCode();",
"public String getCode() {\n return (String) get(\"code\");\n }",
"public Long getCode() {\n return code;\n }",
"public Long getCode() {\n return code;\n }",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"public java.lang.String getCode() {\r\n return code;\r\n }",
"public String getCode() {\n return super.getString(Constants.Properties.CODE);\n }",
"public long getCode() {\n return code;\n }",
"public long getCode () {\r\n\t\treturn code;\r\n\t}",
"public String getCode()\n {\n return code;\n }",
"public String getCode()\r\n\t{\r\n\t\treturn code;\r\n\t}",
"public String getCode();",
"public String getCode();",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"@Accessor(qualifier = \"code\", type = Accessor.Type.GETTER)\n\tpublic String getCode()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CODE);\n\t}",
"public String getAuthCode()\n\t{\n\t\tif(response.containsKey(\"AUTH_CODE\")) {\n\t\t\treturn response.get(\"AUTH_CODE\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public String getCode () {\r\n\t\treturn code;\r\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\r\n\t\treturn code;\r\n\t}",
"public String getCode() {\r\n\t\treturn code;\r\n\t}",
"public String getCode() {\n return _code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public int getCode() {\n\t\treturn adaptee.getCode();\n\t}",
"public String getCode() {\t\t\t\t\t\t\t\t\treturn code;\t\t\t\t\t\t\t}",
"public String getCode(){\n\t\treturn code;\n\t}",
"Integer getCode();",
"public String getCode()\n {\n return fCode;\n }",
"public String code() {\n return this.code;\n }",
"public String code() {\n return this.code;\n }",
"@Override\r\n\tpublic String getCode() {\n\t\treturn code;\r\n\t}",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"Integer getRealmId();",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public String getCode() {\n\t\treturn Code;\n\t}",
"public int getCode() {\r\n return code;\r\n }",
"public int getCode() {\r\n return code;\r\n }",
"public String getCode() {\n return this.code;\n }",
"public String getCode() {\n\t\treturn codeText.getText().toString();\n\t}",
"Code getCode();",
"public int getCode()\n {\n return code;\n }",
"public int getCode () {\n return code;\n }",
"public int getCode();",
"public int getCode() {\n\t\treturn code;\n\t}",
"public int getCode() {\r\n\t\t\treturn code;\r\n\t\t}",
"public String getAuthCode() {\n\t\treturn authCode;\n\t}",
"public com.walgreens.rxit.ch.cda.CS addNewRealmCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.CS target = null;\n target = (com.walgreens.rxit.ch.cda.CS)get_store().add_element_user(REALMCODE$0);\n return target;\n }\n }",
"public String getRealm () {\n return realm;\n }",
"long getCodeId();",
"long getCodeId();",
"long getCodeId();",
"public String getCode() {\n return (String)getAttributeInternal(CODE);\n }",
"public String getCode() { \n\t\treturn getCodeElement().getValue();\n\t}",
"public String getCode() {\n\t\treturn menuDao.getCode();\r\n\t}",
"int getCode();"
] | [
"0.69707364",
"0.69707364",
"0.6763679",
"0.6751596",
"0.6751596",
"0.672405",
"0.672405",
"0.672405",
"0.672405",
"0.672405",
"0.6722001",
"0.67202353",
"0.6707886",
"0.6678788",
"0.6666558",
"0.66260004",
"0.66195834",
"0.66195834",
"0.6611342",
"0.6611342",
"0.6611342",
"0.6611342",
"0.6611342",
"0.6611342",
"0.6611342",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.660997",
"0.66093844",
"0.66084886",
"0.66004777",
"0.6565099",
"0.6565099",
"0.6565099",
"0.6565099",
"0.6565099",
"0.6565099",
"0.6564193",
"0.6564193",
"0.6560949",
"0.65574336",
"0.65574336",
"0.65574336",
"0.65574336",
"0.65573317",
"0.6549973",
"0.65329146",
"0.64827234",
"0.6481531",
"0.64671326",
"0.64671326",
"0.6463872",
"0.6452674",
"0.6452674",
"0.6445848",
"0.6445848",
"0.64238703",
"0.6408876",
"0.6408876",
"0.6408876",
"0.6408876",
"0.6408876",
"0.64069057",
"0.6401873",
"0.6401873",
"0.63940954",
"0.6386326",
"0.6382737",
"0.6357331",
"0.6352348",
"0.6349641",
"0.63492423",
"0.6319222",
"0.62962866",
"0.6273063",
"0.6267936",
"0.62663436",
"0.62663436",
"0.62663436",
"0.6225535",
"0.62034404",
"0.6186496",
"0.61853343"
] | 0.85314316 | 0 |
Sets the realm code. | public void setRealmCode(Code realmCode) {
this.realmCode = realmCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Code getRealmCode() {\n\t\treturn realmCode;\n\t}",
"void setCode(String code);",
"public void setRealmCodeArray(com.walgreens.rxit.ch.cda.CS[] realmCodeArray)\n {\n synchronized (monitor())\n {\n check_orphaned();\n arraySetterHelper(realmCodeArray, REALMCODE$0);\n }\n }",
"void setRealm(String realm);",
"public void setCode(Code code) {\n this.Code = code;\n }",
"public void setCode(String code)\n {\n this.code = code;\n }",
"public void setCode (String code) {\r\n\t\tthis.code = code;\r\n\t}",
"public void setCode(int code) {\n this.code = code;\n }",
"public void setCode(int code) {\n this.code = code;\n }",
"public final void setCode(java.lang.String code)\n\t{\n\t\tsetCode(getContext(), code);\n\t}",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n\t\tCode = code;\n\t}",
"public void setCode(String code){\n\t\tthis.code = code;\n\t}",
"public void setCode(Long code) {\n this.code = code;\n }",
"public void setCode(Long code) {\n this.code = code;\n }",
"@Accessor(qualifier = \"code\", type = Accessor.Type.SETTER)\n\tpublic void setCode(final String value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CODE, value);\n\t}",
"public void setCode(java.lang.String code) {\r\n this.code = code;\r\n }",
"public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}",
"public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}",
"public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}",
"public void setCode (java.lang.Long code) {\r\n\t\tthis.code = code;\r\n\t}",
"public void setCode(long value) {\n this.code = value;\n }",
"protected void setCode(@Code int code) {\n\t\tthis.mCode = code;\n\t}",
"public void setCode(String code) {\n\t\tthis.code = code;\n\t}",
"public void setCode(String code) {\n\t\tthis.code = code;\n\t}",
"IPayerEntry setCode(CD value);",
"public void setRealmCodeArray(int i, com.walgreens.rxit.ch.cda.CS realmCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.CS target = null;\n target = (com.walgreens.rxit.ch.cda.CS)get_store().find_element_user(REALMCODE$0, i);\n if (target == null)\n {\n throw new IndexOutOfBoundsException();\n }\n target.set(realmCode);\n }\n }",
"public void setCode(Integer code) {\n this.code = code;\n }",
"public void setCode(String cod){\n\t\tcodeService = cod;\n\t}",
"void setCode(Integer aCode);",
"public void setCode(final int code) {\n this.code = code;\n commited = true;\n }",
"public final void setCode(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String code)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Code.toString(), code);\n\t}",
"public void setAuthorizationCode(int authorizationCode);",
"public void setCode(org.hl7.fhir.CodeableConcept code)\n {\n generatedSetterHelperImpl(code, CODE$6, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }",
"public void setCode(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CODE_PROP.get(), value);\n }",
"public void code (String code) throws LuchthavenException\r\n\t{\r\n\t\tluchthaven.setCode(code);\r\n\t}",
"public void setCode(byte[] code);",
"public void setCode(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CODE_PROP.get(), value);\n }",
"public com.walgreens.rxit.ch.cda.CS addNewRealmCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.CS target = null;\n target = (com.walgreens.rxit.ch.cda.CS)get_store().add_element_user(REALMCODE$0);\n return target;\n }\n }",
"public void setCode(String code) {\n\t\tthis.code = code == null ? null : code.trim();\n\t}",
"public void setCode(String value) {\n setAttributeInternal(CODE, value);\n }",
"public interface C4596x638dff4c {\n RedeemedCode realmGet$code();\n\n void realmSet$code(RedeemedCode redeemedCode);\n}",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"@Override\n\tpublic void setTypeCode(java.lang.String typeCode) {\n\t\t_permissionType.setTypeCode(typeCode);\n\t}",
"public void setCode(String code) {\r\n this.code = code == null ? null : code.trim();\r\n }",
"public void setCode(String code) {\r\n this.code = code == null ? null : code.trim();\r\n }",
"public void setCode(String code) {\r\n this.code = code == null ? null : code.trim();\r\n }",
"public void setCodeset (String codeset)\r\n\t{\r\n\t\tthis.codeset = codeset;\r\n\t}",
"public Builder setCode(int value) {\n bitField0_ |= 0x00000001;\n code_ = value;\n onChanged();\n return this;\n }",
"public Type setCode(BoundCodeDt<DataTypeEnum> theValue) {\n\t\tmyCode = theValue;\n\t\treturn this;\n\t}",
"public void setCode(org.openarchives.www.oai._2_0.OAIPMHerrorcodeType.Enum code)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CODE$0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CODE$0);\n }\n target.setEnumValue(code);\n }\n }",
"public void setAuthCode(String authCode) {\n this.authCode=authCode;\n }",
"public Builder setCode(int value) {\n\n code_ = value;\n onChanged();\n return this;\n }",
"public Builder setCode(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n code_ = value;\n onChanged();\n return this;\n }",
"public void setRequestCode(String requestCode);",
"public void setAuthAppCode(String authAppCode)\n\t{\n\t\tthis.authAppCode = Toolbox.trim(authAppCode, 3);\n\t}",
"public void setCode(BizCodeEnum code) {\n this.code = code;\n }",
"public void setAppCode(String appCode)\n\t{\n\t\tthis.appCode = Toolbox.trim(appCode, 3);\n\t}",
"private void setValidCode() {\n\t\tValidCode.setBounds(330, 170, 180, 30);\n\t}",
"public int set_code(String b);",
"public void setAuthCode(String authCode) {\n\t\tthis.authCode = authCode == null ? null : authCode.trim();\n\t}",
"public void setCode(OAIPMHErrorcodeType code) {\r\n this.code = code;\r\n }",
"public void setRaceCode(com.walgreens.rxit.ch.cda.CE raceCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.CE target = null;\n target = (com.walgreens.rxit.ch.cda.CE)get_store().find_element_user(RACECODE$18, 0);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.CE)get_store().add_element_user(RACECODE$18);\n }\n target.set(raceCode);\n }\n }",
"protected void setCode(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{\n\t\t\n\t\tString code = rs.getString(UiActionTable.COLUMN_CODE);\n\t\t\n\t\tif(code == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tuiAction.setCode(code);\n\t}",
"public String setCode() {\n\t\treturn null;\n\t}",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\n return _code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public void setSeasonCode(final String value)\r\n\t{\r\n\t\tsetSeasonCode( getSession().getSessionContext(), value );\r\n\t}",
"public void setMainCode(Long mainCode) {\n this.mainCode = mainCode;\n }",
"public void setCodeSet(String codeset) {\n\t\tthis.codeset = codeset;\n\t}",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }"
] | [
"0.72809666",
"0.6990442",
"0.68993735",
"0.674226",
"0.67353785",
"0.6617773",
"0.66120505",
"0.6592828",
"0.6592828",
"0.6551974",
"0.6519707",
"0.6519707",
"0.6519707",
"0.6519707",
"0.6519707",
"0.6519707",
"0.65138483",
"0.6500351",
"0.6485466",
"0.6485466",
"0.6483078",
"0.64672685",
"0.64454466",
"0.64454466",
"0.64454466",
"0.6438485",
"0.6419712",
"0.63535315",
"0.6353282",
"0.6353282",
"0.6304046",
"0.6303616",
"0.6291944",
"0.62106746",
"0.6190645",
"0.6179946",
"0.6155355",
"0.6111485",
"0.6109899",
"0.60928094",
"0.6091955",
"0.60813373",
"0.6077396",
"0.60599595",
"0.6048342",
"0.60028607",
"0.59776837",
"0.59655726",
"0.59655726",
"0.59655726",
"0.59655726",
"0.59655726",
"0.59655726",
"0.59655726",
"0.59655726",
"0.59655726",
"0.5939856",
"0.59359974",
"0.59359974",
"0.59359974",
"0.59121066",
"0.5849728",
"0.583928",
"0.5834044",
"0.583287",
"0.58092856",
"0.57605654",
"0.5735987",
"0.57033205",
"0.57018363",
"0.5668081",
"0.56610703",
"0.5651634",
"0.5647121",
"0.5634419",
"0.56017816",
"0.55287886",
"0.5515732",
"0.5499449",
"0.5499449",
"0.5499449",
"0.5499449",
"0.5499449",
"0.5499449",
"0.5499449",
"0.5496336",
"0.54930365",
"0.54930365",
"0.54930365",
"0.54930365",
"0.5479854",
"0.547975",
"0.5475242",
"0.54597336",
"0.54597336",
"0.54597336",
"0.54597336",
"0.54597336",
"0.54597336",
"0.54597336"
] | 0.785166 | 0 |
Gets the type id. | public TypeID getTypeID() {
return typeID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTypeId() {\r\n return typeId;\r\n }",
"public int getTypeId() {\n return typeId_;\n }",
"public Long getTypeId() {\r\n\t\treturn typeId;\r\n\t}",
"public Integer getTypeId() {\n return typeId;\n }",
"public String getIdType() {\n return idType;\n }",
"public TypeId getTypeId() {\r\n return typeId;\r\n }",
"public Long getTypeid() {\n return typeid;\n }",
"public int getIdType() {\r\n return idType;\r\n }",
"public int getTypeId() {\n return instance.getTypeId();\n }",
"public Integer getIdType() {\n return idType;\n }",
"public String getId_type() {\n return id_type;\n }",
"public String getId() {\n return typeDeclaration.getId();\n }",
"public String getIDType() {\n return idType;\n }",
"public BigDecimal getTypeId() {\n return typeId;\n }",
"public int getTypeId()\n {\n return (int) getKeyPartLong(KEY_CONTENTTYPEID, -1);\n }",
"int getTypeIdValue();",
"public long getType() {\r\n return type;\r\n }",
"IDType getID();",
"protected int getTypeIdFor( final String type )\n {\n if( type.equalsIgnoreCase( TYPE_CLASS_STR ) )\n {\n return TYPE_CLASS;\n }\n else\n {\n return super.getTypeIdFor( type );\n }\n }",
"public int getTypeId();",
"public int getTypeId();",
"public TypeIdentifierSnippet getTypeIdentifier() {\n return typeIdentifier;\r\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"@Override\n public String getDeviceTypeId() {\n \n return this.strTypId;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public static int getIdByType(String type)\n {\n return idTypeMap.get(type).intValue();\n }",
"public String getIdTypeName() {\n\t\treturn this.getIdType(this.currentClass()).getSimpleName();\n\t}",
"public int getType() {\n return _type;\n }",
"public int getType() {\n return _type;\n }",
"final public int getType() {\n return type;\n }",
"public int getType()\n\t\t{\n\t\t\treturn this.type;\n\t\t}",
"public int getType()\r\n {\r\n return type;\r\n }",
"public int getType()\r\n\t{\r\n\t\treturn type;\r\n\t}",
"public int getType() {\r\n\t\treturn (type);\r\n\t}",
"public int getType() {\r\n return typ;\r\n }",
"public Integer getTypeCode() {\n return typeCode;\n }",
"public Class<Long> getIdType() {\n return Long.class;\n }",
"public int getType() {\n return type;\n }",
"public int getType() {\n return type;\n }",
"public int getType() {\n return type;\n }",
"public int getType() {\n return type;\n }",
"public static native int getTypeId(long msgArg);",
"public int getType() {\r\n return type;\r\n }",
"public int getType() {\r\n return type;\r\n }",
"public int getType() {\r\n return type;\r\n }",
"public int getType()\n\t{\n\t\treturn this.type;\n\t}",
"public int getType()\n {\n return type;\n }",
"public int getType()\n {\n return type;\n }",
"public java.lang.Integer getType() {\n return type;\n }",
"public java.lang.Integer getType() {\n return type;\n }",
"public int getType()\n\t{\n\t\treturn type;\n\t}",
"public int getType() {\n\t return type;\n\t }",
"public int getType() {\n return theType;\n }",
"public int getType () {\n return type;\n }",
"public int getType () {\n return type;\n }",
"public int getType()\n {\n return this.type;\n }",
"public int getType() {\n\t\treturn this.type;\n\t}",
"public int getType() {\n\t\treturn this.type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public String getTypeCode() {\n return typeCode;\n }",
"public String getTypeCode() {\n return typeCode;\n }",
"public String getTypeCode() {\n return typeCode;\n }",
"public String getTypeCode() {\n return typeCode;\n }",
"public int getData_type_id() {\n return data_type_id;\n }",
"public int getType() {\n return this.type;\n }",
"public int getType() {\r\n\t\treturn type;\r\n\t}",
"public static String getType() {\n\t\treturn type;\n\t}",
"@Override\r\n\tpublic int getTypeId() {\n\t\treturn 0;\r\n\t}",
"public int getType() {\n return type_;\n }",
"public int getType();",
"public int getType();",
"public int getType();",
"public int getType();",
"public int getType();",
"public int getType() {\n return type;\n }",
"org.tensorflow.proto.framework.FullTypeId getTypeId();",
"public Integer getEntityTypeId() {\n // get entity type code\n String code = getEntityTypeCode();\n // check cache, (may contain null)\n if (entityTypeIdCache.containsKey(code)) {\n return entityTypeIdCache.get(code);\n }\n // query, cache, and return metadata driven ids\n EntityType entityType = getMetadata().getEntityTypeByName(code);\n Integer id = ((entityType != null) ? entityType.getEntityTypeId() : null);\n entityTypeIdCache.put(code, id);\n return id;\n }",
"public int getType(){\n\t\treturn type;\n\t}",
"public int getType(){\r\n\t\treturn type;\r\n\t}",
"public int getType () {\r\n return type;\r\n }",
"public int getType() {\n\t\treturn this.mType;\n\t}",
"@Schema(description = \"Unique identifier for this index type\")\n\tpublic String getId() {\n\t\treturn id;\n\t}",
"public com.walgreens.rxit.ch.cda.POCDMT000040InfrastructureRootTypeId getTypeId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.POCDMT000040InfrastructureRootTypeId target = null;\n target = (com.walgreens.rxit.ch.cda.POCDMT000040InfrastructureRootTypeId)get_store().find_element_user(TYPEID$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }"
] | [
"0.83973855",
"0.82877374",
"0.8272789",
"0.8271745",
"0.81853807",
"0.81849635",
"0.81553835",
"0.8103711",
"0.80955833",
"0.8091173",
"0.80779123",
"0.79435796",
"0.78180593",
"0.7672827",
"0.7587079",
"0.7522423",
"0.73945445",
"0.73669344",
"0.73611075",
"0.7329375",
"0.7329375",
"0.72621554",
"0.7253571",
"0.7253571",
"0.7253571",
"0.7253571",
"0.7253571",
"0.7253431",
"0.7253431",
"0.7245717",
"0.7224023",
"0.7224023",
"0.7224023",
"0.7224023",
"0.7224023",
"0.7224023",
"0.7224023",
"0.7202839",
"0.7176282",
"0.7170561",
"0.7170561",
"0.7151225",
"0.71376497",
"0.7125792",
"0.7106458",
"0.71024585",
"0.709134",
"0.7090572",
"0.7086071",
"0.7081361",
"0.7081361",
"0.7081361",
"0.7081361",
"0.70811754",
"0.7078352",
"0.7078352",
"0.7078352",
"0.70757514",
"0.7072998",
"0.7072998",
"0.7068975",
"0.7068975",
"0.7064244",
"0.7061539",
"0.70584005",
"0.70472294",
"0.70472294",
"0.7039036",
"0.70281",
"0.70281",
"0.7024416",
"0.7024416",
"0.7024416",
"0.7024416",
"0.7024416",
"0.7024416",
"0.7021533",
"0.7021533",
"0.7021533",
"0.7021533",
"0.7019993",
"0.70178384",
"0.7011432",
"0.7008554",
"0.6998179",
"0.6990667",
"0.6988255",
"0.6988255",
"0.6988255",
"0.6988255",
"0.6988255",
"0.6978826",
"0.6944968",
"0.6937598",
"0.6934603",
"0.6928412",
"0.69231784",
"0.6922225",
"0.6913187",
"0.6911864"
] | 0.8238795 | 4 |
Sets the type id. | public void setTypeID(TypeID typeID) {
this.typeID = typeID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setType(int id) {\n _type = id;\n }",
"public void setIdType(int idType) {\r\n this.idType = idType;\r\n }",
"public void setId_type(String id_type) {\n this.id_type = id_type;\n }",
"public void setIdType(Integer idType) {\n this.idType = idType;\n }",
"private void setTypeId(int value) {\n \n typeId_ = value;\n }",
"public void setTypeId(Integer typeId) {\n this.typeId = typeId;\n }",
"public void setTypeId(Long typeId) {\r\n\t\tthis.typeId = typeId;\r\n\t}",
"public void setIdType(String idType) {\n this.idType = idType == null ? null : idType.trim();\n }",
"public void setTypeId(String typeId) {\r\n\t\t\tthis.typeId = typeId;\r\n\t\t}",
"public void setTypeid(Long typeid) {\n this.typeid = typeid;\n }",
"public void setTypeId(String typeId) {\r\n this.typeId = typeId == null ? null : typeId.trim();\r\n }",
"protected void setTypeId(String typeId) {\n\t\tcontext.getElement().setAttribute(\"typeId\", \"org.csstudio.opibuilder.widgets.\" + typeId);\n\t}",
"public void setData_type_id(int data_type_id) {\n this.data_type_id = data_type_id;\n }",
"public void setTypeId(com.walgreens.rxit.ch.cda.POCDMT000040InfrastructureRootTypeId typeId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.POCDMT000040InfrastructureRootTypeId target = null;\n target = (com.walgreens.rxit.ch.cda.POCDMT000040InfrastructureRootTypeId)get_store().find_element_user(TYPEID$2, 0);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.POCDMT000040InfrastructureRootTypeId)get_store().add_element_user(TYPEID$2);\n }\n target.set(typeId);\n }\n }",
"public void setTypeId(final ReferenceTypeId typeId);",
"public Builder setTypeId(int value) {\n copyOnWrite();\n instance.setTypeId(value);\n return this;\n }",
"public String getTypeId() {\r\n return typeId;\r\n }",
"public void setType(int type) {\n type_ = type;\n }",
"public void setType( int type ) {\r\n typ = type;\r\n }",
"public void setType(int t){\n this.type = t;\n }",
"public void setTypeId(BigDecimal typeId) {\n this.typeId = typeId;\n }",
"public void setType(int t) {\r\n\t\ttype = t;\r\n\t}",
"public void setType(long type) {\r\n this.type = type;\r\n }",
"public void setType (int type) {\n this.type = type;\n }",
"public void setType (int type) {\n this.type = type;\n }",
"public void xsetType(org.apache.xmlbeans.XmlInt type)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_attribute_user(TYPE$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlInt)get_store().add_attribute_user(TYPE$2);\n }\n target.set(type);\n }\n }",
"public void setType(int type) {\r\n this.type = type;\r\n }",
"public void setType(int type) {\r\n this.type = type;\r\n }",
"public Long getTypeId() {\r\n\t\treturn typeId;\r\n\t}",
"public void setType(int atype)\n {\n type = atype;\n }",
"@Test\r\n public void testSetTypeId() {\r\n System.out.println(\"setTypeId\");\r\n int tid = 0;\r\n \r\n instance.setTypeId(tid);\r\n assertEquals(tid, instance.getTypeId());\r\n \r\n }",
"public void setType(int type) {\n this.type = type;\n }",
"public int getTypeId() {\n return typeId_;\n }",
"public TypeId getTypeId() {\r\n return typeId;\r\n }",
"public void setType(String type);",
"public void setType(String type);",
"public void setType(String type);",
"public void setType(final int t) {\n\t\ttype = t;\n\t}",
"public void setType(int type)\n\t{\n\t\tthis.type = type;\n\t}",
"public Integer getTypeId() {\n return typeId;\n }",
"public void setType(int type) {\n\t\tthis.type = type;\n\t}",
"public void setType(Type t) {\n type = t;\n }",
"public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }",
"public void setType(int type)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TYPE$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TYPE$2);\n }\n target.setIntValue(type);\n }\n }",
"void setType(Type type)\n {\n this.type = type;\n }",
"private void setType(String type) {\n mType = type;\n }",
"public void set_type(String t)\n {\n type =t;\n }",
"void setType(java.lang.String type);",
"public final void setType(String type){\n\t\tthis.type = type;\t\n\t}",
"void setType(String type) {\n this.type = type;\n }",
"public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}",
"public void setType(int value) {\n this.type = value;\n }",
"public void setType(java.lang.Integer type) {\n this.type = type;\n }",
"public void setType(java.lang.Integer type) {\n this.type = type;\n }",
"public void setType (String typ) {\n type = typ;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"final public void setType(String type)\n {\n setProperty(TYPE_KEY, (type));\n }",
"void setTxnTypeId(int id)\t{\n\t\tmType = TransactionTypeEnum.getTransactionType(id);\n\t}",
"public void setType(String type){\n \tthis.type = type;\n }",
"public void setType(Integer type) {\r\n\t\tthis.type = type;\r\n\t}",
"public void setType(Type t) {\n\t\ttype = t;\n\t}",
"public void setTypeId(int systemTypeId)\n {\n mSystemTypeId = systemTypeId;\n }",
"public void setType(Type type){\n\t\tthis.type = type;\n\t}",
"public void setType(String type){\r\n if(type == null){\r\n throw new IllegalArgumentException(\"Type can not be null\");\r\n }\r\n this.type = type;\r\n }",
"public void setType( Type type ) {\n assert type != null;\n this.type = type;\n }",
"public void setType(String type) \n {\n this.type = type;\n }",
"public void setId_types(HashMap<String, Integer> id_types) {\n this.id_types = id_types;\n }",
"public void setType(Integer type) {\n\t\tthis.type = type;\n\t}",
"public static void setType(String type) {\n Globals.type = type;\n setProperty(\"type\", type);\n }",
"void setDataType(int type );",
"public final void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(Type type) {\n this.type = type;\n }",
"public void setType(Type type) {\n this.type = type;\n }",
"public void setType(Type type) {\n this.type = type;\n }",
"public void setType(int nType) { m_nType = nType; }",
"public void setType (String type) {\n this.type = type;\n }",
"public void setType (String type) {\n this.type = type;\n }",
"public void setType (String type) {\n this.type = type;\n }",
"public String getId_type() {\n return id_type;\n }",
"public void setIdForDataType(String idForDataType) {\n this.idForDataType = idForDataType;\n }",
"public void setType (String type) { n.setAttribute(ATTNAMECOMMONPREFIX + ATTNAMESUFFIX_TYPE , type); }",
"@JsonIgnore\r\n public void setType(URI type) {\r\n this.type = type == null ? null : new TypeReference<AlternateIdType>(type);\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\n m_Type = type;\n }",
"public void setType( String type )\n {\n this.type = type;\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(gov.nih.nci.calims2.domain.common.Type type) {\n this.type = type;\n }",
"@Override\n public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type){\n this.type = type;\n }"
] | [
"0.84891677",
"0.8368016",
"0.83582276",
"0.8252013",
"0.8155177",
"0.8090878",
"0.7900213",
"0.78983575",
"0.77609664",
"0.7746289",
"0.76882064",
"0.76499397",
"0.75411856",
"0.7431074",
"0.7337556",
"0.7278675",
"0.69538635",
"0.6943699",
"0.6933767",
"0.691121",
"0.6905413",
"0.68814194",
"0.68628335",
"0.6853014",
"0.6853014",
"0.6848068",
"0.682689",
"0.682689",
"0.6822374",
"0.6792657",
"0.67694944",
"0.676723",
"0.6766603",
"0.67607665",
"0.6722498",
"0.6722498",
"0.6722498",
"0.6713638",
"0.67127585",
"0.6697192",
"0.6675645",
"0.6666888",
"0.6663879",
"0.66587865",
"0.663194",
"0.6617397",
"0.6596535",
"0.6587136",
"0.6571867",
"0.65709645",
"0.65680087",
"0.6565896",
"0.6555344",
"0.6555344",
"0.6549664",
"0.6537916",
"0.6537916",
"0.6537916",
"0.6537916",
"0.6537916",
"0.6537916",
"0.6537916",
"0.65347785",
"0.65244687",
"0.6509825",
"0.65076137",
"0.64899236",
"0.6477295",
"0.64630425",
"0.6455557",
"0.6453454",
"0.64523315",
"0.6450912",
"0.6448238",
"0.644725",
"0.643764",
"0.64336634",
"0.6432739",
"0.6431688",
"0.6425623",
"0.6425623",
"0.6425623",
"0.64232785",
"0.64191157",
"0.64191157",
"0.64191157",
"0.6416681",
"0.6412651",
"0.64125293",
"0.64102817",
"0.6406512",
"0.6406512",
"0.6406512",
"0.6406512",
"0.6404448",
"0.6403784",
"0.63889676",
"0.63866866",
"0.6384744",
"0.63819915"
] | 0.7393743 | 14 |
Gets the template id. | public TemplateID getTemplateID() {
return templateID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String templateId() {\n return this.templateId;\n }",
"public java.lang.String getTemplateId() {\n java.lang.Object ref = templateId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n templateId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public int getTemplateId() {\n return templateId;\n }",
"public String getTemplateId() {\n\t\treturn templateId;\n\t}",
"public Long getTemplateId() {\r\n return templateId;\r\n }",
"public Integer getTemplateid() {\n return templateid;\n }",
"@java.lang.Override\n public java.lang.String getTemplateId() {\n java.lang.Object ref = templateId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n templateId_ = s;\n return s;\n }\n }",
"@DISPID(86)\r\n\t// = 0x56. The runtime will prefer the VTID if present\r\n\t@VTID(84)\r\n\tint templateID();",
"@DISPID(2)\r\n\t// = 0x2. The runtime will prefer the VTID if present\r\n\t@VTID(8)\r\n\tint templateID();",
"public com.google.protobuf.ByteString\n getTemplateIdBytes() {\n java.lang.Object ref = templateId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n templateId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getTemplateIdBytes() {\n java.lang.Object ref = templateId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n templateId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getAuthTemplateId() {\n return getProperty(Property.AUTH_TEMPLATE_ID);\n }",
"java.lang.String getTemplateId();",
"@ApiModelProperty(value = \"The id of the template\")\n public String getId() {\n return id;\n }",
"public int getTemplateId(Statement stmt, String templateName){\n\t\tint templateId = 0;\n\t\tString query = \"select templateId from ExporterTemplates where templateName ='\"+templateName + \"'\";\n\t\ttry{\n\t\t\trs = stmt.executeQuery(query);\n\t\t\trs.next();\n\t\t\ttemplateId = rs.getInt(\"templateId\");\n\t\t}catch(SQLException se){\n\t\t\tSystem.out.println(\"Error to fetch Template ID\");\n\t\t\tSystem.err.println(se.getMessage());\n\t\t\t\n\t\t}\n\t\treturn templateId;\n\t}",
"public int getVorlageShopObjectID(int templateId);",
"com.google.protobuf.ByteString\n getTemplateIdBytes();",
"@DISPID(124)\r\n\t// = 0x7c. The runtime will prefer the VTID if present\r\n\t@VTID(119)\r\n\tint templatePID();",
"@DISPID(14) //= 0xe. The runtime will prefer the VTID if present\n @VTID(20)\n int templateID();",
"@DISPID(122)\r\n\t// = 0x7a. The runtime will prefer the VTID if present\r\n\t@VTID(117)\r\n\tint targetTemplateID();",
"public int getPropertyId(int templateId, String templateproperty){\n\t\t\n \tint id=0;\n \t\n\t\tString sql = \"select id from templateproperty where \"\n\t\t\t\t+\" idtemplate=\"+templateId\n\t\t\t\t+\" AND \"\n\t\t\t\t+ \" templateproperty=\\\"\" +templateproperty+\"\\\"\";\n\t\t\n\t\ttry {\n\t\t\t// prepared statement para inserção\n\t\t\tConnection con = DatabaseConnectionFactory.getConnection();\n \t\n\t\t\tPreparedStatement stmt = con.prepareStatement(sql);\n\n\t\t\tResultSet rs = stmt.executeQuery();\n \n if(rs.next()) {\n // criando o objeto TemplateProperty\n \n \t id=rs.getInt(\"id\");\n\n }\n\n\t\t\tstmt.close();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\treturn id;\n\t}",
"Template getTemplateById(String templateId) throws NotificationClientException;",
"public void setTemplateId(int tmp) {\n this.templateId = tmp;\n }",
"protected String getTemplateEngineId( HttpServletRequest request )\n {\n return (String) request.getParameter( TEMPLATE_ENGINE_ID_HTTP_PARAM );\n }",
"public String getTemplateName() {\n return templateName;\n }",
"public java.lang.String getQuestTemplateId() {\n java.lang.Object ref = questTemplateId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n questTemplateId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getTemplateName() {\r\n\t\treturn templateName;\r\n\t}",
"public String getTemplateName() {\n\t\treturn templateName;\n\t}",
"public String getUniqueId() {\n return getCurrentInstance().getViewRoot().createUniqueId();\n }",
"public static String getTemplate(String template) {\n return templates.get(template);\n }",
"public void setTemplateId(Long templateId) {\r\n this.templateId = templateId;\r\n }",
"public java.lang.Object getTemplateName() {\n return templateName;\n }",
"public static String id()\n {\n return _id;\n }",
"public void setTemplateId(String templateId) {\n\t\tthis.templateId = templateId;\n\t}",
"public abstract Integer getTemplId();",
"public Template getTemplate(String templateID) {\r\n // Gets the templates collection and creates a query string for the template id\r\n MongoCollection templates = mongoDB.getCollection(\"Templates\");\r\n Document query = new Document(\"_id\", new ObjectId(templateID));\r\n\r\n // Loops over templates found matching the id, returning the first one\r\n for (Template template : (FindIterable<Template>) templates.find(query, Template.class)) {\r\n return template;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }",
"public java.lang.String getInvoiceTemplateId() {\n return invoiceTemplateId;\n }",
"public String getId() {\n\t\treturn this.token.get(\"id\").toString();\n\t}",
"public void setTemplateid(Integer templateid) {\n this.templateid = templateid;\n }",
"public String getObservationTemplateIdentifier() {\n return observationTemplateIdentifier;\n }",
"@java.lang.Override\n public java.lang.String getQuestTemplateId() {\n java.lang.Object ref = questTemplateId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n questTemplateId_ = s;\n return s;\n }\n }",
"public String getTemplateName()\n {\n return MY_TEMPLATE;\n }",
"public String getTemplateCode() {\n return templateCode;\n }",
"String getTemplate();",
"public Integer getId() {\n return id.get();\n }",
"java.lang.String getID();",
"Integer getID();",
"Integer getID();",
"public String getTemplateFilename() {\n\t\treturn templateFilename;\n\t}",
"public int getId() {\n if (!this.registered)\n return -1;\n return id;\n }",
"public abstract NoticeTemplate getNoticeTemplate(String templateId);",
"public Integer getTemplatenodeid() {\n return templatenodeid;\n }",
"public long getId() {\n\t\treturn getTo(true).getId();\n\t}",
"public String getId() {\n if (id == null)\n return \"\"; //$NON-NLS-1$\n return id;\n }",
"java.lang.String getDocumentId();",
"public static int getCurrentId() {\n return currentId;\n }",
"public void setTemplateId(String tmp) {\n this.setTemplateId(Integer.parseInt(tmp));\n }",
"@NonNull\n public final synchronized String getId() {\n if (id == null) {\n id = UUID.randomUUID().toString();\n }\n return id;\n }",
"String getContentGeneratorId();",
"public Integer getChartTemplateId() {\n return chartTemplateId;\n }",
"public final String getId() {\r\n\t\treturn id;\r\n\t}",
"public long getId() {\n\t\treturn _tempNoTiceShipMessage.getId();\n\t}",
"Template getTemplateVersion(String templateId, int version) throws NotificationClientException;",
"public String getId()\n\t{\n\t\treturn getId( getSession().getSessionContext() );\n\t}",
"public String getID(){\n return this.getKey().getTenantId(this.getTenantName());\n }",
"public java.lang.Integer getId () {\n\t\treturn _id;\n\t}",
"public String id() {\n return definition.getString(ID);\n }",
"String getUniqueId();",
"public java.lang.String getId() {\n return _id;\n }",
"String getID();",
"String getID();",
"String getID();",
"String getID();",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public java.lang.Integer getId () {\n\t\treturn id;\n\t}",
"public static int getIdNumber() {\n return idNumber;\n }",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();"
] | [
"0.812126",
"0.79534745",
"0.795009",
"0.7886245",
"0.7869361",
"0.7831347",
"0.7810787",
"0.7469136",
"0.73521805",
"0.72859776",
"0.7231599",
"0.71172374",
"0.70620257",
"0.7058968",
"0.6810181",
"0.6717017",
"0.6702229",
"0.66724455",
"0.6525175",
"0.64860386",
"0.6363873",
"0.6308695",
"0.6306373",
"0.6270935",
"0.6254032",
"0.6244514",
"0.62410915",
"0.6237261",
"0.6198379",
"0.6156962",
"0.6142807",
"0.61369556",
"0.61056775",
"0.6089927",
"0.60880214",
"0.60786873",
"0.60719925",
"0.60674596",
"0.6063849",
"0.60458666",
"0.597895",
"0.59762955",
"0.59673077",
"0.5952859",
"0.59434456",
"0.5934655",
"0.5890628",
"0.5890628",
"0.5885566",
"0.58649457",
"0.58534247",
"0.585203",
"0.584",
"0.582066",
"0.58195585",
"0.58139515",
"0.5813852",
"0.5802912",
"0.5797762",
"0.5790075",
"0.57817173",
"0.5776593",
"0.5775728",
"0.5772678",
"0.57633704",
"0.5754601",
"0.5739589",
"0.573801",
"0.57290137",
"0.5728823",
"0.5728823",
"0.5728823",
"0.5728823",
"0.57250977",
"0.57250977",
"0.57250977",
"0.57250977",
"0.57250977",
"0.57250977",
"0.57250977",
"0.57250977",
"0.57250977",
"0.57250977",
"0.57250977",
"0.57210094",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961",
"0.5719961"
] | 0.7589564 | 7 |
Sets the template id. | public void setTemplateID(TemplateID templateID) {
this.templateID = templateID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTemplateId(int tmp) {\n this.templateId = tmp;\n }",
"public void setTemplateid(Integer templateid) {\n this.templateid = templateid;\n }",
"public void setTemplateId(Long templateId) {\r\n this.templateId = templateId;\r\n }",
"public abstract void setTemplId(Integer templId);",
"public Builder setTemplateId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n templateId_ = value;\n onChanged();\n return this;\n }",
"public void setTemplateId(String tmp) {\n this.setTemplateId(Integer.parseInt(tmp));\n }",
"public void setTemplateId(String templateId) {\n\t\tthis.templateId = templateId;\n\t}",
"void setTemplate(ITemplateKey key, Template template);",
"@ApiModelProperty(value = \"The id of the template\")\n public String getId() {\n return id;\n }",
"public Integer getTemplateid() {\n return templateid;\n }",
"public String templateId() {\n return this.templateId;\n }",
"public int getTemplateId() {\n return templateId;\n }",
"public void setTemplate(Template template)\n/* */ {\n/* 62 */ this.template = template;\n/* */ }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public Long getTemplateId() {\r\n return templateId;\r\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setTemplateIdArray(int i, com.walgreens.rxit.ch.cda.II templateId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.II target = null;\n target = (com.walgreens.rxit.ch.cda.II)get_store().find_element_user(TEMPLATEID$4, i);\n if (target == null)\n {\n throw new IndexOutOfBoundsException();\n }\n target.set(templateId);\n }\n }",
"public String getTemplateId() {\n\t\treturn templateId;\n\t}",
"public void setId (String id)\n {\n _id = id;\n }",
"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.String value) {\n this.id = value;\n }",
"public void setId(int value) {\r\n this.id = value;\r\n }",
"private void setId(Integer id) { this.id = id; }",
"public Builder setTemplateIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n templateId_ = value;\n onChanged();\n return this;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"@SuppressWarnings(\"unused\")\n private void setId(Integer id) {\n this.id = id;\n }",
"@DISPID(14) //= 0xe. The runtime will prefer the VTID if present\n @VTID(21)\n void templateID(\n int pVal);",
"void setId(int id) {\n this.id = id;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"@Override\r\n\tpublic void setId(final K id) {\n\t\tsuper.setId(id);\r\n\t}",
"public void setId(int id){\r\n this.id = id;\r\n }",
"@Override\n public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId (long id)\r\n {\r\n _id = id;\r\n }",
"@Override\n public void setId(int id) {\n this.id = id;\n }",
"public void setId(java.lang.Integer _id)\n {\n id = _id;\n }",
"public void setId(Integer value) {\n this.id = value;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id_)\n\t{\n\t\tthis.id=id_;\n\t}",
"public void setId(String id)\n {\n data().put(_ID, id);\n }",
"public void setId(String id) {\n _id = id;\n }",
"public void setId( Integer id )\n {\n this.id = id ;\n }",
"public void setId(String id) {\r\n this.id = id;\r\n }",
"public void setId(String id){\r\n\t\tthis.id = id;\r\n\t}",
"public void setTemplatenodeid(Integer templatenodeid) {\n this.templatenodeid = templatenodeid;\n }",
"public void setId (String id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }"
] | [
"0.76208365",
"0.7390925",
"0.72089416",
"0.704378",
"0.7017167",
"0.6976607",
"0.6808855",
"0.6450954",
"0.63822395",
"0.6254747",
"0.6219802",
"0.6189664",
"0.616216",
"0.615863",
"0.6121741",
"0.61163473",
"0.61045355",
"0.60423076",
"0.59753656",
"0.59666663",
"0.59666663",
"0.59602016",
"0.59602016",
"0.59602016",
"0.59552234",
"0.5952806",
"0.5939482",
"0.59371644",
"0.59371644",
"0.59371644",
"0.59371644",
"0.59371644",
"0.59371644",
"0.59371644",
"0.5886455",
"0.58842635",
"0.5883858",
"0.58812875",
"0.58812875",
"0.58812875",
"0.58812875",
"0.58812875",
"0.58812875",
"0.58812875",
"0.58812875",
"0.58812875",
"0.58775556",
"0.58772236",
"0.58736527",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.58701146",
"0.5862341",
"0.5860827",
"0.5855453",
"0.5847263",
"0.5840368",
"0.58374864",
"0.5835963",
"0.5835963",
"0.5835963",
"0.5835963",
"0.5825583",
"0.5821301",
"0.5819351",
"0.58164686",
"0.58155775",
"0.5812789",
"0.5811193",
"0.5808779",
"0.5805142",
"0.5805142"
] | 0.6835829 | 6 |
Gets the represented organization. | public RepresentedOrganization getRepresentedOrganization() {
return representedOrganization;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Organization getOrganization() {\n return organization;\n }",
"public Organization getOrganization() {\n return organization;\n }",
"public String getOrganization() {\n return organization;\n }",
"public Organization getOrganization(){\r\n\t\treturn organization;\r\n\t}",
"public String getOrganization() {\n\t\treturn organization;\n\t}",
"public VOOrganization getOrganization() {\n\n if (organization == null) {\n organization = new VOOrganization();\n FacesContext fc = FacesContext.getCurrentInstance();\n Locale locale = fc.getViewRoot().getLocale();\n organization.setLocale(locale.toString());\n }\n return organization;\n }",
"public String organization() {\n return this.organization;\n }",
"public String getOrganization ()\n {\n return this.organization;\n }",
"String getOrganization();",
"public final String getOrganisation() {\n return organisation;\n }",
"public com.hps.july.persistence.Organization getOrganization() throws java.rmi.RemoteException, javax.ejb.FinderException;",
"public com.hps.july.persistence.OrganizationAccessBean getOrganization() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n instantiateEJB();\n com.hps.july.persistence.Organization localEJBRef = ejbRef().getOrganization();\n if ( localEJBRef != null )\n return new com.hps.july.persistence.OrganizationAccessBean(localEJBRef);\n else\n return null;\n }",
"@AutoEscape\n\tpublic String getOrganization();",
"public Organisation getOrganisation() {\n\t\tif (null == organisation) {\n\t\t\t//Load the Organisation with the given orgPrefix\n\t\t\tString orgPrefix = ConfigurationFactory.getConfiguration(Configuration.DEPLOYMENT_CONFIG_HIERA_ORGANISATION_PREFIX);\n\t\t\tif (StringUtils.isBlank(orgPrefix)) {\n\t\t\t\tthrow new IllegalArgumentException(\"No Organisation prefix specified (\" + Configuration.DEPLOYMENT_CONFIG_HIERA_ORGANISATION_PREFIX + \")\");\n\t\t\t}\n\t\t\torganisation = ConfigurationFactory.getOrganisations().get(orgPrefix);\n\t\t\tif (organisation == null) {\n\t\t\t\tthrow new IllegalArgumentException(\"No Organisation (\" + ConfigurationFactory.ORGANISATIONS + \") found with prefix: \" + orgPrefix);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn organisation;\n\t}",
"@Schema(example = \"Passbase Inc.\", description = \"Name of the organization that owns this project\")\n public String getOrganization() {\n return organization;\n }",
"public String getOrganizationId() {\n return organizationId;\n }",
"public String getOrganizationId() {\r\n return organizationId;\r\n }",
"public Number getOrganizationId() {\n return (Number)getAttributeInternal(ORGANIZATIONID);\n }",
"public Long getOrganizationId() {\n return organizationId;\n }",
"public Long getOrganizationId() {\n return organizationId;\n }",
"Party getOrganizationParty();",
"public\t Organization getOrganizationHeader()\n { return (Organization) this.getHeader(OrganizationHeader.NAME); }",
"OrganizationMaster getOrganization(Long uniqueId);",
"public String getType() {\n\t\t\treturn \"organization\";\n\t\t}",
"@Override\n\tpublic OrganizationVO getOrganization(String name) throws RemoteException {\n\t\treturn new OrganizationVO(\"1\",Organizationtype.hall);\n\t}",
"public String getOrganizationName() {\n return (orgName);\n }",
"public java.lang.String getOrgName() {\n return OrgName;\n }",
"public java.lang.String getId_Organization() {\n return id_Organization;\n }",
"public String getOrganizationCode() {\n return organizationCode;\n }",
"public StrColumn getOrganisation() {\n return delegate.getColumn(\"organisation\", DelegatingStrColumn::new);\n }",
"@Override\n\tpublic TbOrg getOwnOrg() {\n\t\treturn tbOrgMapper.getOwnOrg();\n\t}",
"public Number getOrgId() {\n return (Number)getAttributeInternal(ORGID);\n }",
"public OrgDo getOrg(Integer id);",
"public String getOrganizationName() {\n\n \n return organizationName;\n\n }",
"public java.lang.String getOrgName() {\n return orgName;\n }",
"public String getOrgan() {\n\t\treturn this.organ;\n\t}",
"public java.lang.String getOrganizationType() {\n return organizationType;\n }",
"public String getOrgName() {\n return orgName;\n }",
"public Number getOrgId() {\n return (Number) getAttributeInternal(ORGID);\n }",
"public Long getOrgId() {\n return orgId;\n }",
"public Long getOrgId() {\n return orgId;\n }",
"public Long getOrgId() {\n return orgId;\n }",
"public Long getOrgId() {\n return orgId;\n }",
"public Long getOrgId() {\n return orgId;\n }",
"public String getOrgName() {\r\n return orgName;\r\n }",
"public java.lang.String getOrganizationId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORGANIZATIONID$4, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public com.microsoft.schemas._2003._10.serialization.Guid xgetOrganizationId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas._2003._10.serialization.Guid target = null;\r\n target = (com.microsoft.schemas._2003._10.serialization.Guid)get_store().find_element_user(ORGANIZATIONID$4, 0);\r\n return target;\r\n }\r\n }",
"public long getOrganizationId();",
"public String getJdOrg() {\r\n\t\treturn jdOrg;\r\n\t}",
"public long getOrgId() {\r\n return orgId;\r\n }",
"public Banking_organizationPersistence getBanking_organizationPersistence() {\n return banking_organizationPersistence;\n }",
"public String getOrganId() {\n return organId;\n }",
"public OrgUnit getOrgUnit() {\n return OrgUnitDao.getOrgUnitByRefId(getOrgUnitRefId());\n }",
"public String getOrgId() {\n\t\treturn orgId;\n\t}",
"public String getOrgname() {\n return orgname;\n }",
"public Account getOrganizationOwnerAccount() {\n return organizationOwnerAccount;\n }",
"@AutoEscape\n\tpublic String getOrgId();",
"@Override\n\tpublic java.lang.String getEsfOrganization() {\n\t\treturn _esfShooterAffiliationChrono.getEsfOrganization();\n\t}",
"public String getOrganizationType() {\n\t\treturn organizationType;\n\t}",
"public String getOrganizationText() {\n return organizationText;\n }",
"public Integer getOrgId() {\n\t\treturn orgId;\n\t}",
"@JsonIgnore public Organization getAuthenticator() {\n return (Organization) getValue(\"authenticator\");\n }",
"public Organisation getOwner() {\n for (final DeviceAuthorization authorization : this.authorizations) {\n if (authorization.getFunctionGroup().equals(DeviceFunctionGroup.OWNER)) {\n return authorization.getOrganisation();\n }\n }\n\n return null;\n }",
"@ApiModelProperty(value = \"Details of the organization as provided to the issuer.\")\n public OrganizationDetails getOrgDetails() {\n return orgDetails;\n }",
"String organizationId();",
"public String getOrgCode() {\n return orgCode;\n }",
"public String getOrgCode() {\n return orgCode;\n }",
"String organizationName();",
"public String getOrganizationUrl() {\n\n \n return organizationUrl;\n\n }",
"public String getOrgNo() {\r\n return orgNo;\r\n }",
"public BigDecimal getOrgId() {\n return orgId;\n }",
"public String getOrgNm()\n\t{\n\t\treturn mOrgNm;\n\t}",
"@Override\n public Banking_organization getBanking_organization(\n long banking_organizationID) throws PortalException, SystemException {\n return banking_organizationPersistence.findByPrimaryKey(banking_organizationID);\n }",
"public EmailAddress getOrganizer() throws ServiceLocalException {\n\t\treturn (EmailAddress) this.getPropertyBag()\n\t\t\t\t.getObjectFromPropertyDefinition(AppointmentSchema.Organizer);\n\t}",
"public com.hps.july.persistence.OrganizationAccessBean getOwner() {\n\treturn owner;\n}",
"@Override\n public long getOrganizationId() {\n return _usersCatastropheOrgs.getOrganizationId();\n }",
"public com.hps.july.persistence.OrganizationKey getOrganizationKey() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((com.hps.july.persistence.OrganizationKey) __getCache(\"organizationKey\")));\n }",
"public String getOrganizationAddress() {\n\n \n return organizationAddress;\n\n }",
"public Long gettOrganizationId() {\n\t\treturn tOrganizationId;\n\t}",
"public java.lang.CharSequence getKdOrg() {\n return kd_org;\n }",
"public Integer getOrgCode() {\n\t\treturn orgCode;\n\t}",
"public java.lang.CharSequence getKdOrg() {\n return kd_org;\n }",
"@JsonGetter(\"orgId\")\r\n public long getOrgId ( ) { \r\n return this.orgId;\r\n }",
"public String gettOrganizationCode() {\n\t\treturn tOrganizationCode;\n\t}",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public Organization get(Integer parseInt) throws SQLException {\n\t\tlogger.info(\"[Organization] get({})\", parseInt);\n\t\treturn organizationDao.queryForId(parseInt);\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getConsortium() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CONSORTIUM_PROP.get());\n }",
"public OrganizationHistory organizationHistory() {\n return this.organizationHistory;\n }"
] | [
"0.8019893",
"0.8019893",
"0.79032314",
"0.79006714",
"0.7842097",
"0.7763177",
"0.774217",
"0.7698416",
"0.7525443",
"0.75053674",
"0.7431401",
"0.73406786",
"0.73134047",
"0.71851784",
"0.70756114",
"0.7073249",
"0.70446616",
"0.7032865",
"0.70033795",
"0.70033795",
"0.69923794",
"0.69632524",
"0.6915498",
"0.6894989",
"0.68837106",
"0.68640816",
"0.682486",
"0.6794444",
"0.679001",
"0.67735785",
"0.6759895",
"0.6729091",
"0.67077434",
"0.67042094",
"0.66989934",
"0.6696968",
"0.6686153",
"0.6680937",
"0.66693306",
"0.66476846",
"0.66476846",
"0.66476846",
"0.66476846",
"0.66476846",
"0.6644786",
"0.6633531",
"0.6626091",
"0.6624571",
"0.66150767",
"0.65827113",
"0.6549978",
"0.65175253",
"0.64986163",
"0.64850324",
"0.6438659",
"0.6426952",
"0.64090115",
"0.6406046",
"0.6399225",
"0.6380794",
"0.63736767",
"0.6352923",
"0.6321607",
"0.63208276",
"0.6304527",
"0.6300673",
"0.6300673",
"0.62872195",
"0.6282872",
"0.6228618",
"0.621922",
"0.6216166",
"0.6203343",
"0.6170833",
"0.61684626",
"0.614745",
"0.6123469",
"0.6110272",
"0.6055726",
"0.6030611",
"0.5992299",
"0.5980182",
"0.5979945",
"0.59709936",
"0.5953254",
"0.5953254",
"0.5953254",
"0.5953254",
"0.5953254",
"0.5953254",
"0.5953254",
"0.5953254",
"0.5953254",
"0.5953254",
"0.5953254",
"0.5953254",
"0.5953254",
"0.59489733",
"0.594087",
"0.5906543"
] | 0.7639988 | 8 |
Sets the represented organization. | public void setRepresentedOrganization(RepresentedOrganization representedOrganization) {
this.representedOrganization = representedOrganization;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOrganization(com.hps.july.persistence.Organization anOrganization) throws java.rmi.RemoteException;",
"protected void setOrganization(String organization) {\n this.organization = organization;\n }",
"public void setOrganization(Organization organization){\r\n\t\tthis.organization = organization;\r\n\t}",
"public void setOrganization(String organization);",
"public void setOrganization(Organization organization) {\n this.organization = organization;\n }",
"public void setOrganization(Organization organization) {\n this.organization = organization;\n }",
"public void setOrganization(com.hps.july.persistence.Organization arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().setOrganization(arg0);\n }",
"public void setOrganization(String organization) {\n\t\tthis.organization = organization;\n\t}",
"public final void setOrganisation(String value) {\n organisation = value;\n }",
"public void secondarySetOrganization(com.hps.july.persistence.Organization anOrganization) throws java.rmi.RemoteException;",
"public void xsetOrganizationId(com.microsoft.schemas._2003._10.serialization.Guid organizationId)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas._2003._10.serialization.Guid target = null;\r\n target = (com.microsoft.schemas._2003._10.serialization.Guid)get_store().find_element_user(ORGANIZATIONID$4, 0);\r\n if (target == null)\r\n {\r\n target = (com.microsoft.schemas._2003._10.serialization.Guid)get_store().add_element_user(ORGANIZATIONID$4);\r\n }\r\n target.set(organizationId);\r\n }\r\n }",
"public void setOrganizationId(long organizationId);",
"public void setOrganizationId(java.lang.String organizationId)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORGANIZATIONID$4, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ORGANIZATIONID$4);\r\n }\r\n target.setStringValue(organizationId);\r\n }\r\n }",
"public void secondarySetOrganization(com.hps.july.persistence.Organization arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().secondarySetOrganization(arg0);\n }",
"public void setOrganizationId(Number value) {\n setAttributeInternal(ORGANIZATIONID, value);\n }",
"public String getOrganization() {\n return organization;\n }",
"public Organization getOrganization(){\r\n\t\treturn organization;\r\n\t}",
"@Override\n public void setOrganizationId(long organizationId) {\n _usersCatastropheOrgs.setOrganizationId(organizationId);\n }",
"public String getOrganization() {\n\t\treturn organization;\n\t}",
"public boolean setOrganization(String organize)\n {\n this.organization = organize;\n System.out.print(\"Publishing organization information written successfully\\n\");\n return true;\n }",
"public void setId_Organization(java.lang.String id_Organization) {\n this.id_Organization = id_Organization;\n }",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setOrganizationText(String organizationText) {\n this.organizationText = organizationText;\n }",
"public String getOrganization ()\n {\n return this.organization;\n }",
"public void setOrganizationAddress(String organizationAddress) {\n \n this.organizationAddress = organizationAddress;\n\n }",
"public String organization() {\n return this.organization;\n }",
"public void setOrgId(String orgId);",
"public void setOrgId(Number value) {\n setAttributeInternal(ORGID, value);\n }",
"public void setOrgId(Number value) {\n setAttributeInternal(ORGID, value);\n }",
"public void setOrganizationId(String organizationId) {\r\n this.organizationId = organizationId;\r\n }",
"@Override\n\tpublic void setEsfOrganization(java.lang.String esfOrganization) {\n\t\t_esfShooterAffiliationChrono.setEsfOrganization(esfOrganization);\n\t}",
"public Organization getOrganization() {\n return organization;\n }",
"public Organization getOrganization() {\n return organization;\n }",
"public void setOrganizationId(Long organizationId) {\n this.organizationId = organizationId;\n }",
"public void setOrganizationId(Long organizationId) {\n this.organizationId = organizationId;\n }",
"public void setOrganizationUrl(String organizationUrl) {\n \n this.organizationUrl = organizationUrl;\n\n }",
"public Value.Builder setKdOrg(java.lang.CharSequence value) {\n validate(fields()[12], value);\n this.kd_org = value;\n fieldSetFlags()[12] = true;\n return this;\n }",
"public void setOrganizationId(String organizationId) {\n this.organizationId = organizationId;\n }",
"public void setContactOrganization(String contactOrganization) {\n this.contactOrganization = contactOrganization;\n }",
"public void setOrgan(String organ) {\n\t\tthis.organ = organ;\n\t}",
"public String getOrganizationId() {\r\n return organizationId;\r\n }",
"private void setOrganizationFields(Cursor cur) {\n\n\t\tint selectedColumn;\n\n\t\t//\n\t\t// Get Organizations fields\n\t\t//\n\t\tselectedColumn = cur.getColumnIndex(Organization.COMPANY);\n\t\tString company = cur.getString(selectedColumn);\n\n\t\tselectedColumn = cur.getColumnIndex(Organization.TITLE);\n\t\tString title = cur.getString(selectedColumn);\n\n\t\tselectedColumn = cur.getColumnIndex(Organization.TYPE);\n\t\tint orgType = cur.getInt(selectedColumn);\n\n\t\tString customLabel = null;\n\t\tif (orgType == Organization.TYPE_CUSTOM) {\n\t\t\tselectedColumn = cur.getColumnIndex(Organization.LABEL);\n\t\t\tcustomLabel = cur.getString(selectedColumn);\n\t\t}\n\n\t\torgs.add(new OrgData(orgType, title, company, customLabel));\n\t}",
"public void setOrganizationName(String organizationName) {\n \n this.organizationName = organizationName;\n\n }",
"@Schema(example = \"Passbase Inc.\", description = \"Name of the organization that owns this project\")\n public String getOrganization() {\n return organization;\n }",
"public void setPersonOrgID(int value) {\n this.personOrgID = value;\n }",
"public String getOrganizationId() {\n return organizationId;\n }",
"public void setOrganizationCode(String organizationCode) {\n this.organizationCode = organizationCode;\n }",
"@AutoEscape\n\tpublic String getOrganization();",
"Builder addSourceOrganization(Organization value);",
"public Long getOrganizationId() {\n return organizationId;\n }",
"public Long getOrganizationId() {\n return organizationId;\n }",
"@Override\r\n public void setCorporation(String corporation) {\n }",
"public void setOrgNo(String orgNo) {\r\n this.orgNo = orgNo;\r\n }",
"public void setOrganizationEmail(String organizationEmail) {\n \n this.organizationEmail = organizationEmail;\n\n }",
"@JsonSetter(\"orgId\")\r\n public void setOrgId (long value) { \r\n this.orgId = value;\r\n }",
"public void xsetOrganizationVersion(org.apache.xmlbeans.XmlString organizationVersion)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ORGANIZATIONVERSION$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(ORGANIZATIONVERSION$6);\r\n }\r\n target.set(organizationVersion);\r\n }\r\n }",
"public void setOrgId(long orgId) {\r\n this.orgId = orgId;\r\n }",
"public void privateSetOrganizationKey(com.hps.july.persistence.OrganizationKey arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().privateSetOrganizationKey(arg0);\n }",
"public void setOrganisator(MyUser organisator) {\n if (createdEvents != null) {\n for (int i = 0; i < createdEvents.size(); i++) {\n createdEvents.get(i).setOrganisator(organisator);\n }\n adapderEventCard.notifyDataSetChanged();\n }\n }",
"public void setBanking_organizationPersistence(\n Banking_organizationPersistence banking_organizationPersistence) {\n this.banking_organizationPersistence = banking_organizationPersistence;\n }",
"public void unsetOrganizationId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(ORGANIZATIONID$4, 0);\r\n }\r\n }",
"public void setOwner(com.hps.july.persistence.OrganizationAccessBean newOwner) {\n\towner = newOwner;\n}",
"public java.lang.String getId_Organization() {\n return id_Organization;\n }",
"public void setOrgName(String orgName) {\r\n this.orgName = orgName;\r\n }",
"public interface Organization {\n\n void setName(String name);\n\n String getName();\n\n SubordinatesContainer getHead();\n\n void setHead(SubordinatesContainer head);\n}",
"public void setOrganizationVersion(java.lang.String organizationVersion)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORGANIZATIONVERSION$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ORGANIZATIONVERSION$6);\r\n }\r\n target.setStringValue(organizationVersion);\r\n }\r\n }",
"public void setOrganId(String organId) {\n this.organId = organId;\n }",
"public String getOrganizationText() {\n return organizationText;\n }",
"public String getOrganizationCode() {\n return organizationCode;\n }",
"Builder addSourceOrganization(String value);",
"public String getOrganizationName() {\n\n \n return organizationName;\n\n }",
"public void setOrgName(String orgName) {\n this.orgName = orgName == null ? null : orgName.trim();\n }",
"public void setKdOrg(java.lang.CharSequence value) {\n this.kd_org = value;\n }",
"public void setp_org_id(String value) {\n setNamedWhereClauseParam(\"p_org_id\", value);\n }",
"public String getType() {\n\t\t\treturn \"organization\";\n\t\t}",
"public void setOrganizationOwnerAccount(Account organizationOwnerAccount) {\n this.organizationOwnerAccount = organizationOwnerAccount;\n }",
"Builder addSourceOrganization(Organization.Builder value);",
"public void setJdOrg(String jdOrg) {\r\n\t\tthis.jdOrg = jdOrg;\r\n\t}",
"String getOrganization();",
"public void setOrganizationType(String organizationType) {\n\t\tthis.organizationType = organizationType;\n\t}",
"public VOOrganization getOrganization() {\n\n if (organization == null) {\n organization = new VOOrganization();\n FacesContext fc = FacesContext.getCurrentInstance();\n Locale locale = fc.getViewRoot().getLocale();\n organization.setLocale(locale.toString());\n }\n return organization;\n }",
"public void newOrg()\r\n {\r\n\t\tint[] genes={1,1,1,1,1,1,1,1,1,1,1}; //Setting the gene values to the basic, default values\r\n\t\tOrganism parent=new Organism(genes,1); //Creating the organism with the specified set of genes, and as the first generation\r\n\t\te.setParent(parent); //Setting the curent parent organism to the default starting organism\r\n\t\tArrayList<Organism> treeTemp=new ArrayList<Organism>(); \r\n\t\te.setTree(treeTemp); //Setting new succession tree to an empty tree\r\n\t\trepaint();\r\n }",
"public void setOrgName(java.lang.String orgName) {\n this.orgName = orgName;\n }",
"public void setOrganizationType(java.lang.String organizationType) {\n this.organizationType = organizationType;\n }",
"Builder addPublisher(Organization value);",
"@NotNull public Builder provider(@NotNull Organization.Builder organization) {\n putValue(\"provider\", organization.build());\n return this;\n }",
"public final String getOrganisation() {\n return organisation;\n }",
"@Test\n public void testUpdateOrg() {\n Organization org = new Organization();\n org.setOrgId(1);\n org.setOrgName(\"Avenger\");\n org.setDescription(\"blah blah\");\n org.setAddress(ad);\n dao.addOrg(org);\n org.setOrgName(\"X-Men\");\n assertNotEquals(org, dao.getOrg(org.getOrgId()));\n Organization fromDao = dao.updateOrg(org);\n assertEquals(org, fromDao);\n }"
] | [
"0.8155654",
"0.80994713",
"0.80612844",
"0.8039675",
"0.79712206",
"0.79712206",
"0.7443915",
"0.7411432",
"0.7286468",
"0.7266599",
"0.70668906",
"0.706356",
"0.69909704",
"0.6912044",
"0.68972796",
"0.67364484",
"0.67357886",
"0.6709268",
"0.66786826",
"0.66174144",
"0.6615993",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65979296",
"0.65917414",
"0.6555159",
"0.651749",
"0.6487576",
"0.6461273",
"0.64196086",
"0.64196086",
"0.6410413",
"0.63810945",
"0.63366264",
"0.63366264",
"0.63298774",
"0.63298774",
"0.6325305",
"0.63247913",
"0.6276873",
"0.6235379",
"0.6224315",
"0.6158992",
"0.6141374",
"0.61229086",
"0.6106249",
"0.60931677",
"0.60680133",
"0.6039326",
"0.6025542",
"0.60032874",
"0.597334",
"0.597334",
"0.5969403",
"0.5959503",
"0.5924857",
"0.5894546",
"0.58861214",
"0.58754796",
"0.5870859",
"0.586677",
"0.5859409",
"0.585382",
"0.5838978",
"0.5834833",
"0.5797586",
"0.5784735",
"0.5778111",
"0.57501996",
"0.5738026",
"0.5728862",
"0.57258934",
"0.5714832",
"0.5671823",
"0.56688833",
"0.56677747",
"0.56571144",
"0.56547284",
"0.5653791",
"0.56512696",
"0.5639018",
"0.5625349",
"0.56210494",
"0.561325",
"0.56125516",
"0.5608071",
"0.5601214",
"0.5585841",
"0.5568196",
"0.55652946"
] | 0.6624183 | 19 |
Gets the null flavor. | public String getNullFlavor() {
return nullFlavor;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NULLFLAVOR$28);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public com.walgreens.rxit.ch.cda.NullFlavor xgetNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.NullFlavor target = null;\n target = (com.walgreens.rxit.ch.cda.NullFlavor)get_store().find_attribute_user(NULLFLAVOR$28);\n return target;\n }\n }",
"public String getFlavor() {\n \t\treturn flavor == null ? \"tooling\" : flavor; //$NON-NLS-1$\n \t}",
"public boolean isSetNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(NULLFLAVOR$28) != null;\n }\n }",
"public void unsetNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(NULLFLAVOR$28);\n }\n }",
"protected DataFlavor[] getRicherFlavors() {\n if (richText == null) {\n return null;\n }\n\n try {\n DataFlavor[] flavors = new DataFlavor[3];\n flavors[0] = new DataFlavor(mimeType + \";class=java.lang.String\");\n flavors[1] = new DataFlavor(mimeType + \";class=java.io.Reader\");\n flavors[2] = new DataFlavor(mimeType + \";class=java.io.InputStream;charset=unicode\");\n return flavors;\n } catch (ClassNotFoundException cle) {\n // fall through to unsupported (should not happen)\n }\n\n return null;\n }",
"public String getFlavorText() {\n return flavorText;\n }",
"public static final DataFlavor getDataFlavor () {\n\t\ttry {\n\t\t\treturn new DataFlavor (DataFlavor.javaJVMLocalObjectMimeType \n\t\t\t\t\t+ \";class=\\\"\"+Prodotto.class.getName() + \"\\\"\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public void setNullFlavor(String nullFlavor) {\n\t\tthis.nullFlavor = nullFlavor;\n\t}",
"public String getFlavor(WeaponFlavor flavorKey) {\n\t\t\treturn flavors.get(flavorKey);\n\t\t}",
"public ImageFlavor getTargetFlavor() {\n/* 312 */ if (this.converters.size() > 0)\n/* 313 */ return getConverter(this.converters.size() - 1).getTargetFlavor(); \n/* 314 */ if (this.loader != null) {\n/* 315 */ return this.loader.getTargetFlavor();\n/* */ }\n/* 317 */ return null;\n/* */ }",
"public DataFlavor[] getTransferDataFlavors() {\n\t\treturn flavors;\n\t}",
"public DataFlavor[] getTransferDataFlavors() {\r\n if(dataFlavors == null) {\r\n return new DataFlavor[0];\r\n }\r\n \r\n DataFlavor[] _array = new DataFlavor[dataFlavors.size()];\r\n return (DataFlavor[])dataFlavors.toArray(_array);\r\n }",
"@Override\r\n\tpublic boolean isHasFlavor() {\n\t\treturn true;\r\n\t}",
"public Object getTransferData(DataFlavor flavor)\n throws UnsupportedFlavorException, IOException\n {\n if (flavor == DataFlavor.imageFlavor)\n return this;\n\n return null;\n }",
"public DataFlavor[] getTransferDataFlavors() {\n\t\t// returning flavors itself would allow client code to modify\n\t\t// our internal behavior\n\t\treturn (DataFlavor[]) flavors.clone();\n\t}",
"String getDefaultNull();",
"public void setNullFlavor(java.lang.String nullFlavor)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NULLFLAVOR$28);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NULLFLAVOR$28);\n }\n target.setStringValue(nullFlavor);\n }\n }",
"private StandardFlavors()\r\n\t{\r\n\t}",
"public ImageDescriptor getImageDescriptor()\n\t{\n\n\t\treturn null;\n\t}",
"boolean getPredefinedValuesNull();",
"public boolean getPredefinedValuesNull() {\n return predefinedValuesNull_;\n }",
"public boolean getPredefinedValuesNull() {\n return predefinedValuesNull_;\n }",
"public String mo9295bg() {\n return null;\n }",
"@Override\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\r\n\t}",
"boolean getActiveNull();",
"public DataFlavor[] getTransferDataFlavors()\n {\n DataFlavor[] flavors = {DataFlavor.imageFlavor};\n return flavors;\n }",
"public ImageDescriptor getImageDescriptor() {\n\t\treturn null;\r\n\t}",
"@Override\n\t\tpublic ImageDescriptor getImageDescriptor() {\n\t\t\treturn null;\n\t\t}",
"T getNullRepresentation();",
"private static String getOsFamily()\n {\n Set families = getValidFamilies();\n\n Iterator iter = families.iterator();\n while ( iter.hasNext() )\n {\n String fam = (String) iter.next();\n if ( Os.isFamily( fam ) )\n {\n return fam;\n }\n }\n return null;\n }",
"public void xsetNullFlavor(com.walgreens.rxit.ch.cda.NullFlavor nullFlavor)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.NullFlavor target = null;\n target = (com.walgreens.rxit.ch.cda.NullFlavor)get_store().find_attribute_user(NULLFLAVOR$28);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.NullFlavor)get_store().add_attribute_user(NULLFLAVOR$28);\n }\n target.set(nullFlavor);\n }\n }",
"private Optional<String> getBackgroundColor() {\n return Optional.ofNullable(this.currentStyle)\n .filter(style -> style.get(PN_BACKGROUND_COLOR_ENABLED, Boolean.FALSE))\n .flatMap(style -> Optional.ofNullable(this.resource.getValueMap().get(PN_BACKGROUND_COLOR, String.class)))\n .filter(StringUtils::isNotEmpty);\n }",
"protected String getBgPath() {\n return null;\n }",
"public Color color() {\n return null;\n }",
"private static DataFlavor createDefaultDataFlavor() {\n try {\n return new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType + \";class=\\\"\"\n + DocumentTreeNode[].class.getName() + \"\\\"\");\n } catch (ClassNotFoundException e) {\n // this will never happen\n return null;\n }\n }",
"public CardStack getAvailableCards()\n {\n return null;\n }",
"public Magnifier getMagnifier() {\n\t\treturn null;\n\t}",
"public String mo9242az() {\n return null;\n }",
"@Override\n\tpublic Farbe getFuellFarbe() {\n\t\treturn null;\n\t}",
"public DataFlavor[] getTransferDataFlavors() {\n return new DataFlavor[] {DATA_FLAVOR};\n }",
"public int[] getVariantMeta() { return new int[] { 0 }; }",
"@Override\n\tpublic Recipe getRecipe() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getFortuneService() {\n\t\treturn null;\n\t}",
"@Override\r\n public OwFormat getFormat()\r\n {\n return null;\r\n }",
"String getEmptyVersion();",
"public ActivationDataFlavor[] getTransferDataFlavors();",
"public boolean getActiveNull() {\n return activeNull_;\n }",
"public ImageProperties getImageProperties() {\n\t\treturn null;\n\t}",
"@Nullable\n public ThemeType getTheme() {\n return mTheme;\n }",
"private Optional<String> getBackgroundImage() {\n return Optional.ofNullable(this.currentStyle)\n .filter(style -> style.get(PN_BACKGROUND_IMAGE_ENABLED, Boolean.FALSE))\n .flatMap(style -> Utils.getOptionalLink(linkManager.get(resource).withLinkUrlPropertyName(PN_BACKGROUND_IMAGE_REFERENCE).build()).map(Link::getURL))\n .filter(StringUtils::isNotEmpty);\n }",
"final String getFamily_NoClientCode() {\n return getFamily(Locale.getDefault());\n }",
"public Integer getIconImageResourceId() {\n return null;\n }",
"public static VkHandle getNullHandler(){ \n return VK_NULL_HANDLE.getNullHandle();\n }",
"public String getImage() {\n\t\treturn null;\n\t}",
"public Integer getApple() {\n\t\treturn null;\r\n\t}",
"protected DataFlavor getImportFlavor(DataFlavor[] flavors, JTextComponent c) {\n DataFlavor plainFlavor = null;\n DataFlavor refFlavor = null;\n DataFlavor stringFlavor = null;\n\n if (c instanceof JEditorPane) {\n for (int i = 0; i < flavors.length; i++) {\n String mime = flavors[i].getMimeType();\n if (mime.startsWith(((JEditorPane)c).getEditorKit().getContentType())) {\n return flavors[i];\n } else if (plainFlavor == null && mime.startsWith(\"text/plain\")) {\n plainFlavor = flavors[i];\n } else if (refFlavor == null && mime.startsWith(\"application/x-java-jvm-local-objectref\")\n && flavors[i].getRepresentationClass() == java.lang.String.class) {\n refFlavor = flavors[i];\n } else if (stringFlavor == null && flavors[i].equals(DataFlavor.stringFlavor)) {\n stringFlavor = flavors[i];\n }\n }\n if (plainFlavor != null) {\n return plainFlavor;\n } else if (refFlavor != null) {\n return refFlavor;\n } else if (stringFlavor != null) {\n return stringFlavor;\n }\n return null;\n }\n\n\n for (int i = 0; i < flavors.length; i++) {\n String mime = flavors[i].getMimeType();\n if (mime.startsWith(\"text/plain\")) {\n return flavors[i];\n } else if (refFlavor == null && mime.startsWith(\"application/x-java-jvm-local-objectref\")\n && flavors[i].getRepresentationClass() == java.lang.String.class) {\n refFlavor = flavors[i];\n } else if (stringFlavor == null && flavors[i].equals(DataFlavor.stringFlavor)) {\n stringFlavor = flavors[i];\n }\n }\n if (refFlavor != null) {\n return refFlavor;\n } else if (stringFlavor != null) {\n return stringFlavor;\n }\n return null;\n }",
"public Shape getShape() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Filter getFilter() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Filter getFilter() {\n\t\treturn null;\n\t}",
"public Shape getShape() {\n return null;\n }",
"public boolean getActiveNull() {\n return activeNull_;\n }",
"public FlavorSet without(Set<Flavor> flavors) {\n if (this.isEmpty() || flavors.isEmpty()) {\n return this;\n }\n return copyOf(Sets.difference(this.flavors, flavors));\n }",
"public Image getImage() {\n return null;\r\n }",
"private DataFlavor chooseDropFlavor(DropTargetDropEvent e) {\n\t\tif (e.isLocalTransfer() == true && e.isDataFlavorSupported(ElementDrag.DEFAULT_FLAVOR)) {\n\t\t\treturn ElementDrag.DEFAULT_FLAVOR;\n\t\t}\n\t\treturn null;\n\t}",
"public String getColor() {\n\t\treturn null;\n\t}",
"default Integer getGravity() {\n return null;\n }",
"public String getIconFileName() {\n return null;\n }",
"@Override\n\tpublic ISpecies getDefault() {\n\t\treturn null;\n\t}",
"public static String formatNull() {\n\t\treturn \"null\";\n\t}",
"public String[] getFishableFish() {\n return PondTile.fishableFish;\n }",
"@Nullable\n public Background getBackground() {\n if (mImpl.hasBackground()) {\n return Background.fromProto(mImpl.getBackground());\n } else {\n return null;\n }\n }",
"public static Value makeNull() {\n return theNull;\n }",
"@Nullable\n public String getBrandColor() {\n return mBrandColor;\n }",
"@Override\r\n\tpublic String foodName() {\n\t\treturn null;\r\n\t}",
"public Optional<String> getUri() {\n return Optional.ofNullable(uri);\n }",
"@Override\n\tprotected Shape getShape() {\n\t\treturn null;\n\t}",
"public String getIconURL()\n {\n return null; \n }",
"public Dimension getImageSize() {\n\t\treturn null;\n\t}",
"public String getNullAttribute();",
"@Override\n protected Color getflameC ()\n {\n return null;\n }",
"String getTheme();",
"protected Shape getShape()\n {\n return null;\n }",
"public Double getFocalLength()\n\t{\n\t\treturn null;\n\t}",
"private final Bundle m1027e() {\n try {\n ApplicationInfo applicationInfo = this.f979b.getPackageManager().getApplicationInfo(this.f980c, 128);\n if (applicationInfo != null && applicationInfo.metaData != null) {\n return applicationInfo.metaData;\n }\n f978a.mo34139a(\"App has no applicationInfo or metaData\", new Object[0]);\n return null;\n } catch (PackageManager.NameNotFoundException unused) {\n f978a.mo34143d(\"App is not found in PackageManager\", new Object[0]);\n return null;\n }\n }",
"public String getEditionFull() {\n return FxSharedUtils.getFlexiveEditionFull();\n }",
"public Integer getBanana() {\n\t\treturn null;\r\n\t}",
"protected String retrievePresentationStyle() {\n\n Configuration configuration = requireContext().getResources().getConfiguration();\n int wQualifier = configuration.screenWidthDp;\n int hQualifier = configuration.screenHeightDp;\n\n if (wQualifier >= 448 && hQualifier >= 448) {\n /* tablet */\n return \"drawer\";//\"dialog\";\n } else if (hQualifier >= 300 && (float) hQualifier / wQualifier >= 4f / 3) {\n /* mobile-portrait */\n return \"drawer\";//\"bottomsheet\";\n } else {\n /* mobile-landscape, mobile small screen */\n /* fullscreen */\n return \"fullscreen\";\n }\n }",
"@CheckForNull public Archetype getAnyArchetype() {\n if (map.isEmpty()) {\n return null;\n }\n return map.values().iterator().next();\n }",
"public boolean getCharacteristicDescriptionNull() {\n return characteristicDescriptionNull_;\n }",
"private static native JsJsonNull createProd() /*-{\n return null;\n }-*/;",
"public boolean isNull() {\n return Stream.<Object>of(airQualityIndex, humidity,\n measurementTime, pm1, pm25, pm10, pollutionLevel,\n pressure, temperature)\n .allMatch(Objects::isNull);\n }",
"public Image getImage()\n {\n return null;\n }",
"@Override\n\tpublic String getSadFortune() {\n\t\treturn null;\n\t}",
"public String getDefaultThemeName() {\n\treturn resources.getString(\"defaultTheme\", null);\n }",
"public static Theme get(int value) {\n\t\tswitch (value) {\n\t\t\tcase STRUCTURE_VALUE: return STRUCTURE;\n\t\t\tcase NAMING_VALUE: return NAMING;\n\t\t\tcase REQUIREMENTS_VALUE: return REQUIREMENTS;\n\t\t\tcase FUNCTIONALITY_VALUE: return FUNCTIONALITY;\n\t\t\tcase PERFORMANCE_VALUE: return PERFORMANCE;\n\t\t\tcase MAINTAINABILITY_VALUE: return MAINTAINABILITY;\n\t\t\tcase USABILITY_VALUE: return USABILITY;\n\t\t\tcase SECURITY_VALUE: return SECURITY;\n\t\t\tcase IMPLEMENTATION_VALUE: return IMPLEMENTATION;\n\t\t\tcase LIFECYCLE_VALUE: return LIFECYCLE;\n\t\t}\n\t\treturn null;\n\t}",
"private String getNullValueText() {\n return getNull();\n }",
"@Override\n\tpublic String getScheme() {\n\t\treturn null;\n\t}",
"public Double getExposureTime()\n\t{\n\t\treturn null;\n\t}"
] | [
"0.7536747",
"0.74950147",
"0.67160594",
"0.63376284",
"0.6253951",
"0.6066498",
"0.59510684",
"0.57420474",
"0.5670973",
"0.5601671",
"0.5596028",
"0.55792195",
"0.5563851",
"0.5535979",
"0.55240154",
"0.5471186",
"0.5436813",
"0.5408034",
"0.5404658",
"0.53799796",
"0.53486234",
"0.53346086",
"0.5332702",
"0.53301376",
"0.5318917",
"0.52987576",
"0.5293382",
"0.529166",
"0.5268732",
"0.5219444",
"0.521571",
"0.5197978",
"0.5188167",
"0.51341474",
"0.5070933",
"0.50600684",
"0.5054685",
"0.5049685",
"0.5037056",
"0.5030031",
"0.5003014",
"0.4997337",
"0.49851257",
"0.49832323",
"0.49444652",
"0.4935747",
"0.49302578",
"0.491649",
"0.49058634",
"0.49004894",
"0.48974067",
"0.48948428",
"0.48877954",
"0.48850852",
"0.4879029",
"0.48787978",
"0.48707372",
"0.4865303",
"0.48601955",
"0.48501885",
"0.48501885",
"0.4850047",
"0.48499587",
"0.48466915",
"0.48466066",
"0.4838408",
"0.48343232",
"0.482358",
"0.48144588",
"0.4814048",
"0.4803475",
"0.4803462",
"0.4792882",
"0.47913778",
"0.47897616",
"0.47594625",
"0.47490144",
"0.47352374",
"0.47286773",
"0.47194952",
"0.47186616",
"0.4713098",
"0.47126514",
"0.47027826",
"0.46984988",
"0.4698442",
"0.46948892",
"0.46927094",
"0.4690532",
"0.46885166",
"0.46881598",
"0.46855316",
"0.46820888",
"0.4679295",
"0.4678088",
"0.4677586",
"0.46595812",
"0.46578127",
"0.46572968",
"0.46537715"
] | 0.72402924 | 2 |
Sets the null flavor. | public void setNullFlavor(String nullFlavor) {
this.nullFlavor = nullFlavor;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void unsetNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(NULLFLAVOR$28);\n }\n }",
"public void xsetNullFlavor(com.walgreens.rxit.ch.cda.NullFlavor nullFlavor)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.NullFlavor target = null;\n target = (com.walgreens.rxit.ch.cda.NullFlavor)get_store().find_attribute_user(NULLFLAVOR$28);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.NullFlavor)get_store().add_attribute_user(NULLFLAVOR$28);\n }\n target.set(nullFlavor);\n }\n }",
"public void setNullFlavor(java.lang.String nullFlavor)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NULLFLAVOR$28);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NULLFLAVOR$28);\n }\n target.setStringValue(nullFlavor);\n }\n }",
"@Override\r\n\tpublic void setFlavor() {\n\t\thasFlavor = false;\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(OBSERVABLE_EVENT_SET_FLAVOR);\r\n\t}",
"public boolean isSetNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(NULLFLAVOR$28) != null;\n }\n }",
"@Override\n public void setNull() {\n\n }",
"public Builder setPredefinedValuesNull(boolean value) {\n \n predefinedValuesNull_ = value;\n onChanged();\n return this;\n }",
"public String getNullFlavor() {\n\t\treturn nullFlavor;\n\t}",
"public Builder clearPredefinedValuesNull() {\n \n predefinedValuesNull_ = false;\n onChanged();\n return this;\n }",
"private StandardFlavors()\r\n\t{\r\n\t}",
"public com.walgreens.rxit.ch.cda.NullFlavor xgetNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.NullFlavor target = null;\n target = (com.walgreens.rxit.ch.cda.NullFlavor)get_store().find_attribute_user(NULLFLAVOR$28);\n return target;\n }\n }",
"public java.lang.String getNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NULLFLAVOR$28);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public void setNone() {\n\t\tstate = State.NONE;\n\t}",
"public Builder clearForceDeleteNull() {\n \n forceDeleteNull_ = false;\n onChanged();\n return this;\n }",
"public void setFlavor(LinePlotFlavor flavor) {\n this.flavor = flavor;\n }",
"public FlavorSet without(Set<Flavor> flavors) {\n if (this.isEmpty() || flavors.isEmpty()) {\n return this;\n }\n return copyOf(Sets.difference(this.flavors, flavors));\n }",
"public void setNullToActionMode() {\n if (mActionMode != null) {\n mActionMode = null;\n storageGridViewAdapter.showCheckBox(false);\n }\n }",
"public Builder clearActiveNull() {\n \n activeNull_ = false;\n onChanged();\n return this;\n }",
"public Builder setForceDeleteNull(boolean value) {\n \n forceDeleteNull_ = value;\n onChanged();\n return this;\n }",
"@Override\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\n\t}",
"public String getFlavor() {\n \t\treturn flavor == null ? \"tooling\" : flavor; //$NON-NLS-1$\n \t}",
"public NullDeviceProvider() {\n super(new ProviderId(\"null\", \"org.onosproject.provider.nil\"));\n }",
"public Builder clearDayNull() {\n \n dayNull_ = false;\n onChanged();\n return this;\n }",
"public Fruit() {\r\n\t\tsetColor(null);\r\n\t\tsetName(null);\r\n\t}",
"public Builder setDayNull(boolean value) {\n \n dayNull_ = value;\n onChanged();\n return this;\n }",
"public Builder setActiveNull(boolean value) {\n \n activeNull_ = value;\n onChanged();\n return this;\n }",
"public void setValueNull()\n\t{\n\t\tallValues.clear();\n\t}",
"private void createNullSet()\n\t{\n\t\tm_values = null;\n\t}",
"public void initMode()\r\n\t{\r\n\t\t_box = null;\r\n\t}",
"private void setNull() {\n\n this.txtExamDate.setDate(null);\n this.txtCourseName.setText(null);\n this.txtCourseName.requestFocus();\n }",
"static public void assertNull(Object object) {\n assertNull(null, object);\n }",
"public void clear(boolean nulltags) {\n \t\tArrays.fill(tags, null);\n \t\tnumTags = 0;\n \t}",
"public void reset() {\n this.displayHasContent = false;\n this.obscured = false;\n this.syswin = false;\n this.preferredRefreshRate = 0.0f;\n this.preferredModeId = 0;\n }",
"public void reset(){\n super.reset();\n this.troef = CardColor.NONE;\n }",
"public void setUndefinedAllowed(boolean value) {\n _allowUndefined = value;\n }",
"public final void mo3707a() {\n this.f7241c.setText((CharSequence) null);\n this.f7242d.setText((CharSequence) null);\n this.f7243e.setText((CharSequence) null);\n this.f7244f.setImageDrawable(null);\n mo3708b();\n }",
"void setNilValue();",
"Fruit(){\n this.name = null;\n this.color = null;\n }",
"public Builder clearFromDayNull() {\n \n fromDayNull_ = false;\n onChanged();\n return this;\n }",
"public void resetToDefault() {\n if (_option != null) {\n setValue(_option.getDefault());\n notifyChangeListeners();\n }\n }",
"private void setNulls() {\n mEnum = null;\n mString = null;\n mCharSequence = null;\n //mBoolean = true;\n mBoolByte = BooleanDataType.NULL;\n mChar = CharDataType.NULL;\n mDateTime = DateTimeDataType.NULL;\n mTimeOfDay = TimeOfDayDataType.NULL;\n\n mByte = IntegerDataType.INT8_NULL;\n mShort = IntegerDataType.INT16_NULL;\n mInt = IntegerDataType.INT32_NULL;\n mInt48 = IntegerDataType.INT48_NULL;\n mLong = IntegerDataType.INT64_NULL;\n mFloat = FloatDataType.IEEE32_NULL;\n mDouble = FloatDataType.IEEE64_NULL;\n //mDouble2 = FloatDataType.IEEE64_NULL;\n mPUINT30 = IntegerDataType.PUINT30_NULL;\n mPUINT61 = IntegerDataType.PUINT61_NULL;\n mPIneterval = IntegerDataType.PINTERVAL_NULL;\n mSCALE_AUTO = FloatDataType.DECIMAL_NULL;\n mSCALE4 = FloatDataType.DECIMAL_NULL;\n }",
"public Builder clearToDayNull() {\n \n toDayNull_ = false;\n onChanged();\n return this;\n }",
"public void setToDefault();",
"public void setEmptyView(View emptyView);",
"public void setNulled(final boolean nulled) {\n \t\tthis.nulled = nulled;\n \t}",
"public void setPlayerPkmnNull()\r\n {\r\n playerPokemon = null;\r\n }",
"public void setCouchDBToNull() {\n mCouchDBinstance = null;\n mCouchManager = null;\n database = null;\n }",
"@Override\r\n\tpublic boolean isHasFlavor() {\n\t\treturn true;\r\n\t}",
"@TargetApi(16)\n public void setDefaultVideoStill() {\n Drawable drawable = this.view.getResources().getDrawable(R.drawable.default_video_still);\n if (drawable instanceof LayerDrawable) {\n LayerDrawable layerDrawable = (LayerDrawable) drawable;\n for (int i = 0; i < layerDrawable.getNumberOfLayers(); i++) {\n Drawable drawable2 = layerDrawable.getDrawable(i);\n if (drawable2 != null) {\n drawable2.setLevel(1);\n }\n }\n }\n this.view.setBackground(drawable);\n this.view.setVisibility(0);\n this.view.requestLayout();\n this.eventEmitter.emit(EventType.DID_SET_VIDEO_STILL);\n }",
"@Test public void nullBitmapOptionsIfNoResizing() {\n final Request noResize = new Request.Builder(TestUtils.URI_1).build();\n final BitmapFactory.Options noResizeOptions = createBitmapOptions(noResize);\n assertThat(noResizeOptions).isNull();\n }",
"public Builder clearCharacteristicDescriptionNull() {\n \n characteristicDescriptionNull_ = false;\n onChanged();\n return this;\n }",
"public Builder setCharacteristicDescriptionNull(boolean value) {\n \n characteristicDescriptionNull_ = value;\n onChanged();\n return this;\n }",
"public Builder setDeleteCharacteristicNull(boolean value) {\n \n deleteCharacteristicNull_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\r\n\t}",
"public Builder setFieldTypeIdNull(boolean value) {\n \n fieldTypeIdNull_ = value;\n onChanged();\n return this;\n }",
"@SuppressWarnings(\"deprecation\")\n @Override\n void setDefaults() {\n //Do nothing\n }",
"void setNullable(boolean nullable);",
"@Override\n\tpublic void flagNull() {\n\t\t\n\t}",
"@Generated(hash = 74421150)\n public synchronized void resetForecast() {\n forecast = null;\n }",
"public Builder setValueCharacteristicIdNull(boolean value) {\n \n valueCharacteristicIdNull_ = value;\n onChanged();\n return this;\n }",
"void setMenuNull() {\n game.r = null;\n }",
"public void testSetTweet_nullTweetPermalink() {\n final BaseTweetView view = createView(context, TestFixtures.TEST_TWEET);\n view.setTweet(null);\n Assert.assertThat(view.getPermalinkUri(), nullValue());\n }",
"protected void setIsNull(final boolean isNull) {\n this.isNull = isNull;\n }",
"public void testSetPowertype_NullClassifier() {\n instance.setPowertype(null);\n assertNull(\"null expected.\", instance.getPowertype());\n }",
"public void setGenerateNull(boolean generateNull){\n mGenerateNull = generateNull;\n }",
"void setNilRequiredResources();",
"public Builder setForumIdNull(boolean value) {\n \n forumIdNull_ = value;\n onChanged();\n return this;\n }",
"public void m21454c(boolean z) {\n if (!z) {\n this.f18797c = null;\n }\n }",
"public void zeroValues()\n {\n fx = 0.0f;\n fy = 0.0f;\n fz = 0.0f;\n magnitude = 0.0f;\n }",
"public void defed() {\n\n if (coalesceBridge != null) {\n coalesceBridge.defed();\n } else if (preColor) {\n defed = true;\n }\n }",
"public void mo9255d() {\n this.f1298a = null;\n }",
"public void setIdubicacionfiscalNull(boolean idubicacionfiscalNull)\r\n\t{\r\n\t\tthis.idubicacionfiscalNull = idubicacionfiscalNull;\r\n\t}",
"public Builder clearIsFallback() {\n bitField0_ = (bitField0_ & ~0x00000020);\n isFallback_ = false;\n onChanged();\n return this;\n }",
"public SVGBuilder setWhiteMode() {\n this.fillColorFilter = new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.SRC_IN);\n return this;\n }",
"private final synchronized void m46514S() {\n if (this.f40736r) {\n setLayerType(0, null);\n }\n this.f40736r = false;\n }",
"public void m21452b(boolean z) {\n if (!z) {\n this.f18796b = null;\n }\n }",
"public void setUnionDefNull(java.lang.Long value) {\n\t throw new java.lang.UnsupportedOperationException(\"Set is not supported on tombstones\");\n\t }",
"public Builder clearImportConfigurationNull() {\n \n importConfigurationNull_ = false;\n onChanged();\n return this;\n }",
"public Builder setFromDayNull(boolean value) {\n \n fromDayNull_ = value;\n onChanged();\n return this;\n }",
"public Builder clearStage() {\n bitField0_ = (bitField0_ & ~0x00000010);\n stage_ = 0;\n onChanged();\n return this;\n }",
"public void reset() {\n this.inhibited = false;\n this.forced = false;\n }",
"public final void mo39711K() {\n setBackgroundColor(0);\n }",
"public Builder setToDayNull(boolean value) {\n \n toDayNull_ = value;\n onChanged();\n return this;\n }",
"private Optional() {\r\n\t\tthis.value = null;\r\n\t}",
"public Builder clearDeleteCharacteristicNull() {\n \n deleteCharacteristicNull_ = false;\n onChanged();\n return this;\n }",
"public void setUnionDefNull(java.lang.Long value) {\n this.unionDefNull = value;\n setDirty(6);\n }",
"public void mo33816a() {\n this.f15942j = null;\n }",
"public final void mo60877e() {\n this.f61633c = null;\n }",
"public void reset() {\n this.state = null;\n }",
"public Builder setCampaignTypeIdNull(boolean value) {\n \n campaignTypeIdNull_ = value;\n onChanged();\n return this;\n }",
"public None()\n {\n \n }",
"public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000008);\n type_ = fi.kapsi.koti.jpa.nanopb.Nanopb.FieldType.FT_DEFAULT;\n onChanged();\n return this;\n }",
"public void reset() {\n\n\t\trbNone.setSelected(true);\n\t\tquizIDField.clear();\n\t\tfilter();\n\t\t\n\t}",
"@Override\n\t\tpublic ImageDescriptor getImageDescriptor() {\n\t\t\treturn null;\n\t\t}",
"public Builder setConditionListNull(boolean value) {\n \n conditionListNull_ = value;\n onChanged();\n return this;\n }",
"protected void clear() {\r\n setValue(getDefault());\r\n }",
"public void makeApprovedIfNull() {\n int x = getHifiveRating();\n if (x == 0) {\n setHifiveRating(HIFIVERATING_approved);\n }\n }",
"public Builder setImportConfigurationNull(boolean value) {\n \n importConfigurationNull_ = value;\n onChanged();\n return this;\n }",
"public void reset() {\n\t\tmCustomRingtone = null;\n\t\tmSendToVM = null;\n\t\tmSelected = false;\n\t\tmHasText = null;\n\t\tmHasPhone = null;\n\t\tmHasEmail = null;\n\t\t// mPhoto = null; // don't re-get this, too expensive\n\t\tmContactInfo = null;\n\t}",
"public boolean getPredefinedValuesNull() {\n return predefinedValuesNull_;\n }"
] | [
"0.7413679",
"0.7320672",
"0.7283821",
"0.62642384",
"0.60253626",
"0.5967828",
"0.5721583",
"0.5709173",
"0.5673903",
"0.5638769",
"0.5596227",
"0.54875946",
"0.52802986",
"0.52757394",
"0.520207",
"0.5186293",
"0.51275736",
"0.5122386",
"0.5082214",
"0.5076978",
"0.5052286",
"0.50487834",
"0.50437874",
"0.50375247",
"0.5031958",
"0.50212246",
"0.50145894",
"0.500321",
"0.49781635",
"0.4948906",
"0.49473685",
"0.49277925",
"0.49175164",
"0.49149728",
"0.49133125",
"0.49117962",
"0.48976925",
"0.4889039",
"0.4879862",
"0.48786226",
"0.4878371",
"0.48723692",
"0.48664594",
"0.48644662",
"0.48632434",
"0.48623446",
"0.4862008",
"0.48558164",
"0.48482963",
"0.48422807",
"0.48420507",
"0.48303",
"0.48255825",
"0.4818724",
"0.4813039",
"0.48009408",
"0.480008",
"0.47966632",
"0.47932473",
"0.47825092",
"0.47731215",
"0.47698843",
"0.47688392",
"0.47648036",
"0.47601885",
"0.47571063",
"0.47564417",
"0.4755655",
"0.4746075",
"0.47375837",
"0.47330168",
"0.47314984",
"0.4721486",
"0.47200662",
"0.47200423",
"0.47181663",
"0.47139788",
"0.47085953",
"0.47084782",
"0.47001064",
"0.46972886",
"0.46954966",
"0.46897876",
"0.46896023",
"0.46877882",
"0.46862394",
"0.4685104",
"0.4683487",
"0.46805695",
"0.46793765",
"0.46780223",
"0.46741408",
"0.46711215",
"0.46672866",
"0.4660472",
"0.46568632",
"0.46476418",
"0.46444035",
"0.46396568",
"0.46337453"
] | 0.708197 | 3 |
Gets the class code. | public String getClassCode() {
return classCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(CLASSCODE$30);\n }\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"java.lang.String getCode();",
"java.lang.String getCode();",
"public ITravelClassType getClassCode();",
"java.lang.String getClass_();",
"java.lang.String getClass_();",
"Code getCode();",
"public byte getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"com.google.protobuf.ByteString\n getClass_Bytes();",
"com.google.protobuf.ByteString\n getClass_Bytes();",
"public String getCode() { \n\t\treturn getCodeElement().getValue();\n\t}",
"public String getCompilerClassName();",
"public com.walgreens.rxit.ch.cda.EntityClass xgetClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.EntityClass target = null;\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_default_attribute_value(CLASSCODE$30);\n }\n return target;\n }\n }",
"public String getCode(){\n\t\treturn new SmartAPIModel().getCpSourceCode(cp.getLocalName());\n\t}",
"public java.lang.String getCode() {\r\n return code;\r\n }",
"public String toCode() {\r\n\t\treturn \"CodeDefinition(\" + mActivityName + \".class\"+ \")\";\r\n\t}",
"public String getCode() {\t\t\t\t\t\t\t\t\treturn code;\t\t\t\t\t\t\t}",
"public String getCode();",
"public String getCode();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }",
"public long getCode () {\r\n\t\treturn code;\r\n\t}",
"public String getCode () {\r\n\t\treturn code;\r\n\t}",
"public java.lang.String getCode() {\n java.lang.Object ref = code_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n code_ = s;\n return s;\n }\n }",
"public String getCode() {\n return (String)getAttributeInternal(CODE);\n }",
"public String getCode(){\n\t\treturn code;\n\t}",
"public java.lang.String getCode() {\n java.lang.Object ref = code_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n code_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\r\n\tpublic String getCode() {\n\t\treturn code;\r\n\t}",
"public String code() {\n return this.code;\n }",
"public String code() {\n return this.code;\n }",
"com.google.protobuf.ByteString\n getCodeBytes();",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public long getCode() {\n return code;\n }",
"public String getCode()\n {\n return code;\n }",
"public String getCode()\r\n\t{\r\n\t\treturn code;\r\n\t}",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n\t\treturn code;\r\n\t}",
"public String getCode() {\r\n\t\treturn code;\r\n\t}",
"public String toBinaryCode() {\r\n\t\treturn \"CodeDefinition(\" + mActivityName + \".class\"+ \")\";\r\n\t}",
"public String getCode() {\n\t\treturn codeText.getText().toString();\n\t}",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"com.google.protobuf.ByteString\n getCodeBytes();",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public int getCode();",
"int getCode();",
"int getCode();",
"int getCode();",
"public String getCode() {\n\t\treturn Code;\n\t}",
"Integer getCode();",
"public String getCode()\n {\n return fCode;\n }",
"public String getClassid() {\n return classid;\n }",
"public String getCode() {\n return (String) get(\"code\");\n }",
"public java.lang.String getJavaClass()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public byte[] code();",
"public String getCode() {\n return super.getString(Constants.Properties.CODE);\n }",
"public int getCode () {\n return code;\n }",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"public String getCode() {\n return this.code;\n }",
"public com.google.protobuf.ByteString\n getCodeBytes() {\n java.lang.Object ref = code_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n code_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public java.lang.Class classForCoder(){\n return null; //TODO codavaj!!\n }",
"public String getCode(){\n\t\treturn codeService;\n\t}"
] | [
"0.7930542",
"0.72006893",
"0.72006893",
"0.7151578",
"0.712956",
"0.712956",
"0.7080494",
"0.7027775",
"0.70144325",
"0.70144325",
"0.70144325",
"0.70144325",
"0.70144325",
"0.6981186",
"0.6981186",
"0.69254476",
"0.6860609",
"0.6829563",
"0.6807027",
"0.6795218",
"0.67901295",
"0.67889434",
"0.67755437",
"0.67755437",
"0.6754046",
"0.675166",
"0.67156506",
"0.66752934",
"0.6671193",
"0.6665577",
"0.6651924",
"0.6647944",
"0.66405654",
"0.66313237",
"0.66313237",
"0.66258544",
"0.66086763",
"0.66086763",
"0.66086763",
"0.66086763",
"0.66086763",
"0.66086763",
"0.6607395",
"0.6604517",
"0.66023934",
"0.6581763",
"0.6581763",
"0.6581763",
"0.6581763",
"0.6581763",
"0.6581763",
"0.6581763",
"0.6581616",
"0.6581616",
"0.65731484",
"0.65698004",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.6568475",
"0.655785",
"0.65443844",
"0.65443844",
"0.65443844",
"0.65443844",
"0.6521676",
"0.65213615",
"0.65213615",
"0.65213615",
"0.651563",
"0.649249",
"0.6478698",
"0.6476262",
"0.6458455",
"0.6456943",
"0.64503",
"0.64375556",
"0.642898",
"0.6422365",
"0.6422365",
"0.64023453",
"0.64001316",
"0.6389632",
"0.6389167"
] | 0.8499517 | 0 |
Sets the class code. | public void setClassCode(String classCode) {
this.classCode = classCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setClassCode(java.lang.String classCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CLASSCODE$30);\n }\n target.setStringValue(classCode);\n }\n }",
"void setCode(String code);",
"public void setCode(byte[] code);",
"public void setCode(Code code) {\n this.Code = code;\n }",
"public void setClassCode(ITravelClassType classCode);",
"public final void setCode(java.lang.String code)\n\t{\n\t\tsetCode(getContext(), code);\n\t}",
"public void setClass (\r\n String strClass) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public void xsetClassCode(com.walgreens.rxit.ch.cda.EntityClass classCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.EntityClass target = null;\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_store().add_attribute_user(CLASSCODE$30);\n }\n target.set(classCode);\n }\n }",
"public void setCode (String code) {\r\n\t\tthis.code = code;\r\n\t}",
"public void setCode(int code) {\n this.code = code;\n }",
"public void setCode(int code) {\n this.code = code;\n }",
"public void setCode(String code)\n {\n this.code = code;\n }",
"protected void setCode(@Code int code) {\n\t\tthis.mCode = code;\n\t}",
"public void setCode(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CODE_PROP.get(), value);\n }",
"public void setCode(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CODE_PROP.get(), value);\n }",
"public void setCode(java.lang.String code) {\r\n this.code = code;\r\n }",
"public void setCode(String value) {\n setAttributeInternal(CODE, value);\n }",
"public void setCode(String code) {\n\t\tCode = code;\n\t}",
"public void setCode(String code){\n\t\tthis.code = code;\n\t}",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setCode(String code) {\n this.code = code;\n }",
"public void setClass_(String newValue);",
"public Builder setCode(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n code_ = value;\n onChanged();\n return this;\n }",
"void setCode(Integer aCode);",
"public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}",
"public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}",
"public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}",
"public void setCode(String cod){\n\t\tcodeService = cod;\n\t}",
"public void setCodeset (String codeset)\r\n\t{\r\n\t\tthis.codeset = codeset;\r\n\t}",
"public void setCode(Integer code) {\n this.code = code;\n }",
"public void setCode(String code) {\n\t\tthis.code = code;\n\t}",
"public void setCode(String code) {\n\t\tthis.code = code;\n\t}",
"@Accessor(qualifier = \"code\", type = Accessor.Type.SETTER)\n\tpublic void setCode(final String value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CODE, value);\n\t}",
"public Builder setCode(int value) {\n bitField0_ |= 0x00000001;\n code_ = value;\n onChanged();\n return this;\n }",
"public final void setCode(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String code)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Code.toString(), code);\n\t}",
"public void SetAsClass () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public void setCode(long value) {\n this.code = value;\n }",
"public void setCode(Long code) {\n this.code = code;\n }",
"public void setCode(Long code) {\n this.code = code;\n }",
"public void setCode (java.lang.Long code) {\r\n\t\tthis.code = code;\r\n\t}",
"public Builder setCode(int value) {\n\n code_ = value;\n onChanged();\n return this;\n }",
"public int set_code(String b);",
"public void setCode(org.hl7.fhir.CodeableConcept code)\n {\n generatedSetterHelperImpl(code, CODE$6, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }",
"public void setDataCode(String dataCode);",
"void setCode(LineLoader in) {\n code=in;\n }",
"IPayerEntry setCode(CD value);",
"public void setMainCode(Long mainCode) {\n this.mainCode = mainCode;\n }",
"public void setCode(final int code) {\n this.code = code;\n commited = true;\n }",
"public void setCodeSet(String codeset) {\n\t\tthis.codeset = codeset;\n\t}",
"void setCodes(Code[] codes);",
"public static void __init() {\r\n\t\t__name__ = new str(\"code\");\r\n\r\n\t\t/**\r\n\t\t copyright Sean McCarthy, license GPL v2 or later\r\n\t\t*/\r\n\t\tdefault_0 = null;\r\n\t\tcl_Code = new class_(\"Code\");\r\n\t}",
"public void unsetClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(CLASSCODE$30);\n }\n }",
"public void code (String code) throws LuchthavenException\r\n\t{\r\n\t\tluchthaven.setCode(code);\r\n\t}",
"public void setSwiftCode(java.lang.String swiftCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SWIFTCODE$8, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SWIFTCODE$8);\n }\n target.setStringValue(swiftCode);\n }\n }",
"public String getClassCode() {\n\t\treturn classCode;\n\t}",
"public void setCode(String code) {\n\t\tthis.code = code == null ? null : code.trim();\n\t}",
"public Classification codeOf(Object code) {\n throw new IllegalStateException(\"Unknown definition: \" + this); // basically unreachable\n }",
"public final native void setCssClass(String cssClass) /*-{\r\n\t\tthis.cssClass = cssClass;\r\n\t}-*/;",
"public void setPyCode(String pyCode) {\n this.pyCode = pyCode;\n }",
"@Test\n\tpublic void testGetAndSetCode() {\n\t\tContainerCode code = new ContainerCode( \"CSQU3054383\" ) ;\n\t\tAssert.assertEquals( \"CSQU3054383\" , code.getCode() ) ;\n\t\t\n\t\tcode.setCode( \"TOLU4734787\" ) ;\n\t\tAssert.assertEquals( \"TOLU4734787\" , code.getCode() ) ;\n\t\t\n\t\tcode.setCode( \"TOLU473478\" ) ;\n\t\tAssert.assertEquals( \"TOLU473478\" , code.getCode() ) ;\n\t}",
"public Type setCode(BoundCodeDt<DataTypeEnum> theValue) {\n\t\tmyCode = theValue;\n\t\treturn this;\n\t}",
"public void setCode(BizCodeEnum code) {\n this.code = code;\n }",
"public void setCode(org.openarchives.www.oai._2_0.OAIPMHerrorcodeType.Enum code)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CODE$0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CODE$0);\n }\n target.setEnumValue(code);\n }\n }",
"public void generateCode() {\n\t\tthis.setCharacter();\n\t}",
"public Builder setCodeBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n code_ = value;\n onChanged();\n return this;\n }",
"public abstract BaseQuantityDt setCode(String theCode);",
"public void setAppCode(String appCode)\n\t{\n\t\tthis.appCode = Toolbox.trim(appCode, 3);\n\t}",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }",
"public String setCode() {\n\t\treturn null;\n\t}",
"public void setCode(String code) {\r\n this.code = code == null ? null : code.trim();\r\n }",
"public void setCode(String code) {\r\n this.code = code == null ? null : code.trim();\r\n }",
"public void setCode(String code) {\r\n this.code = code == null ? null : code.trim();\r\n }",
"void setClassType(String classType);",
"public void xsetSwiftCode(org.apache.xmlbeans.XmlString swiftCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SWIFTCODE$8, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SWIFTCODE$8);\n }\n target.set(swiftCode);\n }\n }",
"public void setJavaClass(java.lang.String javaClass)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(JAVACLASS$24);\r\n }\r\n target.setStringValue(javaClass);\r\n }\r\n }",
"public void xsetCode(org.openarchives.www.oai._2_0.OAIPMHerrorcodeType code)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openarchives.www.oai._2_0.OAIPMHerrorcodeType target = null;\n target = (org.openarchives.www.oai._2_0.OAIPMHerrorcodeType)get_store().find_attribute_user(CODE$0);\n if (target == null)\n {\n target = (org.openarchives.www.oai._2_0.OAIPMHerrorcodeType)get_store().add_attribute_user(CODE$0);\n }\n target.set(code);\n }\n }",
"@Override\n\tpublic void setClassValue(final String value) {\n\n\t}",
"public JasminBytecode( String className ) {\n this.className = className;\n this.jasminCode = new ArrayList<>();\n }",
"public void setStateCode(String value) {\n setAttributeInternal(STATECODE, value);\n }",
"public void setClass(UmlClass c) {\n\t\tlogicalClass = c;\n\t}",
"public void setCodeField(java.lang.String codeField) {\n this.codeField = codeField;\n }",
"@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}",
"private void setValidCode() {\n\t\tValidCode.setBounds(330, 170, 180, 30);\n\t}",
"public void setStateCode(java.lang.String stateCode) {\n this.stateCode = stateCode;\n }",
"public Code() {\n\t}",
"public void setMainClass(String mainClass) {\n\t\tthis.mainClass = mainClass;\n\t}",
"public ByteCodeContainer(String className, byte[] byteCode) {\n this.className = className;\n this.byteCode = byteCode;\n }",
"@Override\r\n\tpublic String getCode() {\n\t\treturn code;\r\n\t}"
] | [
"0.76780176",
"0.75510013",
"0.7136012",
"0.711084",
"0.7012258",
"0.68479323",
"0.6802397",
"0.6747464",
"0.6729254",
"0.6722212",
"0.6722212",
"0.67175484",
"0.6661102",
"0.6644135",
"0.66273344",
"0.66232115",
"0.6622471",
"0.6583074",
"0.6582278",
"0.6581186",
"0.6581186",
"0.6581186",
"0.6581186",
"0.6581186",
"0.6581186",
"0.6545513",
"0.6526684",
"0.6517863",
"0.6517441",
"0.6517441",
"0.6517441",
"0.64769286",
"0.6450346",
"0.64338714",
"0.640751",
"0.640751",
"0.637635",
"0.6362284",
"0.6320883",
"0.63099766",
"0.62973493",
"0.6289988",
"0.6289988",
"0.62861073",
"0.62501186",
"0.61919063",
"0.6188185",
"0.61523664",
"0.61490005",
"0.6139387",
"0.6139286",
"0.6129904",
"0.6128255",
"0.611822",
"0.60494435",
"0.6047255",
"0.60353",
"0.6013814",
"0.59763044",
"0.5974332",
"0.59544575",
"0.59355783",
"0.5926459",
"0.5918203",
"0.59081084",
"0.5902595",
"0.5873792",
"0.5868339",
"0.58505505",
"0.58417624",
"0.5820388",
"0.581462",
"0.581462",
"0.581462",
"0.581462",
"0.581462",
"0.581462",
"0.581462",
"0.581462",
"0.581462",
"0.57961595",
"0.57944965",
"0.57944965",
"0.57944965",
"0.5789556",
"0.57799494",
"0.5770051",
"0.57532203",
"0.5741861",
"0.5735131",
"0.5716303",
"0.5711908",
"0.5696006",
"0.5689037",
"0.568681",
"0.56820625",
"0.5676233",
"0.56743956",
"0.5669686",
"0.566795"
] | 0.72301584 | 2 |
Gets the author choice. | public AuthorChoice getAuthorChoice() {
return authorChoice;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getAuthorisor()\n\t{\n\t\treturn authorisor;\n\t}",
"public void setAuthorChoice(AuthorChoice authorChoice) {\n\t\tthis.authorChoice = authorChoice;\n\t}",
"public String getAuthor()\r\n {\r\n return (m_author);\r\n }",
"public IUser getAuthor() {\n\t\treturn message.getAuthor();\n\t}",
"public String getAuthor() {\n\t\treturn auth;\n\t}",
"public Author getAuthor() {\n\t\treturn this.author;\n\t}",
"private String getOpinionAuthor() {\n String opinion = opinionView.getSelectionModel().getSelectedItem();\n String username = \"\";\n int i = 0;\n while (opinion.charAt(i) != ' '){\n username += opinion.charAt(i);\n i++;\n }\n return username;\n }",
"public String getAuthor() {\r\n\t\treturn author;\r\n\t}",
"public java.lang.String getAuthor() {\n return author;\n }",
"String getAuthor();",
"String getAuthor();",
"public java.lang.String getAuthor() {\n return author;\n }",
"public String getAuthor() { return author_; }",
"public String getAuthor() {\r\n\t\treturn oAuthor;\r\n\t}",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\r\n return author;\r\n }",
"public String getAuthor();",
"public User getAuthor() {\n return author;\n }",
"public void getAnAuthor() {\n System.out.println(\"Give author name: \");\n String key = input.next();\n for (Card s: cards) {\n if (s.autherOfBook.equals(key)) {\n System.out.println(s.titleOfBook + \" \" + s.autherOfBook + \" \" + s.subjectOfBook);\n } \n }\n }",
"public Author getAuthor() {\r\n return author;\r\n }",
"public String getAuthor() {\n\treturn author;\n}",
"@Override\r\n\tpublic String getAuthor() {\n\t\treturn super.getAuthor();\r\n\t}",
"public String getAuthor() {\n return mAuthor;\n }",
"@Override\n\tpublic long getAuthorId() {\n\t\treturn _scienceApp.getAuthorId();\n\t}",
"@JsonIgnore\n public Person getAuthor()\n {\n if (getFetchOptions() != null && getFetchOptions().hasAuthor())\n {\n return author;\n }\n else\n {\n throw new NotFetchedException(\"Author has not been fetched.\");\n }\n }",
"public Author selectAuthorById(int id);",
"String getAuthorName();",
"public String getAuthorId() {\n return authorId;\n }",
"public String getAuthor(){\n return author;\n \n }",
"@Override\n\tpublic String author() {\n\t\treturn author;\n\t}",
"public String getAuthorName() {\n return this.authorName;\n }",
"public String getAuthor() {\n\t\treturn null;\r\n\t}",
"public Author getAuthorProfile(int authorId);",
"public String getAuthor() {\n return (String)getAttributeInternal(AUTHOR);\n }",
"public String getAuthorName() {\n return authorName;\n }",
"public String getAuthorName() {\n return authorName;\n }",
"public Integer getAuthorId() {\n return authorId;\n }",
"public Integer getAuthorId() {\n return authorId;\n }",
"public String getAuthor() {\n\t\treturn \"Prasoon, Vikas, Shantanu\";\n\t}",
"public IPerson getAuthor() {\n\t\treturn fAuthor;\n\t}",
"public String getAutor() {\n return autor;\n }",
"@Override\n\tpublic java.lang.String getAuthor() {\n\t\treturn _news_Blogs.getAuthor();\n\t}",
"public Integer getAuthorId() {\n\t\treturn authorId;\n\t}",
"public String getAutor(){\n return autorsText;\n }",
"public abstract String getAuthor();",
"public String getAuthorName() {\n return mAuthorName;\n }",
"public String getAutor() {\n\t\treturn autor;\n\t}",
"default String getAuthor() {\r\n\t\treturn \"unknown\";\r\n\t}",
"public final native String getAuthor() /*-{\n return this.getAuthor();\n }-*/;",
"private String getAuthorUsername(UIMessage message) {\r\n\t\tString toReturn = \"<Author-Not-Found>\";\r\n\t\ttry {\r\n\t\t\ttoReturn = facade.getMemberByID(message.getAuthorID()).getUsername();\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\t// do nothing - return a default user-name\r\n\t\t}\r\n\t\treturn toReturn;\t\t\r\n\t}",
"@HippoEssentialsGenerated(internalName = \"katharsisexampleshippo:author\")\n public String getAuthor() {\n return getProperty(AUTHOR);\n }",
"public String getAuthor() {\n\t\tint start = \"Author:\".length();\n\t\tint end = author.indexOf('<');\n\t\tString parsed = author.substring(start, end).trim();\n\t\treturn parsed;\n\t}",
"public String getBookAuthor() {\n return bookAuthor;\n }",
"public String getCreateAuthor() {\n return createAuthor;\n }",
"public java.lang.String getAuthor()\n\tthrows java.rmi.RemoteException\n {\n\ttry {\n\t Object $result = ref.invoke(this, $method_getAuthor_0, null, 5683193999863030062L);\n\t return ((java.lang.String) $result);\n\t} catch (java.lang.RuntimeException e) {\n\t throw e;\n\t} catch (java.rmi.RemoteException e) {\n\t throw e;\n\t} catch (java.lang.Exception e) {\n\t throw new java.rmi.UnexpectedException(\"undeclared checked exception\", e);\n\t}\n }",
"public Player getAuthor(){\n return this.playerAuthor;\n }",
"public String getAuthorUsername() {\n\t\treturn authorUsername;\n\t}",
"public StrColumn getRecvdAuthorApproval() {\n return delegate.getColumn(\"recvd_author_approval\", DelegatingStrColumn::new);\n }",
"private String getAuthor(CloudEntity post) {\n if (post.getCreatedBy() != null) {\n return \" \" + post.getCreatedBy().replaceFirst(\"@.*\", \"\");\n } else {\n return \"<anonymous>\";\n }\n }",
"private String getAuthor(CloudEntity post) {\n if (post.getCreatedBy() != null) {\n return \" \" + post.getCreatedBy().replaceFirst(\"@.*\", \"\");\n } else {\n return \"<anonymous>\";\n }\n }",
"public String getAuthor(){return author;}",
"@Override\n\tpublic String getAuthor() {\n\t\treturn \"\";\n\t}",
"@ApiModelProperty(value = \"The event author WordPress post ID\")\n public Integer getAuthor() {\n return author;\n }",
"public IAuthor getAuthor();",
"public String getAuthor()\r\n {\r\n return(\"Judy O'Brien\");\r\n }",
"public Choice getChoice() {\n return choice;\n }",
"public org.jooq.test.h2.generatedclasses.tables.pojos.VAuthor fetchOneById(java.lang.Integer value) {\n\t\treturn fetchOne(org.jooq.test.h2.generatedclasses.tables.VAuthor.V_AUTHOR.ID, value);\n\t}",
"public String printAuthor(){\n System.out.println();\n return author;\n }",
"public StrColumn getAuthorApprovalType() {\n return delegate.getColumn(\"author_approval_type\", DelegatingStrColumn::new);\n }",
"public String getAuthor() {\n if (MetadataUGWD_Type.featOkTst && ((MetadataUGWD_Type)jcasType).casFeat_author == null)\n jcasType.jcas.throwFeatMissing(\"author\", \"de.aitools.ie.uima.type.argumentation.MetadataUGWD\");\n return jcasType.ll_cas.ll_getStringValue(addr, ((MetadataUGWD_Type)jcasType).casFeatCode_author);}",
"AuthorDO selectByPrimaryKey(Long authorId);",
"@Override\n public String toString() {\n return getAuthor().getName();\n }",
"String[] getAuthor();",
"public String getTitleOrAutor() {\n return titleOrAutor;\n }",
"public String getQuestion() {\n\t\treturn QAUTHOR + book.getTitle() + \"?\";\n\t}",
"private void displayByAuthor() {\n\t\tString authorHolder; // declares authorHolder\n\t\t\n\t\tSystem.out.println(\"Please enter author of the book you would like displayed:\");\n\t\tauthorHolder = scan.next();\n\t\tscan.nextLine();\n\t\tSystem.out.println(inventoryObject.displayByAuthor(authorHolder));\n\t\tgetUserInfo();\n\t}",
"public int getChoice() {\n\t\treturn choice;\n\t}",
"public int displayMenuAndGetUserSelection(){\n view.promptInt(\"1. Create a Character\");\n view.promptInt(\"2. Update a Character\");\n view.promptInt(\"3. Display all Characters\");\n view.promptInt(\"4. Search for a Character\");\n view.promptInt(\"5. Delete a Character\");\n view.promptInt(\"6. Exit\");\n return view.promptInt(\"Select from one of the above choices\");\n }",
"public Author getAutore(int id) {\n\n\t\tfinal String sql = \"SELECT * FROM author where id=?\";\n\n\t\ttry {\n\t\t\tConnection conn = DBConnect.getConnection();\n\t\t\tPreparedStatement st = conn.prepareStatement(sql);\n\t\t\tst.setInt(1, id);\n\n\t\t\tResultSet rs = st.executeQuery();\n\n\t\t\tif (rs.next()) {\n\n\t\t\t\tAuthor autore = new Author(rs.getInt(\"id\"), rs.getString(\"lastname\"), rs.getString(\"firstname\"));\n\t\t\t\treturn autore;\n\t\t\t}\n\n\t\t\tconn.close();\n\t\t\treturn null;\n\n\t\t} catch (SQLException e) {\n\t\t\t// e.printStackTrace();\n\t\t\tthrow new RuntimeException(\"Errore Db\");\n\t\t}\n\t}",
"public String getAUTHORIZED_BY() {\r\n return AUTHORIZED_BY;\r\n }",
"public String getAUTHORIZED_BY() {\r\n return AUTHORIZED_BY;\r\n }",
"public String Get_Option_User_Choice(String Op_Set_Name)\n {\n for(OptionSet i: opset) {\n if(Op_Set_Name.equalsIgnoreCase(i.getName()))\n return (i.User_Choice_Name()); \n } \n return null;\n }",
"public static int getUserChoice(){\r\n return Input.getInt(\"Enter 1 to add a song, 2 to display all songs, or 3 to quit the program: \");\r\n }",
"public String getAuthorFullName() {\r\n String fullAuthorName = \"\";\r\n\r\n fullAuthorName = author.getAuthorFullName();\r\n return fullAuthorName;\r\n }",
"public void setAuthor(String author) {\n\t\tauth = author;\n\t}",
"private boolean isReviewerAnAuthor(Manuscript theManuscript) {\r\n\t\tboolean isAuthor = false;\r\n\t\tTreeMap<UUID, Account> acctList = new AccountDatabase().deserializeAccountList();\r\n\t\tArrayList<Account> validAccountList = new ArrayList<Account>();\r\n\t\t\r\n\t\tList<UUID> authorlist = theManuscript.getAuthors();\r\n\t\t\r\n\t\tfor(Account anAcct : acctList.values()) {\r\n\t\t\tif (anAcct.getMyReviewer() != null) {\r\n\t\t\t\tif(anAcct.getMyReviewer().getMyID().equals(this.getMyID())) {\r\n\t\t\t\t\tvalidAccountList.add(anAcct);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(Account anAcct : validAccountList) {\r\n\t\t\tif(theManuscript.doesAuthorBelongToManuscript(anAcct.getMyAuthor())) {\r\n\t\t\t\tisAuthor = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\treturn isAuthor;\r\n\t\t\r\n\t}",
"Author findOne(String id);",
"public java.lang.Object getChoiceValue() {\n return this._choiceValue;\n }",
"public Author getById(int id) {\n return null;\n }"
] | [
"0.65636826",
"0.64887536",
"0.6471206",
"0.6445739",
"0.6443386",
"0.6440433",
"0.6375582",
"0.63627094",
"0.6329845",
"0.63232815",
"0.63232815",
"0.63231754",
"0.63192046",
"0.62967163",
"0.6285176",
"0.6285176",
"0.6285176",
"0.6285176",
"0.6285176",
"0.6285176",
"0.6285176",
"0.6285176",
"0.6285176",
"0.6285176",
"0.6285176",
"0.6285176",
"0.62835354",
"0.6269317",
"0.6260816",
"0.6196538",
"0.61873204",
"0.61758786",
"0.6168944",
"0.61670274",
"0.6165941",
"0.61493796",
"0.6135464",
"0.61193085",
"0.609252",
"0.6077265",
"0.6038088",
"0.60243845",
"0.5986671",
"0.597072",
"0.5966122",
"0.59578437",
"0.59578437",
"0.5910421",
"0.5910421",
"0.5905205",
"0.5902223",
"0.5897828",
"0.5883083",
"0.5865908",
"0.58632374",
"0.5846163",
"0.58020663",
"0.5798363",
"0.5786251",
"0.5781521",
"0.57799953",
"0.5768796",
"0.57412773",
"0.5703226",
"0.5689346",
"0.56422603",
"0.56392324",
"0.56177855",
"0.56072676",
"0.5596019",
"0.5596019",
"0.5586015",
"0.55839825",
"0.5559422",
"0.55443937",
"0.5542761",
"0.55306864",
"0.5515258",
"0.5509304",
"0.5506797",
"0.54572165",
"0.54095733",
"0.54024005",
"0.5392335",
"0.53438765",
"0.5335269",
"0.5323073",
"0.53102165",
"0.5291277",
"0.52866036",
"0.52751887",
"0.52751887",
"0.52751607",
"0.5271038",
"0.5265459",
"0.52635056",
"0.5257841",
"0.5256459",
"0.52523595",
"0.52437454"
] | 0.8350315 | 0 |
Sets the author choice. | public void setAuthorChoice(AuthorChoice authorChoice) {
this.authorChoice = authorChoice;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AuthorChoice getAuthorChoice() {\n\t\treturn authorChoice;\n\t}",
"@Override\r\n\tpublic void setAuthor(String author) {\n\t\tsuper.setAuthor(author);\r\n\t}",
"public void setAuthor(String author) {\r\n String old = this.author;\r\n this.author = author;\r\n this.changeSupport.firePropertyChange(\"author\", old, this.author );\r\n }",
"public void setAuthor(String author)\r\n {\r\n m_author = author;\r\n }",
"public void setAuthor(Player author){\n this.playerAuthor = author;\n }",
"public void setAuthor(String author) {\n\t\tauth = author;\n\t}",
"public void setAuthor(Author author) {\r\n if (author != null) {\r\n this.author = author;\r\n }\r\n }",
"public void setAuthor(String value) {\n setAttributeInternal(AUTHOR, value);\n }",
"public void setAuthor(String author) {\r\n this.author = author;\r\n }",
"public void setAuthor(String author) {\n\tthis.author = author;\n}",
"public void setAuthor(String author) {\r\n\t\tthis.author = author;\r\n\t}",
"public void setAuthor(Person author)\n {\n this.author = author;\n }",
"public void setAuthor(String author) {\n this.author = author;\n }",
"public void setAuthor(String author) {\n this.author = author;\n }",
"public void setAuthor(String author) {\n this.author = author;\n }",
"public void setAuthor(String author) {\n this.author = author;\n }",
"public void setAuthor(String author) {\n this.author = author;\n }",
"public void setAuthor(final Author author) {\n\t\tthis.author = author;\n\t}",
"public com.babbler.ws.io.avro.model.BabbleValue.Builder setAuthor(java.lang.String value) {\n validate(fields()[0], value);\n this.author = value;\n fieldSetFlags()[0] = true;\n return this;\n }",
"public final native void setAuthor(String author) /*-{\n this.setAuthor(author);\n }-*/;",
"public void setAuthorisor(String authorisor)\n\t{\n\t\tthis.authorisor = Toolbox.trim(authorisor, 4);\n\t}",
"@Override\n \tpublic void setAuthorString(String authorString) {\n \t\tthis.authorString = authorString;\n \t}",
"@Override\n public void author_()\n {\n }",
"public void setAuthor(String author) {\n this.author = author == null ? null : author.trim();\n }",
"public void setAuthor(String author) {\n this.author = author == null ? null : author.trim();\n }",
"public void setAuthor(String author) {\n this.author = author == null ? null : author.trim();\n }",
"public void setAuthor(String author) {\n this.author = author == null ? null : author.trim();\n }",
"public void setAuthorLocal(String author) {\r\n\t\toAuthor = author;\r\n\t}",
"@Override\n\tpublic void setAuthor(java.lang.String author) {\n\t\t_news_Blogs.setAuthor(author);\n\t}",
"public void setAuthor(IPerson author) throws IllegalArgumentException {\n\t\tif (null == author)\n\t\t\tthrow new IllegalArgumentException(\"author null\");\n\n\t\tIPerson oldAuthor = getAuthor();\n\n\t\tif (author.equals(oldAuthor))\n\t\t\treturn;\n\n\t\tfAuthor = author;\n\n\t\tfAuthor.addPropertyChangeListener(new PropertyChangeListener() {\n\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\t\tfirePropertyChange(evt);\n\t\t\t}\n\t\t});\n\n\t\tfirePropertyChange(\"author\", oldAuthor, author);\n\t}",
"@Override\n \tpublic void setAuthors(String authors) {\n \t\t// TODO Auto-generated method stub\n \n \t}",
"public void updateAuthor(Author author);",
"public void setAuthors(String _authors) { authors = _authors; }",
"public void setAutor(String autor) {\n this.autor = autor;\n }",
"public void setAuthor(String v) {\n if (MetadataUGWD_Type.featOkTst && ((MetadataUGWD_Type)jcasType).casFeat_author == null)\n jcasType.jcas.throwFeatMissing(\"author\", \"de.aitools.ie.uima.type.argumentation.MetadataUGWD\");\n jcasType.ll_cas.ll_setStringValue(addr, ((MetadataUGWD_Type)jcasType).casFeatCode_author, v);}",
"public void addAuthorAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Author\", ViewNavigator.ADD_AUTHOR_SCENE);\n\t}",
"public AssignedAuthor() {\n \tthis.classCode = \"ASSIGNED\";\n }",
"@Override\n public void author()\n {\n }",
"public String getAuthor() {\r\n\t\treturn author;\r\n\t}",
"@Override\n\tpublic String author() {\n\t\treturn author;\n\t}",
"Builder addAuthor(String value);",
"@Override\n\tpublic void setAuthorId(long authorId) {\n\t\t_scienceApp.setAuthorId(authorId);\n\t}",
"public String getAuthor() { return author_; }",
"public String getAuthor() {\r\n return author;\r\n }",
"public String getAuthor() {\n\t\treturn auth;\n\t}",
"public void setAuthorId(String authorId) {\n this.authorId = authorId;\n }",
"public String getAuthor() {\r\n\t\treturn oAuthor;\r\n\t}",
"public void editAuthor(final View view) {\n final Author author = (Author) view.getTag();\n\n final Dialog dialog = new Dialog(this);\n dialog.setContentView(R.layout.dialog_edit_author);\n dialog.setTitle(R.string.title_dialog_edit_author);\n\n final AutoCompleteTextView textAuthor = (AutoCompleteTextView) dialog.findViewById(R.id.editAuthor_textAuthor);\n textAuthor.setText(author.name);\n textAuthor.setAdapter(mAutoCompleteAdapter);\n\n Button saveButton = (Button) dialog.findViewById(R.id.editAuthor_confirm);\n Button cancelButton = (Button) dialog.findViewById(R.id.editAuthor_cancel);\n\n saveButton.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n String authorName = textAuthor.getText().toString().trim();\n\n String errorMessage = null;\n if (authorName.length() == 0) {\n errorMessage = getString(R.string.message_author_missing);\n } else if (!author.name.equals(authorName)) {\n if (mAuthorMap.containsKey(authorName)) {\n String message = getString(R.string.message_author_already_present);\n errorMessage = String.format(message, authorName);\n } else {\n int authorIndex = mAuthorList.indexOf(author);\n\n Author a = new Author();\n a.name = authorName;\n Author authorDb = authorService.getAuthorByCriteria(a);\n\n if (authorDb != null) {\n a = authorDb;\n }\n mAuthorList.remove(authorIndex);\n mAuthorList.add(authorIndex, a);\n mAuthorArrayAdapter.notifyDataSetChanged();\n mAuthorMap.remove(author.name);\n mAuthorMap.put(authorName, a);\n }\n }\n\n if (errorMessage == null) {\n textAuthor.setText(null);\n textAuthor.setError(null);\n dialog.dismiss();\n } else {\n textAuthor.setError(errorMessage);\n }\n }\n });\n cancelButton.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }",
"public void setAuthorName(String authorName) {\n this.authorName = authorName;\n }",
"public void setAuthorName(String authorName) {\n this.authorName = authorName;\n }",
"public void setAuthorId(Integer authorId) {\n this.authorId = authorId;\n }",
"public void setAuthorId(Integer authorId) {\n this.authorId = authorId;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"public String getAuthor() {\n return author;\n }",
"@Override\r\n\tpublic String getAuthor() {\n\t\treturn super.getAuthor();\r\n\t}",
"public void setAuthors(String[] authors) {\n this.authors = authors;\n }",
"public void setAuthors(Author[] authors) {\n this.authors = authors;\n }",
"public void setAuthors(Author[] authors) {\n this.authors = authors;\n }",
"public String getAuthor(){\n return author;\n \n }",
"public String getAuthorId() {\n return authorId;\n }",
"public void assignAuthorisedUser(final boolean val) {\n authorisedUser = val;\n }",
"public void setCreator(User creator) {\n this.creator = creator;\n }",
"public String getAuthor() {\n\treturn author;\n}",
"Builder addAuthor(Organization value);",
"public java.lang.String getAuthor() {\n return author;\n }",
"public void setChoice(Choice choice) {\n this.choice = choice;\n }",
"public String getAuthorisor()\n\t{\n\t\treturn authorisor;\n\t}",
"public String getAuthor() {\n\t\treturn null;\r\n\t}",
"public YouTubeVideo setAuthor(YouTubeChannel author) {\n this.channelId = null;\n this.author = author;\n return this;\n }",
"protected static void setAuthorizer(com.tangosol.net.security.Authorizer authorizer)\n {\n __s_Authorizer = authorizer;\n }",
"@Override\n\tpublic long getAuthorId() {\n\t\treturn _scienceApp.getAuthorId();\n\t}",
"public void setReviewedBy(java.lang.String value);",
"public java.lang.String getAuthor() {\n return author;\n }",
"@Override\n\tpublic String getAuthor() {\n\t\treturn \"\";\n\t}",
"public void setAuthorId(Integer authorId) {\n\t\tthis.authorId = authorId;\n\t}",
"public String getAuthor() {\n return mAuthor;\n }",
"public final void author() throws RecognitionException {\n Token ID1=null;\n\n try {\n // /Users/valliant/Projects/java/CFML/cfml.parsing/antlr/Javadoc.g:13:8: ( '@author' ID )\n // /Users/valliant/Projects/java/CFML/cfml.parsing/antlr/Javadoc.g:13:10: '@author' ID\n {\n match(input,7,FOLLOW_7_in_author42); \n\n ID1=(Token)match(input,ID,FOLLOW_ID_in_author44); \n\n System.out.println(\"author \"+(ID1!=null?ID1.getText():null));\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }",
"public void candidateDetails(Author authorObject);",
"public BrowseHistoryContentValues putThreadAuthorId(long value) {\n mContentValues.put(BrowseHistoryColumns.THREAD_AUTHOR_ID, value);\n return this;\n }",
"public void setAuthorParameters(AuthorParameters authorParameters) {\n\t\tthis.authorParameters = authorParameters;\n\t}",
"public Integer getAuthorId() {\n\t\treturn authorId;\n\t}",
"public Author getAuthor() {\r\n return author;\r\n }",
"public void addAuthor(Author author){\n authors.add(author);\n }",
"@ApiModelProperty(value = \"The event author WordPress post ID\")\n public Integer getAuthor() {\n return author;\n }",
"public User getAuthor() {\n return author;\n }",
"public Builder setAuthorities(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureAuthoritiesIsMutable();\n authorities_.set(index, value);\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }",
"public String getAuthorName() {\n return this.authorName;\n }",
"Builder addAuthor(Person value);",
"public Author selectAuthorById(int id);",
"public void printAuthor()\n {\n System.out.println(\"by: \" + author);\n }"
] | [
"0.73044825",
"0.7094507",
"0.70298004",
"0.70212334",
"0.70113254",
"0.7011184",
"0.7000919",
"0.69269884",
"0.6920577",
"0.6853191",
"0.6817616",
"0.68169636",
"0.6806323",
"0.6806323",
"0.6806323",
"0.6806323",
"0.6806323",
"0.67827326",
"0.6712917",
"0.6691156",
"0.65003306",
"0.64212644",
"0.6318236",
"0.6297746",
"0.6297746",
"0.6297746",
"0.6297746",
"0.62774485",
"0.6271437",
"0.6227835",
"0.6209669",
"0.61536723",
"0.6137483",
"0.6100804",
"0.5989443",
"0.5965401",
"0.59519315",
"0.5929024",
"0.5871307",
"0.58569044",
"0.58210766",
"0.5805865",
"0.5803249",
"0.576945",
"0.5765467",
"0.576516",
"0.5754121",
"0.5727396",
"0.5726885",
"0.5726885",
"0.5724987",
"0.5724987",
"0.57163596",
"0.57163596",
"0.57163596",
"0.57163596",
"0.57163596",
"0.57163596",
"0.57163596",
"0.57163596",
"0.57163596",
"0.57163596",
"0.57163596",
"0.57163596",
"0.56771874",
"0.5674614",
"0.5672563",
"0.5672563",
"0.56671286",
"0.56385887",
"0.5595923",
"0.55872697",
"0.5556373",
"0.5551244",
"0.55355996",
"0.55308187",
"0.5511492",
"0.55112094",
"0.5506557",
"0.54991674",
"0.5497636",
"0.5489493",
"0.54874456",
"0.54709816",
"0.54682654",
"0.5466652",
"0.5460101",
"0.5455934",
"0.5455093",
"0.5454596",
"0.5438299",
"0.5434758",
"0.54345983",
"0.5413654",
"0.54122156",
"0.540905",
"0.5407238",
"0.54056865",
"0.54001796",
"0.5395592"
] | 0.83014613 | 0 |
Turns the factory off. | public void powerOff()
{
if(active)
{
if (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {
setActivationLever(false);
}
//lots of code to make the furnace turn off, without loosing contents.
Furnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();
byte data = furnace.getData().getData();
ItemStack[] oldContents = furnace.getInventory().getContents();
furnace.getInventory().clear();
factoryPowerSourceLocation.getBlock().setType(Material.FURNACE);
furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();
furnace.setRawData(data);
furnace.update();
furnace.getInventory().setContents(oldContents);
//put active to false
active = false;
//reset the production timer
currentProductionTimer = 0;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void turnOff() {\n\n\t}",
"public void turn_off () {\n this.on = false;\n }",
"public void off() {\n\n\t}",
"public static void shut () {\r\n if(factory != null) { \t \r\n factory.finalixe(); \r\n }\r\n factory = null ;\r\n }",
"public void turnOff() {\n\t\tisOn = false;\n\t}",
"public void turnOff() {\n\t\tOn = false;\n\t\tVolume = 1;\n\t\tChannel = 1;\n\t}",
"public void resetFactory() {\n\t\ttry {\n\t\t\tif(null != rawSrv){\n\t\t\trawSrv.resetCfgGroup(ConfigType.RESET_FACTORY);\n\t\t\t}\n\t\t} catch (TVMException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void switchOff();",
"public void shutdownFactory() {\n // TODO(oalexan1) The app does not exit gracefully. Need to understand why.\n m_robot_factory.shutdown();\n m_microphone_factory.shutdown();\n }",
"public void turnOff() {\n update(0,0,0);\n this.status = false;\n }",
"public void turnOff() {\n // set the flag\n onFlag = false;\n \n // set the image\n setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), offImageIcon));\n }",
"public void stopFactory() {\n if (isStarted) {\n logger.info(\"Stopping SessionListenerFactory.\");\n APIEventBus.getInstance().unsubscribe(this);\n isStarted = false;\n }\n }",
"@Override\n\tpublic void off() {\n\n\t}",
"public void disable()\n {\n openGate = null;\n }",
"public void off() {\n // Sets the LED pin state to (low)\n ledPin.low();\n }",
"public void reset() {\n onoff.reset();\n itiefe.reset();\n itiefe.setEnabled(false);\n }",
"@Override\r\n\tpublic void off() {\n\r\n\t}",
"@Override\n\tpublic void off() {\n\t\tSystem.out.println(\"turn off the \"+name+\" Light\");\n\t}",
"public void setEngineOff();",
"public JsonFactory disable(Feature f)\n/* */ {\n/* 549 */ this._factoryFeatures &= (f.getMask() ^ 0xFFFFFFFF);\n/* 550 */ return this;\n/* */ }",
"public void engineOff(){\n engine = false;\n }",
"public void securityOff()\n {\n m_bSecurity = false;\n }",
"public void setOff(){\n state = false;\n //System.out.println(\"El requerimiento esta siendo atendido!\");\n }",
"public void off() throws Exception;",
"@Input(\"onOff\")\n synchronized public void onOff() {\n try {\n _switchJMXSource.setValue(false);\n } catch (PropertyVetoException e) {}\n }",
"@StopStep(localName=\"default-xml-factory\")\n public static void stopDefaultXmlFactory(LifecycleContext context)\n {\n // remove the joost transformer factory if it was created by this step.\n if( joostFactoryCreated ) {\n joostFactoryCreated = false;\n removeTransformerFactoryFactory(JOOST_FACTORY_NAME);\n }\n\n // remove the default xml transformer factory if it was created by this step.\n if( saxonFactoryCreated ) {\n saxonFactoryCreated = false;\n removeTransformerFactoryFactory(SAXON_FACTORY_NAME);\n }\n\n // remove the default xml transformer factory if it was created by this step.\n if( xsltcFactoryCreated ) {\n xsltcFactoryCreated = false;\n removeTransformerFactoryFactory(XSLTC_FACTORY_NAME);\n }\n\n // remove the default xml transformer factory if it was created by this step.\n if( xalanFactoryCreated ) {\n xalanFactoryCreated = false;\n removeTransformerFactoryFactory(XALAN_FACTORY_NAME);\n }\n\n // remove the default document builder factory if it was created by this step.\n if( documentBuilderFactoryCreated ) {\n documentBuilderFactoryCreated = false;\n removeDocumentBuilderFactoryFactory(DEFAULT_DOCUMENT_BUILDER_FACTORY_NAME);\n }\n \n // remove the default xml transformer factory if it was created by this step.\n if( transformerFactoryCreated ) {\n transformerFactoryCreated = false;\n removeTransformerFactoryFactory(DEFAULT_TRANSFORMER_FACTORY_NAME);\n }\n\n // remove the default xml parser factory if it was created by this step.\n if( saxParserFactoryCreated ) {\n saxParserFactoryCreated = false;\n removeSaxParserFactoryFactory(DEFAULT_SAX_PARSER_FACTORY_NAME);\n }\n }",
"@Override\n public void turnOff() {\n System.out.println(\"this wont happen\");\n }",
"@Override\r\n public void turnOff() {\r\n isOn = false;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_OFF);\r\n if (this.engaged()) {\r\n disengageLoads();\r\n }\r\n }",
"public void off() {\n this.relay.set(Relay.Value.kOff);\n }",
"public void disable() {\n operating = false;\n }",
"void turnOff() throws ActorServiceCallException;",
"private void off(){\n\n\t\t// if light is on and there is a flash object\n\t\tif (_flash != null && isFlashOn){\n\n\t\t\t_flash.off();\n\t\t\tisFlashOn = false;\n\t\t}\n\t}",
"public void turnOff(){\n vendingMachine = null;\n Logger.getGlobal().log(Level.INFO,\" Turning Off...\");\n }",
"public void disable()\r\n\t{\r\n\t\tenabled = false;\r\n\t}",
"public JsonFactory disable(JsonGenerator.Feature f)\n/* */ {\n/* 644 */ this._generatorFeatures &= (f.getMask() ^ 0xFFFFFFFF);\n/* 645 */ return this;\n/* */ }",
"@StopStep(localName=\"xml-factory-lifecycle\")\n public static void stopXmlFactory(LifecycleContext context) \n {\n XmlFactoryLifecycle.stopLifecycle( context );\n }",
"public void disable();",
"void unsetSystem();",
"public static void disable() {\n if (lock.compareAndSet(false, true)) {\n\n RxJavaPlugins.setOnCompletableAssembly(null);\n RxJavaPlugins.setOnSingleAssembly(null);\n RxJavaPlugins.setOnMaybeAssembly(null);\n\n RxJavaPlugins.setOnObservableAssembly(null);\n RxJavaPlugins.setOnFlowableAssembly(null);\n RxJavaPlugins.setOnConnectableObservableAssembly(null);\n RxJavaPlugins.setOnConnectableFlowableAssembly(null);\n\n RxJavaPlugins.setOnParallelAssembly(null);\n\n lock.set(false);\n }\n }",
"public Boolean off()\r\n\t{\r\n\t\tString cmd;\r\n\t\t\r\n\t\tcmd = \"flippers/off?null=true\";\r\n\t\treturn cmdSimpleResult(cmd);\r\n\t}",
"public void disable() {\n\t\tm_runner.disable();\n\t}",
"protected void forceMockUpMode(){\n teardown();\n }",
"public void disable() {\r\n m_enabled = false;\r\n useOutput(0, 0);\r\n }",
"public void setSwitchOff() throws UnavailableDeviceException, ClosedDeviceException, IOException {\n\t\tswitch1.setValue(true);\n\t\tthis.switchState = false; \n\t}",
"protected void unsetContribution(ComponentFactory factory) {\n\t\tComponentInstance ci;\n\t\tComponent c;\n\t\tsynchronized (this) {\n\t\t\tci = mapping.remove(factory);\n\t\t\tc = (Component) ci.getInstance();\n\t\t\ttabs.removeComponent(c);\n\t\t}\n\t\tc.detach();\n\t\tci.dispose();\n\t}",
"public void off() {\n\t\tSystem.out.println(\"Tuner is off\");\n\t}",
"public boolean deactivate() {\n this._factory.shutdown();\n return true;\n }",
"public void disable ( ) {\r\n\t\tenabled = false;\r\n\t}",
"public void disable() {\n\t\tm_enabled = false;\n\t\tuseOutput(0);\n\t}",
"private void turnOffCamera() {\n playSound();\n preview.removeAllViews();\n params = camera.getParameters();\n params.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);\n camera.setParameters(params);\n camera.stopPreview();\n camera.release();\n camera = null;\n isCameraOn = false;\n strobo.setChecked(false);\n turnOffFlash();\n toggleButtonImageCamera();\n\n }",
"public void switchOff() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"f\");\n setCurrentState(false);\n }",
"public void reset() {\n this.inhibited = false;\n this.forced = false;\n }",
"protected abstract void switchOffCustom();",
"public void disable(){\r\n\t\tthis.activ = false;\r\n\t}",
"void disableFlipMode();",
"public void disable() {\n TalonHelper.configNeutralMode(Arrays.asList(armMotor, armMotorSlave), NeutralMode.Coast);\n }",
"public void stopMock() {\n isActive = false;\n }",
"public void resetFactory() {\n\t\tcurrent = null;\n\t\tnb_rounds = 0;\n\t\tnb_to_train = 0;\n\t\twhile(!training_queue.isEmpty())\n\t\t\ttraining_queue.remove();\n\t}",
"public static void disableFlyMode(Context context){\n\t\tUtils.sleepForInSecs(5);\n\t}",
"public void stop() {\n enable = false;\n }",
"public void setSensorOff() {\n\n }",
"void disable();",
"void disable();",
"public void lightsOff() {\n PHBridge bridge = PHHueSDK.getInstance().getSelectedBridge();\n PHLightState lightState = new PHLightState();\n lightState.setOn(false);\n bridge.setLightStateForDefaultGroup(lightState);\n }",
"void deactivate() {\n\t\tanimalTemplate = null;\n\t\tscope=null;\n\t\ttriggerOnID=false;\n\t\tstate = null;\n\t\tlog.debug(bundleMarker, \"deactivating...\");\n\t}",
"public void disable() {\n \t\t\tsetEnabled(false);\n \t\t}",
"void unsetState();",
"@Override\n public void onRemoveFactory(final FactoryServiceContext<StreamProfileInternal> factoryServiceContext,\n final FactoryInternal factory)\n {\n m_ConfigListener.unregisterConfigListener(factory.getPid());\n }",
"public void factoryResetWithEraseSD() {\n Intent intent = new Intent(\n com.android.internal.os.storage.ExternalStorageFormatter.FORMAT_AND_FACTORY_RESET);\n intent.setComponent(com.android.internal.os.storage.ExternalStorageFormatter.COMPONENT_NAME);\n mContext.startService(intent);\n }",
"public synchronized void unbindService(BehaviourInferenceAlgorithmRegistry registry) {\n \tregistry = null;\n logger.info(\"BehaviourInferenceAlgorithmRegistry service disconnected.\");\n }",
"public void turnOff(){\n\t\t//**************************************************\n\t\t// Verifica se não foi finalizada ou mesmo não foi inicializada\n\t\tif (!this.isInitialized)\n\t\t\treturn;\n\t\t\n\t\t//**************************************************\n\t\t// Seta a flag para não inicializado para evitar null exception\n\t\tthis.isInitialized = false;\n\t\t\n\t\t//**************************************************\n\t\t// Controle para Terminar as Threads\n\t\tboolean retry = true;\n\t\t//**************************************************\n\t\t// Termina os loopings das Threads\n\t\tthis.datagramSocketClientReceiverWorker.turnOff();\n\t\tthis.datagramSocketClientSenderWorker.turnOff();\n\t\t//**************************************************\n\t\t// Tenta matar a Thread de recebimento na FACA!!!\n\t\twhile(retry){\n\t\t\ttry {\n\t\t\t\tthis.datagramSocketClientReceiverThread.join();\n\t\t\t\tretry = false;\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t\t//**************************************************\n\t\t// Reutilizando a Flag-- Isso é errado... mas fazer o que?\n\t\tretry = true;\n\t\t//**************************************************\n\t\t// Tenta matar a Thread de envio na BALA!!!!\n\t\twhile(retry){\n\t\t\ttry {\n\t\t\t\tthis.datagramSocketClientSenderThread.join();\n\t\t\t\tretry = false;\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t}",
"public void unregisterAdapters(IAdapterFactory factory);",
"public void allOff() {\r\n\t\tsetAllColor(0, 0, 0);\r\n\t}",
"private OffState() {\n instance = this;\n }",
"public static void traceOff() {\r\n\t\ttraceOn = false;\r\n\r\n\t}",
"public JsonFactory disable(JsonParser.Feature f)\n/* */ {\n/* 588 */ this._parserFeatures &= (f.getMask() ^ 0xFFFFFFFF);\n/* 589 */ return this;\n/* */ }",
"public boolean offForEvaluation();",
"private static void turnFlashlightOff() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_OFF);\n cam.setParameters(p);\n }",
"private void tryCleanupFactory(final FactoryInternal factory)\n {\n try\n {\n factory.cleanup();\n }\n catch (final Exception e)\n {\n m_Logging.error(e, \"Unable to cleanup factory with product type [%s]\", factory.getProductType());\n }\n }",
"void disable() {\n }",
"protected void setOffLineMode () {\n if (theDowntimeMgr != null)\n theDowntimeMgr.setOnLine(false);\n }",
"public void noteOff()\n\t{\n\t\ttimeFromOff = 0f;\n\t\tisTurnedOff = true;\n\t}",
"public void shutdown() {\n this.dontStop = false;\n }",
"public FXMLPropertiesDisabler() {\n this(OS.get());\n }",
"@Override\n\tprotected void takeDown() {\n\t\ttry{\n\t\t\tDFService.deregister(this);\n\t\t}\n\t\tcatch(FIPAException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void unsetSOID();",
"void unsetPluginstate();",
"private void tryMakeFactoryUnavailable(final FactoryInternal factory)\n {\n try\n {\n factory.makeUnavailable();\n }\n catch (final Exception e)\n {\n m_Logging.error(e, \"Unable to make factory with product type [%s] unavailable\", \n factory.getProductType());\n }\n }",
"@Override\n public void stop() {\n detector.disable();\n }",
"void unsetSpecimen();",
"public void deactivate() {\n this.active = false;\n }",
"public void turnOffSystemOutput() {\n if (originalSystemOut != null) {\n System.setOut(originalSystemOut);\n originalSystemOut = null;\n\n // WARNING: It is not possible to reconfigure the logger here! This\n // method is called in the UI thread, so reconfiguring the logger\n // here would mean that the UI thread waits for the logger, which\n // could cause a deadlock.\n }\n }",
"protected EnumTypeAdapterFactory suppressUnregisteredLogging(){\n\t\tlogUnregistered = false;\n\t\treturn this;\n\t}",
"public void disablecameraLights(){\n \tcamLights.set(true);\n }",
"void unsetType();",
"public void stop() {\n m_enabled = false;\n }",
"public void unsetMoveMode(CSGSolid solid)\r\n\t{\r\n\t\tmoveMode = false;\r\n\t\tthis.solid = solid;\r\n\t\tthis.solid2 = null;\r\n\t\tsolid.light();\r\n\t}",
"@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }",
"public void shutdownSilently() {\n shutdownSilently(true);\n }",
"public void toggle() {\n toggle(false);\n }"
] | [
"0.6924758",
"0.6884205",
"0.68068707",
"0.67486644",
"0.6743536",
"0.6661426",
"0.658159",
"0.6541921",
"0.6530166",
"0.6496045",
"0.6421562",
"0.6378452",
"0.63720775",
"0.6361164",
"0.635951",
"0.6309541",
"0.6306422",
"0.6291011",
"0.6257392",
"0.6253002",
"0.61979187",
"0.6180794",
"0.610395",
"0.60974365",
"0.60840636",
"0.6057202",
"0.6033031",
"0.60184014",
"0.60172987",
"0.60080314",
"0.59157956",
"0.5912154",
"0.5883917",
"0.5882901",
"0.58643436",
"0.58515424",
"0.5827502",
"0.58093375",
"0.57993084",
"0.5794424",
"0.57928145",
"0.5789616",
"0.5781536",
"0.5771603",
"0.57700205",
"0.5753447",
"0.57244754",
"0.5714415",
"0.57121456",
"0.5710981",
"0.570951",
"0.57084316",
"0.57077664",
"0.5700876",
"0.5697058",
"0.56917304",
"0.56837714",
"0.5658654",
"0.56561375",
"0.5646343",
"0.5633646",
"0.5615584",
"0.5615584",
"0.56132096",
"0.55973655",
"0.55911034",
"0.5586612",
"0.5584303",
"0.5564532",
"0.5562923",
"0.5558257",
"0.5545148",
"0.5544332",
"0.5531351",
"0.55249506",
"0.5520376",
"0.5514966",
"0.5511193",
"0.55091524",
"0.55055153",
"0.5495495",
"0.54803264",
"0.5479141",
"0.54765",
"0.54760087",
"0.54732454",
"0.5464597",
"0.54614514",
"0.54607975",
"0.5449313",
"0.54484886",
"0.544735",
"0.5444959",
"0.5435924",
"0.5435488",
"0.5435215",
"0.54277605",
"0.5419111",
"0.5416812",
"0.54092175"
] | 0.5601641 | 64 |
Turns the factory on | public void powerOn()
{
//put active to true
active = true;
// Set attached lever
if (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {
setActivationLever(true);
}
//lots of code to make the furnace light up, without loosing contents.
Furnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();
byte data = furnace.getData().getData();
ItemStack[] oldContents = furnace.getInventory().getContents();
furnace.getInventory().clear();
factoryPowerSourceLocation.getBlock().setType(Material.BURNING_FURNACE);
furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();
furnace.setRawData(data);
furnace.update();
furnace.getInventory().setContents(oldContents);
//reset the production timer
currentProductionTimer = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFeatureFactory(FeatureFactory featureFactory) {\n factory = featureFactory;\n }",
"void setFactoryBean( FactoryBean factory );",
"public Factory() {\n\t\tsuper();\n\t}",
"public final JsonFactory configure(JsonGenerator.Feature f, boolean state)\n/* */ {\n/* 626 */ return state ? enable(f) : disable(f);\n/* */ }",
"protected void setFactory(HttpClientFactory factory) {\n\t\tthis.factory = factory;\n\t}",
"public Factory() {\n this(getInternalClient());\n }",
"public final JsonFactory configure(Feature f, boolean state)\n/* */ {\n/* 532 */ return state ? enable(f) : disable(f);\n/* */ }",
"private ServiceFactory() {}",
"private FactoryTransformer(Factory factory) {\n super();\n iFactory = factory;\n }",
"public void setStubFactoryFactory(boolean paramBoolean, PresentationManager.StubFactoryFactory paramStubFactoryFactory) {\n/* 176 */ if (paramBoolean) {\n/* 177 */ this.dynamicStubFactoryFactory = paramStubFactoryFactory;\n/* */ } else {\n/* 179 */ this.staticStubFactoryFactory = paramStubFactoryFactory;\n/* */ } \n/* */ }",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"public interface Factory {\r\n}",
"private void setupFactory(Factory f) {\n f.createQuery(f.getModel().getRootPackage()).filterChildren(e -> {\n e.setFactory(f);\n return false;\n }).list();\n }",
"private void configureEmulatorActivated(DebuggerPcodeEmulatorFactory factory) {\n\t\tsetEmulatorFactory(factory);\n\t}",
"Sticker.Factory getStickerFactory();",
"private StickFactory() {\n\t}",
"public LanterneFactoryImpl() {\n\t\tsuper();\n\t}",
"public void setObjectFactory(PoolObjectFactory factory) {\n if (initialized)\n throw new IllegalStateException(INITIALIZED);\n this.factory = factory;\n }",
"MakeflowFactory getMakeflowFactory();",
"@Autowired\n\tpublic void setFactory(SessionFactory factory) {\n\t\tthis.factory = factory;\n\t}",
"public final JsonFactory configure(JsonParser.Feature f, boolean state)\n/* */ {\n/* 571 */ return state ? enable(f) : disable(f);\n/* */ }",
"Factory getFactory()\n {\n return configfile.factory;\n }",
"public IndirectionsmeasuringpointFactoryImpl() {\n super();\n }",
"public void resetFactory() {\n\t\ttry {\n\t\t\tif(null != rawSrv){\n\t\t\trawSrv.resetCfgGroup(ConfigType.RESET_FACTORY);\n\t\t\t}\n\t\t} catch (TVMException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void startFactory() {\n if (!isStarted) {\n logger.info(\"Starting SessionListenerFactory.\");\n APIEventBus.getInstance().subscribe(this);\n isStarted = true;\n }\n }",
"PlanningFactory getFactory();",
"public Check_State(Factory factory) {\n this.factory = factory;\n }",
"public Factory(BaseProcessingEnvImpl env) {\n _env = env;\n }",
"public void setInitialFactory(String initialFactory) {\r\n this.initialFactory = initialFactory;\r\n }",
"public BuiltinFactoryImpl() {\n\t\tsuper();\n\t}",
"public JsonFactory enable(Feature f)\n/* */ {\n/* 540 */ this._factoryFeatures |= f.getMask();\n/* 541 */ return this;\n/* */ }",
"public AoDai chooseFactory(){\n\t\treturn new ModernAoDai();\n\t}",
"public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }",
"public ServiceFactoryImpl() {\n\t\tsuper();\n\t}",
"Demo1Factory getDemo1Factory();",
"public void setFactory(ValueFactory<K, V> factory)\n {\n this.factory = factory;\n }",
"public borFactoryImpl() {\n\t\tsuper();\n\t}",
"protected void configureFopFactory() {\n //Subclass and override this method to perform additional configuration\n }",
"@Override\n\tpublic void turnOn() {\n\n\t}",
"public ControlFactoryImpl() {\n\t\tsuper();\n\t}",
"public static synchronized void setFactory(final ANSSRegionsFactory factory) {\n if (SINGLETON != null) {\n SINGLETON.shutdown();\n }\n SINGLETON = factory;\n }",
"public synchronized static void setFactory(ImageDecoderFactory factory) {\n defaultInstance = factory ;\n }",
"public FvFactoryImpl() {\n\t\tsuper();\n\t}",
"public void setEngineOn();",
"public PresentationManager.StubFactoryFactory getStubFactoryFactory(boolean paramBoolean) {\n/* 167 */ if (paramBoolean) {\n/* 168 */ return this.dynamicStubFactoryFactory;\n/* */ }\n/* 170 */ return this.staticStubFactoryFactory;\n/* */ }",
"private ConcreteFactory() {}",
"public void turn_on () {\n this.on = true;\n }",
"public abstract ProductFactory getFactory();",
"public BehaviourFactoryImpl() {\n\t\tsuper();\n\t}",
"public static void setInputFactory(final IInputFactory inputFactory) {\n\n m_InputFactory = inputFactory;\n\n }",
"public void setFactory(JDOMFactory factory) {\n this.factory = factory;\n }",
"@Override\n IDeviceFactory getFactory();",
"public void setFactoryDAO(DAOFactory factoryDAO) {\n\t\tthis.factoryDAO = factoryDAO;\n\t}",
"void set(boolean on);",
"public void turnOn() {\n\t\tOn = true;\n\t}",
"public PiviFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"private FireWeaponScreenFactory() {\n\t}",
"public static void setCustomFactoryHandler(CustomFactoryHandler factoryHandler)\n {\n DBFactory.factoryHandler = factoryHandler;\n }",
"@Before\r\n\tpublic void setup() {\r\n\t\t\r\n\t\tcustFact = new CustomerFactory();\t\t\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t}",
"public void setDependencyFactory( DependencyFactory dependencyFactory ) \r\n {\r\n this.dependencyFactory = dependencyFactory;\r\n }",
"public static void setActionFactory(AnnotatedActionFactory factory) {\n/* 92 */ Objects.requireNonNull(factory);\n/* 93 */ actionFactory = factory;\n/* */ }",
"ASAFactory getASAFactory();",
"default Factory<T> toFactory() {\n throw new UnsupportedOperationException();\n }",
"public String getInitialFactory() {\r\n return initialFactory;\r\n }",
"private FanState() {\n\t\tinstance = this;\n\t}",
"public void setIsFaked(Boolean isFaked) {\r\n this.isFaked = isFaked;\r\n }",
"public EcoreFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public SapFactoryImpl() {\n super();\n }",
"public CoreFactoryImpl() {\n\t\tsuper();\n\t}",
"public AugmentedfsmFactoryImpl() {\n\t\tsuper();\n\t}",
"private StateManagerFactory() {}",
"public interface Factory {\n LeiFeng createLeiFeng();\n}",
"public interface Factory {\n /* renamed from: a */\n Call mo35727a(Request request);\n }",
"public PedidoFactoryImpl() {\n\t\tsuper();\n\t}",
"@Override\n public boolean isTableFactory() {\n return true;\n }",
"private ORMServiceFactory() { }",
"public GpflFactoryImpl()\n {\n super();\n }",
"public static void setMoneyFactory(MoneyFactory f) {\n\t\tfactory = f;\n\t}",
"public final void SetEntryFactory(IEntryFactory factory)\n\t{\n\t\tentryFactory = factory;\n\t}",
"EzlemurFactory getEzlemurFactory();",
"public EzdmxctrlFactoryImpl() {\n\t\tsuper();\n\t}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public CWLNodeFactory() {\n super(true);\n }",
"IotdslFactory getIotdslFactory();",
"public final Method getFactoryMethod() {\n\treturn factoryMethod;\n }",
"public void setActivatableFactory(ActivatableFactory activatableFactory) {\n this.activatableFactory = activatableFactory;\n }",
"private PerfectoDriverFactory() {\n\n\t}",
"private void setFactory(String factoryClass) {\n MoneyFactory moneyFactory = null;\n try {\n moneyFactory = (MoneyFactory) Class.forName(\"coinpurse.\" + factoryClass).newInstance();\n } catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {\n System.out.println(\"Cannot create Money Factory.\");\n System.exit(0);\n }\n if (moneyFactory == null) System.exit(0);\n MoneyFactory.setFactory(moneyFactory);\n this.moneyFactory = MoneyFactory.getInstance();\n if (moneyFactory.getClass().equals(ThaiMoneyFactory.class)) currency = \"Baht\";\n else if (moneyFactory.getClass().equals(MalayMoneyFactory.class)) currency = \"Ringgit\";\n }",
"@Test\n public void testCreateFactory() {\n setFactory(\"ThaiMoneyFactory\");\n assertEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Baht\");\n setFactory(\"MalayMoneyFactory\");\n assertEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Ringgit\");\n }",
"public void setOn(boolean arg) {\n isOn = arg;\n }",
"public EsoFactoryImpl()\r\n {\r\n super();\r\n }",
"public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public void setOn(boolean on) {\n\t\tthis.on = on;\n\t}",
"public OBStoreFactory getFactory();",
"@Override\n protected void setup() {\n DFAgentDescription dfd = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n sd.setType(\"ControladorAgent\");\n sd.setName(getName());\n sd.setOwnership(\"soonho\");\n dfd.setName(getAID());\n dfd.addServices(sd);\n try {\n DFService.register(this, dfd);\n ControladorBehaviour comportamento = new ControladorBehaviour(this);\n addBehaviour(comportamento);\n } catch (FIPAException e) {\n myLogger.log(Logger.SEVERE, \"Agent \" + getLocalName() + \" - Cannot register with DF\", e);\n doDelete();\n }\n }",
"@Resource\n public void setSessionFactory(SessionFactory factory) {\n this.sessionFactory = factory;\n }",
"public PetrinetmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public UseCaseDslFactoryImpl()\n {\n super();\n }",
"public void setOn(boolean isOn) {\n\t\tisOn = isOn;\n\t}"
] | [
"0.6645104",
"0.6314811",
"0.6201546",
"0.61897916",
"0.6177319",
"0.61536777",
"0.6140583",
"0.61011547",
"0.60617995",
"0.60232836",
"0.6022475",
"0.6006884",
"0.59581894",
"0.59436333",
"0.59364283",
"0.58795303",
"0.5878766",
"0.5870347",
"0.5868093",
"0.58665687",
"0.58562785",
"0.5852537",
"0.58463436",
"0.58412147",
"0.5834633",
"0.5820882",
"0.5793146",
"0.57846904",
"0.5775297",
"0.5772732",
"0.575644",
"0.5738553",
"0.5727952",
"0.5715884",
"0.569054",
"0.5676965",
"0.5671846",
"0.567108",
"0.56684065",
"0.5655103",
"0.56426275",
"0.5614109",
"0.56131816",
"0.5612969",
"0.5606555",
"0.560498",
"0.56015635",
"0.5599688",
"0.5587235",
"0.5584812",
"0.5584701",
"0.5576869",
"0.5570182",
"0.5566039",
"0.5549846",
"0.5546562",
"0.5531205",
"0.55287755",
"0.55232793",
"0.5509274",
"0.55052173",
"0.55021",
"0.5483039",
"0.5474257",
"0.5468435",
"0.5464105",
"0.5462389",
"0.5453029",
"0.5447855",
"0.54472345",
"0.5435634",
"0.54353726",
"0.54337",
"0.5431727",
"0.54294384",
"0.5423002",
"0.5406967",
"0.5406512",
"0.5404972",
"0.5402328",
"0.5390161",
"0.53884375",
"0.53884375",
"0.53884375",
"0.5386108",
"0.53818333",
"0.5380555",
"0.53783065",
"0.5377337",
"0.53765416",
"0.53677976",
"0.5362806",
"0.5358774",
"0.53565526",
"0.5345377",
"0.5341604",
"0.5341584",
"0.53392875",
"0.5329408",
"0.5323247",
"0.53229827"
] | 0.0 | -1 |
Returns either a success or error message. Called by the blockListener when a player left clicks the powerSourceLocation with the InteractionMaterial | public List<InteractionResponse> togglePower()
{
List<InteractionResponse> response=new ArrayList<InteractionResponse>();
//if the factory is turned off
if (!active)
{
//if the factory isn't broken or the current recipe can repair it
if(!isBroken()||isRepairing())
{
//is there fuel enough for at least once energy cycle?
if (isFuelAvailable())
{
//are there enough materials for the current recipe in the chest?
if (checkHasMaterials())
{
//turn the factory on
powerOn();
//return a success message
response.add(new InteractionResponse(InteractionResult.SUCCESS, "Factory activated!"));
return response;
}
//there are not enough materials for the recipe!
else
{
//return a failure message, containing which materials are needed for the recipe
//[Requires the following: Amount Name, Amount Name.]
//[Requires one of the following: Amount Name, Amount Name.]
ItemList<NamedItemStack> needAll=new ItemList<NamedItemStack>();
ItemList<NamedItemStack> allInputs = getAllInputs();
needAll.addAll(allInputs.getDifference(getInventory()));
if(!needAll.isEmpty())
{
response.add(new InteractionResponse(InteractionResult.FAILURE,"You need all of the following: "+needAll.toString()+"."));
} else if (allInputs == null || allInputs.isEmpty()) {
log.warning("getAllInputs() returned null or empty; recipe is returning no expectation of input!");
}
return response;
}
}
//if there isn't enough fuel for at least one energy cycle
else
{
//return a error message
int multiplesRequired=(int)Math.ceil(getProductionTime()/(double)getEnergyTime());
response.add(new InteractionResponse(InteractionResult.FAILURE, "Factory is missing fuel! ("+getFuel().getMultiple(multiplesRequired).toString()+")"));
return response;
}
}
else
{
response.add(new InteractionResponse(InteractionResult.FAILURE, "Factory is in disrepair!"));
return response;
}
}
//if the factory is on already
else
{
//turn the factory off
powerOff();
//return success message
response.add(new InteractionResponse(InteractionResult.FAILURE, "Factory has been deactivated!"));
return response;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@EventHandler\n void onPlayerInteract(PlayerInteractEvent e){\n Player player = e.getPlayer();\n Block rawblock = e.getClickedBlock();\n Material block = null;\n if(rawblock != null){ block = rawblock.getType();}\n if(block != null && block == Material.DARK_OAK_WALL_SIGN){\n Sign sign = (Sign) e.getClickedBlock().getState();\n if(sign.getLine(0).equalsIgnoreCase(ChatColor.WHITE + \"[\" + ChatColor.GOLD + \"RAID\" + ChatColor.WHITE + \"]\"))\n {\n player.sendMessage(\"gg\");\n }\n }\n }",
"@EventHandler\n public void onChestOpen(PlayerInteractEvent e){\n if(e.getClickedBlock()==null){\n return; //they clicked air\n }\n if(compareLocation(e.getClickedBlock().getLocation())){\n e.setCancelled(true); //its our location they clicked, so we stop it.\n }\n }",
"@SubscribeEvent(priority = EventPriority.LOWEST)\n public void interactRightClickBlock(PlayerInteractEvent.RightClickBlock evt)\n {\n boolean invalid = !evt.getEntityPlayer().isSneaking() || !CompatWrapper.isValid(evt.getItemStack())\n || !(evt.getItemStack().getItem() instanceof OceanOrb /*ItemPokedex*/) || evt.getWorld().isRemote;\n if (invalid) return;\n Block block = null;\n EntityPlayer playerIn = evt.getEntityPlayer();\n World worldIn = evt.getWorld();\n BlockPos pos = evt.getPos();\n IBlockState state = evt.getWorld().getBlockState(evt.getPos());\n block = state.getBlock();\n PokedexEntry entry = Database.getEntry(\"lugia\");\n if (block == BlockInit.LEGENDARY_SPAWN && entry != null)\n {\n SpawnData data = entry.getSpawnData();\n if (data != null) for (SpawnBiomeMatcher matcher : data.matchers.keySet())\n {\n if (data.getWeight(matcher) > 0) return;\n }\n ISpecialSpawnCondition spawnCondition = ISpecialSpawnCondition.spawnMap.get(entry);\n ISpecialCaptureCondition captureCondition = ISpecialCaptureCondition.captureMap.get(entry);\n if (spawnCondition != null)\n {\n Vector3 location = Vector3.getNewVector().set(pos);\n if (spawnCondition.canSpawn(playerIn, location))\n {\n EntityLiving entity = (EntityLiving) PokecubeMod.core.createPokemob(entry, worldIn);\n IPokemob pokemob = CapabilityPokemob.getPokemobFor(entity);\n if (captureCondition != null && !captureCondition.canCapture(playerIn, pokemob))\n {\n evt.setCanceled(true);\n return;\n }\n PokecubePlayerDataHandler.getCustomDataTag(playerIn).setBoolean(\"spwn:\" + entry.getTrimmedName(),\n true);\n entity.setHealth(entity.getMaxHealth());\n location.add(0, 1, 0).moveEntity(entity);\n spawnCondition.onSpawn(pokemob);\n playerIn.getHeldItemMainhand().setCount(0);\n worldIn.setBlockToAir(pos);\n if (pokemob.getExp() < 100)\n {\n entity = pokemob.setForSpawn(Tools.levelToXp(entry.getEvolutionMode(), 50)).getEntity();\n }\n worldIn.spawnEntity(entity);\n }\n }\n evt.setCanceled(true);\n }\n }",
"@Override\n public void execute(PlayerClickExecutableItemEvent event) {\n event.blockClicked.getWorld().createExplosion(event.blockClicked.getLocation(), 12.0f);\n event.player.sendMessage(ChatColor.GREEN + \"Sylphid's magic overflowed.\");\n }",
"@EventHandler(priority = EventPriority.LOWEST)\n\tvoid onPlayerInteract(PlayerInteractEvent event)\n\t{\n\t //not interested in left-click-on-air actions\n\t Action action = event.getAction();\n\t if(action == Action.LEFT_CLICK_AIR) return;\n\t \n\t Player player = event.getPlayer();\n\t\tBlock clickedBlock = event.getClickedBlock(); //null returned here means interacting with air\n\t\t\n\t\tMaterial clickedBlockType = null;\n\t\tif(clickedBlock != null)\n\t\t{\n\t\t clickedBlockType = clickedBlock.getType();\n\t\t}\n\t\telse\n\t\t{\n\t\t clickedBlockType = Material.AIR;\n\t\t}\n\n\t\tPlayerData playerData = null;\n\n\t\t//Turtle eggs\n\t\tif(action == Action.PHYSICAL)\n\t\t{\n\t\t\tif (clickedBlockType != Material.TURTLE_EGG)\n\t\t\t\treturn;\n\t\t\tplayerData = this.dataStore.getPlayerData(player.getUniqueId());\n\t\t\tClaim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);\n\t\t\tif(claim != null)\n\t\t\t{\n\t\t\t\tplayerData.lastClaim = claim;\n\n\t\t\t\tString noAccessReason = claim.allowBreak(player, clickedBlockType);\n\t\t\t\tif(noAccessReason != null)\n\t\t\t\t{\n\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//don't care about left-clicking on most blocks, this is probably a break action\n if(action == Action.LEFT_CLICK_BLOCK && clickedBlock != null)\n {\n if(clickedBlock.getY() < clickedBlock.getWorld().getMaxHeight() - 1 || event.getBlockFace() != BlockFace.UP)\n {\n Block adjacentBlock = clickedBlock.getRelative(event.getBlockFace());\n byte lightLevel = adjacentBlock.getLightFromBlocks();\n if(lightLevel == 15 && adjacentBlock.getType() == Material.FIRE)\n {\n if(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());\n Claim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);\n if(claim != null)\n {\n playerData.lastClaim = claim;\n\n String noBuildReason = claim.allowBuild(player, Material.AIR);\n if(noBuildReason != null)\n {\n event.setCancelled(true);\n instance.sendMessage(player, TextMode.Err, noBuildReason);\n player.sendBlockChange(adjacentBlock.getLocation(), adjacentBlock.getType(), adjacentBlock.getData());\n return;\n }\n }\n }\n }\n\n //exception for blocks on a specific watch list\n if(!this.onLeftClickWatchList(clickedBlockType))\n {\n return;\n }\n }\n \n\t\t//apply rules for containers and crafting blocks\n\t\tif(\tclickedBlock != null && instance.config_claims_preventTheft && (\n\t\t\t\t\t\tevent.getAction() == Action.RIGHT_CLICK_BLOCK && (\n\t\t\t\t\t\t(this.isInventoryHolder(clickedBlock) && clickedBlock.getType() != Material.LECTERN) ||\n\t\t\t\t\t\tclickedBlockType == Material.CAULDRON ||\n\t\t\t\t\t\tclickedBlockType == Material.JUKEBOX ||\n\t\t\t\t\t\tclickedBlockType == Material.ANVIL ||\n\t\t\t\t\t\tclickedBlockType == Material.CHIPPED_ANVIL ||\n\t\t\t\t\t\tclickedBlockType == Material.DAMAGED_ANVIL ||\n\t\t\t\t\t\tclickedBlockType == Material.CAKE ||\n\t\t\t\t\t\tclickedBlockType == Material.SWEET_BERRY_BUSH)))\n\t\t{\t\t\t\n\t\t\tif(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());\n\n\t\t\t// check permissions for the claim the player is in\n\t\t\tClaim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);\n\t\t\tif(claim != null)\n\t\t\t{\n\t\t\t\tplayerData.lastClaim = claim;\n\n\t\t\t\tString noContainersReason = claim.allowContainers(player);\n\t\t\t\tif(noContainersReason != null)\n\t\t\t\t{\n\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, noContainersReason);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//otherwise apply rules for doors and beds, if configured that way\n\t\telse if( clickedBlock != null && \n\t\t \n\t\t(instance.config_claims_lockWoodenDoors && (\n\t\t\t\tclickedBlockType == Material.OAK_DOOR ||\n\t\t\t\tclickedBlockType == Material.ACACIA_DOOR || \n\t\t\t\tclickedBlockType == Material.BIRCH_DOOR ||\n\t\t\t\tclickedBlockType == Material.JUNGLE_DOOR ||\n\t\t\t\tclickedBlockType == Material.SPRUCE_DOOR ||\n\t\t\t\tclickedBlockType == Material.DARK_OAK_DOOR)) ||\n\t\t \n (instance.config_claims_preventButtonsSwitches && (\tclickedBlockType == Material.WHITE_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.ORANGE_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.MAGENTA_BED\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.LIGHT_BLUE_BED\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.YELLOW_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.LIME_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.PINK_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.GRAY_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.LIGHT_GRAY_BED\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.CYAN_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.PURPLE_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.BLUE_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.BROWN_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.GREEN_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.RED_BED\t\t||\n\t\t\t\t\t\t\t\t\tclickedBlockType == Material.BLACK_BED)) ||\n\t\t \n (instance.config_claims_lockTrapDoors && (\n\t\t\t\t\tclickedBlockType == Material.OAK_TRAPDOOR ||\n\t\t\t\t\tclickedBlockType == Material.SPRUCE_TRAPDOOR ||\n\t\t\t\t\tclickedBlockType == Material.BIRCH_TRAPDOOR ||\n\t\t\t\t\tclickedBlockType == Material.JUNGLE_TRAPDOOR ||\n\t\t\t\t\tclickedBlockType == Material.ACACIA_TRAPDOOR ||\n\t\t\t\t\tclickedBlockType == Material.DARK_OAK_TRAPDOOR)) ||\n\t\t\t\t\n (instance.config_claims_lockFenceGates && (\n\t\t\t\tclickedBlockType == Material.OAK_FENCE_GATE ||\n\t\t\t\tclickedBlockType == Material.ACACIA_FENCE_GATE || \n\t\t\t\tclickedBlockType == Material.BIRCH_FENCE_GATE ||\n\t\t\t\tclickedBlockType == Material.JUNGLE_FENCE_GATE ||\n\t\t\t\tclickedBlockType == Material.SPRUCE_FENCE_GATE ||\n\t\t\t\tclickedBlockType == Material.DARK_OAK_FENCE_GATE)) ||\n\t\t\t\t(instance.config_claims_lecternReadingRequiresAccessTrust && clickedBlockType == Material.LECTERN))\n\t\t{\n\t\t if(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());\n\t\t Claim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);\n\t\t\tif(claim != null)\n\t\t\t{\n\t\t\t\tplayerData.lastClaim = claim;\n\n\t\t\t\tString noAccessReason = claim.allowAccess(player);\n\t\t\t\tif(noAccessReason != null)\n\t\t\t\t{\n\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, noAccessReason);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//otherwise apply rules for buttons and switches\n\t\telse if(clickedBlock != null && instance.config_claims_preventButtonsSwitches && (clickedBlockType == null || clickedBlockType == Material.STONE_BUTTON || Tag.BUTTONS.isTagged(clickedBlockType) || clickedBlockType == Material.LEVER))\n\t\t{\n\t\t if(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());\n\t\t Claim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);\n\t\t\tif(claim != null)\n\t\t\t{\n\t\t\t playerData.lastClaim = claim;\n\t\t\t\t\n\t\t\t\tString noAccessReason = claim.allowAccess(player);\n\t\t\t\tif(noAccessReason != null)\n\t\t\t\t{\n\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, noAccessReason);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t//otherwise apply rule for cake\n else if(clickedBlock != null && instance.config_claims_preventTheft && clickedBlockType == Material.CAKE)\n {\n if(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());\n Claim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);\n if(claim != null)\n {\n playerData.lastClaim = claim;\n \n String noContainerReason = claim.allowAccess(player);\n if(noContainerReason != null)\n {\n event.setCancelled(true);\n instance.sendMessage(player, TextMode.Err, noContainerReason);\n return;\n }\n } \n }\n\t\t\n\t\t//apply rule for note blocks and repeaters and daylight sensors //RoboMWM: Include flower pots\n\t\telse if(clickedBlock != null && \n\t\t\t(\n\t\t clickedBlockType == Material.NOTE_BLOCK || \n\t\t clickedBlockType == Material.REPEATER || \n\t\t clickedBlockType == Material.DRAGON_EGG ||\n\t\t clickedBlockType == Material.DAYLIGHT_DETECTOR ||\n\t\t clickedBlockType == Material.COMPARATOR ||\n\t\t\t\t\t\tTag.FLOWER_POTS.isTagged(clickedBlockType)\n\t\t ))\n\t\t{\n\t\t if(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());\n\t\t Claim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);\n\t\t\tif(claim != null)\n\t\t\t{\n\t\t\t\tString noBuildReason = claim.allowBuild(player, clickedBlockType);\n\t\t\t\tif(noBuildReason != null)\n\t\t\t\t{\n\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, noBuildReason);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//otherwise handle right click (shovel, string, bonemeal) //RoboMWM: flint and steel\n\t\telse\n\t\t{\n\t\t\t//ignore all actions except right-click on a block or in the air\n\t\t\tif(action != Action.RIGHT_CLICK_BLOCK && action != Action.RIGHT_CLICK_AIR) return;\n\t\t\t\n\t\t\t//what's the player holding?\n\t\t\tEquipmentSlot hand = event.getHand();\n\t\t\tItemStack itemInHand = instance.getItemInHand(player, hand);\n\t\t\tMaterial materialInHand = itemInHand.getType();\t\n\t\t\t\n\t\t\tSet<Material> dyes = new HashSet<>();\n\t\t\t\n\t\t\tfor (Material material : Material.values())\n\t\t\t{\n\t\t\t\tif (!material.isLegacy() && material.name().endsWith(\"_DYE\"))\n\t\t\t\t\tdyes.add(material);\n\t\t\t}\n\n\t\t\t\n\t\t\t//if it's bonemeal, armor stand, spawn egg, etc - check for build permission //RoboMWM: also check flint and steel to stop TNT ignition\n\t\t\tif(clickedBlock != null && (materialInHand == Material.BONE_MEAL\n\t\t\t\t\t|| materialInHand == Material.ARMOR_STAND\n\t\t\t\t\t|| materialInHand == Material.END_CRYSTAL\n\t\t\t\t\t|| materialInHand == Material.FLINT_AND_STEEL\n\t\t\t\t\t|| dyes.contains(materialInHand)))\n\t\t\t{\n\t\t\t\tString noBuildReason = instance\n\t\t\t\t\t\t.allowBuild(player, clickedBlock\n\t\t\t\t\t\t\t\t.getLocation(),\n\t\t\t\t\t\t\t\tclickedBlockType);\n\t\t\t\tif(noBuildReason != null)\n\t\t\t\t{\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, noBuildReason);\n\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\telse if(clickedBlock != null && (\n\t\t\t materialInHand == Material.OAK_BOAT\t\t|| \n\t\t\t materialInHand == Material.SPRUCE_BOAT\t\t|| \n\t\t\t materialInHand == Material.BIRCH_BOAT\t\t|| \n\t\t\t materialInHand == Material.JUNGLE_BOAT\t\t|| \n\t\t\t materialInHand == Material.ACACIA_BOAT\t\t||\n\t\t\t materialInHand == Material.DARK_OAK_BOAT))\n\t\t\t{\n\t\t\t if(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());\n\t\t\t Claim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);\n\t\t\t\tif(claim != null)\n\t\t\t\t{\n\t\t\t\t\tString noBuildReason = claim.allowBuild(player, Material.OAK_BOAT); // Though only checks OAK_BOAT, permission should be same for all boats. Plus it being a boat doesn't seem to make a difference currently.\n\t\t\t\t\tif(noBuildReason != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, noBuildReason);\n\t\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//survival world minecart placement requires container trust, which is the permission required to remove the minecart later\n\t\t\telse if(clickedBlock != null &&\n\t\t\t\t(materialInHand == Material.MINECART\t\t\t\t|| \n\t\t\t\tmaterialInHand == Material.FURNACE_MINECART\t\t\t|| \n\t\t\t\tmaterialInHand == Material.CHEST_MINECART\t\t\t|| \n\t\t\t\tmaterialInHand == Material.TNT_MINECART\t\t\t\t|| \n\t\t\t\tmaterialInHand == Material.HOPPER_MINECART))\n\t\t\t{\n\t\t\t\tif(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());\n\t\t\t\tClaim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);\n\t\t\t\tif(claim != null)\n\t\t\t\t{\n\t\t\t\t\tString reason = claim.allowContainers(player);\n\t\t\t\t\tif(reason != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, reason);\n\t\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//if he's investigating a claim\n\t\t\telse if(materialInHand == instance.config_claims_investigationTool && hand == EquipmentSlot.HAND)\n\t\t\t{\n\t\t //if claims are disabled in this world, do nothing\n\t\t\t if(!instance.claimsEnabledForWorld(player.getWorld())) return;\n\n\t\t\t //if holding shift (sneaking), show all claims in area\n\t\t\t if(player.isSneaking() && player.hasPermission(\"griefprevention.visualizenearbyclaims\"))\n\t\t\t {\n\t\t\t //find nearby claims\n\t\t\t Set<Claim> claims = this.dataStore.getNearbyClaims(player.getLocation());\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, claims));\n\n\t\t\t //visualize boundaries\n Visualization visualization = Visualization.fromClaims(claims, player.getEyeLocation().getBlockY(), VisualizationType.Claim, player.getLocation());\n Visualization.Apply(player, visualization);\n\n instance.sendMessage(player, TextMode.Info, Messages.ShowNearbyClaims, String.valueOf(claims.size()));\n\n return;\n\t\t\t }\n\n\t\t\t //FEATURE: shovel and stick can be used from a distance away\n\t\t if(action == Action.RIGHT_CLICK_AIR)\n\t\t {\n\t\t //try to find a far away non-air block along line of sight\n\t\t clickedBlock = getTargetBlock(player, 100);\n\t\t clickedBlockType = clickedBlock.getType();\n\t\t }\n\n\t\t //if no block, stop here\n\t\t if(clickedBlock == null)\n\t\t {\n\t\t return;\n\t\t }\n\n\t\t\t //air indicates too far away\n\t\t\t\tif(clickedBlockType == Material.AIR)\n\t\t\t\t{\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, Messages.TooFarAway);\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, Collections.<Claim>emptySet()));\n\n\t\t\t\t\tVisualization.Revert(player);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());\n\t\t\t\tClaim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false /*ignore height*/, playerData.lastClaim);\n\n\t\t\t\t//no claim case\n\t\t\t\tif(claim == null)\n\t\t\t\t{\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Info, Messages.BlockNotClaimed);\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, Collections.<Claim>emptySet()));\n\n\t\t\t\t\tVisualization.Revert(player);\n\t\t\t\t}\n\n\t\t\t\t//claim case\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tplayerData.lastClaim = claim;\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Info, Messages.BlockClaimed, claim.getOwnerName());\n\n\t\t\t\t\t//visualize boundary\n\t\t\t\t\tVisualization visualization = Visualization.FromClaim(claim, player.getEyeLocation().getBlockY(), VisualizationType.Claim, player.getLocation());\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, claim));\n\n\t\t\t\t\tVisualization.Apply(player, visualization);\n\n\t\t\t\t\tif (player.hasPermission(\"griefprevention.seeclaimsize\")) {\n\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Info, \" \" + claim.getWidth() + \"x\" + claim.getHeight() + \"=\" + claim.getArea());\n\t\t\t\t\t}\n\n\t\t\t\t\t//if permission, tell about the player's offline time\n\t\t\t\t\tif(!claim.isAdminClaim() && (player.hasPermission(\"griefprevention.deleteclaims\") || player.hasPermission(\"griefprevention.seeinactivity\")))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(claim.parent != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t claim = claim.parent;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDate lastLogin = new Date(Bukkit.getOfflinePlayer(claim.ownerID).getLastPlayed());\n\t\t\t\t\t\tDate now = new Date();\n\t\t\t\t\t\tlong daysElapsed = (now.getTime() - lastLogin.getTime()) / (1000 * 60 * 60 * 24);\n\n\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Info, Messages.PlayerOfflineTime, String.valueOf(daysElapsed));\n\n\t\t\t\t\t\t//drop the data we just loaded, if the player isn't online\n\t\t\t\t\t\tif(instance.getServer().getPlayer(claim.ownerID) == null)\n\t\t\t\t\t\t\tthis.dataStore.clearCachedPlayerData(claim.ownerID);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//if it's a golden shovel\n\t\t\telse if(materialInHand != instance.config_claims_modificationTool || hand != EquipmentSlot.HAND) return;\n\n\t\t\tevent.setCancelled(true); //GriefPrevention exclusively reserves this tool (e.g. no grass path creation for golden shovel)\n\n\t\t\t//disable golden shovel while under siege\n\t\t\tif(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());\n\n\t\t\t//FEATURE: shovel and stick can be used from a distance away\n if(action == Action.RIGHT_CLICK_AIR)\n {\n //try to find a far away non-air block along line of sight\n clickedBlock = getTargetBlock(player, 100);\n clickedBlockType = clickedBlock.getType();\n }\n\n //if no block, stop here\n if(clickedBlock == null)\n {\n return;\n }\n\n\t\t\t//can't use the shovel from too far away\n\t\t\tif(clickedBlockType == Material.AIR)\n\t\t\t{\n\t\t\t\tinstance.sendMessage(player, TextMode.Err, Messages.TooFarAway);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//if the player is in restore nature mode, do only that\n\t\t\tUUID playerID = player.getUniqueId();\n\t\t\tplayerData = this.dataStore.getPlayerData(player.getUniqueId());\n\t\t\tif(playerData.shovelMode == ShovelMode.RestoreNature || playerData.shovelMode == ShovelMode.RestoreNatureAggressive)\n\t\t\t{\n\t\t\t\t//if the clicked block is in a claim, visualize that claim and deliver an error message\n\t\t\t\tClaim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);\n\t\t\t\tif(claim != null)\n\t\t\t\t{\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, Messages.BlockClaimed, claim.getOwnerName());\n\t\t\t\t\tVisualization visualization = Visualization.FromClaim(claim, clickedBlock.getY(), VisualizationType.ErrorClaim, player.getLocation());\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, claim));\n\n\t\t\t\t\tVisualization.Apply(player, visualization);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//figure out which chunk to repair\n\t\t\t\tChunk chunk = player.getWorld().getChunkAt(clickedBlock.getLocation());\n\t\t\t\t//start the repair process\n\n\t\t\t\t//set boundaries for processing\n\t\t\t\tint miny = clickedBlock.getY();\n\n\t\t\t\t//if not in aggressive mode, extend the selection down to a little below sea level\n\t\t\t\tif(!(playerData.shovelMode == ShovelMode.RestoreNatureAggressive))\n\t\t\t\t{\n\t\t\t\t\tif(miny > instance.getSeaLevel(chunk.getWorld()) - 10)\n\t\t\t\t\t{\n\t\t\t\t\t\tminy = instance.getSeaLevel(chunk.getWorld()) - 10;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tinstance.restoreChunk(chunk, miny, playerData.shovelMode == ShovelMode.RestoreNatureAggressive, 0, player);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//if in restore nature fill mode\n\t\t\tif(playerData.shovelMode == ShovelMode.RestoreNatureFill)\n\t\t\t{\n\t\t\t\tArrayList<Material> allowedFillBlocks = new ArrayList<Material>();\n\t\t\t\tEnvironment environment = clickedBlock.getWorld().getEnvironment();\n\t\t\t\tif(environment == Environment.NETHER)\n\t\t\t\t{\n\t\t\t\t\tallowedFillBlocks.add(Material.NETHERRACK);\n\t\t\t\t}\n\t\t\t\telse if(environment == Environment.THE_END)\n\t\t\t\t{\n\t\t\t\t\tallowedFillBlocks.add(Material.END_STONE);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tallowedFillBlocks.add(Material.GRASS);\n\t\t\t\t\tallowedFillBlocks.add(Material.DIRT);\n\t\t\t\t\tallowedFillBlocks.add(Material.STONE);\n\t\t\t\t\tallowedFillBlocks.add(Material.SAND);\n\t\t\t\t\tallowedFillBlocks.add(Material.SANDSTONE);\n\t\t\t\t\tallowedFillBlocks.add(Material.ICE);\n\t\t\t\t}\n\n\t\t\t\tBlock centerBlock = clickedBlock;\n\n\t\t\t\tint maxHeight = centerBlock.getY();\n\t\t\t\tint minx = centerBlock.getX() - playerData.fillRadius;\n\t\t\t\tint maxx = centerBlock.getX() + playerData.fillRadius;\n\t\t\t\tint minz = centerBlock.getZ() - playerData.fillRadius;\n\t\t\t\tint maxz = centerBlock.getZ() + playerData.fillRadius;\n\t\t\t\tint minHeight = maxHeight - 10;\n\t\t\t\tif(minHeight < 0) minHeight = 0;\n\n\t\t\t\tClaim cachedClaim = null;\n\t\t\t\tfor(int x = minx; x <= maxx; x++)\n\t\t\t\t{\n\t\t\t\t\tfor(int z = minz; z <= maxz; z++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//circular brush\n\t\t\t\t\t\tLocation location = new Location(centerBlock.getWorld(), x, centerBlock.getY(), z);\n\t\t\t\t\t\tif(location.distance(centerBlock.getLocation()) > playerData.fillRadius) continue;\n\n\t\t\t\t\t\t//default fill block is initially the first from the allowed fill blocks list above\n\t\t\t\t\t\tMaterial defaultFiller = allowedFillBlocks.get(0);\n\n\t\t\t\t\t\t//prefer to use the block the player clicked on, if it's an acceptable fill block\n\t\t\t\t\t\tif(allowedFillBlocks.contains(centerBlock.getType()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdefaultFiller = centerBlock.getType();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//if the player clicks on water, try to sink through the water to find something underneath that's useful for a filler\n\t\t\t\t\t\telse if(centerBlock.getType() == Material.WATER)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tBlock block = centerBlock.getWorld().getBlockAt(centerBlock.getLocation());\n\t\t\t\t\t\t\twhile(!allowedFillBlocks.contains(block.getType()) && block.getY() > centerBlock.getY() - 10)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tblock = block.getRelative(BlockFace.DOWN);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(allowedFillBlocks.contains(block.getType()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdefaultFiller = block.getType();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//fill bottom to top\n\t\t\t\t\t\tfor(int y = minHeight; y <= maxHeight; y++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tBlock block = centerBlock.getWorld().getBlockAt(x, y, z);\n\n\t\t\t\t\t\t\t//respect claims\n\t\t\t\t\t\t\tClaim claim = this.dataStore.getClaimAt(block.getLocation(), false, cachedClaim);\n\t\t\t\t\t\t\tif(claim != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcachedClaim = claim;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//only replace air, spilling water, snow, long grass\n\t\t\t\t\t\t\tif(block.getType() == Material.AIR || block.getType() == Material.SNOW || (block.getType() == Material.WATER && ((Levelled) block.getBlockData()).getLevel() != 0) || block.getType() == Material.GRASS)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//if the top level, always use the default filler picked above\n\t\t\t\t\t\t\t\tif(y == maxHeight)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tblock.setType(defaultFiller);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t//otherwise look to neighbors for an appropriate fill block\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tBlock eastBlock = block.getRelative(BlockFace.EAST);\n\t\t\t\t\t\t\t\t\tBlock westBlock = block.getRelative(BlockFace.WEST);\n\t\t\t\t\t\t\t\t\tBlock northBlock = block.getRelative(BlockFace.NORTH);\n\t\t\t\t\t\t\t\t\tBlock southBlock = block.getRelative(BlockFace.SOUTH);\n\n\t\t\t\t\t\t\t\t\t//first, check lateral neighbors (ideally, want to keep natural layers)\n\t\t\t\t\t\t\t\t\tif(allowedFillBlocks.contains(eastBlock.getType()))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tblock.setType(eastBlock.getType());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if(allowedFillBlocks.contains(westBlock.getType()))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tblock.setType(westBlock.getType());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if(allowedFillBlocks.contains(northBlock.getType()))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tblock.setType(northBlock.getType());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if(allowedFillBlocks.contains(southBlock.getType()))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tblock.setType(southBlock.getType());\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t//if all else fails, use the default filler selected above\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tblock.setType(defaultFiller);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//if the player doesn't have claims permission, don't do anything\n\t\t\tif(!player.hasPermission(\"griefprevention.createclaims\"))\n\t\t\t{\n\t\t\t\tinstance.sendMessage(player, TextMode.Err, Messages.NoCreateClaimPermission);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//if he's resizing a claim and that claim hasn't been deleted since he started resizing it\n\t\t\tif(playerData.claimResizing != null && playerData.claimResizing.inDataStore)\n\t\t\t{\n\t\t\t\tif(clickedBlock.getLocation().equals(playerData.lastShovelLocation)) return;\n\n\t\t\t\t//figure out what the coords of his new claim would be\n\t\t\t\tint newx1, newx2, newz1, newz2, newy1, newy2;\n\t\t\t\tif(playerData.lastShovelLocation.getBlockX() == playerData.claimResizing.getLesserBoundaryCorner().getBlockX())\n\t\t\t\t{\n\t\t\t\t\tnewx1 = clickedBlock.getX();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnewx1 = playerData.claimResizing.getLesserBoundaryCorner().getBlockX();\n\t\t\t\t}\n\n\t\t\t\tif(playerData.lastShovelLocation.getBlockX() == playerData.claimResizing.getGreaterBoundaryCorner().getBlockX())\n\t\t\t\t{\n\t\t\t\t\tnewx2 = clickedBlock.getX();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnewx2 = playerData.claimResizing.getGreaterBoundaryCorner().getBlockX();\n\t\t\t\t}\n\n\t\t\t\tif(playerData.lastShovelLocation.getBlockZ() == playerData.claimResizing.getLesserBoundaryCorner().getBlockZ())\n\t\t\t\t{\n\t\t\t\t\tnewz1 = clickedBlock.getZ();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnewz1 = playerData.claimResizing.getLesserBoundaryCorner().getBlockZ();\n\t\t\t\t}\n\n\t\t\t\tif(playerData.lastShovelLocation.getBlockZ() == playerData.claimResizing.getGreaterBoundaryCorner().getBlockZ())\n\t\t\t\t{\n\t\t\t\t\tnewz2 = clickedBlock.getZ();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnewz2 = playerData.claimResizing.getGreaterBoundaryCorner().getBlockZ();\n\t\t\t\t}\n\n\t\t\t\tnewy1 = playerData.claimResizing.getLesserBoundaryCorner().getBlockY();\n\t\t\t\tnewy2 = clickedBlock.getY() - instance.config_claims_claimsExtendIntoGroundDistance;\n\n\t\t\t\tthis.dataStore.resizeClaimWithChecks(player, playerData, newx1, newx2, newy1, newy2, newz1, newz2);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//otherwise, since not currently resizing a claim, must be starting a resize, creating a new claim, or creating a subdivision\n\t\t\tClaim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), true /*ignore height*/, playerData.lastClaim);\n\n\t\t\t//if within an existing claim, he's not creating a new one\n\t\t\tif(claim != null)\n\t\t\t{\n\t\t\t\t//if the player has permission to edit the claim or subdivision\n\t\t\t\tString noEditReason = claim.allowEdit(player);\n\t\t\t\tif(noEditReason == null)\n\t\t\t\t{\n\t\t\t\t\t//if he clicked on a corner, start resizing it\n\t\t\t\t\tif((clickedBlock.getX() == claim.getLesserBoundaryCorner().getBlockX() || clickedBlock.getX() == claim.getGreaterBoundaryCorner().getBlockX()) && (clickedBlock.getZ() == claim.getLesserBoundaryCorner().getBlockZ() || clickedBlock.getZ() == claim.getGreaterBoundaryCorner().getBlockZ()))\n\t\t\t\t\t{\n\t\t\t\t\t\tplayerData.claimResizing = claim;\n\t\t\t\t\t\tplayerData.lastShovelLocation = clickedBlock.getLocation();\n\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Instr, Messages.ResizeStart);\n\t\t\t\t\t}\n\n\t\t\t\t\t//if he didn't click on a corner and is in subdivision mode, he's creating a new subdivision\n\t\t\t\t\telse if(playerData.shovelMode == ShovelMode.Subdivide)\n\t\t\t\t\t{\n\t\t\t\t\t\t//if it's the first click, he's trying to start a new subdivision\n\t\t\t\t\t\tif(playerData.lastShovelLocation == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if the clicked claim was a subdivision, tell him he can't start a new subdivision here\n\t\t\t\t\t\t\tif(claim.parent != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, Messages.ResizeFailOverlapSubdivision);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//otherwise start a new subdivision\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Instr, Messages.SubdivisionStart);\n\t\t\t\t\t\t\t\tplayerData.lastShovelLocation = clickedBlock.getLocation();\n\t\t\t\t\t\t\t\tplayerData.claimSubdividing = claim;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//otherwise, he's trying to finish creating a subdivision by setting the other boundary corner\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if last shovel location was in a different world, assume the player is starting the create-claim workflow over\n\t\t\t\t\t\t\tif(!playerData.lastShovelLocation.getWorld().equals(clickedBlock.getWorld()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tplayerData.lastShovelLocation = null;\n\t\t\t\t\t\t\t\tthis.onPlayerInteract(event);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//try to create a new claim (will return null if this subdivision overlaps another)\n\t\t\t\t\t\t\tCreateClaimResult result = this.dataStore.createClaim(\n\t\t\t\t\t\t\t\t\tplayer.getWorld(),\n\t\t\t\t\t\t\t\t\tplayerData.lastShovelLocation.getBlockX(), clickedBlock.getX(),\n\t\t\t\t\t\t\t\t\tplayerData.lastShovelLocation.getBlockY() - instance.config_claims_claimsExtendIntoGroundDistance, clickedBlock.getY() - instance.config_claims_claimsExtendIntoGroundDistance,\n\t\t\t\t\t\t\t\t\tplayerData.lastShovelLocation.getBlockZ(), clickedBlock.getZ(),\n\t\t\t\t\t\t\t\t\tnull, //owner is not used for subdivisions\n\t\t\t\t\t\t\t\t\tplayerData.claimSubdividing,\n\t\t\t\t\t\t\t\t\tnull, player);\n\n\t\t\t\t\t\t\t//if it didn't succeed, tell the player why\n\t\t\t\t\t\t\tif(!result.succeeded)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, Messages.CreateSubdivisionOverlap);\n\n\t\t\t\t\t\t\t\tVisualization visualization = Visualization.FromClaim(result.claim, clickedBlock.getY(), VisualizationType.ErrorClaim, player.getLocation());\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, result.claim));\n\n\t\t\t\t\t\t\t\tVisualization.Apply(player, visualization);\n\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//otherwise, advise him on the /trust command and show him his new subdivision\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Success, Messages.SubdivisionSuccess);\n\t\t\t\t\t\t\t\tVisualization visualization = Visualization.FromClaim(result.claim, clickedBlock.getY(), VisualizationType.Claim, player.getLocation());\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, result.claim));\n\n\t\t\t\t\t\t\t\tVisualization.Apply(player, visualization);\n\t\t\t\t\t\t\t\tplayerData.lastShovelLocation = null;\n\t\t\t\t\t\t\t\tplayerData.claimSubdividing = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//otherwise tell him he can't create a claim here, and show him the existing claim\n\t\t\t\t\t//also advise him to consider /abandonclaim or resizing the existing claim\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, Messages.CreateClaimFailOverlap);\n\t\t\t\t\t\tVisualization visualization = Visualization.FromClaim(claim, clickedBlock.getY(), VisualizationType.Claim, player.getLocation());\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, claim));\n\n\t\t\t\t\t\tVisualization.Apply(player, visualization);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//otherwise tell the player he can't claim here because it's someone else's claim, and show him the claim\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, Messages.CreateClaimFailOverlapOtherPlayer, claim.getOwnerName());\n\t\t\t\t\tVisualization visualization = Visualization.FromClaim(claim, clickedBlock.getY(), VisualizationType.ErrorClaim, player.getLocation());\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, claim));\n\n\t\t\t\t\tVisualization.Apply(player, visualization);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//otherwise, the player isn't in an existing claim!\n\n\t\t\t//if he hasn't already start a claim with a previous shovel action\n\t\t\tLocation lastShovelLocation = playerData.lastShovelLocation;\n\t\t\tif(lastShovelLocation == null)\n\t\t\t{\n\t\t\t\t//if claims are not enabled in this world and it's not an administrative claim, display an error message and stop\n\t\t\t\tif(!instance.claimsEnabledForWorld(player.getWorld()))\n\t\t\t\t{\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, Messages.ClaimsDisabledWorld);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//if he's at the claim count per player limit already and doesn't have permission to bypass, display an error message\n\t\t\t\tif(instance.config_claims_maxClaimsPerPlayer > 0 &&\n\t\t\t\t !player.hasPermission(\"griefprevention.overrideclaimcountlimit\") &&\n\t\t\t\t playerData.getClaims().size() >= instance.config_claims_maxClaimsPerPlayer)\n\t\t\t\t{\n\t\t\t\t instance.sendMessage(player, TextMode.Err, Messages.ClaimCreationFailedOverClaimCountLimit);\n\t\t\t\t return;\n\t\t\t\t}\n\n\t\t\t\t//remember it, and start him on the new claim\n\t\t\t\tplayerData.lastShovelLocation = clickedBlock.getLocation();\n\t\t\t\tinstance.sendMessage(player, TextMode.Instr, Messages.ClaimStart);\n\n\t\t\t\t//show him where he's working\n Claim newClaim = new Claim(clickedBlock.getLocation(), clickedBlock.getLocation(), null, new ArrayList<String>(), new ArrayList<String>(), new ArrayList<String>(), new ArrayList<String>(), null);\n\t\t\t\tVisualization visualization = Visualization.FromClaim(newClaim, clickedBlock.getY(), VisualizationType.RestoreNature, player.getLocation());\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, newClaim));\n\n\t\t\t\tVisualization.Apply(player, visualization);\n\t\t\t}\n\n\t\t\t//otherwise, he's trying to finish creating a claim by setting the other boundary corner\n\t\t\telse\n\t\t\t{\n\t\t\t\t//if last shovel location was in a different world, assume the player is starting the create-claim workflow over\n\t\t\t\tif(!lastShovelLocation.getWorld().equals(clickedBlock.getWorld()))\n\t\t\t\t{\n\t\t\t\t\tplayerData.lastShovelLocation = null;\n\t\t\t\t\tthis.onPlayerInteract(event);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//apply minimum claim dimensions rule\n\t\t\t\tint newClaimWidth = Math.abs(playerData.lastShovelLocation.getBlockX() - clickedBlock.getX()) + 1;\n\t\t\t\tint newClaimHeight = Math.abs(playerData.lastShovelLocation.getBlockZ() - clickedBlock.getZ()) + 1;\n\n\t\t\t\tif(playerData.shovelMode != ShovelMode.Admin)\n\t\t\t\t{\n\t\t\t\t if(newClaimWidth < instance.config_claims_minWidth || newClaimHeight < instance.config_claims_minWidth)\n\t\t\t\t {\n \t\t\t\t\t//this IF block is a workaround for craftbukkit bug which fires two events for one interaction\n \t\t\t\t if(newClaimWidth != 1 && newClaimHeight != 1)\n \t\t\t\t {\n \t\t\t\t instance.sendMessage(player, TextMode.Err, Messages.NewClaimTooNarrow, String.valueOf(instance.config_claims_minWidth));\n \t\t\t\t }\n \t\t\t\t return;\n\t\t\t\t }\n\n\t\t\t\t\tint newArea = newClaimWidth * newClaimHeight;\n if(newArea < instance.config_claims_minArea)\n {\n if(newArea != 1)\n {\n instance.sendMessage(player, TextMode.Err, Messages.ResizeClaimInsufficientArea, String.valueOf(instance.config_claims_minArea));\n }\n\n return;\n }\n\t\t\t\t}\n\n\t\t\t\t//if not an administrative claim, verify the player has enough claim blocks for this new claim\n\t\t\t\tif(playerData.shovelMode != ShovelMode.Admin)\n\t\t\t\t{\n\t\t\t\t\tint newClaimArea = newClaimWidth * newClaimHeight;\n\t\t\t\t\tint remainingBlocks = playerData.getRemainingClaimBlocks();\n\t\t\t\t\tif(newClaimArea > remainingBlocks)\n\t\t\t\t\t{\n\t\t\t\t\t\tinstance.sendMessage(player, TextMode.Err, Messages.CreateClaimInsufficientBlocks, String.valueOf(newClaimArea - remainingBlocks));\n\t\t\t\t\t\tinstance.dataStore.tryAdvertiseAdminAlternatives(player);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tplayerID = null;\n\t\t\t\t}\n\n\t\t\t\t//try to create a new claim\n\t\t\t\tCreateClaimResult result = this.dataStore.createClaim(\n\t\t\t\t\t\tplayer.getWorld(),\n\t\t\t\t\t\tlastShovelLocation.getBlockX(), clickedBlock.getX(),\n\t\t\t\t\t\tlastShovelLocation.getBlockY() - instance.config_claims_claimsExtendIntoGroundDistance, clickedBlock.getY() - instance.config_claims_claimsExtendIntoGroundDistance,\n\t\t\t\t\t\tlastShovelLocation.getBlockZ(), clickedBlock.getZ(),\n\t\t\t\t\t\tplayerID,\n\t\t\t\t\t\tnull, null,\n\t\t\t\t\t\tplayer);\n\n\t\t\t\t//if it didn't succeed, tell the player why\n\t\t\t\tif(!result.succeeded)\n\t\t\t\t{\n\t\t\t\t\tif(result.claim != null)\n\t\t\t\t\t{\n \t\t\t\t instance.sendMessage(player, TextMode.Err, Messages.CreateClaimFailOverlapShort);\n\n \t\t\t\t\tVisualization visualization = Visualization.FromClaim(result.claim, clickedBlock.getY(), VisualizationType.ErrorClaim, player.getLocation());\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, result.claim));\n\n \t\t\t\t\tVisualization.Apply(player, visualization);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t instance.sendMessage(player, TextMode.Err, Messages.CreateClaimFailOverlapRegion);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//otherwise, advise him on the /trust command and show him his new claim\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tinstance.sendMessage(player, TextMode.Success, Messages.CreateClaimSuccess);\n\t\t\t\t\tVisualization visualization = Visualization.FromClaim(result.claim, clickedBlock.getY(), VisualizationType.Claim, player.getLocation());\n\n // alert plugins of a visualization\n Bukkit.getPluginManager().callEvent(new VisualizationEvent(player, result.claim));\n\n\t\t\t\t\tVisualization.Apply(player, visualization);\n\t\t\t\t\tplayerData.lastShovelLocation = null;\n\n\t\t\t\t\t//if it's a big claim, tell the player about subdivisions\n\t\t\t\t\tif(!player.hasPermission(\"griefprevention.adminclaims\") && result.claim.getArea() >= 1000)\n\t\t {\n\t\t instance.sendMessage(player, TextMode.Info, Messages.BecomeMayor, 200L);\n\t\t instance.sendMessage(player, TextMode.Instr, Messages.SubdivisionVideo2, 201L, DataStore.SUBDIVISION_VIDEO_URL);\n\t\t }\n\n\t\t\t\t\tinstance.autoExtendClaim(result.claim);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)\n public void onPlayerQuickLockChest(PlayerInteractEvent event) {\n // Check quick lock enabled\n if (Config.getQuickProtectAction() == (byte) 0) return;\n // Get player and action info\n Action action = event.getAction();\n Player player = event.getPlayer();\n // Check action correctness\n if (action == Action.RIGHT_CLICK_BLOCK && Tag.SIGNS.isTagged(player.getInventory().getItemInMainHand().getType())) {\n if (player.getGameMode().equals(GameMode.SPECTATOR)) {\n return;\n }\n // Check quick lock action correctness\n if (!((event.getPlayer().isSneaking() && Config.getQuickProtectAction() == (byte) 2) ||\n (!event.getPlayer().isSneaking() && Config.getQuickProtectAction() == (byte) 1))) return;\n // Check permission \n if (!player.hasPermission(\"lockettepro.lock\")) return;\n // Get target block to lock\n BlockFace blockface = event.getBlockFace();\n if (blockface == BlockFace.NORTH || blockface == BlockFace.WEST || blockface == BlockFace.EAST || blockface == BlockFace.SOUTH) {\n Block block = event.getClickedBlock();\n if (block == null) return;\n // Check permission with external plugin\n if (Dependency.isProtectedFrom(block, player)) return; // blockwise\n if (Dependency.isProtectedFrom(block.getRelative(event.getBlockFace()), player)) return; // signwise\n // Check whether locking location is obstructed\n Block signLoc = block.getRelative(blockface);\n if (!signLoc.isEmpty()) return;\n // Check whether this block is lockable\n if (LocketteProAPI.isLockable(block)) {\n // Is this block already locked?\n boolean locked = LocketteProAPI.isLocked(block);\n // Cancel event here\n event.setCancelled(true);\n // Check lock info info\n if (!locked && !LocketteProAPI.isUpDownLockedDoor(block)) {\n // Get type\n Material signType = player.getInventory().getItemInMainHand().getType();\n // Not locked, not a locked door nearby\n Utils.removeASign(player);\n // Send message\n Utils.sendMessages(player, Config.getLang(\"locked-quick\"));\n // Put sign on\n Block newsign = Utils.putSignOn(block, blockface, Config.getDefaultPrivateString(), player.getName(), signType);\n Utils.resetCache(block);\n // Cleanups - UUID\n if (Config.isUuidEnabled()) {\n Utils.updateLineByPlayer(newsign, 1, player);\n }\n // Cleanups - Expiracy\n if (Config.isLockExpire()) {\n // set created to now\n Utils.updateLineWithTime(newsign, player.hasPermission(\"lockettepro.noexpire\")); // set created to -1 (no expire) or now\n }\n Dependency.logPlacement(player, newsign);\n } else if (!locked && LocketteProAPI.isOwnerUpDownLockedDoor(block, player)) {\n // Not locked, (is locked door nearby), is owner of locked door nearby\n Utils.removeASign(player);\n Utils.sendMessages(player, Config.getLang(\"additional-sign-added-quick\"));\n Utils.putSignOn(block, blockface, Config.getDefaultAdditionalString(), \"\", player.getInventory().getItemInMainHand().getType());\n Dependency.logPlacement(player, block.getRelative(blockface));\n } else if (LocketteProAPI.isOwner(block, player)) {\n // Locked, (not locked door nearby), is owner of locked block\n Utils.removeASign(player);\n Utils.putSignOn(block, blockface, Config.getDefaultAdditionalString(), \"\", player.getInventory().getItemInMainHand().getType());\n Utils.sendMessages(player, Config.getLang(\"additional-sign-added-quick\"));\n Dependency.logPlacement(player, block.getRelative(blockface));\n } else {\n // Cannot lock this block\n Utils.sendMessages(player, Config.getLang(\"cannot-lock-quick\"));\n }\n }\n }\n }\n }",
"@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)\n public void onPlayerInteract(@NotNull PlayerInteractEvent event) {\n\n if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {\n Block block = event.getClickedBlock();\n if (block != null && (block.getType() == Material.ENDER_CHEST || block.getType() == Material.END_GATEWAY)) {\n\n // make sure the cooldown for this player is over...\n if (!interactionCooldowns.containsKey(event.getPlayer().getUniqueId())) {\n interactionCooldowns.put(event.getPlayer().getUniqueId(), System.currentTimeMillis());\n }\n else {\n Long lastInteract = interactionCooldowns.get(event.getPlayer().getUniqueId());\n if ((System.currentTimeMillis() - lastInteract) >= 500L) {\n interactionCooldowns.remove(event.getPlayer().getUniqueId());\n }\n else {\n return;\n }\n }\n ItemStack usedItem = event.getPlayer().getInventory().getItemInMainHand();\n if (Utils.hasLoreTag(usedItem, TeleportalsPlugin.getKey(\"gateway_prism\").toString())) {\n\n Teleportal teleportal = Teleportal.getFromStruct(block);\n if (teleportal != null) {\n\n if (event.getPlayer().isSneaking()) {\n if (!event.getPlayer().hasPermission(\"teleportals.player.link\")) {\n sendMsg(event.getPlayer(), \"no-perms-link\");\n return;\n }\n teleportal.linkGatewayPrism(usedItem);\n }\n else {\n // make sure the player can activate a teleportal\n if (!event.getPlayer().hasPermission(\"teleportals.player.activate\")) {\n sendMsg(event.getPlayer(), \"no-perms-activate\");\n return;\n }\n if (!isWorldOkayForPortalActivation(event.getPlayer(), event.getPlayer().getWorld())) {\n sendMsg(event.getPlayer(), \"no-perms-activate-here\",\n event.getPlayer().getWorld().getName());\n return;\n }\n Integer limit = getMaxActivePortalLimit(event.getPlayer());\n if (limit != null && (getActivePortalCount(event.getPlayer().getUniqueId()) >= limit)) {\n sendMsg(event.getPlayer(), \"active-portal-limit\", limit);\n return;\n }\n if (!isCrossWorldActivationAllowed()) {\n String exitKey = Utils.getLoreData(usedItem, \"link\");\n String[] exitKeyTokens = exitKey.split(\",\");\n String exitWorldName = exitKeyTokens.length >= 1 ? exitKeyTokens[0] : \"\";\n if (!block.getWorld().getName().equals(exitWorldName)) {\n sendMsg(event.getPlayer(), \"cant-cross-worlds\",\n block.getWorld().getName(),\n exitWorldName);\n return;\n }\n }\n\n if (teleportal.activate(usedItem)) {\n augActivePortalCount(event.getPlayer().getUniqueId(), 1);\n if (event.getPlayer().getGameMode() != GameMode.CREATIVE) {\n usedItem.setAmount(usedItem.getAmount() - 1);\n }\n teleportal.setPortalName(event.getPlayer().getUniqueId().toString());\n }\n }\n }\n }\n }\n }\n }",
"@EventHandler\n\tpublic void onPlayerInteract(PlayerInteractEvent event) {\n\t\tif (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK) {\n\t\t\tSpoutItemStack stack = new SpoutItemStack(event.getPlayer().getItemInHand());\n\t\t\tif (stack.getMaterial() instanceof GenericCustomItem) {\n\t\t\t\tthis.plugin.getHandlerManager().triggerHandlers(\"HoldLeftClick\", ((GenericCustomItem) stack.getMaterial()).getCustomId(), event);\n\t\t\t} else if (stack.getMaterial() instanceof GenericCustomBlock) {\n\t\t\t\tthis.plugin.getHandlerManager().triggerHandlers(\"HoldLeftClick\", ((GenericCustomBlock) stack.getMaterial()).getCustomId(), event);\n\t\t\t}\n\t\t} else if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {\n\t\t\tSpoutItemStack stack = new SpoutItemStack(event.getPlayer().getItemInHand());\n\t\t\tif (stack.getMaterial() instanceof GenericCustomItem) {\n\t\t\t\tthis.plugin.getHandlerManager().triggerHandlers(\"HoldRightClick\", ((GenericCustomItem) stack.getMaterial()).getCustomId(), event);\n\t\t\t} else if (stack.getMaterial() instanceof GenericCustomBlock) {\n\t\t\t\tthis.plugin.getHandlerManager().triggerHandlers(\"HoldRightClick\", ((GenericCustomBlock) stack.getMaterial()).getCustomId(), event);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// The click event for the block you clicked on\n\t\tif (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK) {\n\t\t\tBlock block = ((SpoutCraftBlock) event.getClickedBlock()).getBlockType();\n\t\t\tif (block instanceof GenericCustomBlock) {\n\t\t\t\tif (event.getAction() == Action.LEFT_CLICK_BLOCK) {\n\t\t\t\t\tthis.plugin.getHandlerManager().triggerHandlers(\"LeftClick\", ((GenericCustomBlock) block).getCustomId(), event);\n\t\t\t\t} else {\n\t\t\t\t\tthis.plugin.getHandlerManager().triggerHandlers(\"RightClick\", ((GenericCustomBlock) block).getCustomId(), event);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)\n public void onPlayerInteract(PlayerInteractEvent event) {\n if (event.getClickedBlock() != null && event.getItem() != null) {\n if (event.getAction() == Action.RIGHT_CLICK_BLOCK && !event.getPlayer().isSneaking()) {\n if (ItemUtils.HOES.contains(event.getMaterial())) {\n\n Block block = event.getClickedBlock();\n BlockData original = block.getBlockData();\n BlockData changed = safelyRotated(block);\n if (!original.matches(changed)) {\n\n // make sure player can build here\n Block against = block.getRelative(event.getBlockFace().getOppositeFace(), 1);\n BlockPlaceEvent e = new BlockPlaceEvent(block, block.getState(), against, event.getItem(), event.getPlayer(), true, EquipmentSlot.HAND);\n plugin.getServer().getPluginManager().callEvent(e);\n if (!e.isCancelled()) {\n block.setBlockData(changed);\n event.setCancelled(true);\n }\n }\n }\n }\n }\n }",
"@EventHandler(priority = EventPriority.HIGH)\n public void onAttemptInteractLockedBlocks(PlayerInteractEvent event) {\n Action action = event.getAction();\n Block block = event.getClickedBlock();\n if (block == null) return;\n if (LockettePro.needCheckHand()) {\n if (event.getHand() != EquipmentSlot.HAND) {\n if (action == Action.RIGHT_CLICK_BLOCK) {\n if (LocketteProAPI.isChest(block)) {\n // something not right\n event.setCancelled(true);\n }\n return;\n }\n }\n }\n switch (action) {\n case LEFT_CLICK_BLOCK:\n case RIGHT_CLICK_BLOCK:\n Player player = event.getPlayer();\n if (((LocketteProAPI.isLocked(block) && !LocketteProAPI.isUser(block, player)) ||\n (LocketteProAPI.isUpDownLockedDoor(block) && !LocketteProAPI.isUserUpDownLockedDoor(block, player)))\n && !player.hasPermission(\"lockettepro.admin.use\")) {\n Utils.sendMessages(player, Config.getLang(\"block-is-locked\"));\n event.setCancelled(true);\n Utils.playAccessDenyEffect(player, block);\n } else { // Handle double doors\n if (action == Action.RIGHT_CLICK_BLOCK) {\n if ((LocketteProAPI.isDoubleDoorBlock(block) || LocketteProAPI.isSingleDoorBlock(block)) && LocketteProAPI.isLocked(block)) {\n Block doorblock = LocketteProAPI.getBottomDoorBlock(block);\n org.bukkit.block.data.Openable openablestate = (org.bukkit.block.data.Openable) doorblock.getBlockData();\n boolean shouldopen = !openablestate.isOpen(); // Move to here\n int closetime = LocketteProAPI.getTimerDoor(doorblock);\n List<Block> doors = new ArrayList<>();\n doors.add(doorblock);\n if (doorblock.getType() == Material.IRON_DOOR || doorblock.getType() == Material.IRON_TRAPDOOR) {\n LocketteProAPI.toggleDoor(doorblock, shouldopen);\n }\n for (BlockFace blockface : LocketteProAPI.newsfaces) {\n Block relative = doorblock.getRelative(blockface);\n if (relative.getType() == doorblock.getType()) {\n doors.add(relative);\n LocketteProAPI.toggleDoor(relative, shouldopen);\n }\n }\n if (closetime > 0) {\n for (Block door : doors) {\n if (door.hasMetadata(\"lockettepro.toggle\")) {\n return;\n }\n }\n for (Block door : doors) {\n door.setMetadata(\"lockettepro.toggle\", new FixedMetadataValue(LockettePro.getPlugin(), true));\n }\n Bukkit.getScheduler().runTaskLater(LockettePro.getPlugin(), new DoorToggleTask(doors), closetime * 20L);\n }\n }\n }\n }\n break;\n default:\n break;\n }\n }",
"protected String getLeftMessage() {\n\t\treturn player2.getName() + \": \" + player2.getScore();\n\t}",
"public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {}",
"public interface IPartInteractable extends IPart {\n\n /**\n * Called when the part is right-clicked. Return true if an action occoured, false if nothing happened.\n */\n public boolean onActivated(EntityPlayer player, QRayTraceResult hit, ItemStack item);\n\n /**\n * Called when the part is left-clicked.\n */\n public void onClicked(EntityPlayer player, QRayTraceResult hit, ItemStack item);\n\n}",
"@Override\r\n public boolean interactFirst(EntityPlayer player)\r\n {\r\n ItemStack item = player.getHeldItem();\r\n if (player.isSneaking() && item != null && item.getItem() instanceof ItemLinker\r\n && ((owner != null && player.getUniqueID().equals(owner)) || player.capabilities.isCreativeMode))\r\n {\r\n if (item.getTagCompound() == null)\r\n {\r\n item.setTagCompound(new NBTTagCompound());\r\n }\r\n item.getTagCompound().setString(\"lift\", id.toString());\r\n\r\n String message = StatCollector.translateToLocalFormatted(\"msg.liftSet.name\");\r\n\r\n if (worldObj.isRemote) player.addChatMessage(new ChatComponentText(message));\r\n return true;\r\n }\r\n else if (item != null && item.getItem() instanceof ItemLinker\r\n && ((owner != null && player.getUniqueID().equals(owner)) || player.capabilities.isCreativeMode))\r\n {\r\n if (!worldObj.isRemote && owner != null)\r\n {\r\n Entity ownerentity = worldObj.getPlayerEntityByUUID(owner);\r\n String message = StatCollector.translateToLocalFormatted(\"msg.lift.owner\", ownerentity.getName());\r\n\r\n player.addChatMessage(new ChatComponentText(message));\r\n }\r\n }\r\n if ((player.isSneaking() && item != null\r\n && (player.getHeldItem().getItem().getUnlocalizedName().toLowerCase().contains(\"wrench\")\r\n || player.getHeldItem().getItem().getUnlocalizedName().toLowerCase().contains(\"screwdriver\")\r\n || player.getHeldItem().getItem().getUnlocalizedName()\r\n .equals(Items.stick.getUnlocalizedName())))\r\n && ((owner != null && player.getUniqueID().equals(owner)) || player.capabilities.isCreativeMode))\r\n {\r\n if (!worldObj.isRemote)\r\n {\r\n String message = StatCollector.translateToLocalFormatted(\"msg.lift.killed\");\r\n player.addChatMessage(new ChatComponentText(message));\r\n setDead();\r\n }\r\n return true;\r\n }\r\n else if (player.isSneaking() && item != null && Block.getBlockFromItem(item.getItem()) != null\r\n && (owner == null || owner.equals(player.getUniqueID())))\r\n {\r\n Block block = Block.getBlockFromItem(item.getItem());\r\n if (block.isNormalCube())\r\n {\r\n ItemStack item2 = item.splitStack(1);\r\n if (this.getHeldItem() != null && !worldObj.isRemote)\r\n {\r\n this.entityDropItem(getHeldItem(), 1);\r\n }\r\n this.setCurrentItemOrArmor(0, item2);\r\n }\r\n }\r\n else if (player.isSneaking() && item == null && (owner == null || owner.equals(player.getUniqueID())))\r\n {\r\n if (this.getHeldItem() != null && !worldObj.isRemote)\r\n {\r\n this.entityDropItem(getHeldItem(), 1);\r\n }\r\n this.setCurrentItemOrArmor(0, null);\r\n }\r\n return false;\r\n }",
"public boolean displayLeftArm() {\r\n\t\tfinal List<Block> newBlocks = new ArrayList<>();\r\n\t\tif (this.leftArmConsumed) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfinal Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 1).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\tthis.left.clear();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!(this.getLeftHandPos().getBlock().getLocation().equals(l1.getBlock().getLocation()))) {\r\n\t\t\tthis.addBlock(l1.getBlock(), GeneralMethods.getWaterData(3), 100);\r\n\t\t\tnewBlocks.add(l1.getBlock());\r\n\t\t}\r\n\r\n\t\tfinal Location l2 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\tthis.left.clear();\r\n\t\t\tthis.left.addAll(newBlocks);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.addBlock(l2.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\tnewBlocks.add(l2.getBlock());\r\n\r\n\t\tfor (int j = 1; j <= this.initLength; j++) {\r\n\t\t\tfinal Location l3 = l2.clone().toVector().add(this.player.getLocation().clone().getDirection().multiply(j)).toLocation(this.player.getWorld());\r\n\t\t\tif (!this.canPlaceBlock(l3.getBlock()) || !this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\t\tthis.left.clear();\r\n\t\t\t\tthis.left.addAll(newBlocks);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tnewBlocks.add(l3.getBlock());\r\n\t\t\tif (j >= 1 && this.selectedSlot == this.freezeSlot && this.bPlayer.canIcebend()) {\r\n\t\t\t\tthis.addBlock(l3.getBlock(), Material.ICE.createBlockData(), 100);\r\n\t\t\t} else {\r\n\t\t\t\tthis.addBlock(l3.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.left.clear();\r\n\t\tthis.left.addAll(newBlocks);\r\n\r\n\t\treturn true;\r\n\t}",
"public void handleLeftClick() {\n\t\tif (summonedFamiliar != null && c.getInstance().summoned != null) {\n\t\t\tif (summonedFamiliar.familiarType == FamiliarType.BOB) {\n\t\t\t\tfor (int i = 0; i < burdenedItems.length; i++) {\n\t\t\t\t\tif (c.getItems().freeSlots() > 0)\n\t\t\t\t\t\twithdrawItem(burdenedItems[i] - 1, 1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tuseSpecial(c);\n\t\t\t}\n\t\t} else {\n\t\t\tc.getPA().sendSummOrbDetails(false, \"\");\n\t\t}\n\t}",
"@EventHandler\n\tvoid signClicker(final PlayerInteractEvent event) {\n\t\tMarioKart.powerupManager.calculate(event.getPlayer(), event);\n\t\tif(MarioKart.fullServer){\n\t\t\treturn;\n\t\t}\n\t\tif (event.getAction() != Action.RIGHT_CLICK_BLOCK) {\n\t\t\treturn;\n\t\t}\n\t\tif (!(event.getClickedBlock().getState() instanceof Sign)) {\n\t\t\treturn;\n\t\t}\n\t\tfinal Sign sign = (Sign) event.getClickedBlock().getState();\n\t\tString[] lines = sign.getLines();\n\t\tMarioKart.plugin.getServer().getScheduler().runTaskAsynchronously(MarioKart.plugin, new BukkitRunnable(){\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(plugin.signManager.isQueueSign(sign)){\n\t\t\t\t\tString trackName = ChatColor.stripColor(sign.getLine(0));\n\t\t\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] {\n\t\t\t\t\t\t\"join\", trackName, \"auto\" },\n\t\t\t\t\t\tevent.getPlayer());\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}});\n\t\tif (!ChatColor.stripColor(lines[0]).equalsIgnoreCase(\"[MarioKart]\")) {\n\t\t\treturn;\n\t\t}\n\t\tString cmd = ChatColor.stripColor(lines[1]);\n\t\tif (cmd.equalsIgnoreCase(\"list\")) {\n\t\t\tint page = 1;\n\t\t\ttry {\n\t\t\t\tpage = Integer.parseInt(ChatColor.stripColor(lines[2]));\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t}\n\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] { \"list\",\n\t\t\t\t\t\"\" + page }, event.getPlayer());\n\t\t} else if (cmd.equalsIgnoreCase(\"leave\")\n\t\t\t\t|| cmd.equalsIgnoreCase(\"quit\") || cmd.equalsIgnoreCase(\"exit\")) {\n\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] { \"leave\" },\n\t\t\t\t\tevent.getPlayer());\n\t\t} else if (cmd.equalsIgnoreCase(\"join\")) {\n\t\t\tString mode = ChatColor.stripColor(lines[3]);\n\t\t\tif (mode.length() > 0) {\n\t\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] {\n\t\t\t\t\t\t\"join\", ChatColor.stripColor(lines[2]).toLowerCase(),\n\t\t\t\t\t\tmode }, event.getPlayer());\n\t\t\t} else {\n\t\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] {\n\t\t\t\t\t\t\"join\", ChatColor.stripColor(lines[2]).toLowerCase() },\n\t\t\t\t\t\tevent.getPlayer());\n\t\t\t}\n\t\t} else if (cmd.equalsIgnoreCase(\"shop\")) {\n\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] { \"shop\" },\n\t\t\t\t\tevent.getPlayer());\n\t\t}\n\t\treturn;\n\t}",
"public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int meta, float p_149727_7_, float p_149727_8_, float p_149727_9_)\n\t {\n//\t if (this.blockMaterial == Material.iron)\n//\t {\n//\t return false; //Allow items to interact with the door\n//\t }\n//\t else\n//\t {\t \t\n\t int i1 = this.func_150012_g(world, x, y, z);\n\t int j1 = i1 & 7;\n\t j1 ^= 4;\n\t int i = i1 & 3;\n//\t System.out.print(\" Direction :\");\n\t Block b=null;\n\t int x2=x;\n\t int y2=y;\n\t int z2=z;\n\t switch(i){\n\t case 0:\n\t \tif( (i1 & 16)==16){//Left\n\t \t\tx2=x+Facing.offsetsXForSide[2];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[2];\n\t \t\t\n\t \t}else{//Right\n\t \t\tx2=x+Facing.offsetsXForSide[3];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[3];\n\t \t}\n//\t \tSystem.out.print(\"WEST \"+Integer.toString(i, 2)+\" : \"+Integer.toString(4, 2));\n\t \tbreak;\n\t case 1:\n\t \tif( (i1 & 16)==16){//Left\n\t \t\tx2=x+Facing.offsetsXForSide[5];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[5];\n\t \t\t\n\t \t}else{//Right\n\t \t\tx2=x+Facing.offsetsXForSide[4];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[4];\n\t \t}\n//\t \tSystem.out.print(\"NORTH \"+Integer.toString(i, 2)+\" : \"+Integer.toString(2, 2));\n\t \tbreak;\n\t case 2:\n\t \tif( (i1 & 16)==16){//Left\n\t \t\tx2=x+Facing.offsetsXForSide[3];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[3];\n\t \t\t\n\t \t}else{//Right\n\t \t\tx2=x+Facing.offsetsXForSide[2];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[2];\n\t \t}\n\t \t\n//\t \tSystem.out.print(\"EAST \"+Integer.toString(i, 2)+\" : \"+Integer.toString(5, 2));\n\t \tbreak;\n\t case 3:\n\t \tif( (i1 & 16)==16){//Left\n\t \t\tx2=x+Facing.offsetsXForSide[4];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[4];\n\t \t\t\n\t \t}else{//Right\n\t \t\tx2=x+Facing.offsetsXForSide[5];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[5];\n\t \t}\n//\t \tSystem.out.print(\"SOUTH \"+Integer.toString(i, 2)+\" : \"+Integer.toString(3, 2));\n\t \tbreak;\n\t }\n\t b=world.getBlock(x2, y2, z2);\n//\t System.out.print(\" : \"+b+\" : \");\n\t\t\t\t/*\nDirection :SOUTH 11 : 100 Open :Open Y :1 Side :Right\nDirection :NORTH 01 : 010 Open :Open Y :1 Side :Left\nDirection :EAST 10 : 101 Open :Open Y :1 Side :Left\nDirection :WEST 00 : 100 Open :Open Y :1 Side :Left\n\t\t\t\t */\n//\t System.out.print(\" Open :\"+(((j1 & 4) >> 2)==0?\"Closed\":\"Open\"));\n//\t System.out.print(\" Y :\"+Integer.toBinaryString( (i1 & 8) >>3 ));\n//\t System.out.print(\" Side :\"+(((i1 & 16) >> 4)==0?\"Right\":\"Left\"));\n\t \n//\t System.out.println();\n\t \n\n\t if ((i1 & 8) == 0)\n\t {\n\t world.setBlockMetadataWithNotify(x, y, z, j1, 2);\n\t world.markBlockRangeForRenderUpdate(x, y, z, x, y, z);\n\t if( b!=null && b==this){\n\t \tworld.setBlockMetadataWithNotify(x2, y2, z2, j1, 2);\n\t \t world.markBlockRangeForRenderUpdate(x2, y2, z2, x2, y2, z2);\n\t }\n\t }\n\t else\n\t {\n\t world.setBlockMetadataWithNotify(x, y - 1, z, j1, 2);\n\t world.markBlockRangeForRenderUpdate(x, y - 1, z, x, y, z);\n\t if( b!=null && b==this){\n\t \tworld.setBlockMetadataWithNotify(x2, y2-1, z2, j1, 2);\n\t \t world.markBlockRangeForRenderUpdate(x2, y2-1, z2, x2, y2, z2);\n\t }\n\t }\n\n\t world.playAuxSFXAtEntity(player, 1003, x, y, z, 0);\n\t return true;\n//\t }\n\t }",
"public void powerOn() { //power_on\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.ON));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.ON) {\n isTurningOn = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n }\n }",
"@EventHandler\r\n\tpublic void onPlayerInteract(PlayerInteractEvent event) {\r\n\t\tPlayer player = event.getPlayer();\r\n\t\tUUID uuid = player.getUniqueId();\r\n\t\tif (event.getHand() == EquipmentSlot.HAND) {\r\n\t\t\tif (player.getInventory().getHeldItemSlot() == 0) {\r\n\t\t\t\tif (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK) {\r\n\t\t\t\t\tmain.getPlayers().get(uuid).getPlayerClass().tryUseLeft();\r\n\t\t\t\t} else if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {\r\n\t\t\t\t\tevent.setCancelled(true);\r\n\t\t\t\t\tmain.getPlayers().get(uuid).getPlayerClass().tryUseRight();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"int getPower(IBlockAccess iBlockAccess, BlockPos blockPos);",
"protected void onBlockClick(PlayerInteractEvent event) {\n\t}",
"@Override\n public void mouseClicked(MouseEvent me)\n {\n super.mouseClicked(me);\n doAction();\n JOptionPane.showMessageDialog(null, \"Level saved successfully.\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n }",
"@Override\r\n\tpublic void uniqueOnStartInteraction() {\n\t\tif (Main.clientPlayer.getNumWood() < cost) {\r\n\t\t\tMain.clientPlayer.stopInteraction();\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tpublic void onLeftClick(Player p) {\n\t\t\n\t}",
"@EventHandler\n public void onHopperCraft(CraftItemEvent event) {\n ItemStack item = event.getCurrentItem();\n Material material = item.getType();\n if(material.equals(XMaterial.HOPPER.parseMaterial())) {\n if(event.getWhoClicked() instanceof Player) {\n Player player = (Player) event.getWhoClicked();\n if(!player.hasPermission(plugin.getPermission())) {\n event.setCancelled(true);\n player.sendMessage(HopperBlockerPlugin.colourize(\"&cYou cannot craft this.\"));\n player.closeInventory();\n }\n }\n }\n }",
"@EventHandler\n\tpublic void onPlayerInteractEvent(PlayerInteractEvent event) {\n\t\tAction action = event.getAction();\n\t if (action != Action.RIGHT_CLICK_BLOCK && action != Action.RIGHT_CLICK_AIR) {\n\t\t\treturn;\n\t\t}\n\n\t\tPlayer player = event.getPlayer();\n\t boolean holdingBOE = false;\n\t boolean holdingSOW = false;\n\n\t\tPlayerInventory inv = player.getInventory();\n\t\tItemStack mainItem = inv.getItemInMainHand();\n\t if (mainItem != null) {\n ItemMeta meta = mainItem.getItemMeta();\n if (meta != null) {\n if (BookOfEnder.getMeta().equals(meta)) {\n holdingBOE = true;\n } else if (ScrollOfWarp.getMeta().getDisplayName().equals(meta.getDisplayName())) {\n holdingSOW = true;\n }\n }\n\t\t}\n\n\t // do nothing if the player isn't holding a book or scroll in their main hand\n\t\tif (!holdingBOE && !holdingSOW) {\n\t\t\treturn;\n\t\t}\n\n\t\t// even if they are holding a key item, do nothing if they are interacting with certain blocks\n\t\t// ex: crafting table, hopper, chest, etc.\n\t\tBlock blockClicked = event.getClickedBlock();\n\t\tif (blockClicked != null && blockClicked.getType().isInteractable()) {\n\t\t\tLog.d(\"NOT handling right-click event (player interacting with block overrides us)\");\n\t\t\treturn;\n\t\t}\n\n\t\tLog.d(\"handling right-click event!\");\n\n\t\t// we are handling the event, so don't allow block placement (with either hand)\n\t\tevent.setCancelled(true);\n\n\t\t// ignore the off-hand event, as this listener will run once for each hand\n\t\tif (event.getHand() == EquipmentSlot.OFF_HAND) {\n\t\t\tLog.d(\"ignoring off-hand\");\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO allow clicking on the block directly above as well?\n\t\t// pass the player and block location onto a more specific handler\n\t\tLocation blockLocation = blockClicked != null ? blockClicked.getLocation() : null;\n\t\tif (holdingBOE) {\n\t\t\thandleBookOfEnderAction(player, blockLocation);\n\t\t} else {\n\t\t\thandleScrollOfWarpAction(player, blockLocation);\n\t\t}\n\t}",
"public void mouseLeft() {\n\n\t}",
"public static Material getEatenMaterial(PlayerInteractEvent event)\r\n\t{\r\n\t\tAction action = event.getAction();\r\n\t\tif (action != Action.RIGHT_CLICK_AIR && action != Action.RIGHT_CLICK_BLOCK) return null;\r\n\t\t\r\n\t\tMaterial ret = null;\r\n\t\t\r\n\t\tif (action == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().getType() == Material.CAKE_BLOCK)\r\n\t\t{\r\n\t\t\tret = Material.CAKE_BLOCK;\r\n\t\t}\r\n\t\telse if (foodMaterials.contains(event.getMaterial()))\r\n\t\t{\r\n\t\t\tret = event.getMaterial();\r\n\t\t}\r\n\t\t\r\n\t\treturn ret;\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tl1.setText(\"You cliked the mouse\");\r\n\t}",
"protected void a(IBlockData iblockdata, World world, BlockPosition blockposition, Block block) {\n/* 103 */ boolean flag = ((Boolean)iblockdata.get(POWERED)).booleanValue();\n/* 104 */ boolean flag1 = (world.isBlockIndirectlyPowered(blockposition) || a(world, blockposition, iblockdata, true, 0) || a(world, blockposition, iblockdata, false, 0));\n/* */ \n/* 106 */ if (flag1 != flag) {\n/* */ \n/* 108 */ int power = flag ? 15 : 0;\n/* 109 */ int newPower = CraftEventFactory.callRedstoneChange(world, blockposition, power, 15 - power).getNewCurrent();\n/* 110 */ if (newPower == power) {\n/* */ return;\n/* */ }\n/* */ \n/* 114 */ world.setTypeAndData(blockposition, iblockdata.set(POWERED, Boolean.valueOf(flag1)), 3);\n/* 115 */ world.applyPhysics(blockposition.down(), this);\n/* 116 */ if (((BlockPropertyTrackPosition)iblockdata.get(SHAPE)).c()) {\n/* 117 */ world.applyPhysics(blockposition.up(), this);\n/* */ }\n/* */ } \n/* */ }",
"public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {\r\n\t if (HubbyUtils.isClientSide()) {\r\n\t\t\t// TODO:\r\n\t\t\t// Add particle effects for an effect\r\n\t\t //NitroInterface.spawnParticle(NitroInterface.ParticleNames.Teleport, par3EntityPlayer.posX, par3EntityPlayer.posY + 1, par3EntityPlayer.posZ);\r\n\t\t //NitroInterface.spawnParticle(NitroInterface.ParticleNames.Teleport, par3EntityPlayer.posX, par3EntityPlayer.posY + 1, par3EntityPlayer.posZ);\r\n\t\t //NitroInterface.spawnParticle(NitroInterface.ParticleNames.Teleport, par3EntityPlayer.posX, par3EntityPlayer.posY + 1, par3EntityPlayer.posZ);\r\n\t\t //NitroInterface.spawnParticle(NitroInterface.ParticleNames.Teleport, par3EntityPlayer.posX, par3EntityPlayer.posY + 1, par3EntityPlayer.posZ);\r\n\t\t //NitroInterface.spawnParticle(NitroInterface.ParticleNames.Teleport, par3EntityPlayer.posX, par3EntityPlayer.posY + 1, par3EntityPlayer.posZ);\r\n\t\t Minecraft.getMinecraft().displayGuiScreen(new UltraGuiScreenTeleportManager());\r\n\t\t}\r\n\t\treturn itemStack;\r\n\t}",
"public static void rightClick() {\r\n\t\tMinecraftForge.EVENT_BUS.register(playerUtil);\r\n\t}",
"public boolean getCanSpawnHere()\n {\n return this.isValidLightLevel() && super.getCanSpawnHere();\n }",
"public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)\n {\n if (p_149727_1_.isClient)\n {\n return true;\n }\n else\n {\n p_149727_5_.displayGUIWorkbench(p_149727_2_, p_149727_3_, p_149727_4_);\n return true;\n }\n }",
"public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)\r\n {\r\n if (world.isRemote) {\r\n return true;\r\n }\r\n else {\r\n TileCampfire tile = (TileCampfire)world.getTileEntity(x, y, z);\r\n\r\n if (tile != null) {\r\n \t// Lit campfire if player holding flint or flint and steel when campfire is unlit\r\n \tif (this.litLevel == 0) {\r\n\t \tItemStack item = player.inventory.getCurrentItem();\r\n\t \tif (item != null) { \t\t\r\n\t \t\tboolean litSuccess = false;\r\n\t \t\tif (item.getItem() == Items.flint) {\r\n\t \t\t\tlitSuccess = true;\r\n\t \t\t\tif (!player.capabilities.isCreativeMode) {\r\n\t \t\t\t\t--item.stackSize;\r\n\t \t\t\t\tif (item.stackSize <= 0) {\r\n\t \t\t\t\t\tplayer.destroyCurrentEquippedItem();\r\n\t \t\t\t\t}\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t\telse \r\n\t \t\tif (item.getItem() == Items.flint_and_steel) {\r\n\t \t\t\tlitSuccess = true;\r\n\t \t\t\titem.damageItem(1, player);\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\tif (litSuccess) {\r\n\t \t\t\t// Replace unlit campfire to dying campfire\r\n\t \t\t\ttile.campfireBurnTime += 2;\t// To consume fuel in TileCampfire.updateEntity\r\n\t \t\t\t//updateCampfireBlockState(1, world, x, y, z);\r\n\t \t\t\treturn true;\t// Event handled, don't open gui\r\n\t \t\t}\r\n\t \t}\r\n \t}\r\n\r\n player.openGui(MainRegistry.modInstance, 0, world, x, y, z);//player.func_146101_a(tile);\r\n }\r\n\r\n return true;\r\n }\r\n }",
"@Override\n\tpublic boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {\n\t\tif (player.getHeldItem() != null) {\n\t\t\tif (player.getHeldItem().getItem() == Items.iron_pickaxe) {\n\t\t\t\tplayer.getHeldItem().damageItem(100, player);\n\t\t\t\tfor (int i = -10; i < 10; i++) {// xval\n\t\t\t\t\tfor (int j = 0; j < 2; j++)\n\t\t\t\t\t\t// yval\n\t\t\t\t\t\tworld.setBlockToAir(x + i, y + j, z);\n\t\t\t\t}\n\n\t\t\t\tfor (int i = -10; i < 10; i++) {\n\t\t\t\t\tfor (int j = 0; j < 2; j++)\n\t\t\t\t\t\t// yval\n\t\t\t\t\t\tworld.setBlockToAir(x, y + j, z + i);\n\t\t\t\t}\n\t\t\t\t// player.getHeldItem().damageItem(100, player);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {//if hand empty\n\t\t\tplayer.addChatMessage(new ChatComponentText(\"[NausicaaMod]This block digs 10x2x1 mineshafts in all 4 directions\"));\n\t\t\tplayer.addChatMessage(new ChatComponentText(\"**DISTROYS BLOCK WITH NO DROPS**\"));\n\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n @SuppressWarnings(\"deprecation\")\n public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) {\n if (worldIn.isRemote)\n return ActionResultType.SUCCESS;\n\n TileEntity te = worldIn.getTileEntity(pos);\n if (!(te instanceof TurretBlockTileEntity))\n return ActionResultType.FAIL;\n\n NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) te, pos);\n return ActionResultType.SUCCESS;\n }",
"private ClickResponse rightClick() {\n if (Baritone.getAltoClefSettings().isInteractionPaused()) return ClickResponse.WAIT_FOR_CLICK;\n\n Optional<Rotation> reachable = getCurrentReach();\n if (reachable.isPresent()) {\n //Debug.logMessage(\"Reachable: UPDATE\");\n this.baritone.getLookBehavior().updateTarget(reachable.get(), true);\n if (this.baritone.getPlayerContext().isLookingAt(_target)) {\n if (_equipTarget != null) {\n if (!_mod.getInventoryTracker().equipItem(_equipTarget)) {\n Debug.logWarning(\"Failed to equip item: \" + Util.arrayToString(_equipTarget.getMatches()));\n }\n } else {\n _mod.getInventoryTracker().deequipRightClickableItem();\n }\n this.baritone.getInputOverrideHandler().setInputForceState(_interactInput, true);\n if (_shiftClick) {\n MinecraftClient.getInstance().options.keySneak.setPressed(true);\n }\n //System.out.println(this.ctx.player().playerScreenHandler);\n\n if (this.arrivalTickCount++ > 20 || _cancelRightClick) {\n _failed = true;\n this.logDirect(\"Right click timed out/cancelled\");\n return ClickResponse.CLICK_ATTEMPTED;\n }\n }\n return ClickResponse.WAIT_FOR_CLICK;\n }\n if (_shiftClick) {\n MinecraftClient.getInstance().options.keySneak.setPressed(false);\n }\n return ClickResponse.CANT_REACH;\n }",
"@Override\n\tpublic void onTurnLeft(PlatformPlayer player) {\n\t\t\n\t}",
"public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)\r\n/* 133: */ {\r\n/* 134:142 */ if (par1World.isClient) {\r\n/* 135:143 */ return true;\r\n/* 136: */ }\r\n/* 137:146 */ TileEntityTransferNode node = (TileEntityTransferNode)par1World.getTileEntity(par2, par3, par4);\r\n/* 138:148 */ if (node == null) {\r\n/* 139:149 */ return false;\r\n/* 140: */ }\r\n/* 141:152 */ if (par5EntityPlayer.getCurrentEquippedItem() != null) {\r\n/* 142:155 */ if (XUHelper.isWrench(par5EntityPlayer.getCurrentEquippedItem()))\r\n/* 143: */ {\r\n/* 144:156 */ node.pipe_type = StdPipes.getNextPipeType(par1World, par2, par3, par4, node.pipe_type);\r\n/* 145:157 */ node.onInventoryChanged();\r\n/* 146:158 */ par1World.markBlockForUpdate(par2, par3, par4);\r\n/* 147:159 */ return true;\r\n/* 148: */ }\r\n/* 149: */ }\r\n/* 150:163 */ par5EntityPlayer.openGui(ExtraUtilsMod.instance, 0, node.getWorldObj(), node.xCoord, node.yCoord, node.zCoord);\r\n/* 151:164 */ return true;\r\n/* 152: */ }",
"@Override\n @SuppressWarnings(\"deprecation\")\n public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) {\n if (worldIn.isRemote)\n return ActionResultType.SUCCESS;\n\n TileEntity te = worldIn.getTileEntity(pos);\n if (!(te instanceof ZapperTurretTileEntity))\n return ActionResultType.FAIL;\n\n NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) te, pos);\n return ActionResultType.SUCCESS;\n }",
"@EventHandler(priority = EventPriority.HIGHEST)\n public void onPlayerInteract(PlayerInteractEvent event) {\n Player p = event.getPlayer();\n if (this.plugin.commandEnabledForPlayers.contains(p.getName())\n && this.f.getBoolean(\"durability_warning_enabled\")) {\n\n if (event.getClickedBlock() != null\n && event.getAction() != null\n && (event.getClickedBlock().getType() != null)) {\n\n durability(p, event);\n }\n }\n }",
"public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)\n {\n float var4 = 1.0F;\n double var5 = var3.prevPosX + (var3.posX - var3.prevPosX) * (double)var4;\n double var7 = var3.prevPosY + (var3.posY - var3.prevPosY) * (double)var4 + 1.62D - (double)var3.yOffset;\n double var9 = var3.prevPosZ + (var3.posZ - var3.prevPosZ) * (double)var4;\n boolean var11 = this.isFull == 0;\n MovingObjectPosition var12 = this.getMovingObjectPositionFromPlayer(var2, var3, var11);\n\n if (var12 == null)\n {\n return var1;\n }\n else\n {\n FillBucketEvent var13 = new FillBucketEvent(var3, var1, var2, var12);\n\n if (MinecraftForge.EVENT_BUS.post(var13))\n {\n return var1;\n }\n else if (var13.getResult() == Event.Result.ALLOW)\n {\n if (var3.capabilities.isCreativeMode)\n {\n return var1;\n }\n else if (--var1.stackSize <= 0)\n {\n return var13.result;\n }\n else\n {\n if (!var3.inventory.addItemStackToInventory(var13.result))\n {\n var3.dropPlayerItem(var13.result);\n }\n\n return var1;\n }\n }\n else\n {\n if (var12.typeOfHit == EnumMovingObjectType.TILE)\n {\n int var14 = var12.blockX;\n int var15 = var12.blockY;\n int var16 = var12.blockZ;\n\n if (!var2.canMineBlock(var3, var14, var15, var16))\n {\n return var1;\n }\n\n if (this.isFull == 0)\n {\n if (!var3.canPlayerEdit(var14, var15, var16, var12.sideHit, var1))\n {\n return var1;\n }\n\n if (var2.getBlockMaterial(var14, var15, var16) == Material.water && var2.getBlockMetadata(var14, var15, var16) == 0)\n {\n var2.setBlockWithNotify(var14, var15, var16, 0);\n\n if (var3.capabilities.isCreativeMode)\n {\n return var1;\n }\n\n if (--var1.stackSize <= 0)\n {\n return new ItemStack(Item.bucketWater);\n }\n\n if (!var3.inventory.addItemStackToInventory(new ItemStack(Item.bucketWater)))\n {\n var3.dropPlayerItem(new ItemStack(Item.bucketWater.itemID, 1, 0));\n }\n\n return var1;\n }\n\n if (var2.getBlockMaterial(var14, var15, var16) == Material.lava && var2.getBlockMetadata(var14, var15, var16) == 0 && var2.getBlockId(var14, var15, var16) == DivineRPG.tarStill.blockID)\n {\n var2.setBlockWithNotify(var14, var15, var16, 0);\n\n if (var3.capabilities.isCreativeMode)\n {\n return var1;\n }\n\n if (--var1.stackSize <= 0)\n {\n return new ItemStack(DivineRPG.tarBucket);\n }\n\n if (!var3.inventory.addItemStackToInventory(new ItemStack(DivineRPG.tarBucket)))\n {\n var3.dropPlayerItem(new ItemStack(DivineRPG.tarBucket.itemID, 1, 0));\n }\n\n return var1;\n }\n }\n else\n {\n if (this.isFull < 0)\n {\n return new ItemStack(DivineRPG.arcaniumBucket);\n }\n\n if (var12.sideHit == 0)\n {\n --var15;\n }\n\n if (var12.sideHit == 1)\n {\n ++var15;\n }\n\n if (var12.sideHit == 2)\n {\n --var16;\n }\n\n if (var12.sideHit == 3)\n {\n ++var16;\n }\n\n if (var12.sideHit == 4)\n {\n --var14;\n }\n\n if (var12.sideHit == 5)\n {\n ++var14;\n }\n\n if (!var3.canPlayerEdit(var14, var15, var16, var12.sideHit, var1))\n {\n return var1;\n }\n\n if (this.tryPlaceContainedLiquid(var2, var5, var7, var9, var14, var15, var16) && !var3.capabilities.isCreativeMode)\n {\n return new ItemStack(DivineRPG.arcaniumBucket);\n }\n }\n }\n\n return var1;\n }\n }\n }",
"public EnumInteractionResult interact(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman, EnumHand enumhand, MovingObjectPositionBlock movingobjectpositionblock) {\n/* 45 */ ItemStack itemstack = entityhuman.b(enumhand);\n/* */ \n/* 47 */ if (itemstack.isEmpty()) {\n/* 48 */ return EnumInteractionResult.PASS;\n/* */ }\n/* 50 */ int i = ((Integer)iblockdata.get(LEVEL)).intValue();\n/* 51 */ Item item = itemstack.getItem();\n/* */ \n/* 53 */ if (item == Items.WATER_BUCKET) {\n/* 54 */ if (i < 3 && !world.isClientSide) {\n/* */ \n/* 56 */ if (!changeLevel(world, blockposition, iblockdata, 3, entityhuman, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY)) {\n/* 57 */ return EnumInteractionResult.SUCCESS;\n/* */ }\n/* 59 */ if (!entityhuman.abilities.canInstantlyBuild) {\n/* 60 */ entityhuman.a(enumhand, new ItemStack(Items.BUCKET));\n/* */ }\n/* */ \n/* 63 */ entityhuman.a(StatisticList.FILL_CAULDRON);\n/* */ \n/* */ \n/* 66 */ world.playSound((EntityHuman)null, blockposition, SoundEffects.ITEM_BUCKET_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F);\n/* */ } \n/* */ \n/* 69 */ return EnumInteractionResult.a(world.isClientSide);\n/* 70 */ } if (item == Items.BUCKET) {\n/* 71 */ if (i == 3 && !world.isClientSide) {\n/* */ \n/* 73 */ if (!changeLevel(world, blockposition, iblockdata, 0, entityhuman, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL)) {\n/* 74 */ return EnumInteractionResult.SUCCESS;\n/* */ }\n/* 76 */ if (!entityhuman.abilities.canInstantlyBuild) {\n/* 77 */ itemstack.subtract(1);\n/* 78 */ if (itemstack.isEmpty()) {\n/* 79 */ entityhuman.a(enumhand, new ItemStack(Items.WATER_BUCKET));\n/* 80 */ } else if (!entityhuman.inventory.pickup(new ItemStack(Items.WATER_BUCKET))) {\n/* 81 */ entityhuman.drop(new ItemStack(Items.WATER_BUCKET), false);\n/* */ } \n/* */ } \n/* */ \n/* 85 */ entityhuman.a(StatisticList.USE_CAULDRON);\n/* */ \n/* */ \n/* 88 */ world.playSound((EntityHuman)null, blockposition, SoundEffects.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);\n/* */ } \n/* */ \n/* 91 */ return EnumInteractionResult.a(world.isClientSide);\n/* */ } \n/* */ \n/* */ \n/* 95 */ if (item == Items.GLASS_BOTTLE) {\n/* 96 */ if (i > 0 && !world.isClientSide) {\n/* */ \n/* 98 */ if (!changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_FILL)) {\n/* 99 */ return EnumInteractionResult.SUCCESS;\n/* */ }\n/* 101 */ if (!entityhuman.abilities.canInstantlyBuild) {\n/* 102 */ ItemStack itemstack1 = PotionUtil.a(new ItemStack(Items.POTION), Potions.WATER);\n/* 103 */ entityhuman.a(StatisticList.USE_CAULDRON);\n/* 104 */ itemstack.subtract(1);\n/* 105 */ if (itemstack.isEmpty()) {\n/* 106 */ entityhuman.a(enumhand, itemstack1);\n/* 107 */ } else if (!entityhuman.inventory.pickup(itemstack1)) {\n/* 108 */ entityhuman.drop(itemstack1, false);\n/* 109 */ } else if (entityhuman instanceof EntityPlayer) {\n/* 110 */ ((EntityPlayer)entityhuman).updateInventory(entityhuman.defaultContainer);\n/* */ } \n/* */ } \n/* */ \n/* 114 */ world.playSound((EntityHuman)null, blockposition, SoundEffects.ITEM_BOTTLE_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 119 */ return EnumInteractionResult.a(world.isClientSide);\n/* 120 */ } if (item == Items.POTION && PotionUtil.d(itemstack) == Potions.WATER) {\n/* 121 */ if (i < 3 && !world.isClientSide) {\n/* */ \n/* 123 */ if (!changeLevel(world, blockposition, iblockdata, i + 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {\n/* 124 */ return EnumInteractionResult.SUCCESS;\n/* */ }\n/* 126 */ if (!entityhuman.abilities.canInstantlyBuild) {\n/* 127 */ ItemStack itemstack1 = new ItemStack(Items.GLASS_BOTTLE);\n/* 128 */ entityhuman.a(StatisticList.USE_CAULDRON);\n/* 129 */ entityhuman.a(enumhand, itemstack1);\n/* 130 */ if (entityhuman instanceof EntityPlayer) {\n/* 131 */ ((EntityPlayer)entityhuman).updateInventory(entityhuman.defaultContainer);\n/* */ }\n/* */ } \n/* */ \n/* 135 */ world.playSound((EntityHuman)null, blockposition, SoundEffects.ITEM_BOTTLE_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 140 */ return EnumInteractionResult.a(world.isClientSide);\n/* */ } \n/* 142 */ if (i > 0 && item instanceof IDyeable) {\n/* 143 */ IDyeable idyeable = (IDyeable)item;\n/* */ \n/* 145 */ if (idyeable.a(itemstack) && !world.isClientSide) {\n/* */ \n/* 147 */ if (!changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.ARMOR_WASH)) {\n/* 148 */ return EnumInteractionResult.SUCCESS;\n/* */ }\n/* 150 */ idyeable.c(itemstack);\n/* */ \n/* */ \n/* 153 */ entityhuman.a(StatisticList.CLEAN_ARMOR);\n/* 154 */ return EnumInteractionResult.SUCCESS;\n/* */ } \n/* */ } \n/* */ \n/* 158 */ if (i > 0 && item instanceof ItemBanner) {\n/* 159 */ if (TileEntityBanner.b(itemstack) > 0 && !world.isClientSide) {\n/* */ \n/* 161 */ if (!changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BANNER_WASH)) {\n/* 162 */ return EnumInteractionResult.SUCCESS;\n/* */ }\n/* 164 */ ItemStack itemstack1 = itemstack.cloneItemStack();\n/* 165 */ itemstack1.setCount(1);\n/* 166 */ TileEntityBanner.c(itemstack1);\n/* 167 */ entityhuman.a(StatisticList.CLEAN_BANNER);\n/* 168 */ if (!entityhuman.abilities.canInstantlyBuild) {\n/* 169 */ itemstack.subtract(1);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 174 */ if (itemstack.isEmpty()) {\n/* 175 */ entityhuman.a(enumhand, itemstack1);\n/* 176 */ } else if (!entityhuman.inventory.pickup(itemstack1)) {\n/* 177 */ entityhuman.drop(itemstack1, false);\n/* 178 */ } else if (entityhuman instanceof EntityPlayer) {\n/* 179 */ ((EntityPlayer)entityhuman).updateInventory(entityhuman.defaultContainer);\n/* */ } \n/* */ } \n/* */ \n/* 183 */ return EnumInteractionResult.a(world.isClientSide);\n/* 184 */ } if (i > 0 && item instanceof ItemBlock) {\n/* 185 */ Block block = ((ItemBlock)item).getBlock();\n/* */ \n/* 187 */ if (block instanceof BlockShulkerBox && !world.s_()) {\n/* 188 */ ItemStack itemstack2 = new ItemStack(Blocks.SHULKER_BOX, 1);\n/* */ \n/* 190 */ if (itemstack.hasTag()) {\n/* 191 */ itemstack2.setTag(itemstack.getTag().clone());\n/* */ }\n/* */ \n/* 194 */ entityhuman.a(enumhand, itemstack2);\n/* 195 */ a(world, blockposition, iblockdata, i - 1);\n/* 196 */ entityhuman.a(StatisticList.CLEAN_SHULKER_BOX);\n/* 197 */ return EnumInteractionResult.SUCCESS;\n/* */ } \n/* 199 */ return EnumInteractionResult.CONSUME;\n/* */ } \n/* */ \n/* 202 */ return EnumInteractionResult.PASS;\n/* */ }",
"@EventHandler\n\tpublic void onClick(InventoryClickEvent e){\n\t\tInventory inv = e.getInventory();\n\t\tPlayer p = (Player) e.getWhoClicked();\n\t\tif(inv.getName().equals(ChatColor.AQUA+\"EffectGui\")){\n\t\t\n\t\t\tif(e.getSlot() == 0){\n\t\t\t\tPacketUtils.sendTitle(p, ChatColor.RED+\"Flame Effect\", \"Has Been Enabled\", 1, 2, 1);\n\t\t\t\tflame.add(p.getUniqueId());\n\t\t\t\tgetConfig().set(p.getName()+\"'s Flame.enabled\", \"yes\");\n\t\t\t\tsaveConfig();\n\t\t\t\tp.closeInventory();\n\t\t\t\te.setCancelled(true);\n\t\t\t}\n\t\t\t\n\t\t\tif(e.getSlot() == 1){\n\t\t\t\tPacketUtils.sendTitle(p, ChatColor.RED+\"Flame Effect\", \"Has Been Disabled\", 1, 2, 1);\n\t\t\t\tflame.remove(p.getUniqueId());\n\t\t\t\tgetConfig().set(p.getName()+\"'s Flame.enabled\", \"no\");\n\t\t\t\tsaveConfig();\n\t\t\t\tp.closeInventory();\n\t\t\t\te.setCancelled(true);\n\t\t\t}\n\t\t\n\t\t}\n}",
"@SuppressWarnings(\"deprecation\")\r\n\t@Override\r\n public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)\r\n {\r\n \tItemStack stack = playerIn.getHeldItem(hand);\r\n \tif (side == EnumFacing.DOWN && side == EnumFacing.UP)\r\n {\r\n return EnumActionResult.PASS;\r\n }\r\n else if (!playerIn.canPlayerEdit(pos.offset(side), side, stack))\r\n {\r\n return EnumActionResult.PASS;\r\n }\r\n \tIBlockState iblockstate = worldIn.getBlockState(pos);\r\n Block block = iblockstate.getBlock();\r\n if (block == ModBlocks.crystalLog)\r\n {\r\n \tCrystalColors.Basic wood = iblockstate.getValue(CrystalColors.COLOR_BASIC);\r\n \tif(wood == CrystalColors.Basic.BLUE && TYPE !=PlantType.BLUE)return EnumActionResult.PASS;\r\n \tif(wood == CrystalColors.Basic.RED && TYPE !=PlantType.RED)return EnumActionResult.PASS;\r\n \tif(wood == CrystalColors.Basic.GREEN && TYPE !=PlantType.GREEN)return EnumActionResult.PASS;\r\n \tif(wood == CrystalColors.Basic.DARK && TYPE !=PlantType.DARK)return EnumActionResult.PASS;\r\n pos = pos.offset(side);\r\n\r\n if (worldIn.isAirBlock(pos))\r\n {\r\n IBlockState iblockstate1 = getPlant().getBlock().getStateForPlacement(worldIn, pos, side, hitX, hitY, hitZ, 0, playerIn);\r\n worldIn.setBlockState(pos, iblockstate1, 10);\r\n SoundType soundtype = worldIn.getBlockState(pos).getBlock().getSoundType(worldIn.getBlockState(pos), worldIn, pos, playerIn);\r\n worldIn.playSound(playerIn, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);\r\n \r\n if (!playerIn.capabilities.isCreativeMode)\r\n {\r\n \tItemStackTools.incStackSize(stack, -1);\r\n }\r\n }\r\n\r\n return EnumActionResult.SUCCESS;\r\n }\r\n return EnumActionResult.PASS;\r\n }",
"public String buildingBlockAction() throws Exception {\n\t\t\t\t\n\t return \"success\";\n\t }",
"private Location getLeftHandPos() {\r\n\t\treturn GeneralMethods.getLeftSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}",
"public void power()\r\n {\r\n powerOn = true;\r\n }",
"public void sendBlockChange ( Location loc , Material material , byte data ) {\n\t\texecute ( handle -> handle.sendBlockChange ( loc , material , data ) );\n\t}",
"@Override\n\tpublic boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)\n\t{\n\t\tUnsaga.debug(\"アクチベートされてます\");\n\n\t\tTileEntityChestUnsaga var10 = (TileEntityChestUnsaga)par1World.getTileEntity(par2, par3, par4);\n\n\t\tif(var10 == null){\n\t\t\tUnsaga.debug(\"タイルエンチチーがとれない\");\n\t\t\treturn true;\n\t\t}\n\n\t\tif(var10.hasItemSet){\n\t\t\tchestFunc(par1World, par2, par3, par4, par5EntityPlayer, par6, par7, par8, par9);\n\t\t\treturn false;\n\t\t}\n\n\t\tif(!var10.getWorldObj().isRemote){\n\t\t\tUnsaga.debug(\"同期します\");\n\t\t\tint chestlevel = 0;\n\t\t\tif(!var10.hasSetChestLevel()){\n\t\t\t\tvar10.initChestLevel(par1World);\n\t\t\t}\n\t\t\tchestlevel = var10.getChestLevel();\n\t\t\tPacketSyncChest ps = new PacketSyncChest(new XYZPos(par2,par3,par4),chestlevel);\n\t\t\tUnsaga.packetPipeline.sendTo(ps, (EntityPlayerMP) par5EntityPlayer);\n\t\t\tUnsaga.debug(\"パケット送ります\");\n\t\t\tPacketGuiOpen pg = new PacketGuiOpen(Unsaga.guiNumber.chest,new XYZPos(par2,par3,par4));\n\t\t\tUnsaga.packetPipeline.sendToServer(pg);\n\t\t\t//PacketDispatcher.sendPacketToPlayer(PacketHandler.getChestSyncPacket(chestlevel, par2, par3, par4,false,var10.trapOccured,var10.unlocked,var10.defused,var10.magicLock,var10.hasItemSet), (Player) par5EntityPlayer);\n\t\t\t//PacketDispatcher.sendPacketToServer(PacketHandler.getChestGuiPacket(par2,par3,par4));\n\n\t\t}\n\t\tif(var10.getWorldObj().isRemote){\n\n\t\t}\n\n\n\t\t\n\t\t\n\t\t\n\t\t\n//\t\tboolean chestopen = var10.touchChest(par5EntityPlayer);\n//\n//\t\tif(chestopen){\n//\t\t\tvar10.setItemsToChest(par1World.rand);\n//\t\t\tchestFunc(par1World, par2, par3, par4, par5EntityPlayer, par6, par7, par8, par9);\n//\t\t}\n\t\treturn false;\n\t}",
"public void leftPressed() {\n System.out.println(\"leftPressed()\");\n current.translate(0, -1);\n display.showBlocks();\n }",
"@Override\r\n\tpublic boolean isUsedEvent(Event e) {\r\n\t\treturn e instanceof PlayerInteractEvent && ((PlayerInteractEvent) e).getClickedBlock().getLocation().equals(pos);\r\n\t}",
"@EventHandler\n public void InteractAnvil(PlayerInteractEvent event) {\n \tif (event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().getType() == Material.ANVIL) {\n \t\t\n \t\t\n \t\t// -- check block structure\n \t\tif (!CheckStructure(event.getClickedBlock())) {\n \t\t//plugin.log(\"Not a Golden Anvil\");\n \t\treturn;\n \t}\n \t\telse\n \t\t{\n \t\t\t// -- check permissions\n \t\t\t// -- allow usage as a golden anvil if they have perms.\n\n \t\t\tif (plugin.config.usePermissions == true) {\n \t\t\t\tif (event.getPlayer().hasPermission(\"hexscribe.use\")) {\n \t\t\t\tanvilLocations.put(event.getPlayer().getUniqueId(), event.getClickedBlock());\n \t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t// -- deny event, send player message\n \t\t\t\t\tevent.getPlayer().sendMessage(ChatColor.RED + \"You do not have permission to use a:\" + ChatColor.GOLD + \" Golden Anvil\");\n \t\t\t\t\tevent.setCancelled(true);\n \t\t\t\t\tevent.setUseInteractedBlock(Result.DENY);\n \t\t\t\t}\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tanvilLocations.put(event.getPlayer().getUniqueId(), event.getClickedBlock());\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n }",
"public Location getPowerSourceLocation() \n\t{\n\t\treturn factoryPowerSourceLocation;\n\t}",
"public Component leftWorld() {\n return MiniMessage.get().parse(voteHeader + leftWorld);\n }",
"public boolean onRightClick(EntityPlayer paramahd)\r\n/* 148: */ {\r\n/* 149:170 */ if (!this.world.isClient) {\r\n/* 150:171 */ paramahd.a((vq)this);\r\n/* 151: */ }\r\n/* 152:174 */ return true;\r\n/* 153: */ }",
"@Override\n\tpublic void openProgrammerGUI(MachineCrafterTileEntity tile) {\n\t\t\n\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}",
"@java.lang.Override public google.maps.fleetengine.v1.PowerSource getPowerSource() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.PowerSource result = google.maps.fleetengine.v1.PowerSource.valueOf(powerSource_);\n return result == null ? google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result;\n }",
"@Override\n\tpublic void LeftButtonClick() {\n\t\t\n\t}",
"protected String getRightMessage() {\n\t\treturn player1.getName() + \": \" + player1.getScore();\n\t}",
"public void mouseClicked(MouseEvent me) {\r\n\t\tint x_coordinate = me.getX();\r\n\t\tint y_coordinate = me.getY();\r\n\t\tString name;\r\n\t\tString out;\r\n\r\n\t\tif (risk.getState() == RiskGameModel.NEW_GAME) { // 0\r\n\t\t\t// startup\r\n\t\t\tSystem.out.println(\"status \" + risk.getState());\r\n\t\t\trisk.gamePhaseSetup(x_coordinate, y_coordinate);\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tstatusLabel.setText(\"Place an army on a unoccupied territory\");\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.INITIAL_REINFORCE) { // 1\r\n\t\t\t// startup\r\n\t\t\tSystem.out.println(\"status \" + risk.getState());\r\n\t\t\trisk.gamePhaseSetup(x_coordinate, y_coordinate);\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tstatusLabel.setText(\"Place an army on a territory you occupy\");\r\n\t\t\tUtility.writeLog(\"initial reinforcement stage\");\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.ATTACK) {\r\n\t\t\trisk.notifyPhaseViewChange();\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\t\r\n\t\t\tout = risk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\trisk.notifyPhaseViewChange();\r\n\r\n\t\t}\r\n\t\tif (risk.getState() == RiskGameModel.START_TURN) {\r\n\t\t\trisk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\trisk.active = risk.curPlayer;\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tstatusLabel.setText(\"Recieved a bonus of \" + risk.curPlayer.getNumberOfArmies());\r\n\t\t\tUtility.writeLog(name + \" got bonus armies\");\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.REINFORCE) {\r\n\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\trisk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\trisk.notifyPhaseViewChange();\r\n\t\t\tUtility.writeLog(name + \" got\" + risk.curPlayer.getNumberOfArmies() + \" left to place\");\r\n\t\t\tstatusLabel.setText(\"You have \" + risk.curPlayer.getNumberOfArmies() + \" left to place\");\r\n\t\t\tif (risk.curPlayer.getNumberOfArmies() == 0) {\r\n\t\t\t\trisk.setState(RiskGameModel.ACTIVE_TURN);\r\n\t\t\t\tUtility.writeLog(name + \" entered active turn\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.START_TURN) {\r\n\t\t\trisk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\trisk.active = risk.curPlayer;\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tstatusLabel.setText(\"Recieved a bonus of \" + risk.curPlayer.getNumberOfArmies());\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.ACTIVE_TURN) {\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tstatusLabel.setText(\"What would you like to do?\");\r\n\t\t\tEndButton.setVisible(true);\r\n\t\t\tFortifyButton.setVisible(true);\r\n\t\t\tAttackButton.setText(\"Attack\");\r\n\r\n\t\t\tAttackButton.setVisible(true);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.ATTACKING) {\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tAttackButton.setText(\"Retreat\");\r\n\t\t\tstatusLabel.setText(\"Select an opposing territory\");\r\n\t\t\tout = risk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\tUtility.writeLog(name + \" entered attacking phase.\");\r\n\t\t\t// System.out.println(out);\r\n\t\t\trisk.notifyPhaseViewChange();\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.ATTACK_PHASE) {\r\n\t\t\t// jInternalFrame1.setVisible(true);\r\n\t\t\tint attackArmies = risk.aTerritory.getArmies();\r\n\t\t\tint defenseArmies = risk.defenseTerritory.getArmies();\r\n\t\t\tint numofatt = 0;\r\n\t\t\t// If attackers turn\r\n\t\t\tif (risk.active == risk.curPlayer) {\r\n\t\t\t\tif (attackArmies > 3) {\r\n\t\t\t\t\tif (y_coordinate > 250 && y_coordinate < 280) {// if in\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// y_coordinate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// coord\r\n\t\t\t\t\t\tif (x_coordinate > 420 && x_coordinate < 460) // If dice\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// one\r\n\t\t\t\t\t\t\tnumofatt = 1;\r\n\t\t\t\t\t\tif (x_coordinate > 480 && x_coordinate < 520) // if dice\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// two\r\n\t\t\t\t\t\t\tnumofatt = 2;\r\n\t\t\t\t\t\tif (x_coordinate > 540 && x_coordinate < 580)\r\n\t\t\t\t\t\t\tnumofatt = 3;\r\n\t\t\t\t\t} // in y_coordinate coord\r\n\t\t\t\t} // if attcking with 3\r\n\t\t\t\tif (attackArmies == 3) {// if attakking with two\r\n\t\t\t\t\tif (y_coordinate > 250 && y_coordinate < 280) {\r\n\t\t\t\t\t\tif (x_coordinate > 460 && x_coordinate < 500)\r\n\t\t\t\t\t\t\tnumofatt = 1;\r\n\t\t\t\t\t\tif (x_coordinate > 510 && x_coordinate < 550)\r\n\t\t\t\t\t\t\tnumofatt = 2;\r\n\t\t\t\t\t} // in y_coordinate coord\r\n\t\t\t\t} // end if can attack with two\r\n\r\n\t\t\t\tif (attackArmies == 2) {// can only attack with one\r\n\t\t\t\t\tif (y_coordinate > 250 && y_coordinate < 280) {\r\n\t\t\t\t\t\tif (x_coordinate > 480 && x_coordinate < 520)\r\n\t\t\t\t\t\t\tnumofatt = 1;\r\n\t\t\t\t\t} // in y_coordinate\r\n\t\t\t\t} // end only attack with one\r\n\r\n\t\t\t\tif (numofatt != 0) {// change player is num is selected\r\n\t\t\t\t\trisk.active = risk.defender;\r\n\t\t\t\t\trisk.setAttack(numofatt);\r\n\t\t\t\t\tUtility.writeLog(risk.getCurrentPlayer().getName() + \" has \" + attackArmies + \" armies\");\r\n\t\t\t\t\tUtility.writeLog(risk.getCurrentPlayer().getName() + \" attacking with \" + numofatt + \" armies\");\r\n\t\t\t\t}\r\n\r\n\t\t\t} // end attackers turn\r\n\r\n\t\t\t// If defenders turn\r\n\t\t\telse if (risk.active == risk.defender) {\r\n\t\t\t\tif (defenseArmies > 1 && risk.attackNum > 1) {\r\n\t\t\t\t\tif (y_coordinate > 250 && y_coordinate < 280) {\r\n\t\t\t\t\t\tif (x_coordinate > 460 && x_coordinate < 500)\r\n\t\t\t\t\t\t\tnumofatt = 1;\r\n\t\t\t\t\t\tif (x_coordinate > 510 && x_coordinate < 550)\r\n\t\t\t\t\t\t\tnumofatt = 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (y_coordinate > 250 && y_coordinate < 280) {\r\n\t\t\t\t\t\tif (x_coordinate > 480 && x_coordinate < 520)\r\n\t\t\t\t\t\t\tnumofatt = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trisk.notifyPhaseViewChange();\r\n\t\t\t\tif (numofatt > 0) {\r\n\t\t\t\t\trisk.setDefend(numofatt);\r\n\t\t\t\t\trisk.engageBattle();\r\n\t\t\t\t\tif (defenseArmies - risk.defenseTerritory.getArmies() == 1) {\r\n\t\t\t\t\t\tstatusLabel.setText(risk.curPlayer.getName() + \" has destroyed an army\");\r\n\t\t\t\t\t\tUtility.writeLog(risk.curPlayer.getName() + \" has destroyed an army\");\r\n\t\t\t\t\t} else if (defenseArmies - risk.defenseTerritory.getArmies() == 2) {\r\n\t\t\t\t\t\tstatusLabel.setText(risk.curPlayer.getName() + \" has destroyed two armies\");\r\n\t\t\t\t\t\tUtility.writeLog(risk.curPlayer.getName() + \" has destroyed two armies\");\r\n\t\t\t\t\t} else if (attackArmies - risk.aTerritory.getArmies() == 1) {\r\n\t\t\t\t\t\tstatusLabel.setText(risk.curPlayer.getName() + \" has lost an army\");\r\n\t\t\t\t\t\tUtility.writeLog(risk.curPlayer.getName() + \" has lost an army\");\r\n\t\t\t\t\t} else if (attackArmies - risk.aTerritory.getArmies() == 2) {\r\n\t\t\t\t\t\tstatusLabel.setText(risk.curPlayer.getName() + \" has lost two armies\");\r\n\t\t\t\t\t\tUtility.writeLog(risk.curPlayer.getName() + \" has lost two armies\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (risk.aTerritory.getArmies() == 1) {\r\n\t\t\t\t\t\trisk.setState(RiskGameModel.ACTIVE_TURN);\r\n\t\t\t\t\t\tstatusLabel.setText(risk.curPlayer.getName() + \" has lost the battle\");\r\n\t\t\t\t\t\tAttackButton.setText(\"Attack\");\r\n\t\t\t\t\t\tFortifyButton.setVisible(true);\r\n\t\t\t\t\t\tEndButton.setVisible(true);\r\n\t\t\t\t\t\trisk.defenseNum = 0;\r\n\t\t\t\t\t\trisk.attackNum = 0;\r\n\t\t\t\t\t\trisk.defenseTerritory = null;\r\n\t\t\t\t\t\trisk.aTerritory = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} /// end if defenders turn\r\n\r\n\t\t} // End attackPhase\r\n\r\n\t\tif (risk.getState() == RiskGameModel.DEFEATED) {\r\n\t\t\tsetState(RiskGameModel.ACTIVE_TURN);\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.CAPTURE) {\r\n\t\t\tstatusLabel.setText(\"Select number of armies to move to \" + risk.defenseTerritory.getName());\r\n\t\t\tAttackButton.setVisible(false);\r\n\t\t\tAttackButton.setText(\"Attack\");\r\n\t\t\tint max = risk.aTerritory.getArmies() - 1;\r\n\t\t\tint min = risk.attackNum;\r\n\t\t\tif (y_coordinate > 230 && y_coordinate < 257) {// if y_coordinate is\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// correct\r\n\t\t\t\tif (x_coordinate > 600 && x_coordinate < 650)// if max\r\n\t\t\t\t\trisk.defenseNum = risk.aTerritory.getArmies() - 1; // max\r\n\t\t\t\tif (x_coordinate > 520 && x_coordinate < 570) { // if inc\r\n\t\t\t\t\tif (risk.defenseNum < max)\r\n\t\t\t\t\t\trisk.defenseNum++;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(\"Maximum units already selected\");\r\n\t\t\t\t} // end if sub\r\n\t\t\t\tif (x_coordinate > 440 && x_coordinate < 490) {// if dec\r\n\t\t\t\t\tif (risk.defenseNum > min)\r\n\t\t\t\t\t\trisk.defenseNum--;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(\"Minimum units already selected\");\r\n\t\t\t\t} // end if add\r\n\t\t\t\tif (x_coordinate > 360 && x_coordinate < 410)// min\r\n\t\t\t\t\trisk.defenseNum = min;\r\n\t\t\t} // end if y_coordinate coord\r\n\r\n\t\t\tif (x_coordinate > 460 && x_coordinate < 545) {// move has ben\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// clicked\r\n\t\t\t\tif (y_coordinate > 325 && y_coordinate < 355) {// then occupy\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the territory\r\n\t\t\t\t\tAttackButton.setVisible(true);\r\n\t\t\t\t\tif (risk.defenseNum == 1)\r\n\t\t\t\t\t\tstatusLabel.setText(\"1 army moved to \" + risk.defenseTerritory.getName());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(risk.defenseNum + \" armies moved to \" + risk.defenseTerritory.getName());\r\n\r\n\t\t\t\t\trisk.notifyPhaseViewChange();\r\n\t\t\t\t\trisk.setAttackDieArray(new Integer[] {0,0,0});\r\n\t\t\t\t\trisk.setDefenceDieArray(new Integer[] {0,0,0});\r\n\t\t\t\t\tUtility.writeLog(risk.getCurrentPlayer().getName() + \" has \" + risk.defenseNum + \" armies moved to \"\r\n\t\t\t\t\t\t\t+ risk.defenseTerritory.getName());\r\n\t\t\t\t\tEndButton.setVisible(true);\r\n\t\t\t\t\tFortifyButton.setVisible(true);\r\n\t\t\t\t\tif (risk.capture()) {\r\n\t\t\t\t\t\tAttackButton.setVisible(false);\r\n\t\t\t\t\t\tFortifyButton.setVisible(false);\r\n\t\t\t\t\t\tCardButton.setVisible(false);\r\n\t\t\t\t\t\tEndButton.setVisible(false);\r\n\t\t\t\t\t\tstatusLabel.setText(risk.getCurrentPlayer().getName() + \" has won the game\");\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, risk.getCurrentPlayer().getName() + \" has won the game\",\r\n\t\t\t\t\t\t\t\t\"Alert\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// risk.notifyPhaseViewChange();\r\n\t\t} // end capturing\r\n\r\n\t\tif (risk.getState() == RiskGameModel.FORTIFY) {\r\n\t\t\trisk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\tstatusLabel.setText(\"Select a country to move armies too\");\r\n\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.FORTIFYING) {\r\n\t\t\trisk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.FORTIFY_PHASE) {\r\n\t\t\tint from = risk.aTerritory.getArmies();\r\n\r\n\t\t\tif (y_coordinate > 230 && y_coordinate < 257) {// if y_coordinate is\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// correct\r\n\t\t\t\tif (x_coordinate > 600 && x_coordinate < 650)// if max\r\n\t\t\t\t\tif (risk.defenseNum == (from - 1))\r\n\t\t\t\t\t\tstatusLabel.setText(\"Maximum units already selected\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trisk.defenseNum = (from - 1);// all but one\r\n\t\t\t\tif (x_coordinate > 520 && x_coordinate < 570) { // if inc\r\n\t\t\t\t\tif (risk.defenseNum < (from - 1))\r\n\t\t\t\t\t\trisk.defenseNum++;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(\"Maximum units already selected\");\r\n\t\t\t\t} // end if inc\r\n\t\t\t\tif (x_coordinate > 440 && x_coordinate < 490) {// if dec\r\n\t\t\t\t\tif (risk.defenseNum > (from - 1))\r\n\t\t\t\t\t\trisk.defenseNum--;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(\"Minimum units already selected\");\r\n\t\t\t\t} // end if add\r\n\t\t\t\tif (x_coordinate > 360 && x_coordinate < 410)// min\r\n\t\t\t\t\tif (risk.defenseNum == 0)\r\n\t\t\t\t\t\tstatusLabel.setText(\"Minimum units already selected\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trisk.defenseNum = 0;\r\n\t\t\t} // end if y_coordinate coord\r\n\r\n\t\t\tif (x_coordinate > 460 && x_coordinate < 545) {// move has ben\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// clicked\r\n\t\t\t\tif (y_coordinate > 325 && y_coordinate < 355) {// then occupy\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the territory\r\n\t\t\t\t\tAttackButton.setVisible(false);\r\n\t\t\t\t\tif (risk.defenseNum == 1)\r\n\t\t\t\t\t\tstatusLabel.setText(\"1 army moved to \" + risk.defenseTerritory.getName());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(risk.defenseNum + \" armies moved to \" + risk.defenseTerritory.getName());\r\n\t\t\t\t\trisk.notifyPhaseViewChange();\r\n\t\t\t\t\tUtility.writeLog(risk.getCurrentPlayer().getName() + \" has \" + risk.defenseNum + \" armies moved to \"\r\n\t\t\t\t\t\t\t+ risk.defenseTerritory.getName());\r\n\t\t\t\t\tEndButton.setVisible(true);\r\n\t\t\t\t\tFortifyButton.setVisible(false);\r\n\t\t\t\t\trisk.aTerritory.looseArmies(risk.defenseNum);\r\n\t\t\t\t\trisk.defenseTerritory.addArmies(risk.defenseNum);\r\n\t\t\t\t\trisk.setState(RiskGameModel.ACTIVE_TURN);\r\n\t\t\t\t} // end y_coordinate\r\n\t\t\t} // end x_coordinate for movwe\r\n\t\t} // ..fortify phase\r\n\r\n\t\tif (risk.getState() == RiskGameModel.TRADE_CARDS) {\r\n\t\t\tif (y_coordinate > 350 && y_coordinate < 380) {\r\n\t\t\t\tif (x_coordinate > 475 && x_coordinate < 525) { // if exxti\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// button pushed\r\n\t\t\t\t\trisk.setState(RiskGameModel.ACTIVE_TURN);\r\n\t\t\t\t\tSystem.out.println(\"exit\");\r\n\t\t\t\t}\r\n\t\t\t} // end exit\r\n\t\t\trisk.notifyPhaseViewChange();\r\n\t\t} // end trade cards\r\n\r\n\t\tSystem.out.println(\"(\" + x_coordinate + \", \" + y_coordinate + \")\");\r\n\r\n\t\tjPanel1.repaint();\r\n\t\tjPanel3.repaint();\r\n\r\n\t}",
"@Override\n\tpublic void mouseLeft() {\n\t\t\n\t}",
"@Override\n public void onCrafting(EntityPlayer player, ItemStack item, IInventory craftMatrix) \n {\n if (item.itemID == mod_TFmaterials.RubyPickaxe.itemID)\n {\n \t//player.addStat(mod_TFmaterials.RubyPickAchieve, 1);\n \tplayer.addStat(mod_TFmaterials.RubyPickAchieve, 1);\n }\n }",
"@java.lang.Override\n public google.maps.fleetengine.v1.PowerSource getPowerSource() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.PowerSource result = google.maps.fleetengine.v1.PowerSource.valueOf(powerSource_);\n return result == null ? google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result;\n }",
"@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tl1.setText(\"You entered the mouse\");\r\n\t}",
"boolean onInteracted(GameCharacter source);",
"public interface IPoweredBlock {\n /**\n * Returns the signal strength of the block\n * */\n int getPower(IBlockAccess iBlockAccess, BlockPos blockPos);\n /**\n * Returns the amount of power it can transfer\n * */\n int getStrength(IBlockAccess iBlockAccess, BlockPos blockPos);\n /**\n * Checks if it can transfer power on this side.\n * */\n boolean isValidSide(IBlockAccess access, BlockPos pos, EnumFacing facing);\n}",
"public void setActionPointsLeft(int newActionPointLeft)\n\t{\n\t\tthis.actionPointLeft=newActionPointLeft;\n\t}",
"@CheckReturnValue\n PowerResult<Void> fire(Player player, ItemStack stack, Location location);",
"protected abstract void highLightPrompt();",
"public boolean canRequestPower();",
"public void powerOn() \n\t{\n\t\t//put active to true\n\t\tactive = true;\n\t\t\n\t\t// Set attached lever\n\t\tif (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {\n\t\t\tsetActivationLever(true);\n\t\t}\n\t\t\n\t\t//lots of code to make the furnace light up, without loosing contents.\n\t\tFurnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\tbyte data = furnace.getData().getData();\n\t\tItemStack[] oldContents = furnace.getInventory().getContents();\n\t\tfurnace.getInventory().clear();\n\t\tfactoryPowerSourceLocation.getBlock().setType(Material.BURNING_FURNACE);\n\t\tfurnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\tfurnace.setRawData(data);\n\t\tfurnace.update();\n\t\tfurnace.getInventory().setContents(oldContents);\n\t\t//reset the production timer\n\t\tcurrentProductionTimer = 0;\n\t}",
"@EventHandler\n\tpublic void onRightClick(PlayerInteractEvent e){\n\t\t\n\t\tPlayer player = e.getPlayer();\n\t\tsetPlayer(player);\n\t\t\n\t}",
"@EventHandler\n\tpublic void onSignHit (BlockDamageEvent event){\n\t\tdebugOut(\"BlockDamageEvent\");\n\t\t//getLogger().info(\"MEEP\");\n\t\tif(event.getBlock().getType()==Material.SIGN_POST || event.getBlock().getType()==Material.WALL_SIGN){\n\t\t\tdebugOut(\"A sign was done damage.\");\n\t\t\t//Credit: https://bukkit.org/threads/how-to-convert-block-class-to-sign-class.102313/\n\t\t\tBlockState blockState = event.getBlock().getState();\n\t\t\tSign sign = (Sign) blockState;\n\t\t\tif(isMakingShop(event.getPlayer())){\n\t\t\t\t//Do this if the player hits a shop while making one\n\t\t\t\tdebugOut(event.getPlayer()+\" is making a shop\");\n\t\t\t\tString[] playerHashInfo = PlayerMakingShop.get(event.getPlayer().getName() ).split(\",\");\n\t\t\t\tInteger shopX = event.getBlock().getX();\n\t\t\t\tInteger shopY = event.getBlock().getY();\n\t\t\t\tInteger shopZ = event.getBlock().getZ();\n\t\t\t\tInteger playerX = Integer.valueOf(playerHashInfo[0]);\n\t\t\t\tInteger playerY = Integer.valueOf(playerHashInfo[1]);\n\t\t\t\tInteger playerZ = Integer.valueOf(playerHashInfo[2]);\n\t\t\t\tString shopWorld = event.getBlock().getWorld().getName();\n\t\t\t\tString playerWorld = playerHashInfo[3];\n\t\t\t\tdebugOut(\"Shop: \"+shopX+shopY+shopZ+shopWorld);\n\t\t\t\tdebugOut(\"Play: \"+playerX+playerY+playerZ+playerWorld);\n\t\t\t\tif(shopX.intValue()==playerX.intValue() && shopY.intValue()==playerY.intValue() && shopZ.intValue() == playerZ.intValue() && shopWorld.equals(playerWorld)){\n\t\t\t\t\tdebugOut(event.getPlayer().getName()+\" hit the shop that (s)he was creating\");\n\t\t\t\t\tItemStack equipped = event.getPlayer().getItemInHand();\n\t\t\t\t\tif(equipped.getType()!=Material.AIR && equipped.getType()!=Material.WRITTEN_BOOK){\n\t\t\t\t\t\tdebugOut(\"Begin establishing Shop at xyz (\"+shopX+\",\"+shopY+\",\"+shopZ+\") in \"+shopWorld);\n\t\t\t\t\t\tString ownerUUID = playerHashInfo[4];\n\t\t\t\t\t\tString establisherUUID = playerHashInfo[5];\n\t\t\t\t\t\tplayerSuccess(event.getPlayer(), \"Success!\");\n\t\t\t\t\t\tString[] buyLine = sign.getLine(2).split(\" \");\n\t\t\t\t\t\tFloat buy = Float.valueOf(buyLine[1]);\n\t\t\t\t\t\tFloat sell = Float.valueOf(buyLine[3]);\n\t\t\t\t\t\testablishShop(ownerUUID, establisherUUID, event.getPlayer().getName(),shopX, shopY, shopZ, event.getBlock().getWorld(), equipped, buy, sell);\n\t\t\t\t\t}else if(equipped.getType()==Material.AIR){\n\t\t\t\t\t\tdebugOut(event.getPlayer().getName()+\" hit the shop with Air, which cannot be sold\");\n\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"cant-sell-air\") );\n\t\t\t\t\t}else if(equipped.getType()==Material.WRITTEN_BOOK) {\n\t\t\t\t\t\tdebugOut(event.getPlayer().getName()+\" hit the shop with a written book, which cannot be sold\");\n\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"cant-sell-book\") );\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tdebugOut(event.getPlayer().getName()+\" did not hit the shop the shop (s)he was creating\");\n\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"click-wrong-shop\"));\n\t\t\t\t\tif(shopX.intValue()==playerX.intValue()){\n\t\t\t\t\t\tdebugOut(\"X matches\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdebugOut(playerX + \" does not equal \" + shopX);\n\t\t\t\t\t}\n\t\t\t\t\tif(shopY.intValue()==playerY.intValue()){\n\t\t\t\t\t\tdebugOut(\"Y matches\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdebugOut(playerY + \" does not equal \" + shopY);\n\t\t\t\t\t}\n\t\t\t\t\tif(shopZ.intValue() == playerZ.intValue()){\n\t\t\t\t\t\tdebugOut(\"Z matches\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdebugOut(playerZ + \" does not equal \" + shopZ);\n\t\t\t\t\t}\n\t\t\t\t\tif(shopWorld.equals(playerWorld)){\n\t\t\t\t\t\tdebugOut(\"Worlds match\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdebugOut(playerWorld + \" does not equal \" + shopWorld);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if(sign.getLine(0).equals(getConfig().getString(\"sign-header\"))){\n\t\t\t\t//Do this if the player hit a shop, when he wasn't making one.\n\t\t\t\tInteger thisShopID = getShopID(event.getBlock().getX(), event.getBlock().getY(), event.getBlock().getZ(), event.getBlock().getWorld() );//GET FROM DATABASE\n\t\t\t\tdebugOut(event.getPlayer()+\" is not making a shop, but did click on a shop sign\");\n\t\t\t\tif(ActivePlayerShop.containsKey(event.getPlayer().getName())){\n\t\t\t\t\tInteger currentValue = ActivePlayerShop.get(event.getPlayer().getName());\n\t\t\t\t\tif(Integer.valueOf(currentValue)==Integer.valueOf(thisShopID) && Integer.valueOf(currentValue)!=0 ){\n\t\t\t\t\t\t//BUY FROM THE SHOP OR WITHDRAW\n\t\t\t\t\t\tdebugOut(\"Checking to see if the selected shop is owned\");\n\t\t\t\t\t\tString shopOwner = getShopOwner(thisShopID);\n\t\t\t\t\t\tif(shopOwner!=\"null\"){\n\t\t\t\t\t\t\tInteger currentStock = getStock(thisShopID);\n\t\t\t\t\t\t\tif(shopOwner.equals(event.getPlayer().getUniqueId().toString()) ){\n\t\t\t\t\t\t\t\tdebugOut(\"Shop is owned\");\n\t\t\t\t\t\t\t\t//Do shop owner stuff\n\t\t\t\t\t\t\t\tif(event.getPlayer().isSneaking()){\n\t\t\t\t\t\t\t\t\t//withdraw a stack\n\t\t\t\t\t\t\t\t\tdebugOut(\"withdrawing one stack -- attempt\");\n\t\t\t\t\t\t\t\t\tItemStack currentItem = getShopItem(thisShopID, true, sign.getLine(3) );\n\t\t\t\t\t\t\t\t\tInteger stackSize = currentItem.getMaxStackSize();\n\t\t\t\t\t\t\t\t\tif(Integer.valueOf(currentStock)>=stackSize){\n\t\t\t\t\t\t\t\t\t\t//Withdraw a stack\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"There are enough items in stock\");\n\t\t\t\t\t\t\t\t\t\tif(canAddItem(currentItem, event.getPlayer()) ){\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"The player can fit all of the items in inventory\");\n\t\t\t\t\t\t\t\t\t\t\tevent.getPlayer().getInventory().addItem(currentItem);\n\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-stackSize);\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"The player cannot fit all items in inventory\");\n\t\t\t\t\t\t\t\t\t\t\tif(getConfig().getString(\"buy-when-full\").matches(\"true\")){\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is true -- dropping extra items on floor\");\n\t\t\t\t\t\t\t\t\t\t\t\t//Drop extra items on floor\n\t\t\t\t\t\t\t\t\t\t\t\tsoftAddItem(currentItem, event.getPlayer());\n\t\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-stackSize);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is false -- cancelling trade\");\n\t\t\t\t\t\t\t\t\t\t\t\t//Do not sell\n\t\t\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"full-inventory-error\"));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t//Not enough in stock\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"There are not enough items in stock to withdraw a stack\");\n\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"not-enough-items\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t//withdraw one item\n\t\t\t\t\t\t\t\t\tdebugOut(\"withdrawing one item -- attempt\");\n\t\t\t\t\t\t\t\t\tif(Integer.valueOf(currentStock)>0){\n\t\t\t\t\t\t\t\t\t\t//Add one to player\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"In Stock\");\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Retrieving the item\");\n\t\t\t\t\t\t\t\t\t\tItemStack currentItem = getShopItem(thisShopID, false, sign.getLine(3) );\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Item retrieved\");\n\t\t\t\t\t\t\t\t\t\tif(canAddItem(currentItem, event.getPlayer()) ){\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Player can fit item -- adding\");\n\t\t\t\t\t\t\t\t\t\t\tsoftAddItem(currentItem, event.getPlayer());\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Decreasing stock by one...\");\n\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-1);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Player cannot fit item\");\n\t\t\t\t\t\t\t\t\t\t\tif(getConfig().getString(\"buy-when-full\").matches(\"true\")){\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is true -- dropping extra items on floor\");\n\t\t\t\t\t\t\t\t\t\t\t\tsoftAddItem(currentItem, event.getPlayer());\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Decreasing stock by one...\");\n\t\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-1);\n\t\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is false -- cancelling trade\");\n\t\t\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"full-inventory-error\"));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Transaction Completed\");\n\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Out of Stock\");\n\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"out-of-stock\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tdebugOut(\"Shop is not owned\");\n\t\t\t\t\t\t\t\t//Do consumer stuff\n\t\t\t\t\t\t\t\tdebugOut(\"getShopBuyPrice\");\n\t\t\t\t\t\t\t\tfloat buyPrice = getShopBuyPrice(thisShopID);\n\t\t\t\t\t\t\t\tdebugOut(\"getVaultbalance\");\n\t\t\t\t\t\t\t\tfloat customerBalance = (float) getVaultBalance(event.getPlayer().getUniqueId());\n\t\t\t\t\t\t\t\tdebugOut(\"Creating 'currentItem'\");\n\t\t\t\t\t\t\t\tItemStack currentItem;\n\t\t\t\t\t\t\t\tif(event.getPlayer().isSneaking()){\n\t\t\t\t\t\t\t\t\t//buy a stack\n\t\t\t\t\t\t\t\t\tdebugOut(\"attempting to buy a stack\");\n\t\t\t\t\t\t\t\t\tcurrentItem = getShopItem(thisShopID, true, sign.getLine(3));\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t//buy one item\n\t\t\t\t\t\t\t\t\tdebugOut(\"attempting to buy one item\");\n\t\t\t\t\t\t\t\t\tcurrentItem = getShopItem(thisShopID, false, sign.getLine(3));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(currentStock>=currentItem.getAmount()){\n\t\t\t\t\t\t\t\t\tdebugOut(\"Item has sufficient stock\");\n\t\t\t\t\t\t\t\t\tif(customerBalance < (buyPrice*currentItem.getAmount()) ){\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Insufficient Funds -- player has: \"+customerBalance+\" | the shop needs: \"+(buyPrice*currentItem.getAmount() ));\n\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"insufficient-funds\"));\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Player has sufficient funds: \"+customerBalance);\n\t\t\t\t\t\t\t\t\t\tUUID ownerUUID = UUID.fromString(getShopOwner(thisShopID));\n\t\t\t\t\t\t\t\t\t\tif(canAddItem(currentItem, event.getPlayer()) ){\n\t\t\t\t\t\t\t\t\t\t\t//Do transaction\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Player can fit item -- adding\");\n\t\t\t\t\t\t\t\t\t\t\tsoftAddItem(currentItem, event.getPlayer());\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Decreasing stock\");\n\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Changing funds...\");\n\t\t\t\t\t\t\t\t\t\t\tchangeVaultBalance(ownerUUID, buyPrice*currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\tchangeVaultBalance(event.getPlayer().getUniqueId(), -buyPrice*currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\tevent.getPlayer().sendMessage(ChatColor.GREEN + \"You have bought \"+ChatColor.YELLOW+currentItem.getAmount()+\" \"+ChatColor.GREEN+\" item(s) for \"+ChatColor.YELLOW+buyPrice*currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Player cannot fit item\");\n\t\t\t\t\t\t\t\t\t\t\tif(getConfig().getString(\"buy-when-full\").matches(\"true\")){\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is enabled -- continuing transaction\");\n\t\t\t\t\t\t\t\t\t\t\t\tsoftAddItem(currentItem, event.getPlayer());\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Decreasing stock\");\n\t\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Changing funds...\");\n\t\t\t\t\t\t\t\t\t\t\t\tchangeVaultBalance(ownerUUID, buyPrice*currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\t\tchangeVaultBalance(event.getPlayer().getUniqueId(), -buyPrice*currentItem.getAmount()) ;\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Notifying Player...\");\n\t\t\t\t\t\t\t\t\t\t\t\tevent.getPlayer().sendMessage(ChatColor.GREEN + \"You have bought \"+ChatColor.YELLOW+currentItem.getAmount()+\" \"+ChatColor.GREEN+\" item(s) for \"+ChatColor.YELLOW+buyPrice*currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is not enabled -- cancelling transaction\");\n\t\t\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"full-inventory-error\"));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\tdebugOut(\"Not enough in stock\");\n\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"not-enough-items\"));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tdebugOut(\"This shop does not exist; is it finished being created?\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdebugOut(\"A shop was activated, but it was not this one; changing to this shop\");\n\t\t\t\t\t\tActivePlayerShop.put(event.getPlayer().getName(), thisShopID);\n\t\t\t\t\t\tshowShopInfo(thisShopID, event.getPlayer());\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdebugOut(\"No shop activated, activating it\");\n\t\t\t\t\tActivePlayerShop.put(event.getPlayer().getName(), thisShopID);\n\t\t\t\t\tshowShopInfo(thisShopID, event.getPlayer());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@EventHandler\n\tpublic void onPlayerInteract(PlayerInteractEvent event) {\n\t\tPlayer player = event.getPlayer();\n\n\t\t// Gestion de l'Interaction.\n\t\tif ((event.getItem() == null) || (event.getItem().getType().equals(Material.AIR)))\n\t\t\treturn; \n\t\tif ((event.getAction().equals(Action.RIGHT_CLICK_AIR))\n\t\t\t\t|| (event.getAction().equals(Action.RIGHT_CLICK_BLOCK))) {\n\n\t\t\t// Interaction en fonction des Status.\n\t\t\tswitch (GameStatus.getStatus()) {\n\t\t\tcase LOBBY:\n\t\t\t\tswitch (event.getItem().getType()) {\n\t\t\t\tcase SKULL_ITEM:\n\t\t\t\t\tnew TeamMenu(player);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BED:\n\t\t\t\t\tSwitchServer.sendPlayerToLobby(player, false);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public void recordInProductHelpMenuItemClicked() {\n RecordUserAction.record(\"Android.ChromeHome.IPHMenuItemClicked\");\n }",
"@EventHandler\n public void onInventoryClick(InventoryClickEvent e)\n {\n Player player = (Player) e.getWhoClicked();\n if(player.getOpenInventory().getTitle() == \"§6§l[§a§lGuildMC§6§l] §r§eGuild Master\" || player.getOpenInventory().getTitle() == \"§6§l[§a§lGuildMC§6§l] §r§eRaid GUI\"){\n if(e.getCurrentItem().getType() == Material.NETHER_STAR){\n GuildMCFunctions functions = new GuildMCFunctions();\n functions.addPlayerToCreatorList(player);\n }\n e.setCancelled(true);\n }\n }",
"private void joinLobby(ActionEvent actionEvent, String name) throws ExecutionException, InterruptedException {\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n if(!fireStoreController.checkExistence(token)){\n JoinLobbyViewTokenTextField.setText(\"This lobby does not exist\");\n }\n\n if(fireStoreController.getLobbySize(token) >= 8){\n LobbyAlreadyFullPopup.setVisible(true);\n }\n\n }",
"boolean run(final double POWER)\n {\n boolean success = true; // Tells whether attempt to power lift is successful or not\n\n try\n {\n _motor.setPower(POWER);\n }\n catch(Exception e)\n {\n Log.e(\"Error\" , \"Cannot power lift, check your mapping\");\n success = false;\n }\n\n return success;\n }",
"boolean onLeftClick(double mouseX, double mouseY);",
"public SceneState handleLeftClick(PVector position) {\n \n mContext.mManager.fireMissile(position); \n return this;\n\n }",
"@Override\r\n \tpublic void mousePressed(MouseEvent e)\r\n \t{\r\n\t if (showDebug && e.isPopupTrigger()) {\r\n\t rightClickMenu.show(e.getComponent(),\r\n\t e.getX(), e.getY());\r\n\t }\r\n \t}",
"public abstract void onStockPass(World world, BlockPos pos, IBlockState state, IRollingStock stock);",
"@ActionTrigger(action=\"KEY-PRVBLK\", function=KeyFunction.PREVIOUS_BLOCK)\n\t\tpublic void spriden_PreviousBlock()\n\t\t{\n\t\t\t\n\t\t\t\texecuteAction(\"INVALID_FUNCTION_MSG\");\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t}",
"public void leftButtonPressed() {\n\t\tif(droneApp.myDrone.isConnected) {\n\t\t\tif(!on) {\n\t\t\t\t// Enable our steamer\n\t\t\t\tstreamer.enable();\n\t\t\t\t// Enable the sensor\n\t\t\t\tdroneApp.myDrone.quickEnable(qsSensor);\n\t\t\t\t\n\t\t\t\ton = true;\n\t\t\t\t\n\t\t\t\tint w = tvSensorValue.getWidth();\n\t\t\t\tint h = tvSensorValue.getHeight();\n\t\t\t\t\n\t\t\t\tif(firstTime) {\t\t\n\t\t\t\t\tfirstTime = false;\n\t\t\t\t\twarmUpWindow1 = new PopupWindow(layout2, w, h, true);\n\t\t\t\t\twarmUpWindow1.setOutsideTouchable(true);\n\t\t\t\t\twarmUpWindow1.setFocusable(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(warmedUp) {\n\t\t\t\t\twarmedUp = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tshowWarmupWindow(h);\n\t\t\t\tcountdown1Handler.post(countdown1Runnable);\n\t\t\t} else {\n\t\t\t\tresetAllOperations();\n\t\t\t}\n\t\t}\n\t}",
"public void onBlockEmissionIncrease(BlockPos debug1, int debug2) {\n/* 40 */ if (this.blockEngine != null) {\n/* 41 */ this.blockEngine.onBlockEmissionIncrease(debug1, debug2);\n/* */ }\n/* */ }",
"public void onSourceRightClick(DefaultPopupManager manager) {\r\n }",
"@Override\n\tpublic String addmaterial() {\n\t\treturn \"Leather Material is ready\";\n\t}",
"public void triggerInteraction(Player p, Tile newTile) {\n\t\tTile playerTil = p.getTile();\n\t\tGameObject object = newTile.getGameObject();\n\t\tif (object instanceof Item) {\n\t\t\tif (!p.inventoryIsFull()) {\n\t\t\t\tif (object instanceof Key) {\n\t\t\t\t\tint keyCount = 0;\n\t\t\t\t\tfor (Item i : p.getInventory()) {\n\t\t\t\t\t\tif (i instanceof Key) {\n\t\t\t\t\t\t\tkeyCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (keyCount >= PLAYER_KEY_LIMIT) {\n\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\"You already have 3 keys, Harambe does not appreciate your greed, sharpen up soldier!\",\n\t\t\t\t\t\t\t\tp);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tplayerTil.setGameObject(null);\n\t\t\t\tp.pickUpItem((Item) object);\n\t\t\t\tnewTile.setGameObject(p);\n\t\t\t\tp.setTile(newTile);\n\t\t\t\tp.setLocation(board.getLocationById(newTile.getLocationID()));\n\t\t\t}\n\t\t} else if (object instanceof Chest) {\n\t\t\tChest c = (Chest) object;\n\t\t\tfor (Item i : p.getInventory()) {\n\t\t\t\tif (i instanceof Key) {\n\t\t\t\t\tKey k = ((Key) i);\n\t\t\t\t\tif (k.getCode() == c.getCode()) {\n\t\t\t\t\t\tif (c.getContents() != null) {\n\t\t\t\t\t\t\tp.getInventory().remove(i);\n\t\t\t\t\t\t\tp.pickUpItem(c.getContents());\n\t\t\t\t\t\t\tc.setContents(null);\n\t\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\t\"With the chest you recognise a distinct glow, a Banana!\", p);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\"You don't have a key with the correct code to open this chest soldier!\", p);\n\n\t\t} else if (object instanceof Door) {\n\t\t\tDoor door = (Door) object;\n\t\t\tp.getTile().setGameObject(null);\n\t\t\tp.setLocation(door.getLocationID());\n\t\t\tp.setTile(p.getLocation().getTileAtPosition(door.getDoorPosition()));\n\t\t\tp.getTile().setGameObject(p);\n\n\t\t} else if (object instanceof NPC) {\n\t\t\tif (!nightTime) {\n\t\t\t\tfor (Item i : p.getInventory()) {\n\t\t\t\t\tif (i instanceof Fish) {\n\t\t\t\t\t\tp.getInventory().remove(i);\n\t\t\t\t\t\tp.pickUpItem(new Banana(\"Banana\"));\n\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\"The Pretty Penguin was overwhelmed as you handed her the fish, in response she gave you a golden reward!\",\n\t\t\t\t\t\t\t\tp);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\"The Pretty Penguin did not offer a response, consider offering her a present\", p);\n\t\t\t}else{\n\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\"Ssssh!, Harambe does not approve of your intentions to wake a sleeping woman\", p);\n\t\t\t}\n\t\t}\n\t}",
"public void buttonAction(int selectedFeature) {\n\t\tmyParent.stopCustomCursor(this.couplerMullionPanel);\n\t\t\n\t\tthis.myParent.setActionTypeEvent(1);\n\t\t\n\t\tif (selectedLevel == 1) {\n\t\t\t\n\t\t\tif (selectedFeature == 1) {\n\t\t\t\tmyParent.myCursorImage = ItemFrame.iconFiles.get(\"vCouplerCursor\");\n\t\t\t\tmyParent.myCursor = myParent.toolkit.createCustomCursor(myParent.myCursorImage.getImage(), new Point(0, 0), \"\");\n\t\t\t\tmyParent.startCustomCursor(myParent.main, myParent.myCursor);\n\t\t\t} else {\n\t\t\t\tmyParent.myCursorImage = ItemFrame.iconFiles.get(\"hCouplerCursor\");\n\t\t\t\tmyParent.myCursor = myParent.toolkit.createCustomCursor(myParent.myCursorImage.getImage(), new Point(0, 0), \"\");\n\t\t\t\tmyParent.startCustomCursor(myParent.main, myParent.myCursor);\n\t\t\t}\n\t\t} else {\n\t\t\tif (selectedFeature == 1) {\n\t\t\t\tmyParent.myCursorImage = ItemFrame.iconFiles.get(\"vMullionCursor\");\n\t\t\t\tmyParent.myCursor = myParent.toolkit.createCustomCursor(myParent.myCursorImage.getImage(), new Point(0, 0), \"\");\n\t\t\t\tmyParent.startCustomCursor(myParent.main, myParent.myCursor);\n\t\t\t} else {\n\t\t\t\tmyParent.myCursorImage = ItemFrame.iconFiles.get(\"hMullionCursor\");\n\t\t\t\tmyParent.myCursor = myParent.toolkit.createCustomCursor(myParent.myCursorImage.getImage(), new Point(0, 0), \"\");\n\t\t\t\tmyParent.startCustomCursor(myParent.main, myParent.myCursor);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}",
"public void sideLeft(double targetDistance, double power) {\n setDriveMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n setDriveMode(DcMotor.RunMode.RUN_USING_ENCODER);\n double currentDistance = 0;\n while (Math.abs(currentDistance) < targetDistance && opModeIsActive()) {\n currentDistance = frontRight.getCurrentPosition();\n frontLeft.setPower(power);\n frontRight.setPower(-power);\n backLeft.setPower(-power);\n backRight.setPower(power);\n }\n stopMotors();\n }",
"public String levelPassedText() {\r\n\t\treturn levelManager.levelPassedText();\r\n\t}",
"@Override\n public boolean onMachineActivated(World world, int x, int y, int z, EntityPlayer par5EntityPlayer, int side, float hitX, float hitY, float hitZ)\n {\n int metadata = world.getBlockMetadata(x, y, z);\n\n if (!world.isRemote)\n {\n par5EntityPlayer.openGui(Atomic.INSTANCE, 0, world, x, y, z);\n return true;\n }\n\n return true;\n }",
"public void notifyNewPower (StoredPower power) {\n UserEvent.NewPower message = new UserEvent.NewPower(this.id, power, \"\");\n notifyMe(message);\n\t}",
"void onRespawned(Need need, NeedLevel level, PlayerEntity player, PlayerEntity oldPlayer);",
"protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException\r\n\t{\r\n\t\tsuper.mouseClicked(mouseX, mouseY, mouseButton);\r\n\r\n\t\tsynchronized (this.threadLock)\r\n\t\t{\r\n\t\t\tif (!this.openGLWarning1.isEmpty() && !StringUtils.isNullOrEmpty(this.openGLWarningLink) && mouseX >= this.openGLWarningX1 && mouseX <= this.openGLWarningX2 && mouseY >= this.openGLWarningY1 && mouseY <= this.openGLWarningY2)\r\n\t\t\t{\r\n\t\t\t\tGuiConfirmOpenLink guiconfirmopenlink = new GuiConfirmOpenLink(this, this.openGLWarningLink, 13, true);\r\n\t\t\t\tguiconfirmopenlink.disableSecurityWarning();\r\n\t\t\t\tthis.mc.displayGuiScreen(guiconfirmopenlink);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void leftClickPressedOnDelivery();",
"@SuppressWarnings(\"deprecated\")\n protected void durability(Player p, PlayerInteractEvent event) {\n this.p = p;\n\n Block block = event.getClickedBlock();\n Action action = event.getAction();\n Material blockType = block.getType();\n Location blockLocation = block.getLocation();\n ItemStack heldItem = p.getInventory().getItemInMainHand();\n Material heldItemType = heldItem.getType();\n\n //left click = spade,hoe\n //right click = axe,pick axe,sword,spade,hoe,sword\n canRun = isCanCheckDurability(action, heldItemType);\n\n if (canRun && Helper.isBlockForOutput(blockType)) {\n //Only for blocks\n //TODO get type id nicer than with deprecated method\n final String blockLocationFormat = String.format(\"%d;%d;%d;%d\",\n block.getTypeId(),\n blockLocation.getBlockX(),\n blockLocation.getBlockY(),\n blockLocation.getBlockZ());\n\n if (checkDurability(heldItem, blockLocationFormat)) {\n xyzBlock.add(blockLocationFormat);\n //Remove later on, so it can be added again\n new BukkitRunnable() {\n\n @Override\n public void run() {\n if (xyzBlock.contains(blockLocationFormat)) xyzBlock.remove(blockLocationFormat);\n }\n\n }.runTaskLater(this.plugin, 1220); //1220 = 1 minute (in-game) //TODO make configurable?\n }\n }\n }"
] | [
"0.57646453",
"0.5735129",
"0.56218016",
"0.56192154",
"0.5462869",
"0.52999187",
"0.5293351",
"0.52360815",
"0.51356816",
"0.5091515",
"0.50883734",
"0.508381",
"0.5072793",
"0.50477827",
"0.50326514",
"0.5011931",
"0.50035596",
"0.49817252",
"0.49716985",
"0.48956394",
"0.48935565",
"0.48701143",
"0.48620296",
"0.48519722",
"0.48510122",
"0.48255658",
"0.48115706",
"0.4779997",
"0.47763878",
"0.47680104",
"0.47633603",
"0.47479928",
"0.4745831",
"0.47312695",
"0.47264972",
"0.47228247",
"0.4722274",
"0.47149947",
"0.4705821",
"0.46986267",
"0.46804866",
"0.4671404",
"0.46594706",
"0.46587926",
"0.46571186",
"0.46497387",
"0.46482596",
"0.4636583",
"0.46309203",
"0.46281618",
"0.46237013",
"0.4621895",
"0.46159413",
"0.46126565",
"0.46121246",
"0.4608942",
"0.4607332",
"0.46066096",
"0.4605681",
"0.46015334",
"0.46004248",
"0.45989916",
"0.45886764",
"0.45833796",
"0.457665",
"0.45749965",
"0.45680514",
"0.45509076",
"0.4541851",
"0.4535422",
"0.45270255",
"0.45256218",
"0.45208427",
"0.45198992",
"0.45183936",
"0.45105815",
"0.45102927",
"0.45083988",
"0.4502372",
"0.45019615",
"0.44963425",
"0.4491624",
"0.4489354",
"0.44871387",
"0.44840518",
"0.4482816",
"0.4482557",
"0.44804442",
"0.44796586",
"0.44767413",
"0.4471001",
"0.44568107",
"0.44311216",
"0.44256914",
"0.44253966",
"0.44227907",
"0.44217002",
"0.44197053",
"0.44197023",
"0.4412865",
"0.4411186"
] | 0.0 | -1 |
Remove inputs from chest | public void consumeInputs() {
getInputs().removeFrom(getInventory());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }",
"@Override\n public void onRemoval() {\n try {\n if (eOutputHatches != null) {\n for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eOutputHatches) {\n hatch_elemental.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eInputHatches) {\n hatch_elemental.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_OutputData hatch_data : eOutputData) {\n hatch_data.id = -1;\n hatch_data.q = null;\n }\n for (GT_MetaTileEntity_Hatch_InputData hatch_data : eInputData) {\n hatch_data.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_Uncertainty hatch : eUncertainHatches) {\n hatch.getBaseMetaTileEntity().setActive(false);\n }\n for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) {\n hatch.getBaseMetaTileEntity().setActive(false);\n }\n }\n cleanOutputEM_EM();\n if (ePowerPass && getEUVar() > V[3] || eDismantleBoom && mMaxProgresstime > 0 && areChunksAroundLoaded_EM()) {\n explodeMultiblock();\n }\n } catch (Exception e) {\n if (DEBUG_MODE) {\n e.printStackTrace();\n }\n }\n }",
"public final void removeFromChest(String name) {\n chestCharacters.remove(name);\n }",
"void removeAllSpawn();",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(!chesses.isEmpty()) {\r\n\t\t\t\t\tChess to_remove = chesses.getLast();\r\n\t\t\t\t\tPoint to_delete = to_remove.getCor();\r\n\t\t\t\t\tisChess[to_delete.x][to_delete.y] = 0;\r\n\t\t\t\t\tchesses.remove(chesses.size() - 1);\r\n\t\t\t\t\tturn = 1 - turn;\t\r\n\t\t\t\t\trepaint();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void removeFromInventoryWheels(int amountOfWheels, String inputColor, String inputStandard, int inputType){\n }",
"public void removeAllFightsystems()\r\n {\n\r\n }",
"@Override\n public void removeAll(){\n gameCollection.removeAllElements();\n }",
"public void removeAllPawns(){\n\n for (Map.Entry<Integer, ImageView> entry : actionButtons.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n }\n\n for (Map.Entry<Integer, ImageView> entry : harvestBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n harvestBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : productionBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n productionBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : gridMap.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n gridFreeSlot = 0;\n }\n }",
"private void removeEnchantRecipe() {\n Iterator<Recipe> it = Bukkit.recipeIterator();\n\n while (it.hasNext()) {\n Recipe res = it.next();\n\n if (res.getResult().getType() == ENCHANT_TABLE.getType()) {\n it.remove();\n }\n }\n }",
"@Override\n\tpublic void remove()\n\t{\n\t\tsuper.remove();\n\t\tgetMyPlayer().getGoldMines().remove(this);\n\t}",
"public void clear() {\n for (int i = 0; i < if_you_items.length; i++) {\n if_you_items[i].setEnabled(true);\n }\n for (int i = 0; i < then_we_items.length; i++) {\n then_we_items[i].setEnabled(true);\n }\n non_promised_ministries.clear();\n non_promised_ministries.addAll(all_ministries);\n // if not at war, can't ask/offer peace\n if (game.getDiplomacy().getDiplomaticState(game.getTurn(), faction) != C.DS_WAR) {\n if_you_items[IfYouWill.PEACE.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.PEACE.ordinal()].setEnabled(false);\n }\n if (faction > C.HOUSE5) { // non-house\n non_promised_ministries.clear();\n if_you_items[IfYouWill.TECH.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.TECH.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n return;\n }\n // search for promised votes and ministries in pending contracts of sender\n for (Contract con : game.getDiplomacy().getSentContracts()) {\n for (Term term : con.getTerms()) {\n if (term.getDonor() == game.getTurn()) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n if (term.getDonor() == faction) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n }\n }\n // search for promised votes and ministries for sender and for receiver\n // those that are made with sender\n if (game.getRegency().getVotes()[game.getTurn()][Regency.CANDIDATE_IDX] > -1\n || game.getRegency().getVotes()[faction][Regency.CANDIDATE_IDX] == game.getTurn()) {\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n }\n int[] promises = game.getDiplomacy().getMinistryPromises(game.getTurn());\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] > -1) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n promises = game.getDiplomacy().getMinistryPromises(faction);\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] == game.getTurn()) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n if (non_promised_ministries.isEmpty()) {\n then_we_items[ThenWeWill.MINISTRY.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.MINISTRY.ordinal()].setEnabled(false);\n }\n }",
"private void clearStragglers() {\n for (int i = 0; i < game.gridPieces.length; i++) {\n GridPiece piece = game.gridPieces[i];\n\n if (piece.state == game.STATE_TEMP) {\n piece.restoreState();\n //restoreState(piece);\n } else if (piece.state == game.STATE_TEMP_NOTOUCH) {\n piece.setState(game.STATE_FINAL);\n }\n }\n }",
"public void refill() {\n\t\tfor(int i = 0; i < chests.size(); i++)\r\n\t\t\tchests.get(i).refill();\r\n\t}",
"void nuke() {\n\t\tfor (int a = 0; a < height; a++) {\n\t\t\tfor (int b = 0; b < width; b++) {\n\t\t\t\tif (FWorld[a][b] != null) {\n\t\t\t\t\tEZ.removeEZElement(FWorld[a][b]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tEZ.removeEZElement(background);\n\t\tEZ.removeEZElement(explosion);\n\t\tturtle.kill();\n\t}",
"public void removeAll()\r\n {\r\n if (level ==2)\r\n {\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(Ladder.class));\r\n removeObjects(getObjects(SmallPlatform.class));\r\n removeObjects(getObjects(Door.class)); \r\n removeObjects(getObjects(Tomato.class)); \r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(DeadTomato.class));\r\n player.setLocation();\r\n }\r\n if (level == 3)\r\n {\r\n removeObjects(getObjects(Tomato.class));\r\n removeObject(door2);\r\n removeObjects(getObjects(Canon.class));\r\n removeObjects(getObjects(CanonBullet.class));\r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(Pedestal.class));\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(DeadTomato.class));\r\n }\r\n if (level == 4)\r\n {\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(Text.class));\r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(Ladder.class));\r\n removeObjects(getObjects(Door.class)); \r\n removeObjects(getObjects(Boss.class)); \r\n removeObjects(getObjects(Thorns.class));\r\n player.setLocation();\r\n }\r\n }",
"public void removeScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j].isScenery())\n\t\t\t\t\tgrid[i][j]=null;\n\t\t\t}\n\t\t}\n\t}",
"private void clearExits()\n {\n promenade.removeExit(\"up\", ossuary);\n \n ossuary.removeExit(\"down\", promenade);\n ossuary.removeExit(\"left\", forest);\n ossuary.removeExit(\"straight\", crypt);\n \n \n \n tower.removeExit(\"straight\", ramparts);\n tower.removeExit(\"down\", forest);\n \n ramparts.removeExit(\"down\", bridge);\n ramparts.removeExit(\"straight\", castle);\n \n \n prison.removeExit(\"up\", promenade);\n prison.removeExit(\"down\", sewers);\n prison.removeExit(\"straight\", deathRoom2);\n \n sewers.removeExit(\"down\", depths);\n sewers.removeExit(\"left\", deathRoom1);\n \n depths.removeExit(\"up\", sewers);\n depths.removeExit(\"right\", crypt);\n \n crypt.removeExit(\"up\", graveyard);\n crypt.removeExit(\"straight\", deathRoom3);\n crypt.removeExit(\"left\", depths);\n crypt.removeExit(\"back\", ossuary);\n \n graveyard.removeExit(\"straight\", bridge);\n graveyard.removeExit(\"down\", crypt);\n \n bridge.removeExit(\"up\", ramparts);\n bridge.removeExit(\"down\", deathRoom2);\n \n throneRoomEntrance.removeExit(\"straight\", throne);\n \n }",
"public void clearHand() {\n for (Component c : cardPane.getComponents()) {\n if (c instanceof Card) {\n cardPane.remove(c); //Removes all Cards from card panel\n }\n }\n busted = false; //Hand not busted\n values.clear(); //Removes all Integers from values\n values.add(0); //Sets initial value to 0\n updateValue(); //Updates value\n repaint(); //Redraws hand\n }",
"@Override\r\n\tpublic void reset() {\r\n\t\tairCrafts.clear();\r\n\t}",
"private void checkOpenChestInput(Chest openChest) {\n for (Map.Entry<Rectangle, Integer> entry : chestInventoryInputs.entrySet()) {\n Vector3 inputPos = hudCamera.unproject(new Vector3(Gdx.input.getX(), Gdx.input.getY(), 0));\n if (entry.getKey().contains(inputPos.x, inputPos.y)) {\n gameWorld.getHero().takeFromChest(openChest, entry.getValue());\n }\n }\n }",
"@Override\n public void clear() {\n GameObject.clearAll();\n Scene.score = 0;\n\n }",
"public void removeFromGame(){\n this.isInGame = false;\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tUser zws = alllist.getSelectedValue();\r\n\t\t\t\tam.removeElement(zws);\r\n\t\t\t\tall.remove(zws);\r\n\t\t\t\tvm.addElement(zws);\r\n\t\t\t\tverwalter.remove(zws);\r\n\t\t\t}",
"public void removePowerUp(List<CardPower> cost)\n {\n cardPower.removeAll(cost);\n }",
"@Override\r\n\tpublic void keyPressed(PInputEvent e) {\r\n\t\tif (e.getKeyCode() == java.awt.event.KeyEvent.VK_DELETE) {\r\n\t\t\tfor (Iterator<PNode> selectedNodesIterator = getSelection().iterator(); \r\n\t\t\t\t\tselectedNodesIterator.hasNext();) {\r\n\t\t\t\tPNode currentSelectedNode = (PNode) selectedNodesIterator.next();\r\n\t\t\t\t\r\n\t\t\t\tif (GlobalConstants.COMPARTMENT_TYPE_ATTRIBUTE_VALUE\r\n\t\t\t\t\t\t.equalsIgnoreCase((String) currentSelectedNode\r\n\t\t\t\t\t\t\t\t.getAttribute(GlobalConstants.NODE_TYPE_ATTRIBUTE_NAME))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tString compartmentID = currentSelectedNode\r\n\t\t\t\t\t\t\t\t\t\t\t.getAttribute(GlobalConstants.NODE_ID_ATTRIBUTE_NAME)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * This will take care of deleting all in memory transitions as well.\r\n\t\t\t\t\t * */\r\n\t\t\t\t\t((PCompartment) currentSelectedNode).removeInMemoryCompartment();\r\n\t\t\t\t\t\r\n\t\t\t\t\tcompartmentIDToLabelMap.removeCompartmentID(compartmentID);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tList<PNode> currentSelectedNodeTransitions = \r\n\t\t\t\t\t\t\t((List<PNode>) currentSelectedNode\r\n\t\t\t\t\t\t\t\t\t.getAttribute(GlobalConstants\r\n\t\t\t\t\t\t\t\t\t\t\t.COMPARTMENT_TRANSITIONS_ATTRIBUTE_NAME));\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (PNode currentTransition : currentSelectedNodeTransitions) {\r\n\t\t\t\t\t\tcurrentTransition.removeFromParent();\r\n\t\t\t\t\t\tcurrentTransition = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t} else if (GlobalConstants.SIMPLE_TRANSITION_TYPE_ATTRIBUTE_VALUE\r\n\t\t\t\t\t\t\t\t.equalsIgnoreCase((String) currentSelectedNode\r\n\t\t\t\t\t\t\t\t\t\t.getAttribute(GlobalConstants.NODE_TYPE_ATTRIBUTE_NAME))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"SIMPLE TRANSITION DELETE\");\r\n\t\t\t\t\t((SimpleTransition) currentSelectedNode).removeInMemoryRatioTransition();\r\n\t\t\t\t\t\r\n\t\t\t\t} else if (GlobalConstants.COMPLEX_TRANSITION_TYPE_ATTRIBUTE_VALUE\r\n\t\t\t\t\t\t.equalsIgnoreCase((String) currentSelectedNode\r\n\t\t\t\t\t\t\t\t.getAttribute(GlobalConstants.NODE_TYPE_ATTRIBUTE_NAME))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"COMPLEX TRANSITION DELETE\");\r\n\t\t\t\t\t((ComplexTransition) currentSelectedNode)\r\n\t\t\t\t\t\t\t.removeInfectorInformationPanels(currentSelectedNode);\r\n\t\t\t\t\t\r\n\t\t\t\t\t((ComplexTransition) currentSelectedNode).removeInMemoryInfectionTransitions();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsuper.keyPressed(e);\t\t\r\n\t}",
"private void removeAntFromBoard(Board inputBoard, String name) {\nfor (int k = 0; k < inputBoard.getAntsOnBoard().size(); k++) {\nString currentName = inputBoard.getAntsOnBoard().get(k).getName();\nif (currentName.equalsIgnoreCase(name)) {\nint antPosX = inputBoard.getAntsOnBoard().get(k).getAntPosX();\nint antPosY = inputBoard.getAntsOnBoard().get(k).getAntPosY();\ninputBoard.getAntsOnBoard().remove(k);\ninputBoard.getCellCordinates(antPosX, antPosY).removeAnt();\n}\n}\n}",
"public void remove() {\n/* 1379 */ super.remove();\n/* 1380 */ this.inventoryMenu.removed(this);\n/* 1381 */ if (this.containerMenu != null) {\n/* 1382 */ this.containerMenu.removed(this);\n/* */ }\n/* */ }",
"public void removeFromInventoryDHandles (String inputType, String inputColor, String inputStandard){\n }",
"public void removePowerUp(PowerUp p) {\n for (Location loc : p.getLocations()) {\n Location replacement = new Location(loc.getX(), loc.getY());\n gridCache.add(replacement);\n }\n\n powerUps.remove(p);\n render();\n}",
"@Override\n\tpublic void removeAt(final int index) {\n\t\tremoveFromInsertionOrder(index);\n\t\tsuper.removeAt(index); // clear key, state, value; adjust size\n\t}",
"private void clearJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearJMenuItemActionPerformed\n //reset arrayLists\n namesArray = new ArrayList<>();\n tempArray = new ArrayList<>();\n edgeArray = new ArrayList<>();\n graph = null;\n \n loadJList();\n timePassed = 0;\n //reset displayed values\n \n pathJTextArea.setText(\"\");\n costJTextField.setText(\"\");\n timeJTextField.setText(\"\");\n bruteForceJRadioButton.setSelected(true);\n checkEnabled();\n }",
"private void purgeAllOverflowEM_EM() {\n float mass = 0;\n for (GT_MetaTileEntity_Hatch_InputElemental tHatch : eInputHatches) {\n if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {\n tHatch.updateSlots();\n }\n mass += tHatch.overflowMatter;\n tHatch.overflowMatter = 0;\n }\n for (GT_MetaTileEntity_Hatch_OutputElemental tHatch : eOutputHatches) {\n if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {\n tHatch.updateSlots();\n }\n mass += tHatch.overflowMatter;\n tHatch.overflowMatter = 0;\n }\n cleanMassEM_EM(mass);\n }",
"public void clear() {\r\n myCommandLine.clear();\r\n inputPositionX.clear();\r\n inputPositionY.clear();\r\n creatureHomeX = creatureHomeY = 0;\r\n myModelTokenIndex = 0;\r\n commandHistory.getMenus().get(0).getItems().clear();\r\n continuing = false;\r\n if (myAnimation != null) {\r\n myAnimation.stop();\r\n }\r\n }",
"public void clearState() {\n // if the user press the wrong cells, aka path, etc.\n // set state back to grass\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n } else if (cells.get(i) == CellState.ToPlaceTower) {\n cells.set(i, CellState.Grass);\n }\n\n }\n }",
"void delete_missiles() {\n // Player missiles\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n if (missile.y_position <= Dimensions.LINE_Y) {\n ImageView ship_missile_image_view = ship_missile_image_views.get(i);\n game_pane.getChildren().remove(ship_missile_image_view);\n ship_missile_image_views.remove(i);\n ship.missiles.remove(missile);\n }\n }\n\n // Enemy missiles\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n if (missile.y_position > scene_height) {\n ImageView alien_missile_image_view = alien_missile_image_views.get(i);\n game_pane.getChildren().remove(alien_missile_image_view);\n alien_missile_image_views.remove(i);\n Alien.missiles.remove(missile);\n }\n }\n }",
"public void removePrevCardList(){\n for (int i = 0; i < playerCardList.getPlayerCardListSize(); i++){\n playerCardPuzzle.getChildren().remove(playerCardList.getPlayerCardByNo(i));\n }\n }",
"void clearUndo() {\r\n while (!listOfBoards.isEmpty()) {\r\n listOfMoves.pop();\r\n listOfBoards.pop();\r\n }\r\n }",
"private void remove() {\n \t\tfor(int i = 0; i < 5; i++) {\n \t\t\trMol[i].setText(\"\");\n \t\t\trGrams[i].setText(\"\");\n \t\t\tpMol[i].setText(\"\");\n \t\t\tpGrams[i].setText(\"\");\n \t\t}\n }",
"public void removeClockFromStock(Clock removedClock);",
"public void removeCards() {\n\t\tthis.content.removeAll(this.content);\n\t}",
"@Override\n\tpublic void hideContents() {\n\t\tprogram.remove(Play);\n\t\tprogram.remove(Settings);\n\t\tprogram.remove(Credits);\n\t\tprogram.remove(Exit);\n\t\tprogram.remove(tank);\n\t\tprogram.remove(barrel);\n\t\tprogram.remove(explosion);\n\t\tprogram.remove(title);\n\t\tshootCounter = 0;\n\t\tdelayCounter = 0;\n\t\tbarrel = new GameImage(\"../media/TanksPNGS/large_greenTank_cannon.png\");\n\t\tbarrel.setLocation(15, 475);\n\t\tp = false;\n\t\ts= false;\n\t\tc = false;\n\t\tq = false;\n\t}",
"void clear_missiles() {\n // Remove ship missiles\n ship.missiles.clear();\n for (ImageView ship_missile_image_view : ship_missile_image_views) {\n game_pane.getChildren().remove(ship_missile_image_view);\n }\n ship_missile_image_views.clear();\n\n // Remove alien missiles\n Alien.missiles.clear();\n for (ImageView alien_missile_image_view : alien_missile_image_views) {\n game_pane.getChildren().remove(alien_missile_image_view);\n }\n alien_missile_image_views.clear();\n }",
"Set<Card> remove();",
"void removeAllEntries();",
"void clearActions();",
"public void youBrokeSon(){\n\t\tcoinList.clear();\n\t}",
"void retract()\n\t\t{\n\t\t\tsides = sides-1;\n\t\t\t\n\t\t\tDimension[] dime2 = new Dimension[d.length - 1];\n\t\t\t\n\t\t\tfor (int i=0; i< d.length-1; i++)\n\t\t\t{\n\t\t\t\tdime2[i]= d[i];\n\t\t\t}\n\t\t\t\n\t\t\td = new Dimension[d.length - 1];\n\t\t\tfor(int i = 0; i< dime2.length; i++)\n\t\t\t{\n\t\t\t\td[i] = dime2[i];\n\t\t\t}\n\t\t\t\t\n\t\t}",
"public void clear() {\n\t\tallItems.clear();\n\t\tminimums.clear();\n\t}",
"public void RemoveSol()\r\n {\r\n for (int i = 0; i <maze.Struct.length ; i++) {\r\n for (int j = 0; j <maze.Struct[0].length ; j++) {\r\n if (maze.Struct[i][j]== 2)\r\n maze.Struct[i][j]= 0;\r\n }\r\n }\r\n setChanged();\r\n notifyObservers(\"RemoveSol\");\r\n }",
"public void tyhjenna() {\n this.kulmat.clear();\n }",
"private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }",
"@Override\n\tpublic void eliminar() {\n\t\t\n\t}",
"public void clearSubbedTiles() { subbedTiles.clear(); }",
"public void removeKing(){\n this.king = false;\n }",
"public void deleteInstance(){\n //cancels the runnable\n shouldCancelRunnable = true;\n //remove the chest from the map to avoid confusion\n this.location.getBlock().setType(Material.AIR);\n //unregister from all events, we're done!\n HandlerList.unregisterAll(this);\n }",
"void removeProduces(Computer oldProduces);",
"public void remove() {\n\t\tstopFloating();\t\n\t\tPacketHandler.toggleRedTint(player, false);\n\t\tplayer.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 30, 1));\n\t\tplayer.stopSound(Sound.MUSIC_DISC_CHIRP);\n\t\tcleanTasks();\n\t\tactiveScenarios.remove(player.getUniqueId());\n\t}",
"public void removeEffectFromSpecialBrick(){\r\n\t\t\t// return everything to the original\r\n\t\t\tColor origColor = (specialBrickId.equals(\"Rect0\"))? discsColors[0]:(specialBrickId.equals(\"Rect1\"))? discsColors[1]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect2\"))? discsColors[2]:(specialBrickId.equals(\"Rect3\"))? discsColors[3]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect4\"))? discsColors[4]:(specialBrickId.equals(\"Rect5\"))? discsColors[5]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect6\"))? discsColors[6]:(specialBrickId.equals(\"Rect7\"))? discsColors[7]:null; \r\n\t\t\tint origWidth = (specialBrickId.equals(\"Rect0\"))? 30:(specialBrickId.equals(\"Rect1\"))? 60:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect2\"))? 90:(specialBrickId.equals(\"Rect3\"))? 120:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect4\"))? 150:(specialBrickId.equals(\"Rect5\"))? 180:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect6\"))? 210:(specialBrickId.equals(\"Rect7\"))? 240:null;\r\n\t\t\tRectangle rect = new Rectangle(origWidth,20, origColor);\r\n\t\t\trect.setId(specialBrickId);\r\n\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\trect.setStrokeWidth(3);\r\n\t\t\t\t\t\t\r\n\t\t\tswitch(specialBrickTower){\r\n\t\t\t\tcase \"firstTower\":\r\n\t\t\t\t\tfor(int i=0; i<firstTower.getChildren().size(); i++){ // cycle through the tower to check which one is the special brick\r\n\t\t\t\t\t\tif (firstTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tfirstTower.getChildren().set(i, rect); // then reset it\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"secondTower\":\r\n\t\t\t\t\tfor(int i=0; i<secondTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (secondTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tsecondTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"thirdTower\":\r\n\t\t\t\t\tfor(int i=0; i<thirdTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (thirdTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tthirdTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\trect.widthProperty().bind(scene.widthProperty().divide(3).subtract(250-origWidth));\r\n\t\t\trect.heightProperty().bind(scene.heightProperty().divide(19));\r\n\t\t\r\n\t\tif(countDownRunning){towersRegion.getChildren().remove(2);countDownRunning=false;} // remove the count down watch from the screen\t\t\r\n\t\tspecialBrickId=null; // reset the special brick id\r\n\t}",
"public void cullPopulation(){\n\t\t// sort the population by the fitness function from low to high\n\t\tCollections.sort(population);\n\t\t\n\t\t// remove 10% of the weakest part of the population\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i++){\n\t\t\tpopulation.remove(0);\n\t\t}\n\n\t}",
"public void discard(){\n for(int i = 1 ; i <= 110 ; i++) cardDeck.remove(i);\n }",
"@Override\n\tpublic void eliminar() {\n\n\t}",
"void unsetLegs();",
"public void removeAllPieces()\n\t{\n\t\t/* iterate over the rows and columns */\n\t\tfor (int i = 0; i < m_rows; i++) {\n\t\t\tfor (int j = 0; j < m_cols; j++) {\n\t\t\t\tremovePiece(i, j);\n\t\t\t}\n\t\t}\n\t}",
"public void removeAll() {\n\t\tsynchronized (mNpcs) {\n\t\t\tmNpcs = Collections.synchronizedList(new ArrayList<Npc>());\n\t\t\tmDemonCount = 0;\n\t\t\tmHumanCount = 0;\n\t\t}\n\t}",
"private void deleteAttacks(){\n while(!attacksToDelete.isEmpty()){\n attacks.remove(attacksToDelete.remove());\n }\n }",
"void removeUses(Equipment oldUses);",
"public void drop(){\r\n if(activeFish.isEmpty()) return;\r\n \r\n ArrayList<Fish> toremove = new ArrayList<Fish>();\r\n for(Fish bone : activeFish){\r\n bone.drop();\r\n\r\n if(!(bone.inBounds())){ // branch for out of bound fh\r\n toremove.add(bone);\r\n }\r\n }\r\n missedFish(toremove);\r\n\r\n update();\r\n }",
"public void clearHops() {\n hops.clear();\n }",
"public void ClearAllThings(ActionEvent actionEvent) {\n questionName.clear();\n question.clear();\n subjects.setValue(0);\n className.setValue(0);\n answer.clear();\n points.clear();\n hint.clear();\n easy.setSelected(false);\n medium.setSelected(false);\n hard.setSelected(false);\n }",
"public void reset() {\n if (id.equals(new ResourceLocation(\"minecraft:planks\"))) {\n whitelist(Range.closed(0, 5));\n } else\n whitelist(Range.closed(0, 15));\n }",
"void unsetSpokes();",
"public void clear() {\n\t\tcopy(problem, player);\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclear();\r\n\t\t\t}",
"public static void clearWorld() {\n\t\t// Complete this method.\n\t\tfor(Critter i: population){\n\t\t\tpopulation.remove(i);\n\t\t}\n\t\tfor(Critter j: babies){\n\t\t\tbabies.remove(j);\n\t\t}\n\t\tpopulation.clear();\n\t\tbabies.clear();\n\n\n\t}",
"public void remove() {\r\n\tif (kingdom != null && currentEffect != null)\r\n\t currentEffect.removeFrom(kingdom);\r\n\tcurrentEffect = null;\r\n }",
"void clear() {\n stacks.clear();\n }",
"public void removeLastEntry(){\r\n\t\tboards.remove(boards.size() -1 );\r\n\t}",
"boolean removAble(InputItem item);",
"@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}",
"private void removeArea() {\n \t\tthis.set.remove( this.area );\n \t\tthis.finish();\n \t}",
"public void removeFromSilkBag() {\r\n silkBag.remove(0);\r\n }",
"public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}",
"private void deleteAllQuestionInputTextAreas() {\n UIComponent panel = FacesContext.getCurrentInstance().getViewRoot().findComponent(\"tabsView:tabViewTasksSettings:viewEditPerformanceAppraisalSettingForm:questionsPerformanceAppraisalPanel\");\n panel.getChildren().clear();\n }",
"void unsetCit();",
"void emptyManaPools(Ability source);",
"public void remove () { this.setAsDown(); n.remove(); }",
"public void removeAllItems ();",
"public void removeAllEntries() {\n }",
"private void removePressed() {\n\t\ts = allMedia.getSelectedValuesList();\n\t\t// now remove all the value that are in the list from the default list model\n\t\tfor(Object o : s){\n\t\t\tif(l.contains(o)){\n\t\t\t\tl.removeElement(o);\n\t\t\t}\n\t\t}\n\t}",
"private void DeleteBurnInsOnPreviousSamples() {\n\t\tif (gibbs_sample_num <= num_gibbs_burn_in + 1 && gibbs_sample_num >= 2){\n\t\t\tgibbs_samples_of_bart_trees[gibbs_sample_num - 2] = null;\n\t\t}\n\t}",
"public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }",
"void unsetMultipleBetMinimum();",
"public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}",
"public void hideWorldChest(){\n\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"WorldChest\");\n\t\tel.hide();\n\t\t// notify the server on close\n\t\tfor(GUIObserver g : observers){\n\t\t\tg.onChestAccess(screenManager.getInventoryManager().getOpenWorldChest(), false);\n\t\t}\n\t}",
"@FXML\n public void clearCupboardIngredients(){\n\n String title = \"Clear Cupboard\";\n String message = \"Are you sure you want to clear cupboard ingredients\";\n boolean confirmClear = plannerBox.confirmDiaglogBox(title, message);\n if (confirmClear){\n if (cupboardIngredients.size() > 0){\n cupboardIngredients.clear();\n Data.<Ingredient>saveList(cupboardIngredients, cupboardFile);\n }\n }\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tscl.remove(\"1\");\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n clear();\n\n }",
"public void removeAllComponents();",
"public void removeAll();"
] | [
"0.6435721",
"0.62610835",
"0.6245458",
"0.6088706",
"0.5950913",
"0.5924315",
"0.58923113",
"0.58134836",
"0.5761527",
"0.5736724",
"0.57155704",
"0.57038265",
"0.5698756",
"0.56567144",
"0.5652342",
"0.5640872",
"0.5637466",
"0.56182164",
"0.55936134",
"0.55684626",
"0.5548801",
"0.55382466",
"0.5537135",
"0.5527285",
"0.55220443",
"0.5521678",
"0.5517073",
"0.55075824",
"0.5503988",
"0.5501381",
"0.5478455",
"0.5464392",
"0.5464231",
"0.54472154",
"0.5443937",
"0.54398066",
"0.5431807",
"0.5425972",
"0.5423272",
"0.54230464",
"0.5422466",
"0.54219013",
"0.5418343",
"0.54146785",
"0.5405812",
"0.5402859",
"0.5396346",
"0.53920037",
"0.5389741",
"0.53866756",
"0.5385229",
"0.5382029",
"0.53790945",
"0.5377184",
"0.53768045",
"0.5376512",
"0.5375258",
"0.53704405",
"0.5367221",
"0.53669965",
"0.5366049",
"0.5362241",
"0.534873",
"0.5346964",
"0.53445864",
"0.5341047",
"0.5339097",
"0.5337888",
"0.5334467",
"0.5332715",
"0.53302854",
"0.5329886",
"0.5329712",
"0.53255075",
"0.53080094",
"0.53023165",
"0.53003186",
"0.529822",
"0.5293723",
"0.5290765",
"0.52878046",
"0.52852345",
"0.52839255",
"0.5275533",
"0.5274479",
"0.52739143",
"0.5272412",
"0.5267955",
"0.52667993",
"0.5266775",
"0.52655303",
"0.5263017",
"0.5257654",
"0.5257094",
"0.5255341",
"0.5248882",
"0.5245233",
"0.5244469",
"0.52437454",
"0.5233563"
] | 0.6316462 | 1 |
Implementations should override this to define any controls on enchantment. | public EnchantmentOptions getEnchantmentOptions() {
return EnchantmentOptions.DEFAULT;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setEnchanted(boolean enchanted) {\n this.enchanted = enchanted;\n }",
"public boolean isEnchanted() {\n return enchanted;\n }",
"public ArmorControls()\n {\n super(new KeyBinding[] { armorKey, toggleGoggles, beltSwap, zoomKey }, new boolean[] { false, false, false, false }, getVanillaKeyBindings(), new boolean[] { false, false });\n /*ClientRegistry.registerKeyBinding(armorKey);\n ClientRegistry.registerKeyBinding(refreshCapes);\n ClientRegistry.registerKeyBinding(toggleGoggles);\n ClientRegistry.registerKeyBinding(beltSwap);\n ClientRegistry.registerKeyBinding(zoomKey);*/\n }",
"public void setEnchantmentLevel(int enchantmentLevel) {\n/* 57 */ Validate.isTrue((enchantmentLevel > 0), \"The enchantment level must be greater than 0!\");\n/* */ \n/* 59 */ this.enchantmentLevel = enchantmentLevel;\n/* */ }",
"private void addEnchant(CustomEnchantment ce, int position) {\n enchants.put(ce, position);\n }",
"public void setWeapons() {\n\t\tca_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew CapAmerWeapons(Battleground.captainAmerica).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\the_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew HawkeyeWeapons(Battleground.hawkeye).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tbw_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew BlackWidowWeapons(Battleground.blackWidow).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\thulk_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew HulkWeapons(Battleground.hulk).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tthor_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew ThorWeapons(Battleground.thor).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tloki_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew LokiWeapons(Battleground.loki).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t}",
"void applyThornEnchantments(EntityLivingBase var0, Entity var1);",
"@Override\n public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) {\n return false;\n }",
"public void setEnchantment(@NotNull Enchantment enchantment) {\n/* 37 */ Validate.notNull(enchantment, \"The enchantment may not be null!\");\n/* */ \n/* 39 */ this.enchantment = enchantment;\n/* */ }",
"@Override\n public void easyMode() {\n super.setHP(900);\n super.getFrontAttack().setBaseDamage(18.75);\n super.getRightAttack().setBaseDamage(18.75);\n super.getBackAttack().setBaseDamage(18.75);\n super.getLeftAttack().setBaseDamage(18.75);\n }",
"public ComboStrike() {\n\t\tattackCds1 = new Array<Float>();\n\t\tinit();\n\t\n\t}",
"private void enableFields(boolean enability){\n txtReference.setEditable(enability);\n txtItem.setEditable(enability);\n txtDescription.setEditable(enability);\n txtBrand.setEditable(enability);\n txtModel.setEditable(enability);\n txtQuantity.setEditable(enability);\n txtUnit.setEditable(enability);\n txtProductDate.setEnabled(enability);\n txtOrigPrice.setEditable(enability);\n txtAgent.setEditable(enability);\n txtCurrency.setEditable(enability);\n txtCurrency.setEnabled(enability);\n txtContactPerson.setEnabled(enability);\n \n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:27:59.755 -0500\", hash_original_method = \"9DAB45081F29D4D9259EECD11A475A04\", hash_generated_method = \"F03AC4D8BE1EF4472303AAEAE6D16334\")\n \npublic TextKeyListener(Capitalize cap, boolean autotext) {\n mAutoCap = cap;\n mAutoText = autotext;\n }",
"public int getItemEnchantability()\r\n {\r\n return this.toolMaterial.getEnchantability();\r\n }",
"public void specialChars(){\r\n \r\n //Each corresponding button is pressed ,its symbol is Stored in Greek Symbol variable and Button gets Disabled\r\n //alpha (α)\r\n if(alpha_btn.isArmed()){\r\n greekSymbols=alpha_btn.getText();\r\n alpha_btn.setDisable(true);\r\n }\r\n //beta (β)\r\n else if(beta_btn.isArmed()){\r\n greekSymbols=beta_btn.getText();\r\n beta_btn.setDisable(true);\r\n }\r\n //gamma (γ)\r\n else if(gamma_btn.isArmed()){\r\n greekSymbols=gamma_btn.getText();\r\n gamma_btn.setDisable(true);\r\n }\r\n //delta (δ)\r\n else if(delta_btn.isArmed()){\r\n greekSymbols=delta_btn.getText();\r\n delta_btn.setDisable(true);\r\n }\r\n //theta (θ)\r\n else if(theta_btn.isArmed()){\r\n greekSymbols=theta_btn.getText();\r\n theta_btn.setDisable(true);\r\n }\r\n //phi (ɸ)\r\n else if(phi_btn.isArmed()){\r\n greekSymbols=phi_btn.getText();\r\n phi_btn.setDisable(true);\r\n }\r\n //appending Greek Symbols to Text Field\r\n anglefield.setText(anglefield.getText()+greekSymbols);\r\n }",
"public void sayEnchantments(String enchantments, Player player){\n\t\tString[] baseSplit = enchantments.split(\";\");\n\t\tif(Integer.valueOf(baseSplit.length)>0){\n\t\t\tif(baseSplit[0]!=\"\"){\n\t\t\t\tplayer.sendMessage(ChatColor.GREEN+\"Enchantments:\");\n\t\t\t\tfor(int i=0; i<baseSplit.length;i++){\n\t\t\t\t\tString[] bigSplit= baseSplit[i].split(\",\");\n\t\t\t\t\tplayer.sendMessage(ChatColor.GREEN+\"-\"+ChatColor.BLUE+cleanEnchantmentName(bigSplit[0])+\" \"+bigSplit[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void challengeMode() {\n super.setHP(2100);\n super.getFrontAttack().setBaseDamage(43.75);\n super.getRightAttack().setBaseDamage(43.75);\n super.getBackAttack().setBaseDamage(43.75);\n super.getBackAttack().setMainStatus(new Bleed(0.7));\n super.getBackAttack().setDescription(\"The Jyuratodus uses the razor fin on its tail to slice the area \" +\n \"behind it while flinging mud to the sides!\");\n super.getLeftAttack().setBaseDamage(43.75);\n }",
"@Override\r\n\tpublic void setAbilities() {\n\t\t\r\n\t}",
"public void setEnchantLevel(CustomEnchantment ce, Player p, long level){\n ItemStack is;\n ItemMeta im;\n List<String> lore;\n if(p == null || (is = p.getInventory().getItemInMainHand()) == null || (im = is.getItemMeta()) == null || (is.getType() != Material.DIAMOND_PICKAXE)) return;\n lore = im.getLore();\n if(lore == null)\n lore = new ArrayList<>();\n boolean containsEnchant = false;\n for(int i = 0; i < lore.size(); i++){\n if(lore.get(i).contains(ce.getDisplayName())){\n containsEnchant = true;\n lore.set(i, ce.getColor() + ce.getDisplayName() + \" \" + level);\n }\n }\n if(!containsEnchant) lore.add(ce.getColor() + ce.getDisplayName() + \" \" + level);\n im.setLore(lore);\n is.setItemMeta(im);\n\n\n\n\n\n }",
"public void addKeyListeners() {\n\t\t\tkeyAdapter = new KeyAdapter(){\n\t\t\t\t@Override\n\t\t\t\tpublic void keyPressed(KeyEvent e){\n\t\t\t\t\tchar command;\n\t\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_SHIFT) {\n//\t\t\t\t\t\tSystem.out.println(\"FORWARD\");\n\t\t\t\t\t\tcommand = 'F';\n\t\t\t\t\t} else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n//\t\t\t\t\t\tSystem.out.println(\"TURN RIGHT\");\n\t\t\t\t\t\tcommand = 'R';\n\t\t\t\t\t} else if (e.getKeyCode() == KeyEvent.VK_LEFT){\n//\t\t\t\t\t\tSystem.out.println(\"TURN LEFT\");\n\t\t\t\t\t\tcommand = 'L';\n\t\t\t\t\t//Let's disable 'F', 'R' and 'L' keys because they're captured by the arrow keys above\n\t\t\t\t\t} else if (e.getKeyCode() == KeyEvent.VK_F || e.getKeyCode() == KeyEvent.VK_R || e.getKeyCode() == KeyEvent.VK_L) {\n\t\t\t\t\t\tcommand = '-';\t//this signifies an invalid command.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcommand = Character.toUpperCase(e.getKeyChar());\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif (currentState == GameState.PLAYING) {\n\t\t\t\t\t\t//If this is tutorial mode, check status first to see if this action should be allowed at all.\n\t\t\t\t\t\t//If not approved, end this method immediately\n\t\t\t\t\t\tif (SAR.this.isTutorialMode()) {\n\t\t\t\t\t\t\tboolean actionApproved = tutorial.checkTutorialActionApproved(command);\n\t\t\t\t\t\t\tif (!actionApproved) return;\n\t\t\t\t\t\t} else if (SAR.this.isPracticeMissionHumanMode()) {\n\t\t\t\t\t\t\tboolean actionApproved = practiceDrillHuman.checkMissionActionApproved(command);\n\t\t\t\t\t\t\tif (!actionApproved) return;\n\t\t\t\t\t\t} else if (SAR.this.isPracticeMissionAIMode()) {\n\t\t\t\t\t\t\tboolean actionApproved = practiceDrillAI.checkMissionActionApproved(command);\n\t\t\t\t\t\t\tif (!actionApproved) return;\n\t\t\t\t\t\t} else if (SAR.this.isFinalMissionMode()){\n\t\t\t\t\t\t\tif (!finalMission.checkMissionActionApproved(command)) return;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Depending on whether the control mode is \"H\" for manual control only, \"R\" for automated control only,\n\t\t\t\t\t\t//or \"B\" for both modes enabled, certain commands will be disabled / enabled accordingly.\n\t\t\t\t\t\t//For instance, in mode \"R\", only the spacebar command will be recognized.\n\t\t\t\t\t\tif ( (\"H\".contains(SAR.this.controlMode) && \"FRLGSQO\" .contains(String.valueOf(command))) ||\n\t\t\t\t\t\t\t (\"R\".contains(SAR.this.controlMode) && \" \" .contains(String.valueOf(command))) ||\n\t\t\t\t\t\t\t (\"B\".contains(SAR.this.controlMode) && \"FRLGSQO \".contains(String.valueOf(command))) ) {\n\t\t\t\t\t\t\tboolean validKeyTyped = updateGame(currentPlayer, command, 0); // invoke update method with the given command\n\t\t\t\t\t\t\t// Switch player (in the event that we have a 2-player mission)\n\t\t\t\t\t\t\tif(validKeyTyped) {\n\t\t\t\t\t\t\t\tSAR.this.numOfMoves++;\n\t\t\t\t\t\t\t\tPlayer nextPlayer = (currentPlayer == h1 ? h2 : h1);\n\t\t\t\t\t\t\t\tif (nextPlayer.isAlive())\n\t\t\t\t\t\t\t\t\tcurrentPlayer = nextPlayer;\n//\t\t\t\t\t\t\t\tSystem.out.printf(\"Total no. of moves so far: %s\\n\", numOfMoves);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//end nested if\n\n\t\t\t\t\t\t//If we're in tutorial mode, we need to check to see\n\t\t\t\t\t\t//if user has completed what the tutorial asked them to do\n\t\t\t\t\t\tif (SAR.this.isTutorialMode()) {\n\t\t\t\t\t\t\ttutorial.checkTutorialStatus(String.valueOf(command));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (Character.toUpperCase(command) == 'A') { // this command can be used when mission is over to restart mission\n\t\t\t\t\t\tif (SAR.this.isTutorialMode()) {\n\t\t\t\t\t\t\tinitTutorial();\t//If this was a tutorial mode, restart the same tutorial\n//\t\t\t\t\t\t\ttutorial = new Tutorial(SAR.this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse initMission();\t\t\t\t\t\t\t\t\t//otherwise, initialize mission again\n\t\t\t\t\t} else if(Character.toUpperCase(command) == 'O' && !SAR.this.isTutorialOrMissionMode()) {\t// open options window as long as this isn't' tutorial mode\n\t\t\t\t\t\topenOptionsWindow();\t//custom method\n\t\t\t\t\t}\n\t\t\t\t\t// Refresh the drawing canvas\n\t\t\t\t\trepaint(); // Call-back paintComponent().\n\n\t\t\t\t}\n\t\t\t\t//end public void keyPressed\n\t\t\t};\n\t\t\t//end keyAdapter initialization\n\t\t\taddKeyListener(keyAdapter);\n\t\t}",
"public int getEnchantmentLevel() {\n/* 48 */ return this.enchantmentLevel;\n/* */ }",
"public void resetSpecialChars(){\r\n //When a Greek symbols is missing (Backspace) from the Text Field its corresponding Greek button gets Enabled\r\n if(!anglefield.getText().contains(\"α\"))alpha_btn.setDisable(false);\r\n if(!anglefield.getText().contains(\"β\"))beta_btn.setDisable(false);\r\n if(!anglefield.getText().contains(\"γ\"))gamma_btn.setDisable(false);\r\n if(!anglefield.getText().contains(\"δ\"))delta_btn.setDisable(false);\r\n if(!anglefield.getText().contains(\"θ\"))theta_btn.setDisable(false);\r\n if(!anglefield.getText().contains(\"ɸ\"))phi_btn.setDisable(false);\r\n }",
"public void spellLevelUp() {\n \n }",
"@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n return false;\n }",
"@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n return false;\n }",
"@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n return false;\n }",
"@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n return false;\n }",
"@Override\n\tpublic void OnAttackCommand() {\n\t\tsuper.OnAttackCommand();\n\t\tSoundManage.playSound(atkSound1);\n\t}",
"private Enchantment getEnchant(String ench) {\n\t\tif (ench.equals(\"S\")) {\n\t\t\treturn Enchantment.DAMAGE_ALL;\n\t\t} else if (ench.equals(\"P\")) {\n\t\t\treturn Enchantment.PROTECTION_ENVIRONMENTAL;\n\t\t} else if (ench.equals(\"U\")) {\n\t\t\treturn Enchantment.DURABILITY;\n\t\t} else if (ench.equals(\"K\")) {\n\t\t\treturn Enchantment.KNOCKBACK;\n\t\t} else if (ench.equals(\"B\")) {\n\t\t\treturn Enchantment.ARROW_KNOCKBACK;\n\t\t} else if (ench.equals(\"D\")) {\n\t\t\treturn Enchantment.ARROW_DAMAGE;\n\t\t} else if (ench.equals(\"I\")) {\n\t\t\treturn Enchantment.ARROW_INFINITE;\n\t\t} else if(ench.equals(\"T\")) { \n\t\t\treturn Enchantment.THORNS;\n\t\t} else if (ench.equals(\"W\")) {\n\t\t\treturn Enchantment.WATER_WORKER;\n\t\t} else {\n\t\t\treturn Enchantment.DAMAGE_ALL;\n\t\t}\n\t}",
"public ItemBuilder addEnchantment(Enchantment enchantment, int level) {\r\n\t\tthis.enchantments.put(enchantment, level);\r\n\t\treturn this;\r\n\t}",
"private void setControls(char functionType){\r\n if (functionType == 'I' ) {\r\n setControlsEnabled(true);\r\n txtRolodexId.setEditable(false);\r\n txtLastUpdate.setEditable(false);\r\n txtUpdateUser.setEditable(false);\r\n }else if (functionType == 'M') {\r\n setControlsEnabled(true);\r\n txtRolodexId.setEditable(false);\r\n txtLastUpdate.setEditable(false);\r\n txtUpdateUser.setEditable(false);\r\n }else if (functionType == 'V') {\r\n setControlsEnabled(false);\r\n btnOK.setEnabled(false);\r\n btnCancel.setEnabled(true);\r\n btnSponsor.setEnabled(false);\r\n txtComments.setOpaque(false);\r\n }else if (functionType == 'C') {\r\n setControlsEnabled(true);\r\n txtRolodexId.setText(\"\");\r\n txtLastUpdate.setText(\"\");\r\n txtUpdateUser.setText(\"\");\r\n txtRolodexId.setEditable(false);\r\n txtLastUpdate.setEditable(false);\r\n txtUpdateUser.setEditable(false);\r\n }else if (functionType == 'N') {\r\n setControlsEnabled(false);\r\n txtComments.setOpaque(false);\r\n }\r\n \r\n \r\n }",
"public Quiz() {\n\t\tcreateAndLayoutComponents();\n\n\t\t// stretch spelling on words to let 2nd language learners have more time to process an unfamiliar language\n\t\ttheVoiceStretch = 1.2;\n\t\ttheVoicePitch = 95;\n\t\ttheVoiceRange = 15;\n\n\t\t// initialise voice generator for VoxSpell\n\t\tvoiceGen = new VoiceGenerator(theVoice,theVoiceStretch,theVoicePitch,theVoiceRange);\n\n\t\t// initialise voice generator for the respell button\n\t\trespellGen = new VoiceGenerator(theVoice,theVoiceStretch,theVoicePitch,theVoiceRange);\n\t\t// immediately cancel it to allow the respell button to work on the first try to only work when \n\t\t// none of the voice generators are in action\n\t\trespellGen.cancel(true); \n\n\n\t\t// enable input accepting when enter button is pressed\n\t\tuserInput.addKeyListener(this);\n\t\tthis.setFocusable(true);\n\t\tthis.addKeyListener(this);\n\n\t\tapplyTheme();\n\t\t\n\t\t// Initialise spellList model which all questions will be asked from and answers will be checked against\n\t\tspellList = new SpellList();\n\t}",
"@Override\n public void setEdibleAnimals() {\n addPrey(Rabbit.SPECIES);\n }",
"@NotNull\n/* */ public Enchantment getEnchantment() {\n/* 28 */ return this.enchantment;\n/* */ }",
"public AbilityEffect() {\n\t\tsuper();\n\t}",
"public CustomEnchantmentTable() {\n super(\n NimbleServer.enchantmentConfig.getEnchantmentTableSize(),\n NimbleServer.enchantmentConfig.getWindowDisplay());\n }",
"public EQU_GAINSetup()\n\t{\n\t\tinitComponents();\n\t\tthis.pack();\n\t\tthis.setPreferredSize(new Dimension(500, 600));\n\t}",
"public Ability(String keyWord, String effectDescription, Card sourceCard) {\n this.keyWord = keyWord;\n this.effectDescription = effectDescription;\n this.sourceCard = sourceCard;\n }",
"@Override public void onInitializeInterface() {\n if (mQwertyKeyboard != null) {\n // Configuration changes can happen after the keyboard gets recreated,\n // so we need to be able to re-build the keyboards if the available\n // space has changed.\n int displayWidth = getMaxWidth();\n if (displayWidth == mLastDisplayWidth) return;\n mLastDisplayWidth = displayWidth;\n }\n\n mQwertyKeyboard = new LatinKeyboard(this, R.xml.qwerty);\n mSymbolsKeyboard = new LatinKeyboard(this, R.xml.symbols);\n mSymbolsShiftedKeyboard = new LatinKeyboard(this, R.xml.symbols_shift);\n }",
"public void cont_actionPerformed(ActionEvent e) {\n\t\t\n\t\t//Reset align to ItemFrame\n\t\tmyParent.resetAlign();\n\t\t\n\t\tinitEditorPanel();\n\t\tthis.buildGuidePanel();\n\t\tmyParent.editCM = false;\n\t\tmyParent.alignH = false;\n\t\tmyParent.alignV = false;\n\t\tmyParent.extendCM = true;\n\t\tmyParent.mullionsPanel.selectedHV = 0;\n\n myParent.setActionTypeEvent(MenuActionEventDraw.EXTEND_COUPLER_MULLION.getValue());\n\n\t\tvC.setSelected(false);\n\t\thC.setSelected(false);\n\t\tvC.setEnabled(false);\n\t\thC.setEnabled(false);\n\t}",
"public final void lm() {\n if (this.acw == null) {\n this.acw = new ActionMenuView(getContext());\n this.acw.setPopupTheme(this.adW);\n this.acw.setOnMenuItemClickListener(this.auh);\n this.acw.a(this.adY, this.adZ);\n LayoutParams layoutParams = new LayoutParams();\n layoutParams.gravity = 8388613 | (this.atR & 112);\n this.acw.setLayoutParams(layoutParams);\n i(this.acw, false);\n }\n }",
"public static int getEnchantability(String name) {\n\n EnumMoreSwords swordType = getType(name);\n\n if (swordType != null) {\n\n return swordType.swordEnchantability;\n }\n\n return -1;\n }",
"@Override\n public void hardMode() {\n super.setHP(1800);\n super.getFrontAttack().setBaseDamage(37.5);\n super.getRightAttack().setBaseDamage(37.5);\n super.getBackAttack().setBaseDamage(37.5);\n super.getLeftAttack().setBaseDamage(37.5);\n }",
"@Override\n public boolean onEditorAction(TextView v, int arg1, KeyEvent arg2) {\n \n return false;\n }",
"public int getMaxEnchantability(int enchantmentLevel) {\n\t\treturn super.getMinEnchantability(enchantmentLevel) + 50;\n\t}",
"@Override\n public void onAlphabetKeyboardSet(@NonNull AnyKeyboard keyboard) {\n super.onAlphabetKeyboardSet(keyboard);\n\n if (mGestureTypingEnabled && mGestureTypingDetector != null) {\n mGestureTypingDetector.setKeys(keyboard.getKeys(), keyboard.getMinWidth(), keyboard.getHeight());\n }\n }",
"public void enable() {\n TalonHelper.configNeutralMode(Arrays.asList(armMotor, armMotorSlave), NeutralMode.Brake);\n }",
"@Override\r\n\tpublic void specialAbility() {\n\t}",
"@Override\r\n\tprotected void onBoEdit() throws Exception {\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tsuper.onBoEdit();\r\n\t}",
"@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }",
"@Override\n public void setAccessibilityPhrase(String arg0)\n {\n \n }",
"@Override\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}",
"void createEqualizerControls();",
"private void addCustomWords() {\r\n\r\n }",
"private void setWeapons()\n {\n sewers.setWeapon(woodSword);\n promenade.setWeapon(woodSword);\n depths.setWeapon(rustedSword);\n forest.setWeapon(goldSword);\n bridge.setWeapon(silverSpear);\n ramparts.setWeapon(infantryBow);\n }",
"public int getItemEnchantability()\n {\n return this.field_77878_bZ.func_78045_a();\n }",
"public void setLetter() {\n\t\tconfirmButton.setEnabled(true);\n\t\tpassButton.setEnabled(true);\n\t\tfor (int i = 0; i < ROW; i++) {\n\t\t\tfor (int j = 0; j < COLUME; j++) {\n\t\t\t\tif (board[i][j].getText().equals(\"\")) {\n\t\t\t\t\tboard[i][j].setEditable(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n // The content description is used for Talkback key presses. The number is\n // separated by a \",\" to introduce a slight delay. Convert letters into a verbatim\n // span so that they are read as letters instead of as one word.\n int i = 0;\n for (int id : mButtonIds) {\n if (id == getId()) {\n break;\n }\n i++;\n }\n if (i >= mButtonIds.length) {\n i = 0;\n for (int id : mButtonIdsNor) {\n if (id == getId()) {\n break;\n }\n i++;\n }\n }\n mTextStr = getResources().getString(letterIds[i]);\n mPaintTransparent.getTextBounds(mTextStr, 0, mTextStr.length(), mTextBounds);\n }",
"@Override\n public void keyTyped(KeyEvent e) {\n \n }",
"private void enableSet(){\n addSubmit.setDisable(true);\n removeSubmit.setDisable(true);\n setSubmit.setDisable(false);\n addCS.setDisable(true);\n removeCS.setDisable(true);\n setCS.setDisable(false);\n addIT.setDisable(true);\n removeIT.setDisable(true);\n setIT.setDisable(false);\n addECE.setDisable(true);\n removeECE.setDisable(true);\n setECE.setDisable(false);\n partTime.setDisable(true);\n fullTime.setDisable(true);\n management.setDisable(true);\n dateAddText.setDisable(true);\n dateRemoveText.setDisable(true);\n dateSetText.setDisable(false);\n nameAddText.setDisable(true);\n nameRemoveText.setDisable(true);\n nameSetText.setDisable(false);\n hourlyAddText.setDisable(true);\n annualAddText.setDisable(true);\n managerRadio.setDisable(true);\n dHeadRadio.setDisable(true);\n directorRadio.setDisable(true);\n //codeAddText.setDisable(true);\n hoursSetText.setDisable(false);\n }",
"private void setLevelUpChars() {\n /*\n * check this if you need more symbol set's\n * TODO do this right @me\n\t\t */\n String charset = KeyboardHandler.current_charset;\n if (charset.length() == 36) {\n for (int i = 0; i < 6; ++i) {\n characterAreas.get(i).setChars(\n charset.substring(i * 6, (i + 1) * 6));\n }\n }\n\n if (charset.length() == 40) {\n Log.d(\"main\",charset);\n characterAreas.get(0).setChars(charset.substring(0, 6));\n characterAreas.get(1).setChars(charset.substring(6, 14));\n characterAreas.get(2).setChars(charset.substring(14, 20));\n characterAreas.get(3).setChars(charset.substring(20, 26));\n characterAreas.get(4).setChars(charset.substring(26, 34));\n characterAreas.get(5).setChars(charset.substring(34, 40));\n }\n }",
"@Test\n public void testEnchantedChangedWithSongOfTheDryads() {\n // Enchantment Creature — Horror\n // 0/0\n // Bestow {2}{B}{B}\n // Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.\n addCard(Zone.HAND, playerA, \"Nighthowler\");\n addCard(Zone.BATTLEFIELD, playerA, \"Swamp\", 4);\n addCard(Zone.BATTLEFIELD, playerA, \"Silvercoat Lion\"); // {1}{W} 2/2 creature\n\n addCard(Zone.GRAVEYARD, playerA, \"Pillarfield Ox\");\n addCard(Zone.GRAVEYARD, playerB, \"Pillarfield Ox\");\n\n // Enchant permanent\n // Enchanted permanent is a colorless Forest land.\n addCard(Zone.BATTLEFIELD, playerB, \"Forest\", 3);\n addCard(Zone.HAND, playerB, \"Song of the Dryads\"); // Enchantment Aura {2}{G}\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Nighthowler using bestow\", \"Silvercoat Lion\");\n\n castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, \"Song of the Dryads\", \"Silvercoat Lion\");\n\n setStrictChooseMode(true);\n setStopAt(2, PhaseStep.BEGIN_COMBAT);\n execute();\n\n assertPermanentCount(playerB, \"Song of the Dryads\", 1);\n\n ManaOptions options = playerA.getAvailableManaTest(currentGame);\n Assert.assertEquals(\"Player should be able to create 1 green mana\", \"{G}\", options.getAtIndex(0).toString());\n\n assertPermanentCount(playerA, \"Nighthowler\", 1);\n assertPowerToughness(playerA, \"Nighthowler\", 2, 2);\n assertType(\"Nighthowler\", CardType.CREATURE, true);\n assertType(\"Nighthowler\", CardType.ENCHANTMENT, true);\n\n Permanent nighthowler = getPermanent(\"Nighthowler\");\n Assert.assertFalse(\"The unattached Nighthowler may not have the aura subtype.\", nighthowler.hasSubtype(SubType.AURA, currentGame));\n }",
"private void setEnableComponents(){\r\n awardAddDocumentForm.cmbDocumentType.setEnabled(true);\r\n awardAddDocumentForm.txtDescription.setEditable(true);\r\n awardAddDocumentForm.txtFileName.setEditable(false);\r\n awardAddDocumentForm.btnUpload.setEnabled(true);\r\n awardAddDocumentForm.btnOk.setEnabled(true);\r\n awardAddDocumentForm.btnCancel.setEnabled(true);\r\n awardAddDocumentForm.btnView.setEnabled(false);\r\n }",
"@Override\n\t\t\tpublic void modifier(Catalogue catalogue) {\n\t\t\t\t\n\t\t\t}",
"public void enableControls() \n\t{\n\t\tfor (MutablePocket thisPocket: playerPockets) // Enable each control in turn\n\t\t{\n\t\t\tthisPocket.enablePocket();\n\t\t}\n\n\t\tfor(ImmutablePocket thisPocket: goalPockets)\n\t\t{\n\t\t\tthisPocket.enablePocket();\n\t\t}\n\n\t}",
"private void setControlsEnabled(boolean value){\r\n txtRolodexId.setEditable(value);\r\n txtLastUpdate.setEditable(value);\r\n txtUpdateUser.setEditable(value);\r\n txtLastName.setEditable(value);\r\n txtFirstName.setEditable(value);\r\n txtMiddleName.setEditable(value);\r\n txtSuffix.setEditable(value);\r\n txtPrefix.setEditable(value);\r\n txtTitle.setEditable(value);\r\n txtSponsorCode.setEditable(value);\r\n txtOrganization.setEditable(value);\r\n txtAddress1.setEditable(value);\r\n txtAddress2.setEditable(value);\r\n txtAddress3.setEditable(value);\r\n txtCity.setEditable(value);\r\n txtCounty.setEditable(value);\r\n //Modified for case#3278 - State Combobox is made non editable\r\n cmbState.setEditable(false);\r\n cmbState.setEnabled(value);\r\n cmbState.setForeground(Color.black);\r\n cmbCountry.setEnabled(value);\r\n txtPostalCode.setEditable(value);\r\n txtPhone.setEditable(value);\r\n txtEMail.setEditable(value);\r\n txtFax.setEditable(value);\r\n txtComments.setEditable(value);\r\n }",
"@Override\r\n public void activate() {\n getControl().setFont(getControl().getParent().getFont());\r\n }",
"private void abilitySelection() {\n\t\tabilityInput.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tphysicalAbilityPanel.removeAll();\n\n\t\t\t\tmentalAbilityPanel.removeAll();\n\n\t\t\t\tabilitySelectionPanel.add(lowFantasy);\n\t\t\t\tabilitySelectionPanel.add(standardFantasy);\n\t\t\t\tabilitySelectionPanel.add(highFantasy);\n\t\t\t\tabilitySelectionPanel.add(epicFantasy);\n\t\t\t\tabilitySelectionPanel.add(fantasyPointsLabel);\n\t\t\t\tisInputting = true;\n\t\t\t\tisRolling = false;\n\t\t\t\tabilitySelectionPanel.setPreferredSize(new Dimension(2400, 220));\n\n\t\t\t\tfantasySelection();\n\n\t\t\t\tphysicalAbilityPanel.add(strengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(strengthSpinner);\n\t\t\t\tphysicalAbilityPanel.add(strengthModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(dexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(dexteritySpinner);\n\t\t\t\tphysicalAbilityPanel.add(dexterityModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(constitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(constitutionSpinner);\n\t\t\t\tphysicalAbilityPanel.add(constitutionModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(intelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(intelligenceSpinner);\n\t\t\t\tmentalAbilityPanel.add(intelligenceModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(wisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(wisdomSpinner);\n\t\t\t\tmentalAbilityPanel.add(wisdomModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(charismaLabel);\n\t\t\t\tmentalAbilityPanel.add(charismaSpinner);\n\t\t\t\tmentalAbilityPanel.add(charismaModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaModifierLabel);\n\n\t\t\t\treference.add(saveAbility);\n\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t\tabilityRoll.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tabilitySelectionPanel.remove(lowFantasy);\n\t\t\t\tabilitySelectionPanel.remove(standardFantasy);\n\t\t\t\tabilitySelectionPanel.remove(highFantasy);\n\t\t\t\tabilitySelectionPanel.remove(epicFantasy);\n\t\t\t\tabilitySelectionPanel.remove(fantasyPointsLabel);\n\t\t\t\treference.remove(saveAbility);\n\t\t\t\tisInputting = false;\n\t\t\t\tisRolling = true;\n\t\t\t\tabilitySelectionPanel.setPreferredSize(new Dimension(2400, 120));\n\n\t\t\t\tphysicalAbilityPanel.removeAll();\n\t\t\t\tmentalAbilityPanel.removeAll();\n\n\t\t\t\tphysicalAbilityPanel.add(strengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(strengthRoll);\n\t\t\t\tphysicalAbilityPanel.add(strengthModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(dexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(dexterityRoll);\n\t\t\t\tphysicalAbilityPanel.add(dexterityModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(constitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(constitutionRoll);\n\t\t\t\tphysicalAbilityPanel.add(constitutionModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(intelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(intelligenceRoll);\n\t\t\t\tmentalAbilityPanel.add(intelligenceModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(wisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(wisdomRoll);\n\t\t\t\tmentalAbilityPanel.add(wisdomModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(charismaLabel);\n\t\t\t\tmentalAbilityPanel.add(charismaRoll);\n\t\t\t\tmentalAbilityPanel.add(charismaModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaModifierLabel);\n\n\t\t\t\tabilityRoll();\n\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t}",
"public void prepareEditor(){\n System.out.println(\"Prepare editor to be used !\");\r\n ((EditorScene)map.getScene()).initScene(20,20,map);\r\n ((EditorScene)map.getScene()).setController(this);\r\n builder.registerBasicEffect();\r\n ((EditorScene)map.getScene()).initListView(builder.getEffects(),selectEffects);\r\n\r\n\r\n\r\n }",
"public CustomEnchantment getEnchant(String s){\n for(CustomEnchantment ce : enchants.keySet()){\n if(ce.getDisplayName().equalsIgnoreCase(s))\n return ce;\n }\n return null;\n }",
"public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }",
"public ManageAllianceQuestion(Creature aResponder, String aTitle, String aQuestion, long aTarget) {\n/* 47 */ super(aResponder, aTitle, aQuestion, 19, aTarget);\n/* */ }",
"@Override\n public void keyPressed(KeyEvent e) {\n \n \n }",
"public CharacterLevels() {\n this.experience = 0;\n\n setAttributeLevel(Attribute.STRENGTH, 1);\n setAttributeLevel(Attribute.ENDURANCE, 1);\n setAttributeLevel(Attribute.VITALITY, 1);\n setAttributeLevel(Attribute.DEXTERITY, 1);\n setAttributeLevel(Attribute.CHARISMA, 1);\n setAttributeLevel(Attribute.INTELLIGENCE, 1);\n setAttributeLevel(Attribute.WISDOM, 1);\n setAttributeLevel(Attribute.LUCK, 1);\n }",
"@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}",
"public abstract void setEffects(Tank t);",
"@Override\n\tpublic void englishMedium() {\n\t\t\n\t}",
"public boolean allElementsInEng() {\n if (!allMenuCommandsInLang(\"Eng\")) return false;\n return true;\n }",
"public void onderbreek(){\n \n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_letter_y, menu);\n return true;\n }",
"@Override\n\tpublic void assistTraining() {\n\t\tSystem.out.println(\"加强射门练习\");\n\t}",
"@Override\n\t\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\t\n\t\t\t\t}",
"private void switchToLowerCase() {\n for (int i = 0; i < mLetterButtons.length; i++) {\n mLetterButtons[i].setText((mQWERTYWithDot.charAt(i) + \"\").toLowerCase());\n }\n mIsShiftPressed = false;\n }",
"private void setupAutoComplete() {\n // Map between AutoCompleteTextViews and their Adapters. Some text fields have a custom\n // adapter whose data is updated dynamically (rather than being statically set)\n Map<AutoCompleteTextView, ArrayAdapter<String>> map = new HashMap<>();\n map.put(mBind.layoutWidthEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.layoutHeightEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.backgroundEdit, new ArrayAdapter<>(this, LAYOUT_DROPDOWN_ITEM, Data.getArrColors()));\n map.put(mBind.maxWidthEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.maxHeightEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n\n for (Map.Entry<AutoCompleteTextView, ArrayAdapter<String>> e : map.entrySet()) {\n e.getKey().setAdapter(e.getValue());\n // For the fields with custom adapters, set up listener, so that the data of the adapter\n // is updated on every keystroke (e.g. \"14\" -> {\"14dp\", \"14in\", \"14mm\", \"14px\", \"14sp\"})\n if (e.getValue() instanceof AutoComplAdapter) {\n e.getKey().addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n // Trigger filtering process on 's', which updates the data of this adapter\n e.getValue().getFilter().filter(s);\n }\n });\n }\n }\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (frmDeclaration.this.chpTypeVar.getSelectedIndex()==3 ||frmDeclaration.this.chpTypeVar.getSelectedIndex()==4)\n\t\t\t\t\t//frmDeclaration.this.chpTaille.setEnabled(true);\n\t\t\t\t\tchpTaille.setEditable(true);\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfrmDeclaration.this.chpTaille.setText(\"1\");\n\t\t\t\t\t\t//frmDeclaration.this.chpTaille.setEnabled(false);\n\t\t\t\t\t\tchpTaille.setEditable(false);\n\t\t\t\t\t}\n\t\t\t}",
"@Override\n public void adjustTypeAttributes() {\n this.getSpecialData().addAttribute(SharedMonsterAttributes.maxHealth, 20.0);\n }",
"@Override\n\tpublic void afterTextChanged(Editable s) {\n\t\tcheckButtonsEnable();\n\t}",
"@Override\n public void attack(Entity e) {\n e.hit(atk);\n }",
"private void initKeybinds() {\n spellbind1 = KeyBindingHelper.registerKeyBinding(new KeyBinding(\n \"key.malazan.spell1\", // The translation key of the keybinding's name\n InputUtil.Type.KEYSYM, // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse.\n GLFW.GLFW_KEY_Z, // The keycode of the key\n \"category.malazan.spells\"\n ));\n // The translation key of the keybinding's name\n // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse.\n // The keycode of the key\n // The translation key of the keybinding's category.\n spellbind2 = KeyBindingHelper.registerKeyBinding(new KeyBinding(\n \"key.malazan.spell2\", // The translation key of the keybinding's name\n InputUtil.Type.KEYSYM, // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse.\n GLFW.GLFW_KEY_X, // The keycode of the key\n \"category.malazan.spells\" // The translation key of the keybinding's category.\n ));\n }",
"private void setArmor() {\n\n if (VersionChecker.currentVersionIsUnder(12, 2)) return;\n if (!ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_ARMOR)) return;\n\n eliteMob.getEquipment().setItemInMainHandDropChance(0);\n eliteMob.getEquipment().setHelmetDropChance(0);\n eliteMob.getEquipment().setChestplateDropChance(0);\n eliteMob.getEquipment().setLeggingsDropChance(0);\n eliteMob.getEquipment().setBootsDropChance(0);\n\n if (hasCustomArmor) return;\n\n if (!(eliteMob instanceof Zombie || eliteMob instanceof PigZombie ||\n eliteMob instanceof Skeleton || eliteMob instanceof WitherSkeleton)) return;\n\n eliteMob.getEquipment().setBoots(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.AIR));\n\n if (eliteMobLevel >= 12)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.LEATHER_HELMET));\n\n if (eliteMobLevel >= 14)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));\n\n if (eliteMobLevel >= 16)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));\n\n if (eliteMobLevel >= 18)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));\n\n if (eliteMobLevel >= 20)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.CHAINMAIL_HELMET));\n\n if (eliteMobLevel >= 22)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));\n\n if (eliteMobLevel >= 24)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));\n\n if (eliteMobLevel >= 26)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.CHAINMAIL_CHESTPLATE));\n\n if (eliteMobLevel >= 28)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));\n\n if (eliteMobLevel >= 30)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));\n\n if (eliteMobLevel >= 32)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));\n\n if (eliteMobLevel >= 34)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));\n\n if (eliteMobLevel >= 36)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));\n\n if (eliteMobLevel >= 38)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));\n\n if (eliteMobLevel >= 40)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));\n\n if (eliteMobLevel >= 42)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));\n\n }",
"@Override\n\tpublic void visit(EquipmentAttack e) {\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\taddAlien();\r\n\t}",
"protected abstract void defineEnemy();",
"public void enableChoice() {\n\t\t// Enable the buttons, lighting them up\n\t\trock.setEnabled(true);\n\t\tpaper.setEnabled(true);\n\t\tscissors.setEnabled(true);\n\t}",
"public LetterSettingView() {\r\n initComponents();\r\n }"
] | [
"0.6199176",
"0.59793",
"0.5643249",
"0.5613144",
"0.5558778",
"0.55337316",
"0.5475708",
"0.5399293",
"0.53197086",
"0.531073",
"0.5280348",
"0.52788925",
"0.5265763",
"0.52466",
"0.52445513",
"0.52278984",
"0.5220422",
"0.52033365",
"0.5194403",
"0.5162227",
"0.51556075",
"0.5142166",
"0.5119968",
"0.5092742",
"0.5092742",
"0.5092742",
"0.5092742",
"0.5084714",
"0.5079896",
"0.5071138",
"0.5056155",
"0.505171",
"0.50306153",
"0.50241786",
"0.50167006",
"0.500408",
"0.49948183",
"0.49782065",
"0.49756798",
"0.49753448",
"0.49710196",
"0.49581617",
"0.49552017",
"0.49535853",
"0.4923622",
"0.49209717",
"0.49081084",
"0.49068603",
"0.48907426",
"0.48849523",
"0.48838505",
"0.488121",
"0.4880971",
"0.48784384",
"0.48622164",
"0.48619816",
"0.48479974",
"0.48476404",
"0.4838922",
"0.4827998",
"0.4825633",
"0.48235074",
"0.48227358",
"0.48088244",
"0.48078677",
"0.47990575",
"0.4790259",
"0.47899476",
"0.478963",
"0.47753945",
"0.47748592",
"0.47712362",
"0.4764654",
"0.47589073",
"0.47567666",
"0.47567666",
"0.47567666",
"0.47567666",
"0.47567666",
"0.47567666",
"0.47567666",
"0.47558603",
"0.47519228",
"0.474336",
"0.4742629",
"0.47420174",
"0.47401837",
"0.47399923",
"0.47284198",
"0.47282672",
"0.4727508",
"0.47249308",
"0.472404",
"0.47230637",
"0.47217506",
"0.47203186",
"0.47186908",
"0.471842",
"0.47131342",
"0.47119159",
"0.47080344"
] | 0.0 | -1 |
Adds outputs to chest with appropriate enchantments | public void produceOutputs() {
getOutputs().putIn(getInventory(),getEnchantments(), getEnchantmentOptions());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testEnchantedChangedWithSongOfTheDryads() {\n // Enchantment Creature — Horror\n // 0/0\n // Bestow {2}{B}{B}\n // Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.\n addCard(Zone.HAND, playerA, \"Nighthowler\");\n addCard(Zone.BATTLEFIELD, playerA, \"Swamp\", 4);\n addCard(Zone.BATTLEFIELD, playerA, \"Silvercoat Lion\"); // {1}{W} 2/2 creature\n\n addCard(Zone.GRAVEYARD, playerA, \"Pillarfield Ox\");\n addCard(Zone.GRAVEYARD, playerB, \"Pillarfield Ox\");\n\n // Enchant permanent\n // Enchanted permanent is a colorless Forest land.\n addCard(Zone.BATTLEFIELD, playerB, \"Forest\", 3);\n addCard(Zone.HAND, playerB, \"Song of the Dryads\"); // Enchantment Aura {2}{G}\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Nighthowler using bestow\", \"Silvercoat Lion\");\n\n castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, \"Song of the Dryads\", \"Silvercoat Lion\");\n\n setStrictChooseMode(true);\n setStopAt(2, PhaseStep.BEGIN_COMBAT);\n execute();\n\n assertPermanentCount(playerB, \"Song of the Dryads\", 1);\n\n ManaOptions options = playerA.getAvailableManaTest(currentGame);\n Assert.assertEquals(\"Player should be able to create 1 green mana\", \"{G}\", options.getAtIndex(0).toString());\n\n assertPermanentCount(playerA, \"Nighthowler\", 1);\n assertPowerToughness(playerA, \"Nighthowler\", 2, 2);\n assertType(\"Nighthowler\", CardType.CREATURE, true);\n assertType(\"Nighthowler\", CardType.ENCHANTMENT, true);\n\n Permanent nighthowler = getPermanent(\"Nighthowler\");\n Assert.assertFalse(\"The unattached Nighthowler may not have the aura subtype.\", nighthowler.hasSubtype(SubType.AURA, currentGame));\n }",
"void applyThornEnchantments(EntityLivingBase var0, Entity var1);",
"private void addEnchant(CustomEnchantment ce, int position) {\n enchants.put(ce, position);\n }",
"public void outputPieces() {\n\t\tmodel.outputCheckers();\n\t}",
"private void combatPhase() {\n \t\n \tpause();\n \tDice.setFinalValMinusOne();\n\n \t// Go through each battle ground a resolve each conflict\n \tfor (Coord c : battleGrounds) {\n \t\t\n \tClickObserver.getInstance().setTerrainFlag(\"\");\n \t\n \tSystem.out.println(\"Entering battleGround\");\n \t\tfinal Terrain battleGround = Board.getTerrainWithCoord(c);\n \t\t\n \t\t// find the owner of terrain for post combat\n \tPlayer owner = battleGround.getOwner();\n \t\n \t\t// simulate a click on the first battleGround, cover all other terrains\n \t\tClickObserver.getInstance().setClickedTerrain(battleGround);\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\tClickObserver.getInstance().whenTerrainClicked();\n \t\tBoard.applyCovers();\n \t\tClickObserver.getInstance().getClickedTerrain().uncover();\n \tClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n }\n });\n \t\t\n \t\t// Get the fort\n \t Fort battleFort = battleGround.getFort(); \n \t\t\n \t\t// List of players to battle in the terrain\n \t\tArrayList<Player> combatants = new ArrayList<Player>();\n \t\t\n \t\t// List of pieces that can attack (including forts, city/village)\n \t\tHashMap<String, ArrayList<Piece>> attackingPieces = new HashMap<String, ArrayList<Piece>>();\n \t\t\n \t\tSystem.out.println(battleGround.getContents().keySet());\n \t\t\n \t\tIterator<String> keySetIterator = battleGround.getContents().keySet().iterator();\n\t \twhile(keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n \t\t\tcombatants.add(battleGround.getContents().get(key).getOwner());\n \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n \t\t\t\n\t \t}\n\t \t\n\t \t\n\t \t\n\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n\t\t\tif (!combatants.contains(battleGround.getOwner()) && battleFort != null) {\n\t\t\t\tcombatants.add(battleGround.getOwner());\n\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n\t\t\t}\n\n \t\t// add forts and city/village to attackingPieces\n \t\tif (battleFort != null) {\n \t\t\tattackingPieces.get(battleGround.getOwner().getName()).add(battleFort);\n \t\t}\n \t\t\n \t\tkeySetIterator = attackingPieces.keySet().iterator();\n\t \twhile (keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n\t \t\tfor (Piece p : attackingPieces.get(key)) {\n\t \t\t\tif (p.getName().equals(\"Baron Munchhausen\") || p.getName().equals(\"Grand Duke\")) {\n\t \t\t\t\tif (p.getOwner() != battleGround.getOwner())\n\t \t\t\t\t\t((Performable)p).specialAbility();\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t}\n\t \t}\n \t\t// TODO implement city/village\n// \t\tif (City and village stuff here)\n \t\tSystem.out.println(combatants);\n \t\t\n \t\tboolean exploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t// Fight until all attackers are dead, or until the attacker becomes the owner of the hex\n \t\twhile (combatants.size() > 1 || exploring) {\n \t\t\t\n /////////////Exploration\n \t// Check if this is an exploration battle:\n \t\t// Must fight other players first\n \t\t\tboolean fightingWildThings = false;\n \tif (exploring) {\n\n \t\t\t\t// Set the battleGround explored\n \t\t\t\tbattleGround.setExplored(true);\n \t\n \t\tString exploringPlayer = null;\n \t\tIterator<String> keySetIter = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIter.hasNext()) {\n \t \t\tString key = keySetIter.next();\n \t \t\texploringPlayer = key;\n \t \t}\n \t\tplayer = battleGround.getContents(exploringPlayer).getOwner();\n \t\tplayer.flipAllUp();\n \t \t\n \t\t// Get user to roll die to see if explored right away\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tDiceGUI.getInstance().uncover();\n \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t \t\t\t+ \", roll the die. You need a 1 or a 6 to explore this terrain without a fight!\");\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\tint luckyExplore = -1;\n \t\t\t\twhile (luckyExplore == -1) {\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\tluckyExplore = Dice.getFinalVal();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// If success TODO FIX this \n \t\t\t\tif (luckyExplore == 1 || luckyExplore == 6) {\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Congrats!\" + player.getName() \n \t\t \t\t\t+ \"!, You get the terrain!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\texploring = false;\n \t\t\t\t\tbreak;\n \t\t\t\t\t\n \t\t\t\t} else { // Else failure. Must fight or bribe\n \t\t\t\t\t\n \t\t\t\t\tfightingWildThings = true;\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tbattleGround.coverPieces();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Boooo!\" + player.getName() \n \t\t \t\t\t+ \"!, You have to bribe, or fight for your right to explore!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// add luckyExplore amount of pieces to terrain under wildThing player\n \t\t\t\t\tfinal ArrayList<Piece> wildPieces = TheCup.getInstance().draw(luckyExplore);\n \t\t\t\t\t\t\n \t\t\t\t\t// Update the infopanel with played pieces. Active done button\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \twildThings.playWildPieces(wildPieces, battleGround);\n \t\t GUI.getDoneButton().setDisable(false);\n \t\t battleGround.coverPieces();\n \t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t \n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t//////Bribing here\n \t\t\t\t\tpause();\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectCreatureToBribe\");\n \t\t\t\t\t\n \t\t\t\t\t// Uncover the pieces that the player can afford to bribe\n \t\t\t\t\t// canPay is false if there are no Pieces that the user can afford to bribe\n \t\t\t\t\tboolean canPay = false;\n \t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n \t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n \t\t\t\t\t\t\tcanPay = true;\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tp.uncover();\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\ttry { Thread.sleep(50); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// Continue looping until there are no more pieces user can afford to bribe, or user hits done button\n \t\t\t\t\twhile (canPay && isPaused) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t\t @Override\n\t \t\t public void run() {\n\t \t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t\t \t\t\t+ \", Click on creatures you would like to bribe\");\n\t \t\t }\n \t\t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t\t// wait for user to hit done, or select a piece\n \t\t\t\t\t\tpieceClicked = null;\n \t\t\t\t\t\twhile(pieceClicked == null && isPaused) {\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif (pieceClicked != null) {\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// spend gold for bribing. Remove clicked creature\n \t\t\t\t\t\t\tplayer.spendGold(((Combatable)pieceClicked).getCombatValue());\n \t\t\t\t\t\t\t((Combatable)pieceClicked).inflict();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// cover pieces that are too expensive\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t\t\t \t\t\t+ \" bribed \" + pieceClicked.getName());\n \t\t\t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t \tif (battleGround.getContents(wildThings.getName()) != null) {\n\t \t\t\t\t for (Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t \tif (((Combatable)p).getCombatValue() > player.getGold())\n\t \t\t\t\t \t\tp.cover();\n\t \t\t\t\t }\n \t\t\t\t \t}\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Check if there are any pieces user can afford to bribe and set canPay to true if so\n \t\t\t\t\t\t\tcanPay = false;\n \t\t\t\t\t\t\tif (battleGround.getContents(wildThings.getName()) == null || battleGround.getContents(wildThings.getName()).getStack().size() == 1)\n \t\t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n\t \t\t\t\t\t\t\t\t\tcanPay = true;\n\t \t\t\t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t\t \t\t\t+ \" done bribing\");\n\t\t\t }\n \t\t\t\t\t});\n \t\t\t\t\tSystem.out.println(\"Made it past bribing\");\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\t\n \t\t\t\t\t// Done bribing, on to fighting\n \t\t\t\t\t\n \t\t\t\t\t// find another player to control wildThings and move on to regular combat\n \t\t\t\t\t// to be used later \n \t\t\t\t\tPlayer explorer = player;\n \t\t\t\t\tPlayer wildThingsController = null;\n \t\t\t\t\tfor (Player p : playerList) {\n \t\t\t\t\t\tif (!p.getName().equals(player.getName()))\n \t\t\t\t\t\t\twildThingsController = p;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// If wild things still has pieces left:\n \t\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName())) {\n\t \t\t\t\t\tcombatants.add(battleGround.getContents().get(wildThings.getName()).getOwner());\n\t \t \t\t\tattackingPieces.put(wildThings.getName(), (ArrayList<Piece>) battleGround.getContents().get(wildThings.getName()).getStack().clone()); \n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// cover pieces again\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tbattleGround.coverPieces();\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t\t\t\tplayer.flipAllDown();\n \t} // end if (exploring)\n \t\t\t\n \t\t\tSystem.out.println(\"combatants.size() > 1 : \" + combatants.size());\n \t\t\tSystem.out.println(combatants);\n \t\t\t\n \t\t\t// This hashMap keeps track of the player to attack for each player\n \t\t\tHashMap<String, Player> toAttacks = new HashMap<String, Player>();\n\n\t\t\t\t// each player selects which other player to attack in case of more than two combatants\n \t\t\tif (combatants.size() > 2) {\n \t\t\t\t\n \t\t\t\tfor (final Player p : combatants) {\n \t\t\t\t\tif (!p.isWildThing()) {\n\t \t \t\tpause();\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"Attacking: SelectPlayerToAttack\");\n\t \t \t\tplayer = p;\n\t\t \tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tPlayerBoard.getInstance().applyCovers();\n\t\t \t \tbattleGround.coverPieces();\n\t\t \t \t GUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", select which player to attack\");\n\t\t\t \t \t}\n\t\t \t });\n\t\t \tfor (final Player pl : combatants) {\n\t\t \t\tif (!pl.getName().equals(player.getName())) {\n\t\t \t\t\tPlatform.runLater(new Runnable() {\n\t\t \t \t @Override\n\t\t \t \t public void run() {\n\t\t \t \t \tPlayerBoard.getInstance().uncover(pl);\n\t\t \t \t }\n\t\t \t\t\t});\n\t\t \t\t}\n\t\t \t}\n\t\t \twhile (isPaused) {\n\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t \t }\n\t\t \t\n\t\t \t// ClickObserver sets playerClicked, then unpauses. This stores what player is attacking what player\n\t\t \ttoAttacks.put(p.getName(), playerClicked);\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\t \t\n\t \t \t} \n \t\t\t\t}\n \t\t\t\tcombatants.remove(wildThings);\n \t\t\t\tPlayerBoard.getInstance().removeCovers();\n \t\t\t\t\n \t } else { // Only two players fighting\n \t \t\n \t \tfor (Player p1 : combatants) {\n \t \t\tfor (Player p2 : combatants) {\n \t \t\t\tif (!p1.getName().equals(p2.getName())) {\n \t \t \ttoAttacks.put(p1.getName(), p2);\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t\t\t\n ///////////////////Call out bluffs here:\n \t\t\tbattleGround.flipPiecesUp();\n \t\t\tfor (final Player p : combatants) {\n \t\t\t\t\n \t\t\t\t// Make sure not wildThings\n \t\t\t\tif (!p.isWildThing()) {\n \t\t\t\t\t\n \t\t\t\t\tArrayList <Piece> callOuts = new ArrayList<Piece>();\n \t\t\t\t\t\n \t\t\t\t\tfor (final Piece ap : attackingPieces.get(p.getName())) {\n \t\t\t\t\t\t\n \t\t\t\t\t\t// If not supported the gtfo\n \t\t\t\t\t\tif (!ap.isSupported()) {\n\n \t\t\t\t\t\t\tcallOuts.add(ap);\n \t\t\t\t\t\t\t((Combatable)ap).inflict();\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t \tInfoPanel.showTileInfo(battleGround);\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: \" + p.getName()\n\t\t\t \t + \" lost their \" + ap.getName() + \" in a called bluff!\");\n\t \t \t }\n\t \t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tfor (Piece co : callOuts) {\n \t\t\t\t\t\tattackingPieces.get(p.getName()).remove(co);\n \t\t\t\t\t}\n\t\t\t\t\t\tif (attackingPieces.get(p.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(p.getName());\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tPlayer baby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\t// Set up this HashMap that will store successful attacking pieces\n \t\t\tHashMap<String, ArrayList<Piece>> successAttacks = new HashMap<String, ArrayList<Piece>>();\n \t\t\t// Set up this HashMap that will store piece marked to get damage inflicted\n\t\t\t\tHashMap<String, ArrayList<Piece>> toInflict = new HashMap<String, ArrayList<Piece>>();\n \t\t\tfor (Player p : combatants) {\n \t\t\t\t\n \t\t\t\tsuccessAttacks.put(p.getName(), new ArrayList<Piece>());\n \t\t\t\ttoInflict.put(p.getName(), new ArrayList<Piece>());\n \t\t\t}\n \t\t\t\n \t\t\t// Array List of pieces that need to be used during a particular phase\n\t\t\t\tfinal ArrayList<Piece> phaseThings = new ArrayList<Piece>();\n\t\t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Magic!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n/////////////////////// Magic phase\n \t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its magic. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isMagic() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover magic pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mag : phaseThings) \n\t \t\t\t\t\tmag.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n\n\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\tSystem.out.println(\"attackingPieces.size(): \" + attackingPieces.size());\n\t\t\t\t\tSystem.out.println(\"attackingPieces.keySet(): \" + attackingPieces.keySet());\n\t\t\t\t\tIterator<String> keySetIte = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIte.hasNext()) {\n \t \t\tString key = keySetIte.next();\n\n \t\t\t\t\tSystem.out.println(\"key: \" + key);\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key).size():\\n\" + attackingPieces.get(key).size());\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key):\\n\" + attackingPieces.get(key));\n \t \t}\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more magic pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a magic piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a magic piece to attack with\");\n\t \t }\n\t \t });\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t \t\t\t+ \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName()); // 'defender'\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ti++;\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Ranged!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n//////////////////// Ranged phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its ranged. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isRanged() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover ranged pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece ran : phaseThings) \n\t \t\t\t\t\tran.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more ranged pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a ranged piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a ranged piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Melee!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\n///////////////////////////// Melee phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its melee. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && !(((Combatable)p).isRanged() || ((Combatable)p).isMagic()) && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover melee pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mel : phaseThings) \n\t \t\t\t\t\tmel.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more melee pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a melee piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a melee piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// Is it a charging piece?\n\t \t\t\t\tint charger;\n\t \t\t\t\tif (((Combatable)pieceClicked).isCharging()) {\n\t \t\t\t\t\tcharger = 2;\n\t \t\t\t\t} else\n\t \t\t\t\t\tcharger = 1;\n\t \t\t\t\t\n\t \t\t\t\t// do twice if piece is a charger\n\t \t\t\t\tfor (int i = 0; i < charger; i++) {\n\t \t\t\t\t\t\n\t\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tpieceClicked.highLight();\n\t\t \t \tDiceGUI.getInstance().uncover();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t\t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\n\t\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t \t\t\t\t\tint attackStrength = -1;\n\t \t\t\t\t\twhile (attackStrength == -1) {\n\t \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n\t \t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n\t \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n\t \t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n\t \t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t\t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t\t \t }\n\t\t \t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// If piece is charging, and it is its first attack, remove the cover again\n\t \t\t\t\t\tif (((Combatable)pieceClicked).isCharging() && i == 0) {\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t \tpieceClicked.uncover();\n\t\t\t \t }\n\t \t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n\t \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t \t\t\t\t}\n\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n \t\t\t\t\t\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Retreat!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n \t\t\t\n \t\t\t\n//////////////////////// Retreat phase\n\t\t\t\t// Can only retreat to a Terrain that has been explored and has no ememies on it\n\t\t\t\t\n\t\t\t\t// Display message, activate done button\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Attack phase: Retreat some of your armies?\");\n\t\t GUI.getDoneButton().setDisable(false);\n\t }\n\t }); \t\t\t\t\n\t\t\t\t\n\t\t\t\t// For each combatant, ask if they would like to retreat\n\t\t for (Player pl : combatants) {\n\t\t \t\n\t\t \t// Make sure wildThings aren't trying to get away\n\t\t \tif (!pl.isWildThing()) {\n\t\t\t \tplayer = pl;\n\t \t InfoPanel.uncover(player.getName());\n\t\t\t\t ClickObserver.getInstance().setActivePlayer(player);\n\t\t\t\t ClickObserver.getInstance().setCreatureFlag(\"Combat: SelectRetreaters\");\n\t\t\t\t \n\t\t\t\t // Pause and wait for player to hit done button\n\t\t\t\t pause();\n\t\t\t Platform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tbattleGround.coverPieces();\n\t\t\t \tbattleGround.uncoverPieces(player.getName());\n\t\t\t \tbattleGround.coverFort();\n\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \", You can retreat your armies\");\n\t\t\t }\n\t\t\t });\n\t\t\t\t while (isPaused && battleGround.getContents(player.getName()) != null) {\n\t\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t\t\t }\t \n\t\t\t\t ClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n\t\t\t\t \n\t\t\t\t // TODO, maybe an if block here asking user if they would like to attack \n\t\t\t\t System.out.println(attackingPieces + \"---BEFORE CLEARING\");\n\t\t\t\t // Re-populate attackingPieces to check for changes\n\t\t\t\t attackingPieces.clear();\n\t\t\t\t Iterator<String> keySetIterator2 = battleGround.getContents().keySet().iterator();\n\t\t\t\t \twhile(keySetIterator2.hasNext()) {\n\t\t\t\t \t\tString key = keySetIterator2.next();\n System.out.println(key + \"=====key\");\n\t\t\t \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n\t\t\t\t \t}\n // System.out.println(attackingPieces);\n\t\t\t\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n System.out.println(\"===battleground\"+battleGround);\n System.out.println(\"===attackingPieces\"+attackingPieces);\n System.out.println(combatants.contains(battleGround.getOwner()) ? \"TRUE\" : \"FALSE\");\n\t\t\t\t\t\tif (combatants.contains(battleGround.getOwner()) && battleFort != null) {\n System.out.println(battleGround + \"===battleground\");\n\t\t\t\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n System.out.println(attackingPieces + \"===attacking pieces\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (battleFort != null) {\n System.out.println(battleFort.getName() + \"===battlefort\");\n System.out.println(battleFort.getOwner().getName() + \"===battlefort's owner\");\n \n\t\t\t\t\t\t\tattackingPieces.get(battleFort.getOwner().getName()).add(battleFort);\n System.out.println(attackingPieces.get(battleFort.getOwner().getName()));\n\t\t\t\t\t\t}\n\t//\t\t\t\t\tif (battleGround city/village)\n\t\t\t\t\t\t// TODO city/village\n\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t // Check if all the players pieces are now gone\n\t\t\t\t if (!attackingPieces.containsKey(player.getName())) {\n\t\t\t\t \t\n\t\t\t\t \t// Display message, and remove player from combatants\n\t\t\t\t \tPlatform.runLater(new Runnable() {\n\t\t\t\t @Override\n\t\t\t\t public void run() {\n\t\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \" has retreated all of their pieces!\");\n\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t \t\n\t\t\t\t \t// If there is only 1 player fighting for the hex, \n\t\t\t\t \tif (attackingPieces.size() == 1) \n\t\t\t\t \t\tbreak;\n\t\t\t\t \t\n\t\t\t\t \t// Pause because somebody just retreated\n\t\t\t\t \ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t }\n\t\t\t\t \n\n\t \t InfoPanel.cover(player.getName());\n\t\t\t\t \n\t\t\t }\n\t\t }\n\t\t \n\t\t // Done button no longer needed\n\t\t Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t GUI.getDoneButton().setDisable(true);\n\t\t }\n\t\t });\n\t\t ClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t ClickObserver.getInstance().setFortFlag(\"\");\n\t\t \n\t\t // Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\n\t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n\t\t\t\t\n\t\t\t\t// Add wildthings back to combatants if they were removed\n\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName()) && !combatants.contains(wildThings))\n\t\t\t\t\tcombatants.add(wildThings);\n\t\t\t\t\n \t\t} // end while (combatants.size() > 1 || exploring)\n \t\tbattleGround.coverFort();\n \t\t\n////////////////// Post Combat\n \t\t\n \t\t// sets player as the winner of the combat\n \t\t// Can be null if battle takes place on a hex owned by nobody, and each player lost all pieces\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tbattleGround.removeBattleHex();\n }\n \t\t});\n \t\t\n \t\tif (combatants.size() == 0)\n \t\t\tplayer = battleGround.getOwner();\n \t\telse if (combatants.size() == 1 && combatants.get(0).getName().equals(wildThings.getName()))\n \t\t\tplayer = null;\n \t\telse\n \t\t\tplayer = combatants.get(0);\n \t\t\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\tSystem.out.println(\"combatants: \" + combatants);\n \t\tfor (Player p : combatants) {\n \t\tSystem.out.println(\"p.getName(): \"+ p.getName());\n \t\t\t\n \t\t}\n \t\tSystem.out.println(\"owner: \" + owner);\n \t\tSystem.out.println(\"combatants.get(0): \" + combatants.get(0));\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\t\n \t\t\n \t\t// Change ownership of hex to winner\n \t\tboolean ownerChanged = false;\n \t\tif (owner != null && combatants.size() > 0 && !battleGround.getOwner().equals(combatants.get(0))) {\n \t\t\tbattleGround.getOwner().removeHex(battleGround);\n \t\t\tcombatants.get(0).addHexOwned(battleGround);\n \t\t\townerChanged = true;\n \t\t}\n\t\t\t\n \t\t// See if fort is kept or downgraded.\n \t\tif (battleFort != null) {\n if (battleFort.getName().equals(\"Citadel\")) {\n owner.setCitadel(false);\n player.setCitadel(true);\n battleFort.healFort();\n player.addHexOwned(battleGround);\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n }\n });\n checkWinners();\n return;\n }\n \t\t\n\t\t\t\t// Get player to click dice to see if fort is kept\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", roll the die to see if the fort is kept or downgraded\");\n\t \tDiceGUI.getInstance().uncover();\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t\t\t\tint oneOrSixGood = -1;\n\t\t\t\twhile (oneOrSixGood == -1) {\n\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t\t\t\t\toneOrSixGood = Dice.getFinalVal();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if a 1 or 6, keep fort (Keep it.... not turn it into a keep)\n\t\t\t\tif (oneOrSixGood == 1 || oneOrSixGood == 6) {\n\t\t\t\t\tbattleFort.healFort();\n\t\t\t\t\tplayer.addHexOwned(battleGround);\n\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tbattleFort.downgrade();Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", the fort was destroyed!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n \t\t}\n\n \t\tbattleGround.flipPiecesDown();\n\t\t\t// TODO city/village and special incomes if they are kept or lost/damaged \n \t\t\n \t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t}/// end Post combat\n\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n//\t\t\t\tInfoPanel.showBattleStats();\n \tBoard.removeCovers();\n }\n\t\t});\n \t\n\t\tClickObserver.getInstance().setTerrainFlag(\"\");\n\t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\tbattleGrounds.clear();\n }",
"@Test\n public void bestowEnchantmentBecomesCreature() {\n addCard(Zone.BATTLEFIELD, playerA, \"Plains\", 4);\n addCard(Zone.BATTLEFIELD, playerA, \"Silvercoat Lion\");\n addCard(Zone.HAND, playerA, \"Hopeful Eidolon\");\n\n addCard(Zone.BATTLEFIELD, playerB, \"Mountain\", 1);\n addCard(Zone.HAND, playerB, \"Lightning Bolt\");\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Hopeful Eidolon using bestow\", \"Silvercoat Lion\");\n castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, \"Lightning Bolt\", \"Silvercoat Lion\");\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n // because Boon Satyr is no creature on the battlefield, evolve may not trigger\n assertLife(playerA, 20);\n assertLife(playerB, 20);\n\n assertPermanentCount(playerA, \"Silvercoat Lion\", 0);\n assertPermanentCount(playerA, \"Hopeful Eidolon\", 1);\n assertPowerToughness(playerA, \"Hopeful Eidolon\", 1, 1);\n\n Permanent hopefulEidolon = getPermanent(\"Hopeful Eidolon\", playerA);\n Assert.assertTrue(\"Hopeful Eidolon has to be a creature but is not\", hopefulEidolon.isCreature(currentGame));\n Assert.assertTrue(\"Hopeful Eidolon has to be an enchantment but is not\", hopefulEidolon.isEnchantment(currentGame));\n\n }",
"public void outputLocations(int attemptNumber) throws IOException {\n BufferedWriter writer = FileUtils.getFileWriter(String.format(\"%d/items.txt\", Settings.getStartingSeed()));\n if (writer == null) {\n return;\n }\n\n Comparator<String> itemNameComparator = new Comparator<String>() {\n @Override\n public int compare(String itemName1, String itemName2) {\n if(itemName1.startsWith(\"Coin:\") && itemName2.startsWith(\"Coin:\")) {\n int coinCount1 = DataFromFile.getMapOfItemToUsefulIdentifyingRcdData().get(itemName1).getInventoryArg();\n int coinCount2 = DataFromFile.getMapOfItemToUsefulIdentifyingRcdData().get(itemName2).getInventoryArg();\n return Integer.compare(coinCount1, coinCount2);\n }\n String translatedItem1 = Translations.getItemText(Settings.getUpdatedContents(itemName1), false);\n String translatedItem2 = Translations.getItemText(Settings.getUpdatedContents(itemName2), false);\n return translatedItem1.compareToIgnoreCase(translatedItem2);\n }\n };\n\n writer.write(Translations.getItemText(Settings.getCurrentStartingWeapon(), false) + \": starting weapon\");\n writer.newLine();\n\n List<String> sortedStartingItems = new ArrayList<>(Settings.getStartingItemsIncludingCustom());\n Collections.sort(sortedStartingItems, itemNameComparator);\n\n for(String itemName : sortedStartingItems) {\n writer.write(Translations.getItemText(itemName, false) + \": starting item\");\n writer.newLine();\n }\n writer.newLine();\n\n Map<String, String> mapOfItemToLocation = buildReverseMap(mapOfItemLocationToItem);\n List<String> itemNames = new ArrayList<>(mapOfItemToLocation.keySet());\n Collections.sort(itemNames, itemNameComparator);\n\n for (String itemName : itemNames) {\n boolean isRemoved = Settings.getCurrentRemovedItems().contains(itemName)\n || Settings.getRemovedItems().contains(itemName)\n || Settings.getStartingItemsIncludingCustom().contains(itemName);\n String location = mapOfItemToLocation.get(itemName);\n itemName = Translations.getItemText(Settings.getUpdatedContents(itemName), isRemoved);\n location = Translations.getLocationText(location, Settings.getCurrentCursedChests().contains(location));\n writer.write(itemName + \": \" + location);\n writer.newLine();\n }\n\n writer.flush();\n writer.close();\n }",
"public static void doEncounters() {\r\n \t\r\n \tIterator<String> populationIter = population.keySet().iterator();\r\n\t\twhile (populationIter.hasNext()) { \r\n\t String pos = populationIter.next();\r\n\t ArrayList<Critter> critterList = population.get(pos);\r\n\t if(critterList.size() > 1) {\r\n\t \tint[] coords = stringToPos(pos);\r\n\t \t//get the integer value of the coordinates from the String key\r\n\t \tint x_copy = coords[0];\r\n\t \tint y_copy = coords[1];\r\n\t \t\r\n\t \tfor(int i = 0; i < critterList.size(); i++) {\r\n\t \t\tfor (int j = i+1; j < critterList.size(); j++) {\r\n\t \t\t\tCritter A = critterList.get(i);\r\n\t \t\t\tCritter B = critterList.get(j);\r\n\t \t\t\tif(A.getEnergy() > 0 && B.getEnergy() > 0 && A.x_coord == x_copy && A.y_coord == y_copy && B.x_coord == x_copy && B.y_coord == y_copy) {\r\n\t \t\t\t\t\r\n\t \t\t\t\t//Critters A and B are fighting\r\n\t \t\t\t\tA.isFight = true;\r\n\t \t\t\t\tB.isFight = true;\r\n\t \t\t\t\t\r\n\t \t\t\t\t//boolean AWantsToFight = A.fight(B.toString());\r\n\t \t\t\t\t//boolean BWantsToFight = B.fight(A.toString());\r\n\t \t\t\t\tint skillA = 0;\r\n\t \t\t\t\tint skillB = 0;\r\n\t \t\t\t\t\r\n\t \t\t\t\t//determine how A wants to respond\r\n\t \t\t\t\tif(A.fight(B.toString()) == true) {\r\n\t \t\t\t\t\tskillA = getRandomInt(A.energy);\r\n\t \t\t\t\t}\r\n\t \t\t\t\t\r\n\t \t\t\t\t//determine how B wants to respond\r\n\t \t\t\t\tif(B.fight(A.toString()) == true) {\r\n\t \t\t\t\t\tskillB = getRandomInt(B.energy);\r\n\t \t\t\t\t}\r\n\t \t\t\t\tif(A.x_coord == x_copy && B.x_coord == x_copy && A.y_coord == y_copy && B.y_coord == y_copy) {\r\n\t \t\t\t\t\tif(skillA > skillB) { // A wins\r\n\t \t\t\t\t\t\tA.energy += (int) Math.floor(B.energy*1.0*0.5);\r\n\t \t\t\t\t\t\tB.energy = 0;\r\n\t \t\t\t\t\t} else if (skillB > skillA) {\r\n\t \t\t\t\t\t\tB.energy += (int) Math.floor(A.energy*1.0*0.5); //B wins\r\n\t \t\t\t\t\t\tA.energy = 0;\r\n\t \t\t\t\t\t} else {\r\n\t \t\t\t\t\t\tif(getRandomInt(1) == 0) { // A wins\r\n\t\t \t\t\t\t\t\tA.energy += (int) Math.floor(B.energy*1.0*0.5);\r\n\t\t \t\t\t\t\t\tB.energy = 0;\r\n\t \t\t\t\t\t\t} else {\r\n\t\t \t\t\t\t\t\tB.energy += (int) Math.floor(A.energy*1.0*0.5); //B wins\r\n\t\t \t\t\t\t\t\tA.energy = 0;\r\n\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t}\r\n\t \t\t\t\t\r\n\t \t\t\t\t//Critters A and B have completed their fight\r\n\t \t\t\t\tA.isFight = false;\r\n\t \t\t\t\tB.isFight = false;\r\n\t \t\t\t\t\r\n\t \t\t\t\tcritterList.set(i, A);\r\n\t \t\t\t\tcritterList.set(j, B);\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t}\r\n\t \t\r\n\t \t//Iterate through the critters in that position\r\n\t \tIterator<Critter> crittIter = critterList.iterator();\r\n\t \twhile(crittIter.hasNext()) {\r\n\t \t\tCritter c = crittIter.next();\r\n\t \t\t//remove critters who have moved out of that grid position or who have died\r\n\t \t\tif(c.x_coord != x_copy || c.y_coord != y_copy || (c.energy <= 0)) {\r\n\t \t\t\tcrittIter.remove();\r\n\t \t\t}\r\n\t \t}\r\n\t \tpopulation.replace(pos, critterList);\r\n\t }\r\n\t\t}\r\n }",
"public void generateCodes() {\n\t\tArrayList<Chest> chests = new ArrayList<Chest>();\n\t\tArrayList<Key> keys = new ArrayList<Key>();\n\n\t\tfor (Location location : board.getLocations().values()) {\n\t\t\tfor (Tile ta[] : location.getTiles()) {\n\t\t\t\tfor (Tile t : ta) {\n\t\t\t\t\tif (t.getGameObject() instanceof Chest) {\n\t\t\t\t\t\tchests.add((Chest) t.getGameObject());\n\t\t\t\t\t} else if (t.getGameObject() instanceof Key) {\n\t\t\t\t\t\tkeys.add((Key) t.getGameObject());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (keys.size() != chests.size()) {\n\t\t\tthrow new RuntimeException(\"must have same numer of keys and chests\");\n\t\t}\n\n\t\tint num = keys.size();\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tint randy = (int) (Math.random() * keys.size());\n\t\t\tint orton = (int) (Math.random() * keys.size());\n\n\t\t\tkeys.get(randy).setCode(i);\n\t\t\tchests.get(orton).setCode(i);\n\t\t\tchests.get(orton).setContents(new Banana(\"Banana\"));\n\t\t\tkeys.remove(randy);\n\t\t\tchests.remove(orton);\n\t\t}\n\n\t}",
"public Inventory getEnchantInventory(Player p){\n Inventory inv = Bukkit.createInventory(null, 27, \"Enchant Pickaxe\");\n for(CustomEnchantment ce : enchants.keySet()){\n ItemStack item = new ItemStack(ce.getIcon());\n ItemMeta meta = item.getItemMeta();\n meta.setDisplayName(ce.getColor() + ce.getDisplayName());\n List<String> lore = new ArrayList<>();\n lore.add(\"\");\n lore.add(Changeables.CHAT + \"Current Level: \" + Changeables.CHAT_INFO + getEnchantLevel(ce, p));\n lore.add(Changeables.CHAT + \"Max Level: \" + Changeables.CHAT_INFO + ce.getMaxLevel());\n lore.add(Changeables.CHAT + \"Current Price: \" + Changeables.CHAT_INFO + ce.getPrice(getEnchantLevel(ce, p)));\n lore.add(\"\");\n lore.add(Changeables.CHAT + \"Left Click to \" + Changeables.CHAT_INFO + \" Buy 1\");\n lore.add(Changeables.CHAT + \"Right Click to \" + Changeables.CHAT_INFO + \" Buy Max\");\n meta.setLore(lore);\n item.setItemMeta(meta);\n inv.setItem(enchants.get(ce), item);\n }\n\n\n\n\n\n return inv;\n }",
"public void outputAfterRecipe_EM() {\n }",
"@Test\n public void bestowEnchantmentWillNotBeTapped() {\n addCard(Zone.BATTLEFIELD, playerA, \"Forest\", 6);\n addCard(Zone.BATTLEFIELD, playerA, \"Silent Artisan\");\n\n addCard(Zone.HAND, playerA, \"Boon Satyr\");\n\n // Enchantment {1}{W}\n // Creatures your opponents control enter the battlefield tapped.\n addCard(Zone.BATTLEFIELD, playerB, \"Imposing Sovereign\");\n\n castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, \"Boon Satyr using bestow\", \"Silent Artisan\");\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n // because Boon Satyr is no creature on the battlefield, evolve may not trigger\n assertPermanentCount(playerA, \"Silent Artisan\", 1);\n assertPowerToughness(playerA, \"Silent Artisan\", 7, 7);\n // because cast with bestow, Boon Satyr may not be tapped\n assertTapped(\"Boon Satyr\", false);\n\n }",
"@Override\n public boolean doAction(String inputs) {\n Random rand = new Random();\n\n // Game variables\n String[] animals = {\"Elk\", \"Bear\", \"Buffalo\"};\n int maxAnimalAlertness = 75;\n int huntEnergyDrain = 35;\n\n // Player variables\n int energy = 100;\n int alertnessDamage = 50;\n int numDryBread = 2;\n int dryBreadHealAmount = 30;\n int energizedByHunt = 35; // Percentage\n\n boolean running = true;\n\n this.console.println(\"Welcome to the hunt!\");\n\n GAME:\n while (running) {\n this.console.println(\"----------------------------------------------\");\n\n int animalAlertness = rand.nextInt(maxAnimalAlertness);\n String animal = animals[rand.nextInt(animals.length)];\n this.console.println(\"\\t# \" + animal + \" has been spotted! #\\n\");\n\n OUTER:\n while (animalAlertness > 0) {\n this.console.println(\"\\tYour energy level: \" + energy);\n this.console.println(\"\\t\" + animal + \"'s alertness: \" + animalAlertness);\n this.console.println(\"\\n\\tWhat would you like to do?\");\n this.console.println(\"\\t1. Shoot\");\n this.console.println(\"\\t2. Eat some dry bread\");\n this.console.println(\"\\t3. Run!\");\n String input = null;\n try {\n input = this.keyboard.readLine();\n } catch (IOException ex) {\n ErrorView.display(this.getClass().getName(), ex.getMessage());\n }\n switch (input) {\n case \"1\":\n int shotDealt = rand.nextInt(alertnessDamage);\n int damageEnergy = rand.nextInt(huntEnergyDrain);\n animalAlertness -= shotDealt;\n energy -= damageEnergy;\n this.console.println(\"\\t> You hit the \" + animal + \" with \" + shotDealt + \"% damage.\");\n this.console.println(\"\\t> You used \" + damageEnergy + \"% of your energy!\");\n if (energy < 1) {\n this.console.println(\"\\t> You have used all your energy reserves.\");\n break OUTER;\n }\n break;\n case \"2\":\n if (numDryBread > 0) {\n energy += dryBreadHealAmount;\n numDryBread--;\n this.console.println(\"\\t> You ate some dry bread, rejuvinating yourself by \" + dryBreadHealAmount + \"%.\"\n + \"\\n\\t> You now have \" + energy + \" % energy.\"\n + \"\\n\\t> You have \" + numDryBread + \" dry bread left.\\n\");\n } else {\n this.console.println(\"\\t> You have no Dry Bread left! Shoot well so you can get some meat!\\n\");\n }\n break;\n case \"3\":\n this.console.println(\"\\tYou run away from the \" + animal + \"!\");\n continue GAME;\n default:\n this.console.println(\"\\tInvalid command!\");\n break;\n }\n }\n\n if (energy < 1) {\n this.console.println(\"You limp away from the hunt, too weak to carry any meat.\");\n break;\n }\n\n this.console.println(\"----------------------------------------------\");\n this.console.println(\" # \" + animal + \" was shot! # \");\n this.console.println(\" # You now have \" + energy + \"% of your energy left. # \");\n if (rand.nextInt(100) < energizedByHunt) {\n numDryBread++;\n this.console.println(\" # You could return to camp. # \");\n\n }\n this.console.println(\"----------------------------------------------\");\n this.console.println(\"What would you like to do now?\");\n this.console.println(\"1. Continue hunting\");\n this.console.println(\"2. Leave the hunt\");\n\n String input = null;\n try {\n input = this.keyboard.readLine();\n } catch (IOException ex) {\n ErrorView.display(this.getClass().getName(), ex.getMessage());\n }\n\n while (!input.equals(\"1\") && !input.equals(\"2\")) {\n this.console.println(\"Invalid command!\");\n try {\n input = this.keyboard.readLine();\n } catch (IOException ex) {\n ErrorView.display(this.getClass().getName(), ex.getMessage());\n }\n }\n\n if (input.equals(\"1\")) {\n this.console.println(\"You continue on your adventure!\");\n } else if (input.equals(\"2\")) {\n this.console.println(\"You return to the wagon train laden with meat for all!\");\n break;\n }\n }\n this.console.println(\"########################\");\n this.console.println(\"# Thanks for hunting #\");\n this.console.println(\"########################\");\n return false;\n }",
"private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}",
"private static void setLootTable(TileEntityChest chest, World world, Rarity chestRarity)\n\t{\n\t\tswitch (chestRarity)\n\t\t{\n\t\t\tcase COMMON:\n\t\t\t\tchest.setLootTable(ModLootTables.COMMON_CHEST, world.rand.nextLong());\n\t\t\t\tchest.setCustomName(\"Common Chest\");\n\t\t\t\tbreak;\n\t\t\tcase UNCOMMON:\n\t\t\t\tchest.setLootTable(ModLootTables.UNCOMMON_CHEST, world.rand.nextLong());\n\t\t\t\tchest.setCustomName(\"Uncommon Chest\");\n\t\t\t\tbreak;\n\t\t\tcase RARE:\n\t\t\t\tchest.setLootTable(ModLootTables.RARE_CHEST, world.rand.nextLong());\n\t\t\t\tchest.setCustomName(\"Rare Chest\");\n\t\t\t\tbreak;\n\t\t\tcase EPIC:\n\t\t\t\tchest.setLootTable(ModLootTables.EPIC_CHEST, world.rand.nextLong());\n\t\t\t\tchest.setCustomName(\"Epic Chest\");\n\t\t\t\tbreak;\n\t\t\tcase LEGENDARY:\n\t\t\t\tchest.setLootTable(ModLootTables.LEGENDARY_CHEST, world.rand.nextLong());\n\t\t\t\tchest.setCustomName(\"Legendary Chest\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n\tpublic void addAccessories() {\n\t\tSystem.out.println(\"Fitting accessories Luxory car\");\r\n\t\t\r\n\t}",
"@SideOnly(Side.CLIENT)\n/* */ public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List, boolean par4) {\n/* 59 */ if (GuiScreen.isShiftKeyDown()) {\n/* 60 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome1.lore\"));\n/* 61 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome2.lore\"));\n/* 62 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome3.lore\"));\n/* 63 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* 64 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome4.lore\"));\n/* 65 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome5.lore\"));\n/* 66 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* 67 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome6.lore\"));\n/* 68 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome7.lore\"));\n/* 69 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome8.lore\"));\n/* 70 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* 71 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome9.lore\"));\n/* 72 */ } else if (GuiScreen.isCtrlKeyDown()) {\n/* 73 */ par3List.add(StatCollector.translateToLocal(\"item.FRVisPerSecond.lore\"));\n/* 74 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRAerCost.lore\") + (AerCost / 100.0D * 10.0D));\n/* 75 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRTerraCost.lore\") + (TerraCost / 100.0D * 10.0D));\n/* 76 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRIgnisCost.lore\") + (IgnisCost / 100.0D * 10.0D));\n/* 77 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRPerditioCost.lore\") + (PerditioCost / 100.0D * 10.0D));\n/* */ } else {\n/* */ \n/* 80 */ par3List.add(StatCollector.translateToLocal(\"item.FRShiftTooltip.lore\"));\n/* 81 */ par3List.add(StatCollector.translateToLocal(\"item.FRViscostTooltip.lore\"));\n/* */ } \n/* */ \n/* 84 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* */ }",
"public void setEnchantLevel(CustomEnchantment ce, Player p, long level){\n ItemStack is;\n ItemMeta im;\n List<String> lore;\n if(p == null || (is = p.getInventory().getItemInMainHand()) == null || (im = is.getItemMeta()) == null || (is.getType() != Material.DIAMOND_PICKAXE)) return;\n lore = im.getLore();\n if(lore == null)\n lore = new ArrayList<>();\n boolean containsEnchant = false;\n for(int i = 0; i < lore.size(); i++){\n if(lore.get(i).contains(ce.getDisplayName())){\n containsEnchant = true;\n lore.set(i, ce.getColor() + ce.getDisplayName() + \" \" + level);\n }\n }\n if(!containsEnchant) lore.add(ce.getColor() + ce.getDisplayName() + \" \" + level);\n im.setLore(lore);\n is.setItemMeta(im);\n\n\n\n\n\n }",
"private void drawOpenChest() {\n Chest chest = findOpenChest();\n if (chest != null) {\n chestInventoryInputs.clear();\n Vector3 screen = hudCamera.unproject(new Vector3(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), 0));\n float originX = screen.x / 2 - (CHEST_GRID * ITEM_BACKGROUND_SIZE) / 2;\n float originY = VIRTUAL_HEIGHT / 2 - (CHEST_GRID * ITEM_BACKGROUND_SIZE) / 2;\n\n Item[] chestContent = chest.getContent();\n int counter = 0;\n for (int i = CHEST_GRID - 1; i >= 0; i--) {\n for (int j = 0; j < CHEST_GRID; j++) {\n hudBatch.draw(background, originX + j * ITEM_BACKGROUND_SIZE, originY + i * ITEM_BACKGROUND_SIZE, ITEM_BACKGROUND_SIZE, ITEM_BACKGROUND_SIZE);\n if (chestContent[counter] != null) {\n Item item = chestContent[counter];\n float itemOffset = ITEM_BACKGROUND_SIZE / 2 - calculateItemWidth(item) / 2;\n hudBatch.draw(item.getTexture(), (originX + j * INVENTORY_ITEM_SIZE) + itemOffset, originY + i * INVENTORY_ITEM_SIZE, INVENTORY_ITEM_SIZE, INVENTORY_ITEM_SIZE);\n chestInventoryInputs.put(new Rectangle(originX + j * ITEM_BACKGROUND_SIZE, originY + i * ITEM_BACKGROUND_SIZE, ITEM_BACKGROUND_SIZE, ITEM_BACKGROUND_SIZE), counter);\n }\n counter++;\n }\n }\n }\n }",
"@Override\r\n\tpublic boolean execute(Game game) throws CommandExecuteException{\r\n\t\t\r\n\t\ttry(BufferedWriter out = new BufferedWriter(new FileWriter(filename))){\r\n\t\t\t// borrar todo lo que hubiera de antes\r\n\t\t\tout.flush();\r\n\t\t\tout.write(\"Plants Vs Zombies v3.0\" + '\\n');\r\n\t\t\tout.write('\\n');\r\n\t\t\tout.write(\"cycle: \" + game.getCiclos() + '\\n');\r\n\t\t\tout.write(\"sunCoins: \" + game.contadorTotalSuncoins() + '\\n');\r\n\t\t\tout.write(\"level: \" + game.getLevel() + '\\n');\r\n\t\t\tout.write(\"seed: \" + game.getSeed() + '\\n');\r\n\t\t\tout.write(\"remZombies: \" + game.zombiesPendientes() + '\\n');\r\n\t\t\tout.write(\"plantList: \");\t\t\t\r\n\t\t\tfor(int i = 0; i < game.getFilas(); ++i) {\r\n\t\t\t\tfor(int j = 0; j < game.getColumnas(); ++j) {\r\n\t\t\t\t\tPlant miplanta = game.getPlantThere(i, j);\r\n\t\t\t\t\tif(miplanta != null) {\r\n\t\t\t\t\t\tout.write(miplanta.getLetra() + \":\" + miplanta.getVida() \r\n\t\t\t\t\t\t+ \":\" + miplanta.getF() + \":\" + miplanta.getC() \r\n\t\t\t\t\t\t+ \":\" + tiempoSiguienteAccion(miplanta) + \" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout.write('\\n');\r\n\t\t\tout.write(\"zombieList: \");\r\n\t\t\tfor(int i = 0; i < game.getFilas(); ++i) {\r\n\t\t\t\tfor(int j = 0; j < game.getColumnas(); ++j) {\r\n\t\t\t\t\tZombie mizombie = game.getZombieThere(i, j);\r\n\t\t\t\t\tif(mizombie != null) {\r\n\t\t\t\t\t\tout.write(mizombie.getLetra() + \":\" + mizombie.getVida() \r\n\t\t\t\t\t\t+ \":\" + mizombie.getF() + \":\" + mizombie.getC() \r\n\t\t\t\t\t\t+ \":\" + tiempoSiguienteAccion(mizombie) + \" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout.write('\\n');\r\n\t\t\tout.write(\"sunList: \");\r\n\t\t\tfor(int i = 0; i < game.getFilas(); ++i) {\r\n\t\t\t\tfor(int j = 0; j < game.getColumnas(); ++j) {\r\n\t\t\t\t\tif(game.getSunPosition(i,j) != null) {\r\n\t\t\t\t\t\tout.write(i + \":\" + j + \" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout.write('\\n');\r\n\t\t\tout.close();\r\n\t\t\tSystem.out.print(\"Game successfully saved in file <\" + this.filename + \">.dat. Use the load command to reload it\" + '\\n' + '\\n');\t\t\r\n\t\t}\r\n\t\tcatch(IOException ioe) {\r\n\t\t\tthrow new CommandExecuteException(\"Unable to save the game.\");\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private static void craft2by2(ItemStack input, ItemStack output)\r\n\t{\r\n\t\tGameRegistry.addRecipe(output, new Object[] { \"##\", \"##\", '#', input });\r\n\t}",
"public void heal3()\r\n {\r\n this.health = 1200;\r\n Story.healText3();\r\n }",
"private void findChest() {\n\t\tchar[][] location = game.getPlayingmap().getLocation();\n//\t\tFighter fighter = (Fighter)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter].getContent();\n\n\t\tif(character.xOfFighter-1>=0&&location[character.xOfFighter-1][character.yOfFighter]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter-1][character.yOfFighter].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter-1, character.yOfFighter, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.xOfFighter+1<game.getPlayingmap().getRow()&&location[character.xOfFighter+1][character.yOfFighter]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter+1][character.yOfFighter].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter+1, character.yOfFighter, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.yOfFighter-1>=0&&location[character.xOfFighter][character.yOfFighter-1]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter-1].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter, character.yOfFighter-1, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.yOfFighter+1<game.getPlayingmap().getColumn()&&location[character.xOfFighter][character.yOfFighter+1]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter+1].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter, character.yOfFighter+1, 'e');\n\t\t\t}\n\t\t}\n\t}",
"private static void craftStair(ItemStack input, ItemStack output)\r\n\t{\r\n\t\tGameRegistry.addRecipe(output, new Object[] { \"# \", \"## \", \"###\", '#', input });\r\n\t}",
"public TransactionResponse buyEnchant() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\tNotification not = hc.getNotify();\r\n \t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\ttry {\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tString nenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tint shopstock = 0;\r\n \t\t\tshopstock = (int) hyperObject.getStock();\r\n \t\t\tif (shopstock >= 1) {\r\n \t\t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\t\tdouble price = hyperObject.getCost(EnchantmentClass.fromString(mater));\r\n \t\t\t\tprice = price + hyperObject.getPurchaseTax(price);\r\n \t\t\t\tif (price != 123456789) {\r\n \t\t\t\t\tif (!im.containsEnchantment(p.getItemInHand(), ench)) {\r\n \t\t\t\t\t\tif (acc.checkFunds(price, p)) {\r\n \t\t\t\t\t\t\tif (im.canAcceptEnchantment(p.getItemInHand(), ench) && p.getItemInHand().getAmount() == 1) {\r\n \t\t\t\t\t\t\t\thyperObject.setStock(shopstock - 1);\r\n \t\t\t\t\t\t\t\tacc.withdraw(price, p);\r\n \t\t\t\t\t\t\t\tacc.depositShop(price);\r\n \t\t\t\t\t\t\t\tif (hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\")) {\r\n \t\t\t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tint l = hyperObject.getName().length();\r\n \t\t\t\t\t\t\t\tString lev = hyperObject.getName().substring(l - 1, l);\r\n \t\t\t\t\t\t\t\tint level = Integer.parseInt(lev);\r\n \t\t\t\t\t\t\t\tim.addEnchantment(p.getItemInHand(), ench, level);\r\n \t\t\t\t\t\t\t\tboolean stax;\r\n \t\t\t\t\t\t\t\tstax = Boolean.parseBoolean(hyperObject.getIsstatic());\r\n \t\t\t\t\t\t\t\tdouble taxrate;\r\n \t\t\t\t\t\t\t\tif (!stax) {\r\n \t\t\t\t\t\t\t\t\ttaxrate = hc.getYaml().getConfig().getDouble(\"config.enchanttaxpercent\");\r\n \t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\ttaxrate = hc.getYaml().getConfig().getDouble(\"config.statictaxpercent\");\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tdouble taxpaid = price - (price / (1 + taxrate / 100));\r\n \t\t\t\t\t\t\t\ttaxpaid = calc.twoDecimals(taxpaid);\r\n \t\t\t\t\t\t\t\tprice = calc.twoDecimals(price);\r\n \t\t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"ENCHANTMENT_PURCHASE_MESSAGE\"), 1, price, hyperObject.getName(), calc.twoDecimals(taxpaid)), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tlog.writeSQLLog(p.getName(), \"purchase\", hyperObject.getName(), 1.0, price, taxpaid, playerecon, type);\r\n \r\n \t\t\t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\t\t\tnot.setNotify(hyperObject.getName(), mater, playerecon);\r\n \t\t\t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tresponse.addFailed(L.get(\"INSUFFICIENT_FUNDS\"), hyperObject);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_ALREADY_HAS_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"THE_SHOP_DOESNT_HAVE_ENOUGH\"), hyperObject.getName()), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction buyEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}",
"@Override\n public void attack(ArrayList<territories> PlayersTerritories,int bonusArmies ) {\n\n // placeArmy(PlayersTerritories,bonusArmies);\n\n\n territories toAttack=getTerritoryGreedyAttack(PlayersTerritories,0);\n\n territories AttackWith = GetMaximumAttacker(PlayersTerritories,toAttack);\n\n Attacking(toAttack,AttackWith);\n\n\n\n }",
"public void heal2()\r\n {\r\n this.health = 900;\r\n Story.healText2();\r\n }",
"public static void NewChar(){\n\t\tSystem.out.println(\"\\\"What is the name of the powerful soul who wishes to brave the Depths alone?\\\"\");\n\t\tScanner sc = new Scanner(System.in);\n\t\tString Name = sc.nextLine();\n\t\tSystem.out.println(\"\\\"\" + Name + \"? Such an odd name, I cannot tell if this is bravery or foolishness...\\\"\");\n\t\tSystem.out.println(\"\\\"So tell me, \" + Name + \", what do your stats look like?\\\"\");\n\t\tboolean key = true; //To allow the player to re-enter stats if he/she messes up in choosing them.\n\t\twhile (key){\n\t\t\tkey = false;\n\t\t\ttstr = statChoice(\"strength\"); //The string in this method is used as text to let the player in on what stat they are choosing. The method automatically lowers the statPoints.\n\t\t\ttmag = statChoice(\"magic power\");\n\t\t\ttluc = statChoice(\"luck\");\n\t\t\ttacc = statChoice(\"accuracy\");\n\t\t\ttdef = statChoice(\"defense\");\n\t\t\ttspe = statChoice(\"speed\");\n\t\t\ttHP = ((statChoice(\"Health Points\") * 10) + 10); //HP and MP are multiplied by ten, and HP auto starts at 10 so the player doesn't automatically die when they start the game.\n\t\t\ttMP = (statChoice(\"Mystic Energy\") * 10);\n\t\t\ttstatSheet(); //This method just prints out the player's current stats.\n\t\t\tSystem.out.println(\"Are you okay with these stats?(Note - You cannot change them later)\");\n\t\t\tString statConfermation = sc.nextLine();\n\t\t\tif(statConfermation.equalsIgnoreCase(\"yes\")||statConfermation.equalsIgnoreCase(\"ye\")||statConfermation.equalsIgnoreCase(\"y\")){\n\t\t\t\tPlayer player = new Player(Name, tstr, tmag, tluc, tacc, tdef, tspe, tHP, tMP); //This is cementing the stats in the Player class\n\t\t\t\tArrays.fill(player.items, \"\");\n\t\t\t\tArrays.fill(player.spell, \"\");\n\t\t\t\tplayer.statSheet();\n\t\t\t\tChooseGift(player);\n\t\t\t\tSystem.out.println(\"\\\"It appears you have chosen your gift.\\nI believe you have all you need, \" + player.name + \", I hope you are ready for the depths!\\nGood luck.\\\"\");\n\t\t\t\tDepthsIntro.Enter(player);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tReset(); //this method just resets the game for the process to go through again.\n\t\t\t\tkey = true;\n\t\t\t}\n\t\t}\n\t\t}",
"private Enchantment getEnchant(String ench) {\n\t\tif (ench.equals(\"S\")) {\n\t\t\treturn Enchantment.DAMAGE_ALL;\n\t\t} else if (ench.equals(\"P\")) {\n\t\t\treturn Enchantment.PROTECTION_ENVIRONMENTAL;\n\t\t} else if (ench.equals(\"U\")) {\n\t\t\treturn Enchantment.DURABILITY;\n\t\t} else if (ench.equals(\"K\")) {\n\t\t\treturn Enchantment.KNOCKBACK;\n\t\t} else if (ench.equals(\"B\")) {\n\t\t\treturn Enchantment.ARROW_KNOCKBACK;\n\t\t} else if (ench.equals(\"D\")) {\n\t\t\treturn Enchantment.ARROW_DAMAGE;\n\t\t} else if (ench.equals(\"I\")) {\n\t\t\treturn Enchantment.ARROW_INFINITE;\n\t\t} else if(ench.equals(\"T\")) { \n\t\t\treturn Enchantment.THORNS;\n\t\t} else if (ench.equals(\"W\")) {\n\t\t\treturn Enchantment.WATER_WORKER;\n\t\t} else {\n\t\t\treturn Enchantment.DAMAGE_ALL;\n\t\t}\n\t}",
"@Override\n\tpublic void closeChest() {\n\n\t}",
"public static void handleChests(World world, BlockPos dataBlockPos, Entry<BlockPos, String> e, int weight)\n\t{\n\t\tint chance = (int) (Math.random() * weight);\n\t\tTileEntity tileentity;\n\t\t\n\t\tswitch (e.getValue())\n\t\t{\n\t\t\tcase \"common_chest\":\n\t\t\t\tworld.setBlockState(dataBlockPos, Blocks.AIR.getDefaultState(), 3);\n\t\t\t\ttileentity = world.getTileEntity(dataBlockPos.down(1));\n\t\t\t\t\n\t\t\t\tif (tileentity instanceof TileEntityChest)\n\t\t\t\t{\n\t\t\t\t\tTileEntityChest chest = (TileEntityChest) tileentity;\n\t\t\t\t\tif (chance == 0) setLootTable(chest, world, Rarity.COMMON);\n\t\t\t\t\telse world.setBlockToAir(dataBlockPos.down(1));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"uncommon_chest\":\n\t\t\t\tworld.setBlockState(dataBlockPos, Blocks.AIR.getDefaultState(), 3);\n\t\t\t\ttileentity = world.getTileEntity(dataBlockPos.down(1));\n\t\t\t\t\n\t\t\t\tif (tileentity instanceof TileEntityChest)\n\t\t\t\t{\n\t\t\t\t\tTileEntityChest chest = (TileEntityChest) tileentity;\n\t\t\t\t\tif (chance == 0) setLootTable(chest, world, Rarity.UNCOMMON);\n\t\t\t\t\telse world.setBlockToAir(dataBlockPos.down(1));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"rare_chest\":\n\t\t\t\tworld.setBlockState(dataBlockPos, Blocks.AIR.getDefaultState(), 3);\n\t\t\t\ttileentity = world.getTileEntity(dataBlockPos.down(1));\n\t\t\t\t\n\t\t\t\tif (tileentity instanceof TileEntityChest)\n\t\t\t\t{\n\t\t\t\t\tTileEntityChest chest = (TileEntityChest) tileentity;\n\t\t\t\t\tif (chance == 0) setLootTable(chest, world, Rarity.RARE);\n\t\t\t\t\telse world.setBlockToAir(dataBlockPos.down(1));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"epic_chest\":\n\t\t\t\tworld.setBlockState(dataBlockPos, Blocks.AIR.getDefaultState(), 3);\n\t\t\t\ttileentity = world.getTileEntity(dataBlockPos.down(1));\n\t\t\t\t\n\t\t\t\tif (tileentity instanceof TileEntityChest)\n\t\t\t\t{\n\t\t\t\t\tTileEntityChest chest = (TileEntityChest) tileentity;\n\t\t\t\t\tif (chance == 0) setLootTable(chest, world, Rarity.EPIC);\n\t\t\t\t\telse world.setBlockToAir(dataBlockPos.down(1));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"legendary_chest\":\n\t\t\t\tworld.setBlockState(dataBlockPos, Blocks.AIR.getDefaultState(), 3);\n\t\t\t\ttileentity = world.getTileEntity(dataBlockPos.down(1));\n\t\t\t\t\n\t\t\t\tif (tileentity instanceof TileEntityChest)\n\t\t\t\t{\n\t\t\t\t\tTileEntityChest chest = (TileEntityChest) tileentity;\n\t\t\t\t\tif (chance == 0) setLootTable(chest, world, Rarity.LEGENDARY);\n\t\t\t\t\telse world.setBlockToAir(dataBlockPos.down(1));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}",
"private void registerDungeonLoot() {\n\t\tChestGenHooks dungeon = ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST);\n\t\tChestGenHooks pyramid = ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST);\n\t\tChestGenHooks jtemple = ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST);\n\t\t\n\t\tWeightedRandomChestContent disc1WRCC = new WeightedRandomChestContent(new ItemStack(turretRec1), 1, 1, 5);\n\t\tWeightedRandomChestContent httmWRCC = new WeightedRandomChestContent(new ItemStack(httm), 1, 1, 5);\n\t\t\n\t\tdungeon.addItem(disc1WRCC);\n\t\tpyramid.addItem(disc1WRCC);\n\t\tpyramid.addItem(httmWRCC);\n\t\tjtemple.addItem(disc1WRCC);\n\t\tjtemple.addItem(httmWRCC);\n\t}",
"private float setAttackAbsorption(HashMap content) {\n\t\tfloat change = calculateAbsorption();\n this.attackDamageModifier = baseDamageModifier + change;\n//System.out.println(\"attack: \" + this.attackDamageModifier);\n content.put(\"attack_damage_modifier\", \"\" + this.attackDamageModifier);\n\t\treturn change*ABSORPTION_PRICE_MULTIPLIER;\n }",
"public void heal1()\r\n {\r\n this.health = 700;\r\n Story.healText1();\r\n }",
"@Override\n @SuppressWarnings(\"empty-statement\")\n public void attack(){\n\n if (myTerritory.getAlpha() <= 0.5){\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getSoldiers()/4;\n defendingSoldiers = myTerritory.getSoldiers()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }\n else\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getFoodGrowth()/4;\n defendingSoldiers = myTerritory.getFoodGrowth()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }",
"public void update(ActorRef out) {\t\n\t\t/* Buff animation */\n\t\tEffectAnimation buff = BasicObjectBuilders.loadEffect(StaticConfFiles.f1_buff);\n\t\tBasicCommands.playEffectAnimation(out, buff, this.currentTile);\n\t\ttry {Thread.sleep(1000);} catch (InterruptedException e) {e.printStackTrace();}\n\t\t\n\t\t/* Update health & attack */\n\t\tthis.addHealth(1, out);\n\t\tthis.addAttack(1, out);\n\t\t\n\t\t/* testing */\n\t\tSystem.out.println(\"SpellThief effect applied to \" + getName());\n\t}",
"public static void initLoot()\n\t{\n\t\tChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,5));\n\t\tChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t\tChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t\tChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t\tChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,5));\n\t\tChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,5));\n\t\tChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t}",
"public TransactionResponse sellEnchant() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\tNotification not = hc.getNotify();\r\n \t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\ttry {\r\n \t\t\tString nenchant = \"\";\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tnenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tint lvl = Integer.parseInt(hyperObject.getName().substring(hyperObject.getName().length() - 1, hyperObject.getName().length()));\r\n \t\t\tint truelvl = im.getEnchantmentLevel(p.getItemInHand(), ench);\r\n \t\t\tif (im.containsEnchantment(p.getItemInHand(), ench) && lvl == truelvl) {\r\n \t\t\t\tdouble dura = p.getItemInHand().getDurability();\r\n \t\t\t\tdouble maxdura = p.getItemInHand().getType().getMaxDurability();\r\n \t\t\t\tdouble duramult = (1 - dura / maxdura);\r\n \t\t\t\tif (p.getItemInHand().getType().equals(Material.ENCHANTED_BOOK)) {\r\n \t\t\t\t\tduramult = 1;\r\n \t\t\t\t}\r\n \t\t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\t\tdouble price = hyperObject.getValue(EnchantmentClass.fromString(mater));\r\n \t\t\t\tdouble fprice = duramult * price;\r\n \t\t\t\tboolean sunlimited = hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\");\r\n \t\t\t\tif (acc.checkshopBalance(fprice) || sunlimited) {\r\n \t\t\t\t\tim.removeEnchantment(p.getItemInHand(), ench);\r\n \t\t\t\t\tdouble shopstock = hyperObject.getStock();\r\n \t\t\t\t\thyperObject.setStock(shopstock + duramult);\r\n \t\t\t\t\tdouble salestax = hp.getSalesTax(fprice);\r\n \t\t\t\t\tacc.deposit(fprice - salestax, p);\r\n \t\t\t\t\tacc.withdrawShop(fprice - salestax);\r\n \t\t\t\t\tif (sunlimited) {\r\n \t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tfprice = calc.twoDecimals(fprice);\r\n \t\t\t\t\tresponse.addSuccess(L.f(L.get(\"ENCHANTMENT_SELL_MESSAGE\"), 1, calc.twoDecimals(fprice), hyperObject.getName(), calc.twoDecimals(salestax)), calc.twoDecimals(fprice - salestax), hyperObject);\r\n \t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t}\r\n \t\t\t\t\tlog.writeSQLLog(p.getName(), \"sale\", hyperObject.getName(), 1.0, fprice - salestax, salestax, playerecon, type);\r\n \r\n \t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\tnot.setNotify(hyperObject.getName(), mater, playerecon);\r\n \t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"SHOP_NOT_ENOUGH_MONEY\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"ITEM_DOESNT_HAVE_ENCHANTMENT\"), hyperObject.getName()), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction sellEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}",
"public void addEngineSinks(String sinkName, int toAllocate) {\n // this relies on these being the correct internalNames for these items\n EquipmentType sinkType = EquipmentType.get(sinkName);\n\n if (sinkType == null) {\n System.out.println(\"Mech: can't find heat sink to add to engine\");\n }\n\n if ((toAllocate == 0) && getEngine().isFusion()) {\n System.out.println(\"Mech: not putting any heat sinks in the engine?!?!\");\n }\n\n for (int i = 0; i < toAllocate; i++) {\n try {\n addEquipment(new Mounted(this, sinkType), Entity.LOC_NONE, false);\n } catch (LocationFullException ex) {\n // um, that's impossible.\n }\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n public void executeAttack() {\r\n \t\r\n \tSystem.out.println();\r\n System.out.println(\"**** Attack Phase Begins for player \" + this.playerName + \"..****\\n\");\r\n \r\n boolean hasConnqueredAtleastOneCountry = false;\r\n \r\n\t System.out.println(\"\\n\" + \"Fetching potential attack scenarios for \" + this.playerName + \"...\\n\");\r\n\t \r\n\t // get all scenarios but we're only interested in attacking with the strongest country & in all-out mode\r\n\t HashMap<String, ArrayList<String>> potentialAttackScenarios = getPotentialAttackScenarios();\r\n\t \r\n\t if (potentialAttackScenarios == null) {\r\n\t System.out.println(\r\n\t \"There are currently no attack opportunities for \" + this.playerName + \".. Sorry!\\n\");\r\n\t System.out.println(\"\\n****Attack Phase Ends for player \" + this.playerName + \"..****\\n\");\r\n\t return;\r\n\t }\r\n\t\r\n\t if (potentialAttackScenarios.isEmpty()) {\r\n\t System.out.println(\r\n\t \"There are currently no attack opportunities for \" + this.playerName + \".. Sorry!\\n\");\r\n\t System.out.println(\"\\n****Attack Phase Ends for player \" + this.playerName + \"..****\\n\");\r\n\t return;\r\n\t }\r\n\t \r\n\t \t \r\n\t String enemyCountryToAttack = null;\r\n\t String strongestCountry = getStrongestCountryConqueredByPlayer(potentialAttackScenarios);\r\n\t if(strongestCountry == null) {\r\n\t \tSystem.out.println(\r\n\t \"There are currently no attack opportunities for \" + this.playerName + \".. Sorry!\\n\");\r\n\t System.out.println(\"\\n****Attack Phase Ends for player \" + this.playerName + \"..****\\n\");\r\n\t return;\r\n\t }\r\n\t \r\n\t \r\n // implement a mini-strategy within this aggressive strategy to target the weakest enemy country first\r\n\t // build map of all enemy countries and their respective army counts\r\n\t ArrayList<String> allAdjacentEnemyCountries = potentialAttackScenarios.get(strongestCountry); \r\n\t HashMap<String,Integer> allAdjacentEnemyCountriesAndArmyCounts = new HashMap<String,Integer>();\r\n\t \r\n\t for(String enemyCountry: allAdjacentEnemyCountries) {\r\n \tInteger currentEnemyCountryArmyCount = gameData.gameMap.getCountry(enemyCountry).getCountryArmyCount();\r\n \tallAdjacentEnemyCountriesAndArmyCounts.putIfAbsent(enemyCountry, currentEnemyCountryArmyCount);\r\n\t }\r\n\t \r\n\t // sort in ascending order based on lowest army count -> highest\r\n\t Object[] sortedAdjacentEnemyCountriesAndArmyCounts = allAdjacentEnemyCountriesAndArmyCounts.entrySet().toArray();\r\n\t Arrays.sort(sortedAdjacentEnemyCountriesAndArmyCounts, (o1, o2) -> ((Map.Entry<String, Integer>) o1).getValue()\r\n\t\t .compareTo(((Map.Entry<String, Integer>) o2).getValue()));\r\n\t \r\n\r\n\t HashSet<String> countriesConquered = new HashSet<>();\r\n\t \r\n\t // attack each surrounding enemy country while you can\r\n\t for (Object e : sortedAdjacentEnemyCountriesAndArmyCounts) {\r\n\r\n\t \t// setup phase state\r\n\t \tAttackPhaseState attackPhase = new AttackPhaseState();\r\n\t \t attackPhase.setAttackingPlayer(this.playerName);\r\n\t \t attackPhaseState.add(attackPhase);\r\n\t \t notifyView();\r\n\t \t // attacking country will be the same for a given turn\r\n\t \t attackPhase.setAttackingCountry(strongestCountry);\r\n\t notifyView();\r\n\t \t\r\n\t \tenemyCountryToAttack = ((Map.Entry<String, Integer>) e).getKey(); \r\n\t \tattackPhase.setDefendingCountry(enemyCountryToAttack);\r\n\t \tnotifyView();\r\n\t\r\n\t \tString defendingPlayer = gameData\r\n\t .getPlayer(this.gameData.gameMap.getCountry(enemyCountryToAttack).getCountryConquerorID())\r\n\t .getStrategyType().getPlayerName();\r\n\t \tattackPhase.setDefendingPlayer(defendingPlayer);\r\n\t \tnotifyView();\r\n\t \r\n\t \t// fight in all out mode until you win or run out of armies on the ground\r\n\t\t while (!attackPhase.getBattleOutcomeFlag() && this.gameData.gameMap.getCountry(strongestCountry).getCountryArmyCount() > 1) {\r\n\t // proceed with max allowed dice count for both sides\r\n\t Integer attackerDiceCount = getActualMaxAllowedDiceCountForAction(\"attack\", strongestCountry, 3);\r\n\t\t attackPhase.setAttackerDiceCount(attackerDiceCount);\r\n\t\t //Integer defenderDiceCount = getActualMaxAllowedDiceCountForAction(\"defend\",enemyCountryToAttack, 2);\r\n\t\t // always set defender dice count to the min to maximize aggression \r\n\t\t Integer defenderDiceCount = 1;\r\n\t\t attackPhase.setDefenderDiceCount(defenderDiceCount);\r\n\t\t rollDiceBattle(attackPhase);\r\n\t hasConnqueredAtleastOneCountry = fight(attackPhase) || hasConnqueredAtleastOneCountry;\r\n\t \r\n\t if(attackPhase.getBattleOutcomeFlag()) {\r\n\t \tcountriesConquered.add(strongestCountry);\r\n\t \tcountriesConquered.add(enemyCountryToAttack);\r\n\t \t\r\n\t }\r\n\t \r\n\t }\r\n\t\t \r\n\t }\r\n\t \r\n\t String weakestCountry = getCountryWithMostNumberOfBordersShared(countriesConquered);\r\n\t \r\n\t if(weakestCountry != strongestCountry) {\r\n\t \t\r\n\t \tInteger strongestCountryArmyCount = this.gameData.gameMap.getCountry(strongestCountry).getCountryArmyCount();\r\n\t \t\r\n\t \tif(strongestCountryArmyCount > 1) {\r\n\t \t\tthis.gameData.gameMap.deductArmyToCountry(strongestCountry, strongestCountryArmyCount - 1);\r\n\t\t\t\tthis.gameData.gameMap.addArmyToCountry(weakestCountry, strongestCountryArmyCount - 1);\r\n\t \t}\r\n\t \t\r\n\t }\r\n\t \r\n checkIfPlayerHasConqueredTheWorld();\r\n \r\n\t\t\r\n\t if (hasConnqueredAtleastOneCountry) {\r\n\t\t \tCard card = gameData.cardsDeck.getCard();\r\n\t \r\n\t\t if(card == null) {\r\n\t\t \tSystem.out.println(\"No more cards left in the deck\");\r\n\t\t } else {\r\n\t\t \t\tthis.cardList.add(card);\r\n\t\t \t\tSystem.out.println(\"PlayerStrategy received 1 card => Army Type: \" + card.getArmyType() + \", Country: \" + card.getCountry().getCountryName());\r\n\t\t \t\tSystem.out.println(\"Total cards : \" + this.cardList.size());\r\n\t\t \t}\r\n\t\t} \r\n\t \r\n\t HashSet<String> conqueredCountryByThisPlayer = gameData.gameMap.getConqueredCountries(playerID);\r\n System.out.println(\"\\nOverview of army counts: \\n\");\r\n for(String country: conqueredCountryByThisPlayer){\r\n System.out.println(\"Country: \"+country+\", Army Count: \"+gameData.gameMap.getCountry(country).getCountryArmyCount());\r\n }\r\n\t \r\n\t endAttack();\r\n }",
"private void communityChest(Player currentPlayer){\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n int nextPlayer;\n if(m_currentTurn >= m_numPlayers){\n nextPlayer = 0;\n } else {\n nextPlayer = m_currentTurn+1;\n }\n\n if(randomNum == 1){\n convertTextToSpeech(\"Your new business takes off, collect 200\");\n if(m_manageFunds) {\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(200);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Your friend hires your villa for a week, \" +\n \"collect 100 off the next player\");\n if(m_manageFunds) {\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(100);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n players.get(nextPlayer).subtractMoney(100);\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n }\n }\n if(randomNum == 3){\n convertTextToSpeech(\"You receive a tax rebate, collect 300\");\n if(m_manageFunds) {\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n }",
"@Override\n\tpublic void addRecipes() {\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_BROWN), \"coralBrown\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_RED), \"coralRed\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_YELLOW), \"coralYellow\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.LIGHT_BLUE), \"coralLightBlue\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.MAGENTA), \"coralMagenta\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.ORANGE), \"coralOrange\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.PINK), \"coralPink\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.PURPLE), \"coralPurple\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.GREY), \"coralGray\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.LIGHT_GREY), \"coralLightGray\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_WHITE), \"coralWhite\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_GREEN), \"plantKelp\", true);\n\t\t\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_BLUE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_BRAIN), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_CANDYCANE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_CUCUMBER), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_ORANGE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_PINK), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_PURPLE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_RED), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_GREY), new ItemStack(coral, 1, CoralMeta.CORAL_LIGHT_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_LIGHT_GREY), new ItemStack(coral, 1, CoralMeta.CORAL_WHITE), 5);\n\t\t\n\t\t//Kelp Wrap Recipe\n\t\tRecipeHelper.add9x9Recipe(new ItemStack(Core.food, 1, FoodMeta.KELP_WRAP), \"plantKelp\");\n\t\t\n\t\taddOceanChestLoot();\n\t}",
"public void setEnchanted(boolean enchanted) {\n this.enchanted = enchanted;\n }",
"@Test\n public void bestowNighthowlerTest() {\n addCard(Zone.BATTLEFIELD, playerA, \"Mountain\", 4);\n // Instant - {2}{R}{R}\n // Chandra's Outrage deals 4 damage to target creature and 2 damage to that creature's controller.\n addCard(Zone.HAND, playerA, \"Chandra's Outrage\");\n\n // Enchantment Creature — Horror\n // 0/0\n // Bestow {2}{B}{B}\n // Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.\n addCard(Zone.HAND, playerB, \"Nighthowler\");\n addCard(Zone.BATTLEFIELD, playerB, \"Swamp\", 4);\n // First strike\n // Whenever Alesha, Who Smiles at Death attacks, you may pay {W/B}{W/B}. If you do, return target creature card\n // with power 2 or less from your graveyard to the battlefield tapped and attacking.\n addCard(Zone.BATTLEFIELD, playerB, \"Alesha, Who Smiles at Death\"); // 3/2\n addCard(Zone.GRAVEYARD, playerB, \"Pillarfield Ox\");\n\n castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, \"Nighthowler using bestow\", \"Alesha, Who Smiles at Death\");\n\n // attacks by Alesha and return card on trigger\n attack(2, playerB, \"Alesha, Who Smiles at Death\");\n setChoice(playerB, true); // use trigger\n addTarget(playerB, \"Pillarfield Ox\"); // target card to return\n\n castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, \"Chandra's Outrage\", \"Alesha, Who Smiles at Death\");\n\n setStrictChooseMode(true);\n setStopAt(2, PhaseStep.END_TURN);\n execute();\n\n assertLife(playerB, 18); // -2 from Chandra's Outrage\n assertLife(playerA, 16); // -3 from attack Alesha with bestowed Nighthowler\n\n assertGraveyardCount(playerA, \"Chandra's Outrage\", 1);\n assertGraveyardCount(playerB, \"Alesha, Who Smiles at Death\", 1);\n assertPermanentCount(playerB, \"Nighthowler\", 1);\n assertPowerToughness(playerB, \"Nighthowler\", 2, 2);\n Permanent nighthowler = getPermanent(\"Nighthowler\", playerB);\n\n Assert.assertEquals(\"Nighthowler has to be a creature\", true, nighthowler.isCreature(currentGame));\n }",
"@Override\n public String addHorse(Observer... horses) {\n for (Observer horse : horses) {\n mounts.add(horse);\n }\n return (Answer.HORSES.toString(2));\n }",
"static void healing_challenge3() { //this is where the player will be able to heal himself/herself in boss challenge\n System.out.println(\" You open up the bag to check your inventory...\");\n enter = next.nextLine();\n if(potions <= zero) {\n System.out.println(username + \" feels something in the bag...\");\n System.out.println(\"\\n\");\n System.out.println(\"There is a large object inside, but turns out to be your spell book\");\n enter = next.nextLine();\n System.out.println(\"UH! OH! You ran out of potions. GUESS YOUR ON YOUR OWN!!!\");\n System.out.println(\"\\n\");\n }else if(potions > zero && playerhealth != 3500) { //this makes sure their aren't any loop holes in the game for cheats\n System.out.println(username + \" found a potion in the bag.\");\n System.out.println(username + \" takes the new blue potion and consumes it entirely...\");\n System.out.println(username + \" gained 300 HP points.\");\n playerhealth = playerhealth + 300; //player's health is healed\n potions--;//put it like this, not potions = potions--; This would break the game...\n if(playerhealth > 3500){ //in case that player heals and adds 300 and health goes higher than maixmum\n playerhealth = 3500;\n }\n //in case if player tries to cheat with the maximum health\n }else if (playerhealth == 3500) {\n System.out.println(\"You are at your maximum health...You can't raise it any higher than that...\");\n System.out.println(\"NICE TRY!\");\n } \n }",
"public void outputStats (){\n System.out.println(\"Your sorcerer's stats:\");\n System.out.println(\"HP = \" + hp);\n System.out.println(\"Mana = \" + mana);\n System.out.println(\"Strength = \" + strength);\n System.out.println(\"Vitality = \" + vitality);\n System.out.println(\"Energy = \" + energy);\n }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);//creates a scanner to scan input\r\n\t\tString[] heroes = {\"Spiderman\",\"Ironman\",\"Doctor Strange\",\"Hulk\",\"Thor\"};//a string array of heroes\r\n\t\t\r\n\t\tString[] powers = new String[heroes.length];//creates string array 'powers' to store within the heroes\r\n\t\t\r\n\t\t//includes a string for each powers variable\r\n\t\tpowers[0] = \"spider-senses\";\r\n\t\tpowers[1] = \"durability\";\r\n\t\tpowers[2] = \"spells\";\r\n\t\tpowers[3] = \"strength\";\r\n\t\tpowers[4] = \"lightning\"; \r\n\t\t\r\n\t\tboolean[] isHuman = new boolean[heroes.length];//creates boolean array 'isHuman' to store within 'heroes'\r\n\t\t\r\n\t\t//initial boolean to determine if the hero is human\r\n\t\tisHuman[0] = true;\r\n\t\tisHuman[1] = true;\r\n\t\tisHuman[2] = true;\r\n\t\tisHuman[3] = false;\r\n\t\tisHuman[4] = false;\r\n\t\t\r\n\t\t//prints the array list of heroes and their status\r\n\t\tfor(int i = 0; i < heroes.length; i++) {\r\n\t\t\tSystem.out.println(\"i: \" + i + \" Name: \" + heroes[i] + \" \\t\\tPowers: \" + powers[i] + \" \\tAre they human?: \" + isHuman[i]);\r\n\t\t}\r\n\t\t\r\n\t\t//checks if the heroes are human\r\n\t\t//if not human, their powers changes to 'NONE'\r\n\t\tfor(int i = 0; i < heroes.length; i++) {\r\n\t\t\tif(isHuman[i] == false) {\r\n\t\t\t\tpowers[i] = \"NONE\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();//spacer\r\n\t\tSystem.out.println(\"A disease known as the Couprinite has been exposed to the Avengers. Everyone survived its effect, however, \" + heroes[4] + \" and the \" + heroes[3] + \" loose all their \"\r\n\t\t\t\t+ \"\\npowers...\");//a brief story as to how they lost their powers\r\n\t\tSystem.out.println();//spacer\r\n\t\tSystem.out.println(\"...status updated.\");//informs user the status has updated\r\n\t\tSystem.out.println();//spacer\r\n\t\t\r\n\t\t//prints the array list of heroes and their current status\r\n\t\tfor(int i = 0; i < powers.length; i++) {\r\n\t\t\tSystem.out.println(\"i: \" + i + \" Name: \" + heroes[i] + \" \\t\\tPowers: \" + powers[i] + \" \\t\\tAre they human?: \" + isHuman[i]);\r\n\t\t}\r\n\r\n\t}",
"public void runSpellsItOut() throws IOException{\n\t\tsc = null;\n\t\t\n\t\ttry{\n\t\t\tsc = new Scanner(System.in);\n\t\t\tSystem.out.println(PRESS_ENTER_START);\n\n\t\t\twhile (!(sc.nextLine().equals(EXIT))) {\n\t\t\t\tSystem.out.println(INSERT_NUMBER);\n\t\t\t\tint number = sc.nextInt();\n\t\t\t\tNumberWord numberWord = new NumberWord(number);\n\t\t\t\t\n\t\t\t\tif(numberWord.getTranslation() == null){\n\t\t\t\t\tSystem.out.println(INVALID_INPUT);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(OUTPUT);\n\t\t\t\t\tSystem.out.println(numberWord.getTranslation());\n\t\t\t\t}\n\t\t\t}\n\t\t}finally{\n\t\t\tcloseScanner();\n\t\t}\n\t}",
"@Test\n public void bestowEnchantmentDoesNotTriggerEvolve() {\n addCard(Zone.BATTLEFIELD, playerA, \"Forest\", 6);\n // Creature - Giant 3/5\n addCard(Zone.BATTLEFIELD, playerA, \"Silent Artisan\");\n\n addCard(Zone.HAND, playerA, \"Experiment One\");\n // Enchanted creature gets +4/+2.\n addCard(Zone.HAND, playerA, \"Boon Satyr\");\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Experiment One\");\n castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, \"Boon Satyr using bestow\", \"Silent Artisan\");\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n // because Boon Satyr is no creature on the battlefield, evolve may not trigger\n assertPermanentCount(playerA, \"Boon Satyr\", 1);\n Permanent boonSatyr = getPermanent(\"Boon Satyr\", playerA);\n Assert.assertTrue(\"Boon Satyr may not be a creature\", !boonSatyr.isCreature(currentGame));\n assertPermanentCount(playerA, \"Silent Artisan\", 1);\n assertPermanentCount(playerA, \"Experiment One\", 1);\n assertPowerToughness(playerA, \"Experiment One\", 1, 1);\n assertPowerToughness(playerA, \"Silent Artisan\", 7, 7);\n\n }",
"private void setCommunityChestCards()\n {\n m_communityChest.add(new Card(\"Advance to St. Charles Place If you pass Go, collect $200\", 0, 1, 11));\n m_communityChest.add(new Card(\"Bank error in your favor, Collect $200\", 200, 0));\n m_communityChest.add(new Card(\"Doctor's fees Pay $50\", -50, 0));\n m_communityChest.add(new Card(\"Get out of Jail free card\", 0, 2));\n m_communityChest.add(new Card(\"Go directly to Jail. Do not pass Go, do not collect $200\", 0, 1, 30));\n m_communityChest.add(new Card(\"Advance token to Reading Railroad\", 0, 1, 5));\n m_communityChest.add(new Card(\"Life insurance matures, Collect $100 \", 100, 0));\n m_communityChest.add(new Card(\"You won second prize in a Beauty contest, Collect $10\", 10, 0));\n m_communityChest.add(new Card(\"From sale of stock you get $50\", 50, 0));\n m_communityChest.add(new Card(\"You have won a crossword competition, Collect $100\", 100, 0));\n }",
"public void printAssistants(Player player);",
"public void setChest(double chest) {\n this.chest = chest;\n }",
"public static void main(String[] args) {\n String [] mainMenu = {\"Main Menu\", \"Search\", \"Stats\", \"Spells\", \"Bag\", \"Quests\", \"Shop\", \"Test\", \"Exit\"};\r\n //Array that stores the shop menu\r\n String [] shopMenu = {\"Shop Menu\", \"Buy\", \"Sell\", \"Exit\"};\r\n //Array that stores the battle menu\r\n String [] battleMenu = {\"Battle Menu\", \"Attack\", \"Run\"};\r\n //Array that stores the bag menu\r\n String [] bagMenu = {\"Bag Menu\", \"Equip\", \"Use\", \"Exit\"};\r\n //Array that stores the spell menu\r\n String [] spellMenu = {\"Spell Menu\", \"Exit\"};\r\n //Array that stores the stat menu\r\n String [] statMenu = {\"Stat Menu\", \"Allocate Stats\", \"Exit\"};\r\n //Array that stores the quest menu\r\n String [] questMenu = {\"Quest Menu\", \"Check\", \"Exit\"};\r\n //Array that stores the allocate stat menu\r\n String [] allocateStatMenu = {\"Allocate Stats Menu\", \"Strength\", \"Intelligence\", \"Vitality\", \"Cancel\"};\r\n //Array that stores the blue moon city menu\r\n String [] blueMoonMenu = {\"Blue Moon City\", \"General Goods\", \"Blacksmith\", \"Magic Shop\", \"Guild\", \"Exit\"};\r\n //Array that holds the blue moon general menu\r\n String [] blueMoonGeneralMenu = {\"Blue Moon General Goods\", \"Buy\", \"Sell\", \"Exit\"};\r\n //Array that stores the blue moon blacksmith menu\r\n String [] blueMoonBlacksmithMenu = {\"Blue Moon Blacksmith\", \"Buy\", \"Sell\", \"Exit\"};\r\n //Array that stores the blue moon guild menu\r\n String [] blueMoonGuildMenu = {\"Blue Moon Guild\", \"Accept\", \"Drop\", \"Turn-In\", \"Exit\"};\r\n \r\n //Variable for the user choice\r\n String userChoice;\r\n Random rand = new Random();\r\n //Variable to keep the program running\r\n Boolean done = false;\r\n //Instantiates the player\r\n player player1 = new player();\r\n //Gets the player's character name\r\n player1.setPlayerName(getUserName());\r\n //Loop that keeps the program running until exited\r\n while(!done){\r\n //Variable for the level up loop\r\n Boolean doneLevel = false;\r\n //Calculates the players defense\r\n player1.setTotalDefense(playerTotalDefense(player1.getPlayerHelmet(), player1.getPlayerChestPlate(), player1.getPlayerGloves(), player1.getPlayerBoots(), player1.getPlayerDefense()));\r\n //Calculates the players attack\r\n player1.setTotalAttack(playerTotalAttack(player1.getPlayerWeapon(), player1.getPlayerAttack(), player1.getStrength()));\r\n //Checks to see if they player has leveled up\r\n while(!doneLevel){\r\n if(player1.getPlayerExperience() > (player1.getPlayerLevel() * 100)){\r\n //Increases the player's level by 1\r\n player1.setPlayerLevel(levelUp(player1.getPlayerLevel()));\r\n //Subtracts the experience for the level up\r\n player1.setPlayerExperience((player1.getPlayerExperience() - ((player1.getPlayerLevel() - 1) * 100)));\r\n //Adds a stat point upon level up\r\n player1.setStatPoints(gainStatPoints(player1.getStatPoints()));\r\n //Fully heals the player\r\n player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth());\r\n //Fully restores the players mp\r\n player1.setCurrentMP(player1.getMaxMP());\r\n }else{\r\n doneLevel = true;\r\n }\r\n }\r\n //Array that stores the player's stats\r\n Object [] playerStats = {player1.getPlayerName(), player1.getPlayerLevel(), player1.getPlayerExperience(), player1.getPlayerCurrentHealth(), player1.getPlayerMaxHealth(),\r\n player1.getCurrentMP(), player1.getMaxMP(), player1.getTotalAttack(), player1.getTotalDefense(), player1.getStrength(),\r\n player1.getIntelligence(), player1.getVitality(), player1.getStatPoints(), player1.getPlayerGold()};\r\n //Displays the main menu and gets the user decision\r\n userChoice = getUserChoice(mainMenu);\r\n //Determines the next course of action\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Starts the battle sequence\r\n case \"1\":\r\n //Boolean for the battle sequence\r\n Boolean battle = true;\r\n //Variable to hold the item dropped after monster death\r\n String loot;\r\n //Variable to hold which encounter was picked\r\n String encounterHolder;\r\n //Holds the encounter\r\n encounterHolder = encounter(player1.getPlayerLevel());\r\n switch(encounterHolder){\r\n//******************************************************************************************************************************\r\n //Found a skeleton\r\n case \"Skeleton\":\r\n //Instantiates a skeleton\r\n skeleton Skeleton = new skeleton();\r\n //Scales skeleton max health based on player level\r\n Skeleton.setSkeletonMaxHealth(skeletonHealthScale(Skeleton.getSkeletonMaxHealth(), player1.getPlayerLevel()));\r\n //Puts the skeleton at full health\r\n Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonMaxHealth());\r\n //Scales skeleton attack based on player level\r\n Skeleton.setSkeletonAttack(skeletonAttackScale(Skeleton.getSkeletonAttack(), player1.getPlayerLevel()));\r\n //Starts the battle loop\r\n while(battle){\r\n //Displays the battle menu\r\n userChoice = getUserChoice(battleMenu);\r\n //Checks the user decision\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Attack option\r\n case \"1\":\r\n //Lists the potential attacks the player can make\r\n System.out.println(\"\\t1) Basic Attack\");\r\n for(int i = 0; i < player1.getSpellList().length; i++){\r\n if(player1.spellList[i].equals(\"\")){\r\n break;\r\n }else{\r\n System.out.println(\"\\t\" + (i + 2) + \") \" + player1.spellList[i]);\r\n }\r\n }\r\n //Gets the user decision\r\n userChoice = getUserInput(\"What attack do you want to do? \\n(Type the name of the attack)\");\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Basic Attack option\r\n case \"Basic Attack\":\r\n //Calculates the remaining health of the skeleton\r\n Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonCurrentHealth() - playerDamageDealt(player1.getTotalAttack(), Skeleton.getSkeletonDefense())); \r\n //Tells the user how much damage they dealt to the skeleton\r\n System.out.println(\"You dealt \" + playerDamageDealt(player1.getTotalAttack(), Skeleton.getSkeletonDefense()) + \" damage to the Skeleton!\"); \r\n //Tells the user how much health the skeleton has remaining\r\n System.out.println(\"The Skeleton has \" + Skeleton.getSkeletonCurrentHealth() + \"/\" + Skeleton.getSkeletonMaxHealth() + \" health left!\"); \r\n //Basic Attack break\r\n break;\r\n//******************************************************************************************************************************\r\n //Fireball option\r\n case \"Fireball\":\r\n //Creates fireball spell\r\n fireball Fireball = new fireball();\r\n //Calculates the fireball damage and calculates the skeleton health after taking damage\r\n Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonCurrentHealth() - fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()));\r\n //Tells the player how much damage they dealt\r\n System.out.println(\"You dealt \" + fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()) + \" damage with Fireball to the Skeleton\");\r\n //Tells the user how much health the skeleton has remaining\r\n System.out.println(\"The Skeleton has \" + Skeleton.getSkeletonCurrentHealth() + \"/\" + Skeleton.getSkeletonMaxHealth() + \" health left!\"); \r\n //Reduces the players mp\r\n player1.setCurrentMP(player1.getCurrentMP() - fireballMPScale(Fireball.getMpCost(), player1.getPlayerLevel()));\r\n //Fireball break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n//******************************************************************************************************************************\r\n //Calculates the remaining health of the player\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() - monsterDamageDealt(Skeleton.getSkeletonAttack(), player1.getTotalDefense())); \r\n //Tells the player how much damage the skeleton dealto to the player\r\n System.out.println(\"The Skeleton dealt \" + monsterDamageDealt(Skeleton.getSkeletonAttack(), player1.getTotalDefense()) + \" damage to you!\"); \r\n //Tells the user how much health they have left\r\n System.out.println(\"You have \" + player1.getPlayerCurrentHealth() + \"/\" + player1.getPlayerMaxHealth() + \" health left!\");\r\n System.out.println(\"You have \" + player1.getCurrentMP() + \"/\" + player1.getMaxMP() + \" MP\");\r\n//******************************************************************************************************************************\r\n //Checks if skeleton is dead\r\n if(Skeleton.getSkeletonCurrentHealth() <= 0){\r\n //Ends the battle while loop\r\n battle = false;\r\n //Tells the user they have killed the enemy\r\n System.out.println(\"You have killed the Skeleton!\");\r\n //Tells the user how much gold they gained\r\n System.out.println(\"You gained \" + Skeleton.getSkeletonGoldDropped() + \" gold\");\r\n //Adds the gold to the users gold amount\r\n player1.setPlayerGold(player1.getPlayerGold() + skeletonGoldScale(Skeleton.getSkeletonGoldDropped(), player1.getPlayerLevel()));\r\n //Tells the user how much experience they have gained\r\n System.out.println(\"You gain \" + Skeleton.getSkeletonExperience() + \" experience!\");\r\n //Calculates the player's experience\r\n player1.setPlayerExperience (experienceTally(player1.getPlayerExperience(), Skeleton.getSkeletonExperience()));\r\n //Function is called to determine the item dropped and stores it in variable\r\n loot = itemDrop(rand.nextInt(5));\r\n //Checks to see if an item was actually dropped\r\n if(loot.equals(\"\")){\r\n //Tells the user that no item was dropped\r\n System.out.println(\"No item dropped.\");\r\n }else{ \r\n //Places the item in the first open space in the player's inventory\r\n player1.setPlayerBag(placeInBag(loot,player1.getPlayerBag()));\r\n //Tells the user which item they god\r\n System.out.println(\"You got: \" + loot + \"!\");\r\n }\r\n }\r\n//******************************************************************************************************************************\r\n //Checks if the player has died\r\n if(player1.getPlayerCurrentHealth() <= 0){\r\n System.out.println(\"You have died\");\r\n //Exits the battle sequence\r\n battle = false;\r\n //Ends the game\r\n done = true;\r\n }\r\n //Attack option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Run option\r\n case \"2\":\r\n //Runs from the battle and goes back to the main menu\r\n System.out.println(\"You have fled from the \" + encounterHolder);\r\n //Ends the battle sequence\r\n battle = false;\r\n //Run option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Skeleton encounter break\r\n break;\r\n//******************************************************************************************************************************\r\n //Devil encounter\r\n case \"Devil\":\r\n //Creates a devil\r\n devil Devil = new devil();\r\n //Scales skeleton max health based on player level\r\n Devil.setDevilMaxHealth(devilHealthScale(Devil.getDevilMaxHealth(), player1.getPlayerLevel()));\r\n //Puts the skeleton at full health\r\n Devil.setDevilCurrentHealth(Devil.getDevilMaxHealth());\r\n //Scales skeleton attack based on player level\r\n Devil.setDevilAttack(devilAttackScale(Devil.getDevilAttack(), player1.getPlayerLevel()));\r\n //Starts the battle loop\r\n while(battle){\r\n //Displays the battle menu\r\n userChoice = getUserChoice(battleMenu);\r\n //Checks the user decision\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Attack option\r\n case \"1\":\r\n //Lists the potential attacks the player can make\r\n System.out.println(\"\\t1) Basic Attack\");\r\n for(int i = 0; i < player1.getSpellList().length; i++){\r\n if(player1.spellList[i].equals(\"\")){\r\n break;\r\n }else{\r\n System.out.println(\"\\t\" + (i + 2) + \") \" + player1.spellList[i]);\r\n }\r\n }\r\n //Gets the user decision\r\n userChoice = getUserInput(\"What attack do you want to do? \\n(Type the name of the attack)\");\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Basic Attack option\r\n case \"Basic Attack\":\r\n //Calculates the remaining health of the devil\r\n Devil.setDevilCurrentHealth(Devil.getDevilCurrentHealth() - playerDamageDealt(player1.getTotalAttack(), Devil.getDevilDefense())); \r\n //Tells the user how much damage they dealt to the devil\r\n System.out.println(\"You dealt \" + playerDamageDealt(player1.getTotalAttack(), Devil.getDevilDefense()) + \" damage to the Devil!\"); \r\n //Tells the user how much health the devil has remaining\r\n System.out.println(\"The Devil has \" + Devil.getDevilCurrentHealth() + \"/\" + Devil.getDevilMaxHealth() + \" health left!\"); \r\n //Basic Attack break\r\n break;\r\n//******************************************************************************************************************************\r\n //Fireball option\r\n case \"Fireball\":\r\n //Creates fireball spell\r\n fireball Fireball = new fireball();\r\n //Calculates the fireball damage and calculates the devil health after taking damage\r\n Devil.setDevilCurrentHealth(Devil.getDevilCurrentHealth() - fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()));\r\n //Tells the user how much health the devil has remaining\r\n System.out.println(\"The Devil has \" + Devil.getDevilCurrentHealth() + \"/\" + Devil.getDevilMaxHealth() + \" health left!\"); \r\n //Tells the player how much damage they dealt\r\n System.out.println(\"You dealt \" + fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()) + \" damage with Fireball to the Devil\");\r\n //Reduces the players mp\r\n player1.setCurrentMP(player1.getCurrentMP() - fireballMPScale(Fireball.getMpCost(), player1.getPlayerLevel()));\r\n //Fireball break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n//******************************************************************************************************************************\r\n //Calculates the remaining health of the player\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() - monsterDamageDealt(Devil.getDevilAttack(), player1.getTotalDefense())); \r\n //Tells the player how much damage the devil dealt to the player\r\n System.out.println(\"The Devil dealt \" + monsterDamageDealt(Devil.getDevilAttack(), player1.getTotalDefense()) + \" damage to you!\"); \r\n //Tells the user how much health they have left\r\n System.out.println(\"You have \" + player1.getPlayerCurrentHealth() + \"/\" + player1.getPlayerMaxHealth() + \" health left!\");\r\n System.out.println(\"You have \" + player1.getCurrentMP() + \"/\" + player1.getMaxMP() + \" MP\");\r\n//******************************************************************************************************************************\r\n //Checks if the devil died\r\n if(Devil.getDevilCurrentHealth() <= 0){\r\n //Ends the battle while loop\r\n battle = false;\r\n //Tells the user they have killed the enemy\r\n System.out.println(\"You have killed the Devil!\");\r\n //Tells the user how much gold they gained\r\n System.out.println(\"You gained \" + Devil.getDevilGold() + \" gold\");\r\n //Adds the gold to the users gold amount\r\n player1.setPlayerGold(player1.getPlayerGold() + devilGoldScale(Devil.getDevilGold(), player1.getPlayerLevel()));\r\n //Tells the user how much experience they have gained\r\n System.out.println(\"You gain \" + Devil.getDevilExperience() + \" experience!\");\r\n //Calculates the player's experience\r\n player1.setPlayerExperience (experienceTally(player1.getPlayerExperience(), Devil.getDevilExperience()));\r\n //Function is called to determine the item dropped and stores it in variable\r\n loot = itemDrop(rand.nextInt(5));\r\n //Checks to see if an item was actually dropped\r\n if(loot.equals(\"\")){\r\n //Tells the user that no item was dropped\r\n System.out.println(\"No item dropped.\");\r\n }else{ \r\n //Places the item in the first open space in the player's inventory\r\n player1.setPlayerBag(placeInBag(loot,player1.getPlayerBag()));\r\n //Tells the user which item they god\r\n System.out.println(\"You got: \" + loot + \"!\");\r\n }\r\n }\r\n//******************************************************************************************************************************\r\n //Checks if the player has died\r\n if(player1.getPlayerCurrentHealth() <= 0){\r\n System.out.println(\"You have died\");\r\n //Exits the battle sequence\r\n battle = false;\r\n //Ends the game\r\n done = true;\r\n }\r\n //Attack option break\r\n break;\r\n//******************************************************************************************************************************\r\n //Run option\r\n case \"2\":\r\n //Runs from the battle and goes back to the main menu\r\n System.out.println(\"You have fled from the \" + encounterHolder);\r\n //Ends the battle sequence\r\n battle = false;\r\n //Run option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Devil encounter break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Blue Moon City\":\r\n Boolean visit = false;\r\n while(!visit){\r\n userChoice = getUserChoice(blueMoonMenu);\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //General Goods option\r\n case \"1\":\r\n blueMoonGeneralGoods BlueMoonGeneral = new blueMoonGeneralGoods();\r\n //Creates healing potion\r\n healingPotion HealingPotion = new healingPotion();\r\n //Creates greater healing potion\r\n greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion();\r\n //Populates the shopkeeper's inventory with items\r\n BlueMoonGeneral.setInventory(populateBlueMoonGeneral(BlueMoonGeneral.getInventory()));\r\n //Displays the shop menu and asks the player what they want to do\r\n userChoice = getUserChoice(blueMoonGeneralMenu);\r\n //Variable for shop loop\r\n Boolean shopExit = false;\r\n while(!shopExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Buy Item\r\n case \"1\":\r\n //Diplays the shop keeper inventory\r\n displayShopInventory(BlueMoonGeneral.getInventory());\r\n //Gets what item the user wants to buy\r\n String buyChoice = getUserInput(\"What item do you want to buy? \\n(Type the name of the item)\");\r\n switch(buyChoice){\r\n//******************************************************************************************************************************\r\n //Buy Healing Potion\r\n case \"Healing Potion\":\r\n //Checks to see if the player has the gold to buy the healing potion\r\n if(player1.getPlayerGold() >= HealingPotion.getHealingPotionBuyPrice()){\r\n //Subtracts the price of the healing potion from the player's gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - HealingPotion.getHealingPotionBuyPrice());\r\n //Puts the healing potion in the player's bag\r\n player1.setPlayerBag(placeInBag(\"Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a healing potion\r\n System.out.println(\"You bought Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n //If the player doesnt have the gold to buy a healing potino\r\n }else if(buyChoice.equals(\"Healing Potion\") && (player1.getPlayerGold() < HealingPotion.getHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a healing player\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n } \r\n//******************************************************************************************************************************\r\n //Buy Greater Healing Potion\r\n case \"Greater Healing Potion\":\r\n //Checks to see if the player has the gold to buy a greater healing potion\r\n if(player1.getPlayerGold() >= GreaterHealingPotion.getGreaterHealingPotionBuyPrice()){\r\n //Subtracts the price of the greater healing potino from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - GreaterHealingPotion.getGreaterHealingPotionBuyPrice());\r\n //Places the greater healing potion in the players bag\r\n player1.setPlayerBag(placeInBag(\"Greater Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a greater healing potion\r\n System.out.println(\"You bought Greater Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n //If they player doesnt have the gold to buy a greater healing potion\r\n }else if(buyChoice.equals(\"Greater Healing Potion\") && (player1.getPlayerGold() < GreaterHealingPotion.getGreaterHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a greater healing potion\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n }\r\n case \"Exit\":\r\n shopExit = true;\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n //Buy option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Sell Item\r\n case \"2\":\r\n //Variable to hold which item is being sold\r\n String itemSold;\r\n //Displays the items in the bag and asks for which item to sell\r\n itemSold = displayItemFromBag(player1.playerBag, \"Sell\");\r\n //Adds the value of the sold item to the player's gold\r\n player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold));\r\n //Removes the sold item from the player's bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold));\r\n //Tells the player which item they sold and how much gold they gained\r\n System.out.println(\"You sold: \" + itemSold);\r\n System.out.println(\"You gained: \" + sellGold(itemSold) + \" gold\");\r\n shopExit = true;\r\n //Sell option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit Item\r\n case \"3\":\r\n shopExit = true;\r\n //Sell option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n shopExit = true;\r\n break;\r\n }\r\n }\r\n //Blue Moon General Goods option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Blacksmith option\r\n case \"2\":\r\n blueMoonBlacksmith BlueMoonBlacksmith = new blueMoonBlacksmith();\r\n //Creates iron helmet\r\n ironHelmet IronHelmet = new ironHelmet();\r\n //Creates iron chest plate\r\n ironChestPlate IronChestPlate = new ironChestPlate();\r\n //Creates iron gloves\r\n ironGloves IronGloves = new ironGloves();\r\n //Creates iron boots\r\n ironBoots IronBoots = new ironBoots();\r\n //Populates the shopkeeper's inventory with items\r\n BlueMoonBlacksmith.setInventory(populateBlueMoonBlacksmith(BlueMoonBlacksmith.getInventory()));\r\n //Displays the shop menu and asks the player what they want to do\r\n displayShopInventory(BlueMoonBlacksmith.getInventory());\r\n userChoice = getUserChoice(blueMoonBlacksmithMenu);\r\n //Variable for shop loop\r\n Boolean blacksmithExit = false;\r\n while(!blacksmithExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Buy Item\r\n case \"1\":\r\n //Diplays the blacksmith inventory\r\n displayShopInventory(BlueMoonBlacksmith.getInventory());\r\n //Gets what item the user wants to buy\r\n String buyChoice = getUserInput(\"What item do you want to buy? \\n(Type the name of the item)\");\r\n switch(buyChoice){\r\n//******************************************************************************************************************************\r\n //Buy Iron Helmet\r\n case \"Iron Helmet\":\r\n //Checks to see if the player has the gold to buy the iron helmet\r\n if(player1.getPlayerGold() >= IronHelmet.getBuyPrice()){\r\n //Subtracts the price of the iron helmet from the player's gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronHelmet.getBuyPrice());\r\n //Puts the iron helmet in the player's bag\r\n player1.setPlayerBag(placeInBag(\"Iron Helmet\", player1.playerBag));\r\n //Tells the player they bought a iron helmet\r\n System.out.println(\"You bought Iron Helmet\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Helmet option break\r\n break;\r\n //If the player doesnt have the gold to buy a iron helmet\r\n }else if(buyChoice.equals(\"Iron Helmet\") && (player1.getPlayerGold() < IronHelmet.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron helmet\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Healing Potion option break\r\n break;\r\n } \r\n//******************************************************************************************************************************\r\n //Buy Iron Chest Plate\r\n case \"Iron Chest Plate\":\r\n //Checks to see if the player has the gold to buy a iron boots\r\n if(player1.getPlayerGold() >= IronChestPlate.getBuyPrice()){\r\n //Subtracts the price of the iron chest plate from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronChestPlate.getBuyPrice());\r\n //Places the iron chest plate in the players bag\r\n player1.setPlayerBag(placeInBag(\"Iron Chest Plate\", player1.playerBag));\r\n //Tells the player they bought a iron chest plate\r\n System.out.println(\"You bought Iron Chest Plate\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Boots option break\r\n break;\r\n //If they player doesnt have the gold to buy a iron chest plate\r\n }else if(buyChoice.equals(\"Iron Chest Plate\") && (player1.getPlayerGold() < IronChestPlate.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron chest plate\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Chest Plate option break\r\n break;\r\n }\r\n //Buy iron boots\r\n case \"Iron Boots\":\r\n //Checks to see if the player has the gold to buy a iron boots\r\n if(player1.getPlayerGold() >= IronBoots.getBuyPrice()){\r\n //Subtracts the price of the iron boots from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronBoots.getBuyPrice());\r\n //Places the iron boots in the players bag\r\n player1.setPlayerBag(placeInBag(\"Iron Boots\", player1.playerBag));\r\n //Tells the player they bought a iron boots\r\n System.out.println(\"You bought Iron Boots\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Boots option break\r\n break;\r\n //If they player doesnt have the gold to buy a iron boots\r\n }else if(buyChoice.equals(\"Iron Boots\") && (player1.getPlayerGold() < IronBoots.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron boots\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Boots option break\r\n break;\r\n }\r\n case \"Iron Gloves\":\r\n //Checks to see if the player has the gold to buy a iron gloves\r\n if(player1.getPlayerGold() >= IronGloves.getBuyPrice()){\r\n //Subtracts the price of the iron gloves from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronGloves.getBuyPrice());\r\n //Places the iron gloves in the players bag\r\n player1.setPlayerBag(placeInBag(\"Iron Gloves\", player1.playerBag));\r\n //Tells the player they bought a iron gloves\r\n System.out.println(\"You bought Iron Gloves\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Gloves option break\r\n break;\r\n //If they player doesnt have the gold to buy a iron gloves\r\n }else if(buyChoice.equals(\"Iron Gloves\") && (player1.getPlayerGold() < IronGloves.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron gloves\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Chest Plate option break\r\n break;\r\n }\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n break; \r\n }\r\n //Buy option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Sell Item\r\n case \"2\":\r\n //Variable to hold which item is being sold\r\n String itemSold;\r\n //Displays the items in the bag and asks for which item to sell\r\n itemSold = displayItemFromBag(player1.playerBag, \"Sell\");\r\n //Adds the value of the sold item to the player's gold\r\n player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold));\r\n //Removes the sold item from the player's bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold));\r\n //Tells the player which item they sold and how much gold they gained\r\n System.out.println(\"You sold: \" + itemSold);\r\n System.out.println(\"You gained: \" + sellGold(itemSold) + \" gold\");\r\n blacksmithExit = true;\r\n //Sell option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit Item\r\n case \"3\":\r\n blacksmithExit = true;\r\n //Sell option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n blacksmithExit = true;\r\n break;\r\n }\r\n }\r\n //Blue Moon Blacksmith option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Magic Shop option\r\n case \"3\":\r\n //Blue Moon Magic Shop option 3 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Guild option\r\n case \"4\":\r\n blueMoonGuild BlueMoonGuild = new blueMoonGuild();\r\n //Populates the shopkeeper's inventory with items\r\n BlueMoonGuild.setQuestList(populateBlueMoonGuild(BlueMoonGuild.getQuestList()));\r\n //Displays the guild menu and asks the player what they want to do\r\n userChoice = getUserChoice(blueMoonGuildMenu);\r\n //Variable for guild loop\r\n Boolean guildExit = false;\r\n while(!guildExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Accept Quest\r\n case \"1\":\r\n displayQuestList(BlueMoonGuild.getQuestList());\r\n String questChoice = getUserInput(\"What quest do you want to accept? Type in the name of the quest.\");\r\n switch(questChoice){\r\n case \"Kill Skeletons\":\r\n player1.setQuestList(placeQuest(player1.getQuestList(), \"Kill Skeletons\"));\r\n System.out.println(\"You have accepted the quest: Kill Skeletons\");\r\n guildExit = true;\r\n break;\r\n }\r\n //Accept quest option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Drop Quest\r\n case \"2\":\r\n //Drop quest option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Turn in quest option \r\n case \"3\":\r\n break;\r\n case \"4\":\r\n guildExit = true;\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n break;\r\n }\r\n }\r\n //Blue Moon Magic Shop option 4 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit option\r\n case \"5\":\r\n visit = true;\r\n //Blue Moon Exit option 5 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Blue Moon Encounter break;\r\n break;\r\n default:\r\n //Encounter break\r\n break;\r\n }\r\n //Search option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Starts the stats sequence\r\n case \"2\":\r\n //Displays the player stats\r\n displayPlayerStats(playerStats, player1.getPlayerHelmet(), player1.getPlayerChestPlate(), player1.getPlayerWeapon(), player1.getPlayerGloves(), player1.getPlayerBoots());\r\n userChoice = getUserChoice(statMenu);\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Allocate Stats option\r\n case \"1\":\r\n userChoice = getUserChoice(allocateStatMenu);\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Add Strength\r\n case \"1\":\r\n //Checks to see if the player has a stat point to spend\r\n if(player1.getStatPoints() > 0){\r\n //Removes stat point\r\n player1.setStatPoints(removeStatPoints(player1.getStatPoints()));\r\n //Increases strength by 1\r\n player1.setStrength(gainStrength(player1.getStrength())); \r\n }else{\r\n //Tells the player they dont have any stat points to spend\r\n System.out.println(\"You don't have any stat points to allocate.\");\r\n }\r\n //Strength option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Add Intelligence\r\n case \"2\":\r\n //Checks to see if the player has a stat point to spend\r\n if(player1.getStatPoints() > 0){\r\n //Removes stat point\r\n player1.setStatPoints(removeStatPoints(player1.getStatPoints()));\r\n //Increases intelligence by 1\r\n player1.setIntelligence(gainIntelligence(player1.getIntelligence()));\r\n //Increases the players max mp based on intelligence\r\n player1.setMaxMP(maxMp(player1.getMaxMP()));\r\n }else{\r\n //Tells the player they dont have any stat points to spend\r\n System.out.println(\"You don't have any stat points to allocate.\");\r\n }\r\n //Intelligence option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Add Vitality\r\n case \"3\":\r\n //Checks to see if the player has a stat point to spend\r\n if(player1.getStatPoints() > 0){\r\n //Removes stat point\r\n player1.setStatPoints(removeStatPoints(player1.getStatPoints()));\r\n //Increases vitality by 1\r\n player1.setVitality(gainVitality(player1.getVitality()));\r\n //Increases the players max health base on vitality\r\n player1.setPlayerMaxHealth(maxHealth(player1.getPlayerMaxHealth()));\r\n }else{\r\n //Tells the player they dont have any stat points to spend\r\n System.out.println(\"You don't have any stat points to allocate.\");\r\n }\r\n //Vitality opion 3 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Cancel\r\n case \"4\":\r\n //Cancel option 4 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n //Allocate stats option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exits the stat menu\r\n case \"2\":\r\n //Exit option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n //Stats option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"3\":\r\n //Variable to store spell exit\r\n Boolean spellExit = false;\r\n //Loop to display spell list\r\n while(!spellExit){\r\n //Display spell list\r\n displayBag(player1.getSpellList());\r\n //Get user choice\r\n userChoice = getUserChoice(spellMenu);\r\n switch(userChoice){\r\n //Exit option\r\n case \"1\":\r\n spellExit = true;\r\n //Exit option 1 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Spells option 3 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Starts the bag sequence\r\n case \"4\":\r\n //Variable for the bag sequence\r\n Boolean bagExit = false;\r\n //Variable to hold which item to equip\r\n String itemChosen;\r\n //Variable to hold which item was in the equipment slot\r\n String previousItem;\r\n //Enters the bag sequence based on user response\r\n while(!bagExit){\r\n //Displays the player's bag\r\n displayBag(player1.getPlayerBag());\r\n //Displays the bag menu\r\n userChoice = getUserChoice(bagMenu);\r\n //Checks user choice\r\n switch(userChoice){\r\n //Equip an item sequence\r\n case \"1\":\r\n //Runs function to choose an item to equip\r\n itemChosen = displayItemFromBag(player1.playerBag, \"Equip\");\r\n //Checks which item was chosen to equip\r\n switch(itemChosen){\r\n//******************************************************************************************************************************\r\n //If helmet was chosen to equip\r\n case \"Leather Helmet\":\r\n //Checks to see if a helmet is already equipped\r\n if(!player1.playerHelmet[0].equals(\"\")){\r\n //Puts the already equipped item in a variable\r\n previousItem = player1.playerHelmet[0];\r\n //Puts the previously equipped item into the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the newly equipped item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the item chosen\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Leather Helmet\");\r\n //Helmet option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If chest player was chosen to equip\r\n case \"Leather Chest Plate\":\r\n //Checks to see if a chest plate is already equipped\r\n if(!player1.playerChestPlate[0].equals(\"\")){\r\n //Puts the already equipped item in a variable\r\n previousItem = player1.playerChestPlate[0];\r\n //Puts the previously equipped item into the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the newly equipped item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the item chosen\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Leather Chest Plate\");\r\n //Chest Plate option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If short sword was chosen to equip\r\n case \"Short Sword\":\r\n //Checks to see if a weapon is already equipped\r\n if(!player1.playerWeapon[0].equals(\"\")){\r\n //Puts the already equipped item in a variable\r\n previousItem = player1.playerWeapon[0];\r\n //Puts the previously equipped item into the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the newly equipped item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the item chosen\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Short Sword\");\r\n //Short Sword option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If long sword was chosen to equip\r\n case \"Long Sword\":\r\n //Checks to see if a weapon is already equipped\r\n if(!player1.playerWeapon[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerWeapon[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped \r\n }else{\r\n //Equips the selected item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Long Sword\");\r\n //Long Sword option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If great sword was selected\r\n case \"Great Sword\":\r\n //Checks to see if a weapon is already equipped\r\n if(!player1.playerWeapon[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerWeapon[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped GreatSword\");\r\n //Great Sword option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron helmet was selected\r\n case \"Iron Helmet\":\r\n //Checks to see if a helmet is already equipped\r\n if(!player1.playerHelmet[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerHelmet[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Helmet\");\r\n //Iron Helmet option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron chest plate was selected\r\n case \"Iron Chest Plate\":\r\n //Checks to see if a chest plate is already equipped\r\n if(!player1.playerChestPlate[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerChestPlate[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Chest Plate\");\r\n //Iron Chest Plate option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron boots was selected\r\n case \"Iron Boots\":\r\n //Checks to see if a boots is already equipped\r\n if(!player1.playerBoots[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerBoots[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerBoots[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerBoots[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Boots\");\r\n //Iron Boots option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron gloves was selected\r\n case \"Iron Gloves\":\r\n //Checks to see if a gloves is already equipped\r\n if(!player1.playerGloves[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerGloves[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerGloves[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerGloves[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Gloves\");\r\n //Iron Gloves option break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Exit\":\r\n //Exit option break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\"); \r\n }\r\n //Equip option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Use Item\r\n case \"2\":\r\n //Displays the useable items from the bag\r\n itemChosen = displayItemFromBag(player1.playerBag, \"Use\");\r\n switch(itemChosen){\r\n//******************************************************************************************************************************\r\n //Use healing potion\r\n case \"Healing Potion\":\r\n //Creates a healing potion\r\n healingPotion HealingPotion = new healingPotion();\r\n //Checks to see if the player is injured\r\n if(player1.getPlayerCurrentHealth() < player1.getPlayerMaxHealth()){\r\n //Tells the player they used a healing potion\r\n System.out.println(\"You used \" + itemChosen);\r\n //Removes the healing potion from the players bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //Checks if the players missing health is less than the health restored by the healing potion\r\n if((player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth() < HealingPotion.getHealthGained())){\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + (player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth()) + \" health\");\r\n //Sets the players health to max\r\n player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth());\r\n //If the players missing health is greater than the health restored by the healing potion\r\n }else{\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + HealingPotion.getHealthGained() + \" health\");\r\n //Restores the players health by the amount given by the healing potion\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() + HealingPotion.getHealthGained());\r\n }\r\n //If you are not injured\r\n }else{\r\n //Tells the player they cannot use a healing potion\r\n System.out.println(\"You are at full health and cannot use that item\");\r\n }\r\n //Healing Potion option break\r\n break;\r\n//******************************************************************************************************************************\r\n //Use Greater Healing Potion\r\n case \"Greater Healing Potion\":\r\n //Creates a greater healing potion\r\n greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion();\r\n //Checks to see if the player is injured\r\n if(player1.getPlayerCurrentHealth() < player1.getPlayerMaxHealth()){\r\n //Tells the player they used a greater healing potion\r\n System.out.println(\"You used \" + itemChosen);\r\n //Removes the greater healing potion from the players bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If the players missing health is less than the health restored by the greater healing potion\r\n if((player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth() < GreaterHealingPotion.getHealthGained())){\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + (player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth()) + \" health\");\r\n //Restores the player to max health\r\n player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth());\r\n //If they players missing health is greater than the health restored by the greater healing potion\r\n }else{\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + GreaterHealingPotion.getHealthGained() + \" health\");\r\n //Restores the players health by the amount given by the greater healing potion\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() + GreaterHealingPotion.getHealthGained());\r\n }\r\n //If the player is not injured\r\n }else{\r\n //Tells the player they cannot use a greater healing potion\r\n System.out.println(\"You are at full health and cannot use that item\");\r\n }\r\n //Greater Healing Potion option break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Scroll of Fireball\":\r\n //Removes scroll of fireball from bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //Tells the player they have learned the fireball spell\r\n System.out.println(\"You have learned: Fireball\");\r\n //Add fireball to spell list\r\n player1.setSpellList(placeInBag(\"Fireball\", player1.getSpellList()));\r\n //Scroll of Fireball option break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Exit\":\r\n //Exit option break\r\n break;\r\n default:\r\n System.out.println(\"Invalid Option. Try again.\");\r\n }//Use option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit\r\n case \"3\":\r\n //Exits the bag sequence\r\n bagExit = true;\r\n //Exit option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }//Bag option 4 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Quests Menu\r\n case \"5\":\r\n Boolean questExit = false;\r\n while(!questExit){\r\n //Displays the bag menu\r\n userChoice = getUserChoice(questMenu);\r\n //Checks user choice\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Check quest option\r\n case \"1\":\r\n //Displays the player's bag\r\n displayQuest(player1.getQuestList());\r\n String questChoice = getUserInput(\"Which quest do you want to check? Type in the name of the quest.\");\r\n String[] questList = new String[16];\r\n questList = player1.getQuestList();\r\n switch(questChoice){\r\n /*case \"Kill Skeletons\":\r\n for(int i = 0; i < questList.length; i++){\r\n if(questList[1].getName().equals(\"Kill Skeletons\")){\r\n killSkeletonQuest kSQ = questList[1];\r\n if(kSQ.isQuestComplete().equals(\"false\")){\r\n System.out.println(\"Quest Status: Incomplete\");\r\n } else {\r\n System.out.println(\"Quest Status: Complete\");\r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"\");\r\n break;*/\r\n }\r\n //Check quest option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit option\r\n case \"2\":\r\n questExit = true;\r\n //Exit option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n break;\r\n }\r\n }\r\n break;\r\n//***************************************************************************************************************************\r\n //Starts the shop sequence\r\n case \"6\":\r\n //Creates the shopkeeper\r\n shopKeeper ShopKeeper = new shopKeeper();\r\n //Creates healing potion\r\n healingPotion HealingPotion = new healingPotion();\r\n //Creates greater healing potion\r\n greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion();\r\n //Creates long sword\r\n longSword LongSword = new longSword();\r\n //Creates great sword\r\n greatSword GreatSword = new greatSword();\r\n //Populates the shopkeeper's inventory with items\r\n ShopKeeper.setShopKeeperInventory(populateShopKeeperInventory(ShopKeeper.getShopKeeperInventory()));\r\n //Displays the shop menu and asks the player what they want to do\r\n userChoice = getUserChoice(shopMenu);\r\n //Variable for shop loop\r\n Boolean shopExit = false;\r\n while(!shopExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Buy item\r\n case \"1\":\r\n //Diplays the shop keeper inventory\r\n displayShopInventory(ShopKeeper.getShopKeeperInventory());\r\n //Gets what item the user wants to buy\r\n String buyChoice = getUserInput(\"What item do you want to buy? \\n(Type the name of the item)\");\r\n switch(buyChoice){\r\n//******************************************************************************************************************************\r\n //Buys healing potion\r\n case \"Healing Potion\":\r\n //Checks to see if the player has the gold to buy the healing potion\r\n if(player1.getPlayerGold() >= HealingPotion.getHealingPotionBuyPrice()){\r\n //Subtracts the price of the healing potion from the player's gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - HealingPotion.getHealingPotionBuyPrice());\r\n //Puts the healing potion in the player's bag\r\n player1.setPlayerBag(placeInBag(\"Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a healing potion\r\n System.out.println(\"You bought Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n //If the player doesnt have the gold to buy a healing potino\r\n }else if(buyChoice.equals(\"Healing Potion\") && (player1.getPlayerGold() < HealingPotion.getHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a healing player\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n } \r\n//******************************************************************************************************************************\r\n //Buys a greater healing potion\r\n case \"Greater Healing Potion\":\r\n //Checks to see if the player has the gold to buy a greater healing potion\r\n if(player1.getPlayerGold() >= GreaterHealingPotion.getGreaterHealingPotionBuyPrice()){\r\n //Subtracts the price of the greater healing potino from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - GreaterHealingPotion.getGreaterHealingPotionBuyPrice());\r\n //Places the greater healing potion in the players bag\r\n player1.setPlayerBag(placeInBag(\"Greater Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a greater healing potion\r\n System.out.println(\"You bought Greater Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n //If they player doesnt have the gold to buy a greater healing potion\r\n }else if(buyChoice.equals(\"Greater Healing Potion\") && (player1.getPlayerGold() < GreaterHealingPotion.getGreaterHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a greater healing potion\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n }\r\n//***************************************************************************************************************************\r\n //Buys a long sword\r\n case \"Long Sword\":\r\n //Checks if the player has enough gold to buy a long sword\r\n if(player1.getPlayerGold() >= LongSword.getBuyPrice()){\r\n //Subtracts the price of the long sword from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - LongSword.getBuyPrice());\r\n //Places the long sword in the players bag\r\n player1.setPlayerBag(placeInBag(\"Long Sword\", player1.playerBag));\r\n //Tells the player they bought a long sword\r\n System.out.println(\"You bought Long Sword\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Long Sword option break\r\n break;\r\n //If the player doesnt have the gold to buy a long sword\r\n }else if(buyChoice.equals(\"Long Sword\") && (player1.getPlayerGold() < LongSword.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a long sword\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Long Sword option break\r\n break;\r\n }\r\n//****************************************************************************************************************************\r\n //Buys a great sword\r\n case \"Great Sword\":\r\n //Checks if teh player has enough gold to buy a great sword\r\n if(player1.getPlayerGold() >= GreatSword.getBuyPrice()){\r\n //Subtracts the price of the great sword from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - GreatSword.getBuyPrice());\r\n //Places the great sword in the players bag\r\n player1.setPlayerBag(placeInBag(\"Great Sword\", player1.playerBag));\r\n //Tells the player they bought a great sword\r\n System.out.println(\"You bought Great Sword\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Great Sword option break\r\n break;\r\n //If the player doesnt have the gold to buy a great sword\r\n }else if(buyChoice.equals(\"Great Sword\") && (player1.getPlayerGold() < GreatSword.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a great sword\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Great Sword option break\r\n break;\r\n }\r\n //If any other option is typed\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n shopExit = true;\r\n break;\r\n }\r\n //Buy option 1 break\r\n break;\r\n//****************************************************************************************************************************\r\n //Sell item\r\n case \"2\":\r\n //Variable to hold which item is being sold\r\n String itemSold;\r\n //Displays the items in the bag and asks for which item to sell\r\n itemSold = displayItemFromBag(player1.playerBag, \"Sell\");\r\n //Adds the value of the sold item to the player's gold\r\n player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold));\r\n //Removes the sold item from the player's bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold));\r\n //Tells the player which item they sold and how much gold they gained\r\n System.out.println(\"You sold: \" + itemSold);\r\n System.out.println(\"You gained: \" + sellGold(itemSold) + \" gold\");\r\n shopExit = true;\r\n //Sell option 2 break\r\n break;\r\n//***************************************************************************************************************************\r\n //Exit shop\r\n case \"3\":\r\n shopExit = true;\r\n //Exit option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n break;\r\n//****************************************************************************************************************************\r\n //Starts the test sequence\r\n case \"7\":\r\n player1.setPlayerLevel(7);\r\n //Test option 6 break\r\n break;\r\n//****************************************************************************************************************************\r\n //Exits out of the game\r\n case \"8\":\r\n System.out.println(\"Exiting the game\");\r\n done = true;\r\n //Exit option 7 break\r\n break;\r\n //Tells the user to try again\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n System.out.println(\"\\nProgram Complete\");\r\n }",
"void addUses(Equipment newUses);",
"private void openChest(Command command)\n {\n String chest = command.getSecondWord();\n if(chest == null){\n System.out.println(\"Open what?\");\n }\n //individual use methods for each item in the game\n else if(chest.equals(\"chest\") && currentRoom.equals(castle)){\n System.out.println(\"You died. Mighty unfortunate.\");\n alive = false;\n }\n else if(chest.equals(\"chest\") && currentRoom.equals(ossuary)){\n System.out.println(\"Well aren't you a lucky lucky person.\" + \"\\n\");\n System.out.println(\"*silver sword appeared!*\" + \"\\n\" + \"*potion appeared!*\" + \"\\n\");\n ossuary.setWeapon(silverSword);\n ossuary.setItem(potion);\n }\n }",
"@Override\n\tpublic IMessage onMessage(Message message, MessageContext ctx)\n\t{\n\t\tif (ctx.side.isServer())\n\t\t{\n\t\t\tint eventID = message.eventID;\n\t\t\tEntityPlayer entityplayer = ctx.getServerHandler().playerEntity;\n\t\t\t\n\t\t\tif(eventID == 0){\n \t\t// Note: the following long line of code gets the itemstack in a roundabout way because it needs\n \t\t// to access the tile entity rather than the container to actually get to the items.\n\t \tTileEntityArcaneWorkbench tileentity = ((ContainerArcaneWorkbench)entityplayer.openContainer).tileEntityArcaneWorkbench;\n\t \t\n\t \tItemStack wand = tileentity.getStackInSlot(ContainerArcaneWorkbench.WAND_SLOT);\n\t \tItemStack[] spellBooks = new ItemStack[ContainerArcaneWorkbench.CRYSTAL_SLOT];\n\t \tfor(int i=0; i<spellBooks.length; i++){\n\t \t\tspellBooks[i] = tileentity.getStackInSlot(i);\n\t \t}\n\t \tItemStack crystals = tileentity.getStackInSlot(ContainerArcaneWorkbench.CRYSTAL_SLOT);\n\t \tItemStack upgrade = tileentity.getStackInSlot(ContainerArcaneWorkbench.UPGRADE_SLOT);\n\t \t\n\t \t// Since the workbench now accepts armour as well as wands, this check is needed.\n\t \tif(wand != null && wand.getItem() instanceof ItemWand){\n\t \t\t\n\t \t\t// Upgrades wand if necessary. Damage is copied, preserving remaining durability,\n\t \t\t// and also the entire NBT tag compound.\n \t\t\tif(upgrade != null){\n \t\t\t\t\n \t\t\t\tif(upgrade.getItem() == Wizardry.arcaneTome){\n \t\t\t\t\t\n \t\t\t\t\tItemStack newWand;\n \t\t\t\t\t\n\t \t\t\t\tswitch(EnumTier.values()[upgrade.getItemDamage()]){\n\n\t\t\t\t\t\t\tcase APPRENTICE: \n\t\t\t\t\t\t\t\tif(((ItemWand)wand.getItem()).tier == EnumTier.BASIC){\n\t\t\t\t\t\t\t\t\tnewWand = new ItemStack(WizardryUtilities.getWand(EnumTier.values()[upgrade.getItemDamage()], ((ItemWand)wand.getItem()).element));\n\t\t\t\t\t\t\t\t\tnewWand.stackTagCompound = wand.stackTagCompound;\n\t\t\t\t\t\t\t\t\t// This needs to be done after copying the tag compound so the max damage for the new wand takes storage\n\t\t\t\t\t\t\t\t\t// upgrades into account.\n\t\t\t\t\t\t\t\t\tnewWand.setItemDamage(newWand.getMaxDamage() - (wand.getMaxDamage() - wand.getItemDamage()));\n\t\t\t\t\t\t\t\t\ttileentity.setInventorySlotContents(ContainerArcaneWorkbench.WAND_SLOT, newWand);\n\t\t\t\t\t\t\t\t\ttileentity.setInventorySlotContents(ContainerArcaneWorkbench.UPGRADE_SLOT, null);\n\t\t\t\t\t\t\t\t\tentityplayer.addStat(Wizardry.apprentice, 1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase ADVANCED: \n\t\t\t\t\t\t\t\tif(((ItemWand)wand.getItem()).tier == EnumTier.APPRENTICE){\n\t\t\t\t\t\t\t\t\tnewWand = new ItemStack(WizardryUtilities.getWand(EnumTier.values()[upgrade.getItemDamage()], ((ItemWand)wand.getItem()).element));\n\t\t\t\t\t\t\t\t\tnewWand.stackTagCompound = wand.stackTagCompound;\n\t\t\t\t\t\t\t\t\tnewWand.setItemDamage(newWand.getMaxDamage() - (wand.getMaxDamage() - wand.getItemDamage()));\n\t\t\t\t\t\t\t\t\ttileentity.setInventorySlotContents(ContainerArcaneWorkbench.WAND_SLOT, newWand);\n\t\t\t\t\t\t\t\t\ttileentity.setInventorySlotContents(ContainerArcaneWorkbench.UPGRADE_SLOT, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase MASTER:\n\t\t\t\t\t\t\t\tif(((ItemWand)wand.getItem()).tier == EnumTier.ADVANCED){\n\t\t\t\t\t\t\t\t\tnewWand = new ItemStack(WizardryUtilities.getWand(EnumTier.values()[upgrade.getItemDamage()], ((ItemWand)wand.getItem()).element));\n\t\t\t\t\t\t\t\t\tnewWand.stackTagCompound = wand.stackTagCompound;\n\t\t\t\t\t\t\t\t\tnewWand.setItemDamage(newWand.getMaxDamage() - (wand.getMaxDamage() - wand.getItemDamage()));\n\t\t\t\t\t\t\t\t\ttileentity.setInventorySlotContents(ContainerArcaneWorkbench.WAND_SLOT, newWand);\n\t\t\t\t\t\t\t\t\ttileentity.setInventorySlotContents(ContainerArcaneWorkbench.UPGRADE_SLOT, null);\n\t\t\t\t\t\t\t\t\tentityplayer.addStat(Wizardry.master, 1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tbreak;\n\t \t\t\t\t}\n\t \t\t\t\t\n\t \t\t\t\t// This needs to happen so the charging works on the new wand, not the old one.\n\t \t\t\t\twand = tileentity.getStackInSlot(ContainerArcaneWorkbench.WAND_SLOT);\n \t\t\t\t\n \t\t\t\t}else{\n\n \t\t\t\t\t// Special upgrades\n \t\t\t\t\t\n \t\t\t\t\t// Used to preserve existing mana when upgrading storage rather than creating free mana.\n \t\t\t\t\tint prevMana = wand.getMaxDamage() - wand.getItemDamage();\n \t\t\t\t\t\n \t\t\t\t\tif(WandHelper.getTotalUpgrades(wand) < ((ItemWand)wand.getItem()).tier.upgradeLimit\n \t\t\t\t\t\t\t&& WandHelper.getUpgradeLevel(wand, upgrade.getItem()) < Wizardry.UPGRADE_STACK_LIMIT){\n \t\t\t\t\t\t\n \t\t\t\t\t\tWandHelper.applyUpgrade(wand, upgrade.getItem());\n \t\t\t\t\t\t\n \t\t\t\t\t\t// Special behaviours for specific upgrades\n\t \t\t\t\t\tif(upgrade.getItem() == Wizardry.storageUpgrade){\n\t \t\t\t\t\t\twand.setItemDamage(wand.getMaxDamage() - prevMana);\n\t \t\t\t\t\t}\n\t \t\t\t\t\tif(upgrade.getItem() == Wizardry.attunementUpgrade){\n\t \t\t\t\t\t\t\n\t\t \t\t\t\t\tSpell[] spells = WandHelper.getSpells(wand);\n\t\t \t\t\t\t\tSpell[] newSpells = new Spell[5 + WandHelper.getUpgradeLevel(wand, Wizardry.attunementUpgrade)];\n\t\t \t\t\t\t\t\n\t\t \t\t\t\t\tfor(int i=0; i<newSpells.length; i++){\n\t\t \t\t\t\t\t\t// Prevents both NPEs and AIOOBEs\n\t\t\t \t\t\t\t\tnewSpells[i] = i < spells.length && spells[i] != null ? spells[i] : WizardryRegistry.none;\n\t\t\t \t\t\t\t}\n\t\t \t\t\t\t\t\n\t\t \t\t\t\t\tWandHelper.setSpells(wand, newSpells);\n\t\t \t\t\t\t\t\n\t\t \t\t\t\t\tint[] cooldown = WandHelper.getCooldowns(wand);\n\t\t \t\t\t\t\tint[] newCooldown = new int[5 + WandHelper.getUpgradeLevel(wand, Wizardry.attunementUpgrade)];\n\t\t \t\t\t\t\t\n\t\t \t\t\t\t\tif(cooldown.length > 0){\n\t\t \t\t\t\t\t\tfor(int i=0; i<cooldown.length; i++){\n\t\t\t \t\t\t\t\t\tnewCooldown[i] = cooldown[i];\n\t\t\t \t\t\t\t\t}\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t\t\n\t\t \t\t\t\t\tWandHelper.setCooldowns(wand, newCooldown);\n\t \t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\ttileentity.decrStackSize(ContainerArcaneWorkbench.UPGRADE_SLOT, 1);\n \t\t\t\t\t\tentityplayer.addStat(Wizardry.specialUpgrade, 1);\n \t\t\t\t\t\t\n \t\t\t\t\t\tif(WandHelper.getTotalUpgrades(wand) == EnumTier.MASTER.upgradeLimit){\n \t\t\t\t\t\tentityplayer.addStat(Wizardry.maxOutWand, 1);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// Reads NBT spell id array to variable, edits this, then writes it back to NBT.\n \t\t\t// Original spells are preserved; if a slot is left empty the existing spell binding will remain.\n \t\t\t// Accounts for spells which cannot be applied because they are above the wand's tier; these spells\n \t\t\t// will not bind but the existing spell in that slot will remain and other applicable spells will\n \t\t\t// be bound as normal, along with any upgrades and crystals.\n \t\t\tSpell[] spells = WandHelper.getSpells(wand);\n \t\t\tif(spells.length <= 0){\n \t\t\t\t// 5 here because if the spell array doesn't exist, the wand can't possibly have attunement upgrades\n \t\t\t\tspells = new Spell[5];\n \t\t\t}\n \t\t\tfor(int i=0; i<spells.length; i++){\n \t\t\t\tif(spellBooks[i] != null && !(Spell.get(spellBooks[i].getItemDamage()).tier.level > ((ItemWand)wand.getItem()).tier.level)){\n \t\t\t\t\tspells[i] = Spell.get(spellBooks[i].getItemDamage());\n \t\t\t\t}\n \t\t\t}\n \t\t\tWandHelper.setSpells(wand, spells);\n \t\t\t\n \t\t\t// Charges wand by appropriate amount\n \t\t\tif(crystals != null){\n\t \t\t\tint chargeDepleted = wand.getItemDamage();\n\t\t \t\t//System.out.println(\"Charge depleted: \" + chargeDepleted);\n\t\t \t\t//System.out.println(\"Crystals found: \" + crystals.stackSize);\n\t \t\t\tif(crystals.stackSize * Wizardry.MANA_PER_CRYSTAL < chargeDepleted){\n\t \t \t\t//System.out.println(\"charging\");\n\t \t\t\t\twand.setItemDamage(chargeDepleted - crystals.stackSize * Wizardry.MANA_PER_CRYSTAL);\n\t \t\t\t\ttileentity.decrStackSize(ContainerArcaneWorkbench.CRYSTAL_SLOT, crystals.stackSize);\n\t \t\t\t}else if(chargeDepleted != 0){\n\t \t\t\t\t//System.out.println((int)Math.ceil(((double)chargeDepleted)/50));\n\t \t\t\t\ttileentity.decrStackSize(ContainerArcaneWorkbench.CRYSTAL_SLOT, (int)Math.ceil(((double)chargeDepleted)/Wizardry.MANA_PER_CRYSTAL));\n\t \t\t\t\twand.setItemDamage(0);\n\t \t\t\t}\n\t \t\t}\n \t\t\n \t\t// Armour\n\t \t}else if(wand != null && wand.getItem() instanceof ItemWizardArmour){\n\t \t\t// Applies legendary upgrade\n\t \t\tif(upgrade != null && upgrade.getItem() == Wizardry.armourUpgrade){\n\t \t\t\tif(!wand.hasTagCompound()){\n\t \t\t\t\twand.stackTagCompound = new NBTTagCompound();\n\t \t\t\t}\n\t \t\t\tif(!wand.stackTagCompound.hasKey(\"legendary\")){\n\t \t\t\t\twand.stackTagCompound.setBoolean(\"legendary\", true);\n\t \t\t\t\ttileentity.setInventorySlotContents(ContainerArcaneWorkbench.UPGRADE_SLOT, null);\n\t \t\t\tentityplayer.triggerAchievement(Wizardry.legendary);\n\t \t\t\t}\n\t \t\t}\n\t \t\t// Charges armour by appropriate amount\n \t\t\tif(crystals != null){\n\t \t\t\tint chargeDepleted = wand.getItemDamage();\n\t \t\t\tif(crystals.stackSize * Wizardry.MANA_PER_CRYSTAL < chargeDepleted){\n\t \t\t\t\twand.setItemDamage(chargeDepleted - crystals.stackSize * Wizardry.MANA_PER_CRYSTAL);\n\t \t\t\t\ttileentity.decrStackSize(ContainerArcaneWorkbench.CRYSTAL_SLOT, crystals.stackSize);\n\t \t\t\t}else if(chargeDepleted != 0){\n\t \t\t\t\ttileentity.decrStackSize(ContainerArcaneWorkbench.CRYSTAL_SLOT, (int)Math.ceil(((double)chargeDepleted)/Wizardry.MANA_PER_CRYSTAL));\n\t \t\t\t\twand.setItemDamage(0);\n\t \t\t\t}\n\t \t\t}\n \t\t\t\n \t\t// Scrolls\n\t \t}else if(wand != null && wand.getItem() == Wizardry.blankScroll){\n\t \t\t// Spells can only be bound to scrolls if the player has already cast them (prevents casting of master spells without getting a master wand)\n\t \t\t// This restriction does not apply in creative mode\n\t \t\tif(spellBooks[0] != null && (entityplayer.capabilities.isCreativeMode || (ExtendedPlayer.get(entityplayer) != null\n\t \t\t\t\t&& ExtendedPlayer.get(entityplayer).hasSpellBeenDiscovered(Spell.get(spellBooks[0].getItemDamage()))))\n\t \t\t\t\t&& crystals != null && crystals.stackSize * Wizardry.MANA_PER_CRYSTAL > Spell.get(spellBooks[0].getItemDamage()).cost){\n\n \t\t\t\ttileentity.decrStackSize(ContainerArcaneWorkbench.CRYSTAL_SLOT, (int)Math.ceil(((double)Spell.get(spellBooks[0].getItemDamage()).cost)/Wizardry.MANA_PER_CRYSTAL));\n \t\t\t\ttileentity.setInventorySlotContents(ContainerArcaneWorkbench.WAND_SLOT, new ItemStack(Wizardry.scroll, 1, spellBooks[0].getItemDamage()));\n \t\t\t\tspellBooks[0].stackSize--;\n \t\t\t\t}\n\t \t}\n\t \t\n\t //////////////////////////////////////////////////////////////////////////////////////////////\t\n\t \t\n\t }else if(eventID == 1){\n\t \tif(entityplayer.inventory.getCurrentItem() != null &&\n\t \t\t \tentityplayer.inventory.getCurrentItem().getItem() instanceof ItemWand){\n\t \t\t\n\t\t \tItemStack wand = entityplayer.inventory.getCurrentItem();\n\t\t \t\n\t\t \t\t\tif(wand != null) WandHelper.selectNextSpell(wand);\n\t\t \t\t\t\n\t\t \t\t\t// This line fixes the bug with continuous spells casting when they shouldn't be\n\t\t \t\t\tentityplayer.clearItemInUse();\n\t }\n\t \t\n\t //////////////////////////////////////////////////////////////////////////////////////////////\n\t \t\n\t }else if(eventID == 2){\n\t \tif(entityplayer.inventory.getCurrentItem() != null &&\n\t\t \t\t entityplayer.inventory.getCurrentItem().getItem() instanceof ItemWand){\n\t \t\t\n\t\t \tItemStack wand = entityplayer.inventory.getCurrentItem();\n\t\t \t\t\t\n\t\t \tif(wand != null) WandHelper.selectPreviousSpell(wand);\n\n\t\t \t\t\t// This line fixes the bug with continuous spells casting when they shouldn't be\n\t\t \t\t\tentityplayer.clearItemInUse();\n\t \t}\n\t }\n\t\t}\n\n\t\treturn null;\n\t}",
"@InvokeEvent\n public void onAttack(PlayerAttackEntityEvent event) {\n int multiplier = Configuration.INSTANCE.getMultiplier();\n // Create a variable for the entity.\n Entity entity = event.getEntity();\n // Create a variable for Minecraft#thePlayer\n EntityPlayer player = Minecraft.getMinecraft().thePlayer;\n // Check if the player is null, multiplier is 1 or Configuration#isMultiplyOnAnimals() is false.\n if (player == null || multiplier == 1 || !Configuration.INSTANCE.isMultiplyOnAnimals()) return;\n // Check if the attack was critical.\n boolean critical = player.fallDistance > 0.0f && !player.onGround && !player.isOnLadder() && !player.isInWater() && !player.isPotionActive(Potion.blindness) && player.ridingEntity == null;\n // Create a float to get the EMD (Enchantment Modifier Damage).\n float enchantment = EnchantmentHelper.getEnchantmentModifierDamage(new ItemStack[]{player.getHeldItem()}, new EntityDamageSource(\"player\", player));\n // Create a for statement which loops for the length of the multiplier and runs the code inside.\n for (int i = 1; i < multiplier; ++i) {\n // Checks if enabled.\n if (Configuration.INSTANCE.isEnabled()) {\n // Check if its a critical hit or the multiply without critical hits option is enabled run Minecraft#onCriticalHit(entity) to show the critical marks\n if (critical || Configuration.INSTANCE.isMultiplyWithoutCrits()) Minecraft.getMinecraft().thePlayer.onCriticalHit(entity);\n // Check if the enchantment float is over 0.0f run Minecraft#onEnchantmentCritical(entity) instead.\n if (enchantment > 0.0f) Minecraft.getMinecraft().thePlayer.onEnchantmentCritical(entity);\n }\n }\n }",
"public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }",
"private String buildEnergy() {\r\n List<Integer> emptyCellsPos0 = new ArrayList<Integer>();\r\n List<Integer> emptyCellsPos1 = new ArrayList<Integer>();\r\n for(int i = 0; i < gameHeight; i++) {\r\n if (myLaneInfo.get(i).get(4).isEmpty()) {\r\n if (myLaneInfo.get(i).get(3).contains(0)) {\r\n emptyCellsPos0.add(i);\r\n }\r\n if (myLaneInfo.get(i).get(3).contains(1)) {\r\n emptyCellsPos1.add(i);\r\n }\r\n }\r\n }\r\n if (!emptyCellsPos0.isEmpty()) {\r\n return ENERGY.buildCommand(0,getRandomElementOfList(emptyCellsPos0));\r\n } else if (!emptyCellsPos1.isEmpty()) {\r\n return ENERGY.buildCommand(1,getRandomElementOfList(emptyCellsPos1));\r\n } else if (canBuy(ATTACK)) {\r\n return buildTurret();\r\n } else {\r\n return doNothingCommand();\r\n }\r\n }",
"public static void craft()\r\n\t{\r\n\t\tList<IRecipe> recipeList = CraftingManager.getInstance().getRecipeList();\r\n\t\tIterator<IRecipe> recipe = recipeList.iterator();\r\n\r\n\t\twhile (recipe.hasNext())\r\n\t\t{\r\n\t\t\tItemStack stack = recipe.next().getRecipeOutput();\r\n\r\n\t\t\tif (stack != null && stack.areItemsEqual(stack, new ItemStack(Blocks.STONEBRICK, 1, 0)))\r\n\t\t\t{\r\n\t\t\t\trecipe.remove();\r\n\t\t\t} else if (stack != null && stack.areItemsEqual(stack, new ItemStack(Blocks.END_BRICKS, 1, 0)))\r\n\t\t\t{\r\n\t\t\t\trecipe.remove();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Adds all the 2 by 2 crafting Recipes\r\n\t\t */\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE, 1, 2), new ItemStack(BBBlocks.moreStones, 4, 1));\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE, 1, 4), new ItemStack(BBBlocks.moreStones, 4, 3));\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE, 1, 6), new ItemStack(BBBlocks.moreStones, 4, 5));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 6), new ItemStack(BBBlocks.moreStones, 4, 9));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 9), new ItemStack(BBBlocks.moreStones, 4, 8));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 10), new ItemStack(BBBlocks.moreStones, 4, 13));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 13), new ItemStack(BBBlocks.moreStones, 4, 12));\r\n\t\tcraft2by2(new ItemStack(Blocks.SANDSTONE, 1, 2), new ItemStack(BBBlocks.moreStones, 4, 14));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 8), new ItemStack(BBBlocks.cotswoldBricks, 4));\r\n\t\tcraft2by2(new ItemStack(Blocks.BRICK_BLOCK, 1), new ItemStack(BBBlocks.agedBricks, 4));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 2), new ItemStack(BBBlocks.moreStones2, 4, 5));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 5), new ItemStack(BBBlocks.moreStones2, 4, 4));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 1), new ItemStack(BBBlocks.moreStones2, 4, 0));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 14), new ItemStack(BBBlocks.moreStones2, 4, 1));\r\n\t\tcraft2by2(new ItemStack(Blocks.RED_SANDSTONE, 1, 2), new ItemStack(BBBlocks.moreStones2, 4, 6));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 6), new ItemStack(BBBlocks.moreStones2, 4, 9));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 9), new ItemStack(BBBlocks.moreStones2, 4, 8));\r\n\t\tcraft2by2(new ItemStack(Blocks.NETHERRACK, 1), new ItemStack(BBBlocks.moreStones2, 4, 11));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 11), new ItemStack(BBBlocks.moreStones2, 4, 10));\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE), new ItemStack(BBBlocks.moreStones2, 4, 12));\r\n\t\tcraft2by2(new ItemStack(Blocks.END_STONE), new ItemStack(BBBlocks.moreStones2, 4, 13));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 12), new ItemStack(Blocks.STONEBRICK, 4, 0));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 13), new ItemStack(Blocks.END_BRICKS, 4, 0));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones3, 1, 0), new ItemStack(BBBlocks.moreStones3, 4, 2));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones3, 1, 2), new ItemStack(BBBlocks.moreStones3, 4, 1));\r\n\r\n\r\n\t\t/**\r\n\t\t * Adds all the stair Recipes\r\n\t\t */\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 0), new ItemStack(BBBlocks.cobbleGraniteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 2), new ItemStack(BBBlocks.cobbleDioriteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 4), new ItemStack(BBBlocks.cobbleAndesiteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 7), new ItemStack(BBBlocks.cobbleLimestoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 11), new ItemStack(BBBlocks.cobbleMarbleStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 15), new ItemStack(BBBlocks.cobbleSandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 3), new ItemStack(BBBlocks.cobbleBasaltStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 7), new ItemStack(BBBlocks.cobbleRedsandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 1), new ItemStack(BBBlocks.brickGraniteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 3), new ItemStack(BBBlocks.brickDioriteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 5), new ItemStack(BBBlocks.brickAndesiteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 8), new ItemStack(BBBlocks.brickLimestoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 12), new ItemStack(BBBlocks.brickMarbleStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 0), new ItemStack(BBBlocks.brickSandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 4), new ItemStack(BBBlocks.brickBasaltStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 8), new ItemStack(BBBlocks.brickRedsandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 10), new ItemStack(BBBlocks.brickNetherrackStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.cotswoldBricks, 1), new ItemStack(BBBlocks.brickCotswoldStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.agedBricks, 1), new ItemStack(BBBlocks.brickAgedbrickStair, 4));\r\n\t\tcraftStair(new ItemStack(Blocks.END_BRICKS, 1), new ItemStack(BBBlocks.brickEndstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(Blocks.RED_NETHER_BRICK, 1), new ItemStack(BBBlocks.brickRednetherStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones3, 1, 1), new ItemStack(BBBlocks.brickAcheriteStair, 4));\r\n\r\n\t\t/**\r\n\t\t * Adds all the slab Recipes\r\n\t\t */\r\n\t\tcraftSlab(BBBlocks.cobbleAndesiteSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleGraniteSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleDioriteSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleMarbleSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleLimestoneSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleSandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleBasaltSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleRedsandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickAndesiteSlab);\r\n\t\tcraftSlab(BBBlocks.brickGraniteSlab);\r\n\t\tcraftSlab(BBBlocks.brickDioriteSlab);\r\n\t\tcraftSlab(BBBlocks.brickMarbleSlab);\r\n\t\tcraftSlab(BBBlocks.brickLimestoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickSandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickBasaltSlab);\r\n\t\tcraftSlab(BBBlocks.brickRedsandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickRednetherSlab);\r\n\t\tcraftSlab(BBBlocks.brickEndstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickNetherrackSlab);\r\n\t\tcraftSlab(BBBlocks.brickCotswoldSlab);\r\n\t\tcraftSlab(BBBlocks.brickAgedbrickSlab);\r\n\t\tcraftSlab(BBBlocks.brickAcheriteSlab);\r\n\t\t\r\n\t\t/**\r\n\t\t * Other Crafting Recipes\r\n\t\t */\r\n\t\tGameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BBBlocks.moreStones2, 16, 14), new Object[] { Blocks.CLAY, \"sand\", Blocks.GRAVEL, Items.WATER_BUCKET}));\r\n\t\tNBTTagCompound concreteTag = new NBTTagCompound();\r\n\t\tconcreteTag.setInteger(\"color\", 16777215);\r\n\t\tItemStack concreteStack = new ItemStack(BBBlocks.concreteDyeable, 8, 0);\r\n\t\tconcreteStack.setTagCompound(concreteTag);\r\n\t\tGameRegistry.addRecipe(concreteStack, new Object[] { \"###\", \"#O#\", \"###\", '#', new ItemStack(BBBlocks.moreStones2, 1, 15), 'O', Items.PAPER });\r\n\t\tGameRegistry.addRecipe(new RecipesConcreteDyeable());\r\n\t\tGameRegistry.addRecipe(new RecipesConcreteTiles());\r\n\t\tGameRegistry.addRecipe(new RecipesConcreteDyeable.RecipeDuplicateConcrete());\r\n\t\tGameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BBBlocks.overgrowth, 8),new Object[] { \"treeLeaves\", \"treeLeaves\"}));\r\n\r\n\t\t/**\r\n\t\t * Adds all the smelting Recipes\r\n\t\t */\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 0), new ItemStack(Blocks.STONE, 1, 1));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 2), new ItemStack(Blocks.STONE, 1, 3));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 4), new ItemStack(Blocks.STONE, 1, 5));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 7), new ItemStack(BBBlocks.moreStones, 1, 6));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 11), new ItemStack(BBBlocks.moreStones, 1, 10));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 15), new ItemStack(BBBlocks.moreStones, 1, 14));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones2, 1, 3), new ItemStack(BBBlocks.moreStones2, 1, 2));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones2, 1, 7), new ItemStack(BBBlocks.moreStones2, 1, 6));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones2, 1, 14), new ItemStack(BBBlocks.moreStones2, 1, 15));\r\n\r\n\t}",
"private static String displayItemFromBag(String[] inventory, String option){\r\n String itemToDoAction;\r\n int counter = 1;\r\n if(option.equals(\"Equip\")){\r\n for(int i = 0; i < inventory.length; i++){\r\n if(inventory[i].equals(\"Short Sword\") || inventory[i].equals(\"Leather Helmet\") || inventory[i].equals(\"Leather Chest Plate\")\r\n || inventory[i].equals(\"Long Sword\") || inventory[i].equals(\"Great Sword\") || inventory[i].equals(\"Iron Helmet\") \r\n ||inventory[i].equals(\"Iron Chest Plate\") || inventory[i].equals(\"Iron Boots\") || inventory[i].equals(\"Iron Gloves\")){\r\n System.out.println(\"\\t\" + counter + \") \" + inventory[i]);\r\n counter++;\r\n }\r\n }\r\n System.out.println(\"\\t\" + counter + \") Exit\");\r\n itemToDoAction = getUserInput(\"Which item would you like to equip? \\n(Type the name of the item) \");\r\n }else if(option.equals(\"Sell\")){\r\n for(int i = 0; i < inventory.length; i++){\r\n if(inventory[i].equals(\"Short Sword\") || inventory[i].equals(\"Leather Helmet\") || inventory[i].equals(\"Leather Chest Plate\")\r\n || inventory[i].equals(\"Long Sword\") || inventory[i].equals(\"Great Sword\") || inventory[i].equals(\"Iron Helmet\") \r\n ||inventory[i].equals(\"Iron Chest Plate\") || inventory[i].equals(\"Iron Boots\") || inventory[i].equals(\"Iron Gloves\")){\r\n System.out.println(\"\\t\" + counter + \") \" + inventory[i]);\r\n counter++;\r\n }\r\n }\r\n System.out.println(\"\\t\" + counter + \") Exit\");\r\n itemToDoAction = getUserInput(\"Which item would you like to sell? \\n(Type the name of the item) \");\r\n }else if(option.equals(\"Use\")){\r\n System.out.println(\"we here\");\r\n for(int i = 0; i < inventory.length; i++){\r\n if(inventory[i].equals(\"Healing Potion\") || inventory[i].equals(\"Greater Healing Potion\") || inventory[i].equals(\"Scroll of Fireball\")){\r\n System.out.println(\"\\t\" + counter + \") \" + inventory[i]);\r\n counter++;\r\n }\r\n }\r\n System.out.println(\"\\t\" + counter + \") Exit\");\r\n itemToDoAction = getUserInput(\"Which item would you like to use? \\n(Type the name of the item) \");\r\n }else{\r\n itemToDoAction = \"\";\r\n }\r\n return itemToDoAction;\r\n }",
"public void updatAttackArmies(){\n\t\t\n\t\tfinal String s = attackToComboBox.getSelectedItem().toString();\n\t\tCountry country = MainPlayScreen.this.game.getBoard().getCountryByName(s);\n\t\t\t\n\t\tfinal int armies = MainPlayScreen.this.game.countryArmies.get(country);\n\t\tSystem.out.println(s + \" Defender Armies: \" + armies);\n\t\t\n\t\tif( armies == 1){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t}// end of if statement\n\t\t\n\t\telse if( armies == 2){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\t\n\t\t} // end of else if statement\n\t\t\n\t\telse{\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\tnumberOfArmies[5].addItem(3);\n\t\t\t\n\t\t}// end of else statement\n\t\tnumberOfArmies[5].repaint();\n\t}",
"public void spellLevelUp() {\n \n }",
"@Override\n\tpublic void openChest() {\n\n\t}",
"public void ChanceAllMods(){\n\t\tfloat prefixTotal = 7;\n\t\tfloat prefixIWant = 2;\n\t\t\n\t\tfloat suffixTotal = 14;\n\t\tfloat suffixIWant = 1;\n\t\t\n\t\tfloat suffixChance, prefixChance, bothChance;\n\t\t\n\t\tprefixChance = prefixIWant / prefixTotal;\n\t\tsuffixChance = suffixIWant / suffixTotal;\n\t\t\n\t\tSystem.out.println(\"prefix chance is \" + prefixChance * 100);\n\t\tSystem.out.println(\"suffix chance is \" + suffixChance * 100);\n\t\tbothChance = (prefixChance*100) * suffixChance;\n\t\t\n\t\tSystem.out.println(\"chance of both is \" + bothChance);\n\t\t// # of crafts = 100 / bothChance\n\t\tfloat numberOfCrafts = 100 / bothChance;\n\t\tSystem.out.println(\"you need \" + numberOfCrafts + \" alteration orbs\");\n\t\tSystem.out.println(\"you need \" + numberOfCrafts * prefixChance + \" augmentation orbs\");\n\t\t\n\t\tCurrencyMarket currencyMarket = new CurrencyMarket();\n\t\tfloat totalCost = numberOfCrafts / currencyMarket.getAlterationOrb();\n\t\ttotalCost += (numberOfCrafts * prefixChance) / currencyMarket.getAugmentOrb();\n\t\tSystem.out.println(\"total cost of craft \" + totalCost + \" Chaos Orbs\");\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}",
"private void enemyEncounter()\n {\n currentEnemies = currentRoom.getEnemies();\n \n if(currentEnemies.size() > 0)\n {\n for(Enemy e : currentEnemies)\n {\n System.out.println(\"\\n\" + \"A \" + e.getName() + \" stares menacingly!\" + \"\\n\");\n enemyName = e.getName();\n \n }\n enemyPresent = true;\n clearExits();\n }\n else{\n setExits(); \n }\n }",
"@Override\n public void show () {\n g.prefs = Gdx.app.getPreferences(\"potions_master_preferences\");\n g.lang = g.prefs.getInteger(\"language\", 0);\n g.atlas = new TextureAtlas(\"textures/textures.atlas\");\n g.textSystem = new TextSystem(g.lang);\n g.sounds = new Sounds();\n g.fonts = new Fonts(g.textSystem.get(\"FONT_CHARS\"));\n g.ingredients = new Ingredients(g);\n g.potions = new Potions();\n\n g.w = Gdx.graphics.getWidth();\n g.h = Gdx.graphics.getHeight();\n\n g.pixel_size = .00625f * g.w;\n g.tile_size = g.pixel_size * 16f;\n\n String[] inv = g.prefs.getString(\"inventory\", \"\").split(\" \");\n for (String s : inv) {\n for (Ingredient i : g.ingredients.list) {\n if (i.getId().equals(s))\n g.ingredients.inventory.add(i);\n }\n }\n\n String[] add = g.prefs.getString(\"added\", \"\").split(\" \");\n for (String s : add) {\n for (Ingredient i : g.ingredients.list) {\n if (i.getId().equals(s))\n g.ingredients.added.add(i);\n }\n }\n\n g.is_music = g.prefs.getBoolean(\"is_music_on\", true);\n g.is_sound = g.prefs.getBoolean(\"is_sound_on\", true);\n\n g.music_volume = g.prefs.getFloat(\"music_volume\", 1f);\n g.sound_volume = g.prefs.getFloat(\"sound_volume\", 1f);\n\n g.week = g.prefs.getInteger(\"week\", 1);\n g.money = g.prefs.getInteger(\"money\", 0);\n g.potions_cooked = g.prefs.getInteger(\"potion_cooked\", 0);\n\n g.is_potion_cooked = false;\n g.potion_color = new Color();\n\n for (int i = 0; i < g.potions_cooked; ++i) {\n String[] p_h = g.prefs.getString(\"potion_history_\" + i, \"\").split(\" \");\n g.potions.list.add(new Potion(\n new String[] {p_h[4], p_h[5], p_h[6], p_h[7]},\n new int[] {\n Integer.parseInt(p_h[0]),\n Integer.parseInt(p_h[1]),\n Integer.parseInt(p_h[2]),\n Integer.parseInt(p_h[3])\n },\n Integer.parseInt(p_h[8]),\n Integer.parseInt(p_h[9])\n ));\n }\n\n if (g.is_music) {\n g.sounds.music_1.setLooping(true);\n g.sounds.music_1.setVolume(g.music_volume);\n g.sounds.music_1.play();\n }\n\n }",
"public void addPreferedWeapon() {\n\t\tfor(int i = 0; i < killers.size(); i++) {\n\t\t\t\n\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\n\t\t\tfor(String key : killers.get(i).getWeapons().keySet()) {\n\t\t\t\tlist.add(killers.get(i).getWeapons().get(key) + \";\" + key);\n\t\t\t}\n\t\t\t\n\t\t\tComparator<String> comp = (s1, s2) -> {\n\t\t\t\treturn s1.compareTo(s2);\n\t\t\t};\n\t\t\t\n\t\t\tCollections.sort(list, Collections.reverseOrder(comp));\n\t\t\tList<String> list2 = new ArrayList<>();\n\t\t\t\n\t\t\tif(!list.isEmpty()) {\n\t\t\t\tint control = extractNumberFromText(list.get(0));\n\t\t\t\t\n\t\t\t\tlist.forEach(s -> {\n\t\t\t\t\tif(extractNumberFromText(s) == control)\n\t\t\t\t\t\tlist2.add(s);\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tkillers.get(i).setWeaponMoreUsed(list2);\n\t\t}\n\t}",
"public void sayEnchantments(String enchantments, Player player){\n\t\tString[] baseSplit = enchantments.split(\";\");\n\t\tif(Integer.valueOf(baseSplit.length)>0){\n\t\t\tif(baseSplit[0]!=\"\"){\n\t\t\t\tplayer.sendMessage(ChatColor.GREEN+\"Enchantments:\");\n\t\t\t\tfor(int i=0; i<baseSplit.length;i++){\n\t\t\t\t\tString[] bigSplit= baseSplit[i].split(\",\");\n\t\t\t\t\tplayer.sendMessage(ChatColor.GREEN+\"-\"+ChatColor.BLUE+cleanEnchantmentName(bigSplit[0])+\" \"+bigSplit[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@SafeVarargs\n\t@ZenCodeType.Method\n\tpublic final void addRecipe(String recipePath, IIngredient input, int energy, IItemStack mainOutput, Percentaged<IItemStack>... additionalOutputs)\n\t{\n\t\tfinal ResourceLocation resourceLocation = new ResourceLocation(\"crafttweaker\", recipePath);\n\n\t\tfinal ItemStack result = mainOutput.getInternal();\n\t\tfinal Ingredient ingredient = input.asVanillaIngredient();\n\t\tfinal CrusherRecipe recipe = IEServerConfig.MACHINES.crusherConfig.apply(\n\t\t\t\tnew CrusherRecipe(resourceLocation, of(result), ingredient, energy)\n\t\t);\n\n\t\tfor(Percentaged<IItemStack> additionalOutput : additionalOutputs)\n\t\t{\n\t\t\tfinal StackWithChance stackWithChance = CrTIngredientUtil.getStackWithChance(additionalOutput);\n\t\t\trecipe.addToSecondaryOutput(stackWithChance);\n\t\t}\n\n\t\tCraftTweakerAPI.apply(new ActionAddRecipe<>(this, recipe, null));\n\t}",
"private void prepare()\n {\n //getWorld().removeObject(wrong_ant);\n<<<<<<< HEAD\n \n \n Label q1 = new Label (\"What is 20 x 0?\", 50);\n \n Label question1answera = new Label (\"0\", 35);\n Label question1answerb = new Label (\"20\", 35);\n Label question1answerc = new Label (\"1\", 35);\n Label question1answerd = new Label (\"2\", 35);\n \n q1.setFillColor(Color.BLACK);\n q1.setLineColor(Color.WHITE);\n addObject(q1, 300, 100);\n \n\n \n Ant ant = new Ant();\n addObject(ant,350,325);\n question1answera.setFillColor(Color.WHITE);\n question1answera.setLineColor(Color.BLACK);\n addObject(question1answera, 350,325);\n \n Wrong_ant wrong_ant = new Wrong_ant();\n addObject(wrong_ant,500,625);\n question1answerb.setFillColor(Color.WHITE);\n question1answerb.setLineColor(Color.BLACK);\n addObject(question1answerb, 500,625);\n \n Wrong_ant wrong_ant1 = new Wrong_ant();\n addObject(wrong_ant1,650,625);\n question1answerc.setFillColor(Color.WHITE);\n question1answerc.setLineColor(Color.BLACK);\n addObject(question1answerc, 650,625);\n \n Wrong_ant wrong_ant2 = new Wrong_ant();\n addObject(wrong_ant2,700,425);\n question1answerd.setFillColor(Color.WHITE);\n question1answerd.setLineColor(Color.BLACK);\n addObject(question1answerd, 700,425);\n \n Ground ground100 = new Ground();\n addObject(ground100, 700, 445);\n \n \n \n=======\n Wrong_ant wrong_ant = new Wrong_ant();\n addObject(wrong_ant,500,625);\n Ant ant = new Ant();\n addObject(ant,350,325);\n Wrong_ant wrong_ant1 = new Wrong_ant();\n addObject(wrong_ant1,650,625);\n Wrong_ant wrong_ant2 = new Wrong_ant();\n addObject(wrong_ant2,700,425);\n Ground ground100 = new Ground();\n addObject(ground100, 700, 445);\n>>>>>>> d7cbdd938f8ba43d2dbfc3e0fb0f8f0d05399bf0\n //wrong_ant.setLocation(712,374);\n //Wrong_ant wrong_ant2 = new Wrong_ant();\n //addObject(wrong_ant2,568,380);\n //wrong_ant2.setLocation(559,373);\n //Wrong_ant wrong_ant3 = new Wrong_ant();\n //addObject(wrong_ant3,600,600);\n //wrong_ant3.setLocation(680,215);\n //Ant ant = new Ant();\n //addObject(ant,500,625);\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n Wall wall2 = new Wall();\n addObject(wall2, 93, 373);\n Wall wall3 = new Wall();\n addObject(wall3, 153, 361);\n Wall wall4 = new Wall();\n addObject(wall4, 249, 347);\n Wall wall5 = new Wall();\n addObject(wall5, 306, 344);\n Wall wall6 = new Wall();\n addObject(wall6, 397, 335);\n Wall wall7 = new Wall();\n addObject(wall7, 501, 333);\n Wall wall8 = new Wall();\n addObject(wall8, 562, 338);\n Wall wall9 = new Wall();\n addObject(wall9, 428, 273);\n Wall wall10 = new Wall();\n addObject(wall10, 334, 273);\n Wall wall11 = new Wall();\n addObject(wall11, 207, 267);\n wall.setLocation(25, 376);\n wall2.setLocation(75, 376);\n wall3.setLocation(125, 376);\n wall4.setLocation(175, 376);\n wall11.setLocation(225, 376);\n wall5.setLocation(275, 376);\n wall10.setLocation(325, 376);\n P2 p2 = new P2();\n addObject(p2, 133, 321);\n wall6.setLocation(375, 376);\n wall9.setLocation(425, 376);\n wall7.setLocation(475, 376);\n wall8.setLocation(525, 376);\n Wall wall12 = new Wall();\n addObject(wall12, 584, 384);\n wall12.setLocation(575, 376);\n Wall wall13 = new Wall();\n addObject(wall13, 283, 331);\n wall13.setLocation(275, 326);\n Wall wall14 = new Wall();\n addObject(wall14, 346, 314);\n Wall wall15 = new Wall();\n addObject(wall15, 423, 310);\n Wall wall16 = new Wall();\n addObject(wall16, 346, 233);\n wall14.setLocation(325, 326);\n wall15.setLocation(375, 326);\n wall16.setLocation(425, 326);\n wall16.setLocation(325, 276);\n Wall wall17 = new Wall();\n addObject(wall17, 433, 283);\n wall17.setLocation(425, 276);\n Wall wall18 = new Wall();\n addObject(wall18, 433, 215);\n wall18.setLocation(425, 226);\n removeObject(wall17);\n Ground ground = new Ground();\n addObject(ground, 242, 315);\n ground.setLocation(235, 308);\n Ground ground2 = new Ground();\n addObject(ground2, 161, 314);\n Ground ground3 = new Ground();\n addObject(ground3, 100, 313);\n Ground ground4 = new Ground();\n addObject(ground4, 105, 275);\n ground2.setLocation(205, 319);\n ground3.setLocation(175, 331);\n ground4.setLocation(145, 343);\n p2.setLocation(80, 319);\n Wall wall19 = new Wall();\n addObject(wall19, 33, 332);\n wall19.setLocation(25, 326);\n Wall wall20 = new Wall();\n addObject(wall20, 31, 283);\n Wall wall21 = new Wall();\n addObject(wall21, 29, 220);\n Wall wall22 = new Wall();\n addObject(wall22, 39, 156);\n Wall wall23 = new Wall();\n addObject(wall23, 34, 100);\n Wall wall24 = new Wall();\n addObject(wall24, 43, 46);\n Wall wall25 = new Wall();\n addObject(wall25, 127, 122);\n wall20.setLocation(25, 276);\n wall21.setLocation(25, 226);\n wall22.setLocation(25, 176);\n wall23.setLocation(25, 126);\n wall24.setLocation(25, 76);\n wall25.setLocation(25, 25);\n wall24.setLocation(25, 75);\n wall23.setLocation(25, 125);\n wall22.setLocation(25, 175);\n wall21.setLocation(25, 225);\n wall20.setLocation(25, 275);\n wall19.setLocation(25, 326);\n wall.setLocation(25, 375);\n wall19.setLocation(25, 325);\n wall2.setLocation(75, 375);\n wall3.setLocation(125, 375);\n wall4.setLocation(175, 375);\n wall11.setLocation(225, 375);\n wall5.setLocation(275, 375);\n wall10.setLocation(325, 375);\n wall6.setLocation(375, 375);\n wall9.setLocation(425, 375);\n wall7.setLocation(475, 375);\n wall8.setLocation(525, 375);\n wall12.setLocation(575, 375);\n ground4.setLocation(145, 342);\n ground3.setLocation(175, 330);\n ground2.setLocation(205, 318);\n ground.setLocation(235, 307);\n wall13.setLocation(275, 325);\n wall14.setLocation(325, 325);\n wall15.setLocation(375, 325);\n wall16.setLocation(325, 275);\n wall18.setLocation(425, 225);\n Wall wall26 = new Wall();\n addObject(wall26, 569, 314);\n wall26.setLocation(575, 325);\n Wall wall27 = new Wall();\n addObject(wall27, 577, 273);\n Wall wall28 = new Wall();\n addObject(wall28, 572, 216);\n Wall wall29 = new Wall();\n addObject(wall29, 571, 158);\n Wall wall30 = new Wall();\n addObject(wall30, 560, 110);\n Wall wall31 = new Wall();\n addObject(wall31, 560, 66);\n Wall wall32 = new Wall();\n addObject(wall32, 555, 17);\n wall27.setLocation(575, 275);\n wall28.setLocation(575, 225);\n wall29.setLocation(575, 176);\n wall30.setLocation(575, 126);\n wall31.setLocation(575, 76);\n wall32.setLocation(575, 25);\n wall31.setLocation(575, 75);\n wall30.setLocation(575, 125);\n wall29.setLocation(576, 174);\n wall29.setLocation(575, 174);\n wall28.setLocation(575, 224);\n wall27.setLocation(575, 274);\n wall26.setLocation(575, 325);\n wall27.setLocation(575, 275);\n wall28.setLocation(575, 225);\n wall29.setLocation(575, 175);\n Wall wall33 = new Wall();\n addObject(wall33, 237, 63);\n wall33.setLocation(99, 29);\n wall33.setLocation(74, 25);\n wall33.setLocation(75, 25);\n Wall wall34 = new Wall();\n addObject(wall34, 166, 39);\n wall34.setLocation(125, 25);\n Wall wall35 = new Wall();\n addObject(wall35, 197, 37);\n wall35.setLocation(175, 24);\n wall35.setLocation(175, 25);\n Wall wall36 = new Wall();\n addObject(wall36, 227, 37);\n wall36.setLocation(225, 25);\n Wall wall37 = new Wall();\n addObject(wall37, 290, 63);\n wall37.setLocation(275, 25);\n Wall wall38 = new Wall();\n addObject(wall38, 340, 67);\n wall38.setLocation(325, 25);\n Wall wall39 = new Wall();\n addObject(wall39, 369, 79);\n wall39.setLocation(375, 25);\n Wall wall40 = new Wall();\n addObject(wall40, 458, 89);\n wall40.setLocation(425, 25);\n Wall wall41 = new Wall();\n addObject(wall41, 497, 87);\n wall41.setLocation(475, 25);\n Wall wall42 = new Wall();\n addObject(wall42, 497, 87);\n wall42.setLocation(525, 25);\n Wall wall43 = new Wall();\n addObject(wall43, 432, 182);\n wall43.setLocation(425, 175);\n Wall wall44 = new Wall();\n addObject(wall44, 426, 120);\n wall44.setLocation(425, 125);\n wall43.setLocation(475, 274);\n wall44.setLocation(525, 274);\n wall44.setLocation(525, 275);\n wall43.setLocation(475, 275);\n wall43.setLocation(475, 275);\n Wall wall45 = new Wall();\n addObject(wall45, 476, 212);\n wall45.setLocation(475, 225);\n removeObject(wall45);\n Wall wall46 = new Wall();\n addObject(wall46, 331, 230);\n wall46.setLocation(325, 225);\n Wall wall47 = new Wall();\n addObject(wall47, 334, 167);\n wall47.setLocation(325, 175);\n removeObject(wall46);\n Ground ground5 = new Ground();\n addObject(ground5, 342, 164);\n ground5.setLocation(335, 157);\n Ground ground6 = new Ground();\n addObject(ground6, 308, 159);\n wall47.setLocation(323, 173);\n wall47.setLocation(325, 175);\n Ground ground7 = new Ground();\n addObject(ground7, 316, 202);\n ground7.setLocation(330, 212);\n removeObject(ground7);\n ground6.setLocation(315, 157);\n Wall wall48 = new Wall();\n addObject(wall48, 325, 224);\n wall48.setLocation(325, 225);\n removeObject(wall48);\n removeObject(wall47);\n Wall wall49 = new Wall();\n addObject(wall49, 254, 182);\n wall49.setLocation(275, 175);\n Ground ground8 = new Ground();\n addObject(ground8, 289, 164);\n Ground ground9 = new Ground();\n addObject(ground9, 248, 167);\n ground8.setLocation(285, 157);\n ground9.setLocation(265, 157);\n ground9.setLocation(265, 157);\n removeObject(wall49);\n Ground ground10 = new Ground();\n addObject(ground10, 531, 236);\n ground10.setLocation(527, 226);\n ground10.setLocation(525, 226);\n ground10.setLocation(525, 225);\n Ground ground11 = new Ground();\n addObject(ground11, 515, 165);\n ground11.setLocation(525, 194);\n Ground ground12 = new Ground();\n addObject(ground12, 519, 159);\n ground12.setLocation(525, 159);\n ground11.setLocation(525, 193);\n ground12.setLocation(525, 158);\n ground12.setLocation(525, 157);\n ground11.setLocation(525, 192);\n Ground ground13 = new Ground();\n addObject(ground13, 497, 144);\n ground13.setLocation(491, 141);\n ground13.setLocation(495, 142);\n Ground ground14 = new Ground();\n addObject(ground14, 468, 124);\n ground14.setLocation(465, 127);\n Ground ground15 = new Ground();\n addObject(ground15, 432, 124);\n ground15.setLocation(435, 112);\n Ground ground16 = new Ground();\n addObject(ground16, 410, 114);\n ground16.setLocation(405, 98);\n Wall wall50 = new Wall();\n addObject(wall50, 365, 132);\n wall50.setLocation(369, 125);\n ground16.setLocation(405, 107);\n ground15.setLocation(435, 117);\n ground14.setLocation(465, 129);\n ground15.setLocation(435, 118);\n ground15.setLocation(435, 119);\n ground14.setLocation(465, 130);\n ground15.setLocation(435, 120);\n ground14.setLocation(465, 131);\n ground13.setLocation(495, 143);\n ground13.setLocation(495, 143);\n wall50.setLocation(375, 130);\n Ground ground17 = new Ground();\n addObject(ground17, 385, 113);\n ground17.setLocation(382, 107);\n ground17.setLocation(365, 107);\n Ground ground18 = new Ground();\n addObject(ground18, 387, 115);\n ground18.setLocation(386, 107);\n removeObject(ground17);\n Ground ground19 = new Ground();\n addObject(ground19, 368, 130);\n ground19.setLocation(365, 107);\n wall50.setLocation(351, 247);\n removeObject(wall50);\n Ground ground20 = new Ground();\n addObject(ground20, 297, 94);\n ground20.setLocation(323, 121);\n removeObject(ground20);\n Wall wall51 = new Wall();\n addObject(wall51, 232, 182);\n wall51.setLocation(222, 174);\n wall51.setLocation(225, 175);\n wall2.setLocation(25, 425);\n wall3.setLocation(25, 475);\n wall4.setLocation(25, 525);\n wall11.setLocation(25, 575);\n wall5.setLocation(25, 625);\n wall10.setLocation(25, 675);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(375, 375);\n wall6.setLocation(74, 675);\n wall9.setLocation(124, 675);\n wall6.setLocation(75, 675);\n wall9.setLocation(125, 675);\n wall7.setLocation(475, 375);\n wall7.setLocation(475, 375);\n wall7.setLocation(475, 375);\n wall7.setLocation(475, 375);\n wall7.setLocation(475, 375);\n wall7.setLocation(175, 675);\n wall8.setLocation(225, 675);\n wall12.setLocation(575, 375);\n wall12.setLocation(575, 375);\n wall12.setLocation(575, 375);\n wall12.setLocation(275, 675);\n wall26.setLocation(325, 675);\n wall43.setLocation(475, 275);\n wall27.setLocation(375, 675);\n wall28.setLocation(425, 675);\n wall29.setLocation(475, 675);\n wall30.setLocation(525, 675);\n wall31.setLocation(575, 675);\n Wall wall52 = new Wall();\n addObject(wall52, 634, 571);\n Wall wall53 = new Wall();\n addObject(wall53, 743, 590);\n Wall wall54 = new Wall();\n addObject(wall54, 709, 522);\n Wall wall55 = new Wall();\n addObject(wall55, 813, 540);\n Wall wall56 = new Wall();\n addObject(wall56, 862, 598);\n Wall wall57 = new Wall();\n addObject(wall57, 912, 528);\n Wall wall58 = new Wall();\n addObject(wall58, 974, 596);\n wall52.setLocation(625, 675);\n wall54.setLocation(709, 522);\n wall54.setLocation(675, 675);\n wall53.setLocation(725, 675);\n wall55.setLocation(775, 675);\n wall56.setLocation(825, 675);\n wall57.setLocation(875, 675);\n wall58.setLocation(925, 675);\n Wall wall59 = new Wall();\n addObject(wall59, 917, 608);\n wall59.setLocation(975, 675);\n Wall wall60 = new Wall();\n addObject(wall60, 953, 636);\n Wall wall61 = new Wall();\n addObject(wall61, 979, 580);\n Wall wall62 = new Wall();\n addObject(wall62, 925, 543);\n Wall wall63 = new Wall();\n addObject(wall63, 983, 504);\n Wall wall64 = new Wall();\n addObject(wall64, 925, 459);\n Wall wall65 = new Wall();\n addObject(wall65, 973, 406);\n Wall wall66 = new Wall();\n addObject(wall66, 919, 359);\n Wall wall67 = new Wall();\n addObject(wall67, 965, 308);\n Wall wall68 = new Wall();\n addObject(wall68, 916, 276);\n Wall wall69 = new Wall();\n addObject(wall69, 960, 223);\n Wall wall70 = new Wall();\n addObject(wall70, 916, 181);\n Wall wall71 = new Wall();\n addObject(wall71, 968, 153);\n Wall wall72 = new Wall();\n addObject(wall72, 915, 109);\n Wall wall73 = new Wall();\n addObject(wall73, 968, 63);\n wall73.setLocation(975, 25);\n wall73.setLocation(975, 25);\n wall72.setLocation(975, 75);\n wall71.setLocation(976, 125);\n wall70.setLocation(924, 181);\n wall71.setLocation(975, 125);\n wall70.setLocation(975, 175);\n wall69.setLocation(975, 225);\n wall68.setLocation(975, 275);\n wall67.setLocation(975, 325);\n wall66.setLocation(975, 375);\n wall65.setLocation(975, 425);\n wall64.setLocation(975, 475);\n wall63.setLocation(975, 525);\n wall63.setLocation(975, 525);\n wall61.setLocation(975, 575);\n wall60.setLocation(975, 625);\n wall62.setLocation(925, 25);\n Wall wall74 = new Wall();\n addObject(wall74, 879, 88);\n Wall wall75 = new Wall();\n addObject(wall75, 833, 35);\n Wall wall76 = new Wall();\n addObject(wall76, 789, 107);\n Wall wall77 = new Wall();\n addObject(wall77, 724, 28);\n Wall wall78 = new Wall();\n addObject(wall78, 690, 109);\n Wall wall79 = new Wall();\n addObject(wall79, 649, 39);\n wall79.setLocation(625, 25);\n wall78.setLocation(675, 25);\n wall77.setLocation(725, 24);\n wall77.setLocation(725, 25);\n wall76.setLocation(777, 22);\n wall76.setLocation(775, 25);\n wall75.setLocation(825, 25);\n wall74.setLocation(875, 25);\n wall13.setLocation(275, 625);\n wall14.setLocation(325, 625);\n wall15.setLocation(375, 625);\n wall16.setLocation(325, 575);\n ground.setLocation(235, 607);\n ground2.setLocation(205, 618);\n ground3.setLocation(175, 631);\n ground4.setLocation(145, 643);\n ground4.setLocation(145, 642);\n ground3.setLocation(175, 630);\n wall43.setLocation(433, 518);\n Wall wall80 = new Wall();\n addObject(wall80, 440, 612);\n wall80.setLocation(375, 575);\n wall43.setLocation(425, 525);\n wall80.setLocation(375, 475);\n wall18.setLocation(475, 525);\n wall18.setLocation(485, 525);\n wall43.setLocation(425, 525);\n wall80.setLocation(475, 575);\n wall18.setLocation(525, 575);\n wall44.setLocation(525, 525);\n wall51.setLocation(525, 475);\n wall44.setLocation(236, 337);\n ground10.setLocation(531, 417);\n wall44.setLocation(525, 425);\n ground10.setLocation(535, 407);\n ground10.setLocation(600, 482);\n wall51.setLocation(382, 377);\n wall44.setLocation(523, 469);\n wall51.setLocation(368, 434);\n wall44.setLocation(525, 525);\n ground10.setLocation(529, 428);\n wall44.setLocation(575, 575);\n wall51.setLocation(477, 476);\n wall44.setLocation(526, 437);\n wall51.setLocation(575, 575);\n wall44.setLocation(627, 425);\n Wall wall81 = new Wall();\n addObject(wall81, 681, 558);\n wall81.setLocation(625, 575);\n wall44.setLocation(625, 525);\n ground10.setLocation(626, 507);\n ground10.setLocation(625, 507);\n wall44.setLocation(625, 475);\n ground11.setLocation(625, 457);\n wall44.setLocation(624, 425);\n wall44.setLocation(625, 425);\n ground12.setLocation(625, 407);\n wall44.setLocation(404, 355);\n ground13.setLocation(595, 392);\n ground14.setLocation(565, 378);\n wall44.setLocation(555, 375);\n ground15.setLocation(536, 363);\n ground15.setLocation(533, 364);\n ground15.setLocation(535, 363);\n ground16.setLocation(505, 348);\n Wall wall82 = new Wall();\n addObject(wall82, 440, 341);\n wall82.setLocation(555, 325);\n Wall wall83 = new Wall();\n addObject(wall83, 469, 322);\n wall83.setLocation(505, 325);\n wall82.setLocation(455, 375);\n Wall wall84 = new Wall();\n addObject(wall84, 398, 381);\n wall84.setLocation(586, 220);\n wall83.setLocation(405, 375);\n ground18.setLocation(475, 333);\n wall44.setLocation(555, 375);\n wall44.setLocation(538, 455);\n ground18.setLocation(805, 539);\n ground18.setLocation(475, 348);\n wall44.setLocation(505, 375);\n wall82.setLocation(455, 375);\n ground16.setLocation(505, 357);\n ground15.setLocation(535, 369);\n ground14.setLocation(565, 380);\n ground14.setLocation(565, 381);\n ground15.setLocation(535, 370);\n ground18.setLocation(475, 357);\n wall82.setLocation(396, 421);\n ground18.setLocation(495, 357);\n wall44.setLocation(455, 375);\n wall82.setLocation(355, 375);\n ground5.setLocation(757, 587);\n ground5.setLocation(764, 642);\n ground19.setLocation(783, 642);\n wall82.setLocation(775, 621);\n ground19.setLocation(785, 642);\n ground5.setLocation(765, 642);\n wall82.setLocation(775, 610);\n ground19.setLocation(735, 638);\n ground5.setLocation(785, 642);\n ground19.setLocation(765, 642);\n wall82.setLocation(690, 585);\n ground6.setLocation(775, 627);\n ground9.setLocation(815, 642);\n ground8.setLocation(805, 627);\n p2.setLocation(100, 621);\n wall84.setLocation(925, 625);\n wall84.setLocation(441, 456);\n wall84.setLocation(355, 375);\n wall82.setLocation(675, 575);\n Wall wall85 = new Wall();\n addObject(wall85, 43, 46);\n wall85.setLocation(856, 618);\n wall85.turn(20);\n }",
"private void respawnChest(){\n //remove the physical chest\n this.location.getBlock().setType(Material.AIR);\n\n //increment the level of the chest. If its higher than its max level, shut down.\n if(++this.level >= getMaxLevel()){\n deleteInstance();\n return;\n }\n\n //play a sound effect for all players (INCLUDING juggernaut) to indicate a chest respawned.\n for(JuggernautPlayer jp: JuggernautGame.getInstance().getPlayers()){\n PacketHelper.playSound(jp.getPlayer(), location, Sound.DIG_WOOD, 1f, 1f);\n }\n\n //set the seconds to unlock depending on the level of the chest\n this.secondsToUnlock = this.level==0 ? 15 : this.level==1 ? 30 : 60;\n\n //reset all old values\n this.claimProgress.clear();\n this.unlockedPercentage = 0;\n this.chestProgressLevel = 0;\n\n //get a new location to spawn the new chest in.\n this.location = JuggernautGame.getInstance().getRandomChestLocation().use();\n\n //log\n System.out.println(\"[Jugg] Respawned chest \" + this.getClass().getSimpleName() + \" Level \" + this.level + \" at \" + location.getBlockX() + \",\" + location.getBlockY() + \",\" + location.getBlockZ());\n\n //set the new location to a chest block\n this.location.getBlock().setType(Material.CHEST);\n }",
"public String attack(String input, boolean playerAttack) {\n\n String result = \" You didn't die\";\n\n int damage = 0;\n\n if (input.toCharArray().length == 1 && playerAttack) {\n\n switch (input.toCharArray()[0]) {\n\n case '1': damage = calculateCharacterDamage(player, 0);\n monster.setHealth(monster.getHealth() - damage);\n result = \" You hit \" + monster.getName() + \" for \" + damage + \"!\";\n break;\n\n case '2': damage = calculateCharacterDamage(player, 1);\n monster.setHealth(monster.getHealth() - damage);\n result = \" You hit \" + monster.getName() + \" for \" + damage + \"!\";\n break;\n\n case '3': damage = calculateCharacterDamage(player, 2);\n monster.setHealth(monster.getHealth() - damage);\n result = \" You hit \" + monster.getName() + \" for \" + damage + \"!\";\n break;\n\n }\n\n }\n else if (input.toCharArray().length == 1 && !playerAttack) {\n\n damage = calculateCharacterDamage(monster, 0);\n\n player.setHealth(player.getHealth() - damage);\n\n result = \"\\n \" + monster.getName() + \" hit you for \" + damage + \"!\";\n\n }\n\n if (player.getHealth() == 0)\n {\n win = monster;\n lose = player;\n try {\n combatdb.addCombat(player.getName(), monster.getName(), monster.getName());\n }\n catch(Exception e)\n {\n System.err.println(e);\n }\n }\n else if (monster.getHealth() == 0)\n {\n win = player;\n lose = monster;\n try {\n combatdb.addCombat(player.getName(), monster.getName(), player.getName());\n }\n catch(Exception e)\n {\n System.err.println(e);\n }\n }\n\n return result + \"\\n\";\n\n }",
"private static void checkActions()\n\t{\n\t\tSystem.out.println();\n\t\t\n\t\tif (fighterAction.equals(\"Kick\") && opponentAction.equals(\"Kick\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" smashes shins with \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tplayerOneHurt = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Kick\") && opponentAction.equals(\"Punch\"))\n\t\t{\n\t\t\tannounce(opponentName,\" gives a big uppercut to \", playerOneName);\n\t\t\tplayerOneHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Kick\") && opponentAction.equals(\"Block\"))\n\t\t{\n\t\t\tannounce(opponentName,\" takes a big kick to the ribs from \", playerOneName);\n\t\t\topponentHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Punch\") && opponentAction.equals(\"Kick\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" gives a big uppercut to \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Punch\") && opponentAction.equals(\"Punch\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" exchanges quick jabs with \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tplayerOneHurt = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Punch\") && opponentAction.equals(\"Block\"))\n\t\t{\n\t\t\tannounce(opponentName,\" parries the punch and deals big damage to \", playerOneName);\n\t\t\tplayerOneHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Block\") && opponentAction.equals(\"Kick\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" takes a big kick to the ribs from \", opponentName);\n\t\t\tplayerOneHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\telse if (fighterAction.equals(\"Block\") && opponentAction.equals(\"Punch\"))\n\t\t{\n\t\t\tannounce(playerOneName,\" parries the punch and deals big damage to \", opponentName);\n\t\t\topponentHurt = true;\n\t\t\tcounterAttack = true;\n\t\t}\n\t\n\t\t// Both block\n\t\telse\n\t\t{\n\t\t\tannounce(\"\",\"Both fighters stand still, waiting for the other to make a move!\",\"\");\n\t\t}\n\n\t\tSystem.out.println();\n\t}",
"public void onCraftMatrixChanged(IInventory par1IInventory)\r\n\t {\r\n\t\t if (par1IInventory == this.tableInventory)\r\n\t\t {\r\n\t\t\t ItemStack itemstack = par1IInventory.getStackInSlot(0);\r\n\t\t\t ItemStack money = par1IInventory.getStackInSlot(1);\r\n\t\t\t int i;\r\n\t\t\t if(money != null && this.isMoney(money))\r\n\t\t\t {\r\n\t\t\t\t int point = (money.itemID == Item.emerald.itemID)? PrepaidEnchantment.EmeraldCost:(money.itemID == Item.ingotGold.itemID)? PrepaidEnchantment.GoldCost: (money.itemID == Item.diamond.itemID)? PrepaidEnchantment.DiamondCost:0;\r\n\t\t\t\t point *= money.stackSize;\r\n\t\t\t\t this.tileEntity.addCurrentMaxLevel(point);\r\n\t\t\t\t par1IInventory.setInventorySlotContents(1, null);\r\n\t\t\t }\r\n\r\n\t\t\t if (itemstack != null && itemstack.isItemEnchantable())\r\n\t\t\t {\r\n\t\t\t\t this.nameSeed = this.rand.nextLong();\r\n\r\n\t\t\t\t if (!this.worldPointer.isRemote)\r\n\t\t\t\t {\r\n\t\t\t\t\t i = 0;\r\n\t\t\t\t\t int j;\r\n\t\t\t\t\t this.Bonus = 0;\r\n\t\t\t\t\t for (j = -1; j <= 1; ++j)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t for (int k = -1; k <= 1; ++k)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t if ((j != 0 || k != 0) && this.worldPointer.isAirBlock(this.posX + k, this.posY, this.posZ + j) && this.worldPointer.isAirBlock(this.posX + k, this.posY + 1, this.posZ + j))\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t this.Bonus += ForgeHooks.getEnchantPower(worldPointer, posX + k * 2, posY, posZ + j * 2);\r\n\t\t\t\t\t\t\t\t this.Bonus += ForgeHooks.getEnchantPower(worldPointer, posX + k * 2, posY + 1, posZ + j * 2);\r\n\r\n\t\t\t\t\t\t\t\t if (k != 0 && j != 0)\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t\t this.Bonus += ForgeHooks.getEnchantPower(worldPointer, posX + k * 2, posY, posZ + j );\r\n\t\t\t\t\t\t\t\t\t this.Bonus += ForgeHooks.getEnchantPower(worldPointer, posX + k * 2, posY + 1, posZ + j );\r\n\t\t\t\t\t\t\t\t\t this.Bonus += ForgeHooks.getEnchantPower(worldPointer, posX + k, posY, posZ + j * 2);\r\n\t\t\t\t\t\t\t\t\t this.Bonus += ForgeHooks.getEnchantPower(worldPointer, posX + k, posY + 1, posZ + j * 2);\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t for (j = 0; j < 3; ++j)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t this.enchantLevels[j] = this.calcItemStackEnchantability(this.rand, j, this.tileEntity.getCurrentMaxLevel(), itemstack);\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t this.detectAndSendChanges();\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t for (i = 0; i < 3; ++i)\r\n\t\t\t\t {\r\n\t\t\t\t\t this.enchantLevels[i] = 0;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t }",
"private void drawActivePotionEffects() {\n/* 63 */ int i = this.guiLeft - 124;\n/* 64 */ int j = this.guiTop;\n/* 65 */ int k = 166;\n/* 66 */ Collection<PotionEffect> collection = this.mc.player.getActivePotionEffects();\n/* */ \n/* 68 */ if (!collection.isEmpty()) {\n/* */ \n/* 70 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 71 */ GlStateManager.disableLighting();\n/* 72 */ int l = 33;\n/* */ \n/* 74 */ if (collection.size() > 5)\n/* */ {\n/* 76 */ l = 132 / (collection.size() - 1);\n/* */ }\n/* */ \n/* 79 */ for (PotionEffect potioneffect : Ordering.natural().sortedCopy(collection)) {\n/* */ \n/* 81 */ Potion potion = potioneffect.getPotion();\n/* 82 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 83 */ this.mc.getTextureManager().bindTexture(INVENTORY_BACKGROUND);\n/* 84 */ drawTexturedModalRect(i, j, 0, 166, 140, 32);\n/* */ \n/* 86 */ if (potion.hasStatusIcon()) {\n/* */ \n/* 88 */ int i1 = potion.getStatusIconIndex();\n/* 89 */ drawTexturedModalRect(i + 6, j + 7, 0 + i1 % 8 * 18, 198 + i1 / 8 * 18, 18, 18);\n/* */ } \n/* */ \n/* 92 */ String s1 = I18n.format(potion.getName(), new Object[0]);\n/* */ \n/* 94 */ if (potioneffect.getAmplifier() == 1) {\n/* */ \n/* 96 */ s1 = String.valueOf(s1) + \" \" + I18n.format(\"enchantment.level.2\", new Object[0]);\n/* */ }\n/* 98 */ else if (potioneffect.getAmplifier() == 2) {\n/* */ \n/* 100 */ s1 = String.valueOf(s1) + \" \" + I18n.format(\"enchantment.level.3\", new Object[0]);\n/* */ }\n/* 102 */ else if (potioneffect.getAmplifier() == 3) {\n/* */ \n/* 104 */ s1 = String.valueOf(s1) + \" \" + I18n.format(\"enchantment.level.4\", new Object[0]);\n/* */ } \n/* */ \n/* 107 */ this.fontRendererObj.drawStringWithShadow(s1, (i + 10 + 18), (j + 6), 16777215);\n/* 108 */ String s = Potion.getPotionDurationString(potioneffect, 1.0F);\n/* 109 */ this.fontRendererObj.drawStringWithShadow(s, (i + 10 + 18), (j + 6 + 10), 8355711);\n/* 110 */ j += l;\n/* */ } \n/* */ } \n/* */ }",
"@Override\n public List<String> doAction(){\n destination.setCloakTurns(destination.getCloakTurns() + 3);\n destination.getOwner().getResources().getTechResource().useTech(Constants.CLOAK_COST);\n //Message \"(Player) cloaked (destination) for three more turns.\"\n return Arrays.asList((destination.getOwner().getName() + \" cloaked \" + destination.getName() + \" for three more turns.\"));\n }",
"public void fillChest(Inventory inv);",
"@Override\n public void doStrategy(final Pyromancer pyromancer) {\n int hpLoss = pyromancer.getHP() / Constants.PYROMANCER_STRATEGY_HP_LOSS;\n pyromancer.reduceHP(hpLoss);\n pyromancer.increaseRaceMod(Constants.DAMAGE_MOD_70);\n }",
"public void popEnemies() {\n\t\t\n\t\tEnemyList.add(orc);\n\t\tEnemyList.add(goblin);\n\t\tEnemyList.add(necromancer);\n\t\tEnemyList.add(troll);\n\t\tEnemyList.add(minotaur);\n\t\tEnemyList.add(hydra);\n\t\tEnemyList.add(zombie);\n\t\tEnemyList.add(thrall);\n\t\tEnemyList.add(demon);\n\t\tEnemyList.add(witch);\n\t\tEnemyList.add(boss);\n\t}",
"public void changeStats(gameCharacter toAffect);",
"public String placeItemInChest(String itemName) {\r\n\t\t\tif(this.getPlayer().getItem(itemName) == null) {\r\n\t\t\t\treturn \"You do not have this item in your inventory.\";\r\n\t\t\t}\r\n\t\t\telse if(this.getCurrentChest().getContent().get(itemName) == null) {\r\n\t\t\t\tthis.handleDecQuestrelatedItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getCurrentChest().addItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().removeItem(itemName);\r\n\t\t\t\treturn \"You put \" + itemName + \" in \" + this.getCurrentChest().getName() + \". \\n\"\r\n\t\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight.\";\r\n\t\t\t}\r\n\t\t\telse if(this.getCurrentChest().getContent().get(itemName).getNumber() >= this.getCurrentChest().getItemSlots()) {\r\n\t\t\t\treturn this.getCurrentChest().getName() + \" cannot contain any more items of this type. \\n\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.handleDecQuestrelatedItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getCurrentChest().addItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().removeItem(itemName);\r\n\t\t\t\treturn \"You put \" + itemName + \" in \" + this.getCurrentChest().getName() + \". \\n\"\r\n\t\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight.\";\r\n\t\t\t\t}\r\n\t\t}",
"protected abstract void addMaterialStats();",
"@EventHandler()\n\tpublic void onPlayerItemConsume(PlayerItemConsumeEvent event){\n\t\tList<String> item_desc = event.getItem().getLore();\n\t\tif (item_desc != null){\n\t\t\tPlayer target = event.getPlayer();\n\n\t\t\tfor (String line : item_desc )\n\t\t\t{\n\t\t\t\tif (line.contains(\"Hunger\"))\n\t\t\t\t{\n\t\t\t\t\tint value = Integer.parseInt(line.substring(line.lastIndexOf(\" \") + 1));\n\t\t\t\t\ttarget.setFoodLevel(target.getFoodLevel() + value );\n\t\t\t\t}\n\t\t\t\telse if (line.contains(\"Saturation\"))\n\t\t\t\t{\n\t\t\t\t\tint value = Integer.parseInt(line.substring(line.lastIndexOf(\" \") + 1));\n\t\t\t\t\ttarget.setSaturation(target.getSaturation() + value );\n\t\t\t\t}\n\t\t\t\telse if (line.contains(\"Effect\"))\n\t\t\t\t{\n\n\t\t\t\t\tString effect_full = line.substring(line.lastIndexOf(\": \") + 2, line.lastIndexOf(\"- \"));\n\t\t\t\t\t// Get the first number in the desc, which will be the strength of the effect by splitting the string at the number.\n\t\t\t\t\tString[] strength_effect = effect_full.split(\"(?<=\\\\D)(?=\\\\d)\");\n\t\t\t\t\tString effect = strength_effect[0];\n\t\t\t\t\tString strength = strength_effect[1];\n\n\t\t\t\t\tString duration_mins = line.substring(line.lastIndexOf(\"- \") + 2, line.lastIndexOf(\":\"));\n\t\t\t\t\tString duration_secs = line.substring(line.lastIndexOf(\":\") + 1, line.lastIndexOf(\" min\"));\n\n\t\t\t\t\tint amplifier = Integer.parseInt(strength.trim()) - 1;\n\t\t\t\t\t// Here we have to convert mins to seconds and also multiply the entire duration by the tick rate, which is default 20.\n\t\t\t\t\tint duration = (Integer.parseInt(duration_mins.trim()) * 60 + Integer.parseInt(duration_secs.trim())) * 20;\n\n\t\t\t\t\tPotionEffectType pot_effect = PotionEffectType.getByName(effect.trim());\n\n\t\t\t\t\tPotionEffect food_effect = new PotionEffect(pot_effect, duration , amplifier);\n\n\t\t\t\t\ttarget.addPotionEffect(food_effect);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public String attack(Entity e) {\n return super.attack(e) + \"\\n\" + super.attack(e);\n }",
"@Override\n public void updateDescription() {\n if(this.amount == 1) {\n this.description = DESCRIPTIONS[0] + DESCRIPTIONS[1];\n }\n else {\n this.description = DESCRIPTIONS[0] + DiminishingStacks + DESCRIPTIONS[2];\n }\n\n }",
"@Override\n public String performSpecialEffect() {\n this.health += HEALTH_STEAL_AMOUNT;\n return \"The vampire stole a bit of health after it attacked.\";\n }",
"@Override\n public void applyEffect(Player player) {\n\n player.add(mResourcesGains);\n\n }",
"@Test\n public void bestowWithFusedSpell() {\n addCard(Zone.BATTLEFIELD, playerA, \"Mountain\", 2);\n /**\n * Cyclops of One-Eyed Pass {2}{R}{R} Creature - Cyclops 5/2\n */\n addCard(Zone.BATTLEFIELD, playerA, \"Cyclops of One-Eyed Pass\");\n\n /**\n * Nyxborn Rollicker {R} Enchantment Creature - Satyr 1/1 Bestow {1}{R}\n * (If you cast this card for its bestow cost, it's an Aura spell with\n * enchant creature. It becomes a creature again if it's not attached to\n * a creature.) Enchanted creature gets +1/+1.\n */\n addCard(Zone.HAND, playerA, \"Nyxborn Rollicker\");\n\n addCard(Zone.BATTLEFIELD, playerB, \"Swamp\", 3);\n addCard(Zone.BATTLEFIELD, playerB, \"Island\", 2);\n\n // Instant\n // Far {1}{U} Return target creature to its owner's hand.\n // Away {2}{B} Target player sacrifices a creature.\n // Fuse (You may cast one or both halves of this card from your hand.)\n addCard(Zone.HAND, playerB, \"Far // Away\");\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Nyxborn Rollicker using bestow\", \"Cyclops of One-Eyed Pass\");\n\n castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, \"fused Far // Away\");\n addTarget(playerB, \"Cyclops of One-Eyed Pass\"); // Far\n addTarget(playerB, playerA); // Away\n addTarget(playerA, \"Nyxborn Rollicker\");\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n assertHandCount(playerA, \"Cyclops of One-Eyed Pass\", 1);\n assertHandCount(playerB, 0);\n\n assertGraveyardCount(playerB, \"Far // Away\", 1);\n\n assertPermanentCount(playerA, \"Nyxborn Rollicker\", 0);\n assertGraveyardCount(playerA, \"Nyxborn Rollicker\", 1);\n\n }",
"private void updateActionCards() {\n\t\tcleanActionCards();\n\t\tLinearLayout layoutActionCards = (LinearLayout) findViewById(R.id.layoutActionCards);\n\t\tArrayList<String> actionCards = ((ApplicationExtension) getApplication())\n\t\t\t\t.getCharacter().getActionCards();\n\t\tfor (int i = 0; i < actionCards.size(); ++i) {\n\t\t\tString cardName = actionCards.get(i);\n\t\t\tTextView textCardName = new TextView(this);\n\t\t\t// temporaryText.add(textCardName);\n\t\t\ttextCardName.setText(cardName + \":\");\n\t\t\ttextCardName.setLayoutParams(new LayoutParams(\n\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n\t\t\tlayoutActionCards.addView(textCardName);\n\n\t\t\tResultTypeUtility utility = new ResultTypeUtility();\n\t\t\tutility.setupDamage();\n\t\t\tfor (int j = 0; j <= Character.MAX[SKULL]; ++j) {\n\t\t\t\tString buttonName = \"toggleButtonSkull\" + j;\n\t\t\t\tint buttonId = getResources().getIdentifier(buttonName, \"id\",\n\t\t\t\t\t\t\"com.roxolan.warhammeroptimiserapp\");\n\t\t\t\tToggleButton button = (ToggleButton) findViewById(buttonId);\n\t\t\t\tif (button.isChecked()) {\n\t\t\t\t\tTextView textAverageDamage = new TextView(this);\n\t\t\t\t\ttextAverageDamage.setText(R.string.computing);\n\t\t\t\t\ttextAverageDamage.invalidate();\n\t\t\t\t\ttextAverageDamage.requestLayout();\n\t\t\t\t\t// temporaryText.add(textAverageDamage);\n\t\t\t\t\tlayoutActionCards.addView(textAverageDamage);\n\t\t\t\t\tdouble averageDamage;\n\t\t\t\t\tCharacter player = ((ApplicationExtension) getApplication()).getCharacter();\n\t\t\t\t\tCharacter monster = new Character(SKULL, j);\n\t\t\t\t\tSystem.out.println(\"Passing card \" + cardName \n\t\t\t\t\t\t\t+ \", rank \" + player.getLevel() + \", skull \" + monster.getLevel() \n\t\t\t\t\t\t\t+ \", damage utility = \" + utility.getUtility(DEAL, DAMAGE));\n\t\t\t\t\ttry {\n\t\t\t\t\t\taverageDamage = Optimiser.averageUtility(this, cardName, player, monster, utility);\n\t\t\t\t\t\ttextAverageDamage.setText(j + \" \"\n\t\t\t\t\t\t\t\t+ getString(R.string.skulls) + \": \"\n\t\t\t\t\t\t\t\t+ averageDamage);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\ttextAverageDamage.setText(R.string.errorCardNotFound);\n\t\t\t\t\t}\n\t\t\t\t\ttextAverageDamage.invalidate();\n\t\t\t\t\ttextAverageDamage.requestLayout();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void createCharacters()\n {\n Item item_chambermaid = new Item(\"Broom\",\"The brush that she uses\");\n Item item_bob_taylor = new Item(\"Toys\",\"Bob Taylor toys\");\n Item item_mr_Cunningham = new Item(\"Black hat\",\"The nice hat of Mr Cunningham\");\n Item item_ms_Wellington = new Item(\"Ring\", \"This is the wedding ring\");\n \n // Neutral characters creation //\n mr_Taylor = new Neutral(\"Mr Taylor\",\" \", poolroom, \"..\\\\pictures\\\\Characters\\\\MrTaylor2.png\");\n ms_Taylor = new Neutral(\"Ms Taylor\",\"Oh no ! My poor husband is dead ! What am I going to do now ?!\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsTaylor2.png\");\n ms_Cunningham = new Neutral(\"Ms Cunningham\",\"My husband was the best old friend of Mr Taylor\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsCunningham2.png\");\n \n // Ally characters creation //\n chambermaid = new Ally(\"Chambermaid\",\"I was in the dancing room to serve the guests.I was not with the master\", poolroom, item_chambermaid, \"..\\\\pictures\\\\Characters\\\\Chambermaid.png\");\n bob_Taylor = new Ally(\"Bob Taylor\",\"What happened to my father ? \", poolroom, item_bob_taylor, \"..\\\\pictures\\\\Characters\\\\BobTaylor2.png\");\n mr_Cunningham = new Ally(\"Mr Cunningham\", \"I was in my bedroom when I heard someone screaming. So I went down stairs quickly\", poolroom, item_mr_Cunningham, \"..\\\\pictures\\\\Characters\\\\MrCunningham2.png\");\n ms_Wellington = new Ally(\"Ms Wellington\", \"I was in the dancing room with my husband. The chambermaid served us.\", poolroom, item_ms_Wellington, \"..\\\\pictures\\\\Characters\\\\MsWellington2.png\");\n \n // Enemy characters ceration //\n valet = new Enemy(\"Valet\",\"I was in the kitchen. I checked the wine delivery\", poolroom,4,80,12,\"..\\\\pictures\\\\Characters\\\\Valet2.png\"); // damage =4 accuraccy = 80, HP=12\n caretaker = new Enemy(\"Caretaker\",\"I was in my hut to repair the fork\",poolroom, 2,20,5, \"..\\\\pictures\\\\Characters\\\\Caretaker2.png\"); // damage =2 accuraccy = 20, HP=5\n mr_Wellington = new Enemy(\"Mr Wellington\",\"I was in the dancing room with my wife\", poolroom, 1,10,7, \"..\\\\pictures\\\\Characters\\\\MrWellington2.png\"); // damage =1 accuraccy = 10, HP=7\n nina_Taylor = new Enemy(\"Nina Taylor\", \"I was in the library and I read a good book\", poolroom, 2, 30, 8,\"..\\\\pictures\\\\Characters\\\\NinaTaylor2.png\"); // damage =2 accuraccy = 30, HP=8\n skeleton = new Enemy(\"Oscar the skeleton\",\"A human skeleton\", laboratory, 2, 80, 5,\"..\\\\pictures\\\\Characters\\\\skeleton.png\");\n ghost = new Enemy(\"Casper the Ghost\", \"A little green ghost\", livingroom, 1, 50, 4, \"..\\\\pictures\\\\Characters\\\\ghost.png\");\n \n listOfPNG = new ArrayList();\n listOfPNG.add(ms_Taylor);\n listOfPNG.add(ms_Cunningham);\n listOfPNG.add(chambermaid);\n listOfPNG.add(bob_Taylor);\n listOfPNG.add(mr_Cunningham);\n listOfPNG.add(ms_Wellington);\n //listOfPNG.add(valet);\n //listOfPNG.add(caretaker);\n listOfPNG.add(mr_Wellington);\n listOfPNG.add(nina_Taylor);\n \n \n }",
"void upgradeTower(HashMap<String, Double> upgrades);",
"static void healing_challenge2() {\n System.out.println(username + \" opens up the bag to check if there are any potions left in there...\");\n enter = next.nextLine();\n if(potions <= zero) {\n System.out.println(username + \" feels something in the bag...\");\n System.out.println(\"\\n\");\n System.out.println(\"GASP!!! It's just a sock from granny Boo.\");\n enter = next.nextLine();\n System.out.println(\"UH! OH! You have no more potions left, SORRY YOU'RE ON YOUR OWN...\");\n System.out.println(\"\\n\");\n }else if(potions > zero && playerhealth != 310) {\n System.out.println(username + \" found a potion in the bag...\");\n System.out.println(username + \" takes the red potion, throws the cap, and slowly let the potion heal the wounds.\");\n System.out.println(username + \" gained 80 HP points.\");\n playerhealth = playerhealth + 80; //player's health is healed\n potions--;\n if(playerhealth > 310){ //in case of player heals and adds 80 and health goes higher than 310\n playerhealth = 310;\n }\n //in case if player tries to increase their health over the maximum\n }else if(playerhealth == 310) {\n System.out.println(\"You are at maximum health.\");\n }\n }",
"public String enchantmentsToString(ItemStack item){\n\t\tMap<Enchantment, Integer> a = null;\n\t\t\n\t\tif(item.getData().toString().contains(\"ENCHANTED_BOOK\")){\n\t\t\tdebugOut(\"Pulling enchantment information from enchanted book\");\n\t\t\t//credit for code http://www.massapi.com/class/org/bukkit/inventory/meta/EnchantmentStorageMeta.html\n\t\t\tEnchantmentStorageMeta esm = (EnchantmentStorageMeta) item.getItemMeta();\n a = esm.getStoredEnchants();\n\t\t}else{\n\t\t\tdebugOut(\"Pulling enchantment information from enchanted non-book item\");\n\t\t\ta= item.getEnchantments();\n\t\t}\n\t\tString returnMe = \"\";\n\t\tfor(Entry<Enchantment, Integer> entry : a.entrySet()) {\n\t\t returnMe = returnMe+entry.getKey().getName()+\",\"+entry.getValue().toString()+\";\";\n\t\t debugOut(\"Enchantments: \"+returnMe);\n\t\t}\n\t\treturn returnMe;\n\t}",
"private void createSpells() {\n spells.add(new Heal(owner, assets));\n spells.add(new Renew(owner, assets));\n spells.add(new FlashHeal(owner, assets));\n spells.add(new Dispel(owner, assets));\n spells.add(new HolyNova(owner, assets));\n spells.add(new PrayerOfMending(owner, assets));\n spells.add(new Barrier(owner, assets));\n spells.add(new GreaterHeal(owner, assets));\n spells.add(new Smite(owner, assets));\n spells.add(new Penance(owner, assets));\n spells.add(new HolyShock(owner, assets));\n spells.add(new Lightwell(owner, assets));\n spells.add(new DivineHymn(owner, assets));\n spells.add(new DivineProtection(owner, assets));\n spells.add(new BlessedGarden(owner, assets));\n\n // add spell to group\n for(int i = 0; i < spells.size(); i++) {\n addActor(spells.get(i));\n }\n }",
"private void calculateHeroStats() {\n int[] mods = calculateMods(heroRoll.hero, 40, skillOn);\n makePopupStat(hp, heroRoll, heroRoll.hero.HP, mods[0], getResources().getString(R.string.hp));\n makePopupStat(atk, heroRoll, heroRoll.hero.atk, mods[1], getResources().getString(R.string.atk));\n makePopupStat(spd, heroRoll, heroRoll.hero.speed, mods[2], getResources().getString(R.string.spd));\n makePopupStat(def, heroRoll, heroRoll.hero.def, mods[3], getResources().getString(R.string.def));\n makePopupStat(res, heroRoll, heroRoll.hero.res, mods[4], getResources().getString(R.string.res));\n\n int totalMods = mods[0] + mods[1] + mods[2] + mods[3] + mods[4];\n String bstText = heroRoll.getBST(getBaseContext()) < 0 ? \"?\" : heroRoll.getBST(getBaseContext()) - totalMods + \"\";\n bst.setText(getResources().getString(R.string.bst) + \" \" + bstText);\n bst.setTextColor(getResources().getColor(R.color.colorPrimary));\n }",
"void addMana(int mana);",
"@Override\r\n public void placeArmy(Integer reinforcementArmy) {\r\n\r\n Integer currentPlayerID = playerID;\r\n HashSet<String> conqueredCountryByThisPlayer = gameData.gameMap.getConqueredCountries(currentPlayerID);\r\n\r\n System.out.println();\r\n System.out.println(\"**** Reinforcement Phase Begins for player \" + this.playerName + \"..****\\n\");\r\n\r\n String strongestCountry = \"\";\r\n Integer strongestCountryArmyCount = Integer.MIN_VALUE;\r\n Integer currentCountryArmyCount = 0;\r\n for(String country: conqueredCountryByThisPlayer){\r\n currentCountryArmyCount = gameData.gameMap.getCountry(country).getCountryArmyCount();\r\n if(strongestCountryArmyCount < currentCountryArmyCount){\r\n strongestCountry = country;\r\n strongestCountryArmyCount = currentCountryArmyCount;\r\n }\r\n }\r\n gameData.gameMap.getCountry(strongestCountry).addArmy(reinforcementArmy);\r\n System.out.println(\"\\nReinforcement is done for player \"+playerName+\". Here is an overview. \\n\");\r\n for(String country: conqueredCountryByThisPlayer){\r\n System.out.println(\"Country: \"+country+\", Army Count: \"+gameData.gameMap.getCountry(country).getCountryArmyCount());\r\n }\r\n }"
] | [
"0.59135854",
"0.55527335",
"0.5508381",
"0.5286576",
"0.5257056",
"0.5251412",
"0.52394164",
"0.523191",
"0.5208032",
"0.5177623",
"0.5151144",
"0.51458293",
"0.5134887",
"0.51145416",
"0.5114225",
"0.5103845",
"0.50990605",
"0.5079118",
"0.5066977",
"0.5064898",
"0.50633764",
"0.50258243",
"0.50121796",
"0.5003365",
"0.4999025",
"0.4990389",
"0.49899593",
"0.4988134",
"0.4979919",
"0.49508473",
"0.4938776",
"0.49364954",
"0.4933764",
"0.49328905",
"0.49275136",
"0.4925088",
"0.49246493",
"0.49165237",
"0.49125868",
"0.49110627",
"0.4903995",
"0.4898628",
"0.4893001",
"0.48908895",
"0.48844382",
"0.48807633",
"0.48793897",
"0.4876359",
"0.48693493",
"0.48691002",
"0.48677647",
"0.4861832",
"0.48599383",
"0.4859382",
"0.48588786",
"0.485346",
"0.48520872",
"0.48471987",
"0.4842555",
"0.48366725",
"0.48320234",
"0.48250777",
"0.48177966",
"0.48142895",
"0.48049796",
"0.47974715",
"0.4792692",
"0.47804832",
"0.4775444",
"0.4773666",
"0.47649285",
"0.47646558",
"0.47436562",
"0.47416264",
"0.47305536",
"0.47290152",
"0.47223374",
"0.47013396",
"0.4699534",
"0.46981782",
"0.46959955",
"0.46940628",
"0.4688759",
"0.4683889",
"0.4678666",
"0.46782827",
"0.4675176",
"0.46741927",
"0.46718618",
"0.4669215",
"0.46675053",
"0.46655315",
"0.46608096",
"0.46603948",
"0.4658214",
"0.46577367",
"0.4655292",
"0.4653547",
"0.4642299",
"0.46418533"
] | 0.6159703 | 0 |
called by the manager each update cycle | public void update()
{
//if factory is turned on
if (active)
{
//if the materials required to produce the current recipe are in the factory inventory
if (checkHasMaterials())
{
//if the factory has been working for less than the required time for the recipe
if (currentProductionTimer < getProductionTime())
{
//if the factory power source inventory has enough fuel for at least 1 energyCycle
if (isFuelAvailable())
{
//if the time since fuel was last consumed is equal to how often fuel needs to be consumed
if (currentEnergyTimer == getEnergyTime()-1)
{
//remove one fuel.
getFuel().removeFrom(getPowerSourceInventory());
//0 seconds since last fuel consumption
currentEnergyTimer = 0;
fuelConsumed();
}
//if we don't need to consume fuel, just increment the energy timer
else
{
currentEnergyTimer++;
}
//increment the production timer
currentProductionTimer ++;
postUpdate();
}
//if there is no fuel Available turn off the factory
else
{
powerOff();
}
}
//if the production timer has reached the recipes production time remove input from chest, and add output material
else if (currentProductionTimer >= getProductionTime())
{
consumeInputs();
produceOutputs();
//Repairs the factory
repair(getRepairs().removeMaxFrom(getInventory(),(int)currentRepair));
recipeFinished();
currentProductionTimer = 0;
powerOff();
}
}
else
{
powerOff();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\r\n\tpublic void update() {\r\n\r\n\t}",
"@Override\r\n\tpublic void update() {\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n public void update() {\n \n }",
"protected void onUpdate() {\r\n\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t}",
"@Override\r\n\tpublic void update() {\n\t}",
"@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}",
"@Override\n public void update() {\n }",
"@Override\r\n\tpublic void update() {\n\r\n\t}",
"@Override\r\n\tpublic void update() {\n\r\n\t}",
"@Override\n\tpublic void update() {}",
"@Override\n\tpublic void update() {}",
"@Override\n public void update()\n {\n\n }",
"@Override\n public void update() {\n\n }",
"@Override\n\tpublic void update() { }",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n public void update() {\n }",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t}",
"@Override\n\tpublic void update() {\n\t}",
"@Override\n\tpublic void update() {\n\t}",
"public void willbeUpdated() {\n\t\t\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\r\n\t\t\r\n\t}",
"public void update() {\n manager.update();\n }",
"public void update() {\n\t\t\n\t}",
"@Override\r\n public void onUpdate() {\n super.onUpdate();\r\n }",
"public void update(){\r\n\t\t\r\n\t}",
"public void updateManager();",
"public void update() {}",
"@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}",
"@Override\n\tpublic void onUpdate() {\n\t\t\n\t}",
"public void update()\n\t{\n\t\tsuper.update();\n\t}",
"@Override\n public void update() {\n updateBuffs();\n }",
"public void update(){\r\n }",
"public void update() {\n }",
"public void update() {\n \t\tissueHandler.checkAllIssues();\n \t\tlastUpdate = System.currentTimeMillis();\n \t}",
"public void update() {\n\t\tupdate(1);\n\t}",
"public void update(){}",
"public void update(){}",
"@Override\n\tpublic int update() {\n\t\treturn 0;\n\t}",
"protected abstract void update();",
"protected abstract void update();",
"public void update(){\n }",
"public void update() {\n\n }",
"public void update() {\n\n }",
"@Override\r\n\tpublic void Update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void Update() {\n\t\t\r\n\t}",
"public void update() ;",
"@Override\n\tpublic void update(UpdateInfo updateInfo) {\n\t\t\n\t}",
"@Override\n public void update() {\n this.blnDoUpdate.set(true);\n }",
"@Override\n\tpublic void preUpdate() {\n\n\t}",
"@Override\n\tpublic void onUpdate() {\n\t\tlistener.onUpdate();\n\t}",
"@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}",
"protected abstract void update();",
"public void update() {\n\t\tmLast = mNow;\n\t\tmNow = get();\n\t}",
"private UpdateManager () {}",
"public void update(){\n \t//NOOP\n }",
"@Override\r\n\tpublic void MemberUpdate() {\n\r\n\t}",
"private void checkForUpdates() {\n UpdateManager.register(this);\n }",
"private void checkForUpdates() {\n UpdateManager.register(this);\n }",
"@Override\n\tpublic void update() {\n\t\tobj.update();\n\t}",
"public void updateInfo() {\n\t}",
"@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}",
"@Override\n public synchronized void update(int deltaTime) {\n }",
"public void requestUpdate(){\n shouldUpdate = true;\n }",
"protected abstract void updateInfos();",
"@Override\n\t\tpublic void update() {\n\t\t\tSystem.out.println(\"새로운 수정\");\n\t\t}",
"abstract public void update();",
"private void updates() {\n \tDBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n for (Update update: updates) {\n \tupdate.init();\n }\n }",
"public abstract void update ();",
"@Override\r\n public void update(long timePassed) {\n\r\n }",
"@Override\r\n public void update() {\r\n this.total = calculateTotal();\r\n }"
] | [
"0.77741456",
"0.77741456",
"0.7707026",
"0.7707026",
"0.7707026",
"0.7707026",
"0.7707026",
"0.769594",
"0.769594",
"0.769594",
"0.7655761",
"0.7643244",
"0.7618485",
"0.76073253",
"0.7591664",
"0.75873226",
"0.75873226",
"0.75723386",
"0.75656533",
"0.75389016",
"0.75389016",
"0.75026506",
"0.75026506",
"0.7496612",
"0.74954635",
"0.74839824",
"0.7477087",
"0.7477087",
"0.7477087",
"0.7477087",
"0.7477087",
"0.7477087",
"0.7467541",
"0.74590826",
"0.74590826",
"0.74590826",
"0.74590826",
"0.74590826",
"0.74590826",
"0.74590826",
"0.74590826",
"0.74590826",
"0.74590826",
"0.7458657",
"0.7458657",
"0.7458657",
"0.74420536",
"0.73131645",
"0.73131645",
"0.73131645",
"0.73131645",
"0.73120946",
"0.73031247",
"0.73014814",
"0.7275552",
"0.7267836",
"0.723345",
"0.7207353",
"0.7190027",
"0.71859175",
"0.71745235",
"0.7158554",
"0.71276534",
"0.7102236",
"0.7023875",
"0.7017152",
"0.70104146",
"0.70104146",
"0.7007122",
"0.69997656",
"0.69997656",
"0.6970475",
"0.69488233",
"0.69488233",
"0.692372",
"0.692372",
"0.6905903",
"0.69044214",
"0.6888381",
"0.68746763",
"0.68649894",
"0.68341756",
"0.6814203",
"0.6811918",
"0.680812",
"0.6801278",
"0.6729352",
"0.6723054",
"0.6723054",
"0.670907",
"0.67080307",
"0.66965175",
"0.668503",
"0.6650991",
"0.66063654",
"0.65871733",
"0.65858513",
"0.65756094",
"0.657205",
"0.6569035",
"0.6554743"
] | 0.0 | -1 |
returns the date at which the factory went into disrepair | public long getTimeDisrepair()
{
return timeDisrepair;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.Date getDisbursmentDate () {\n\t\treturn disbursmentDate;\n\t}",
"@Override\n public int getDate() {\n return this.deadline.getDay();\n }",
"Date getInvoicedDate();",
"Date getDueDate();",
"Date getDueDate();",
"java.lang.String getFoundingDate();",
"public Date getRealEstablish() {\r\n return realEstablish;\r\n }",
"public Date getFechaInclusion()\r\n/* 150: */ {\r\n/* 151:170 */ return this.fechaInclusion;\r\n/* 152: */ }",
"public Date getDueDate() {\n\t\treturn date; //changed DaTe to date\r\n\t}",
"public Date getInstdte() {\r\n return instdte;\r\n }",
"public Date getCertifiedDate() {\r\n \r\n Long deprovisioningCertifiedMillis = this.getCertifiedMillis();\r\n \r\n Date deprovisioningCertifiedDate = deprovisioningCertifiedMillis == null ? null : new Date(deprovisioningCertifiedMillis);\r\n \r\n return deprovisioningCertifiedDate;\r\n }",
"public Date getFechaExclusion()\r\n/* 160: */ {\r\n/* 161:178 */ return this.fechaExclusion;\r\n/* 162: */ }",
"Date getEDate();",
"public String deceasedDate() {\n return getString(FhirPropertyNames.PROPERTY_DECEASED_DATE);\n }",
"public Date getRepairTime() {\n return repairTime;\n }",
"Date getFechaNacimiento();",
"public Date getDisintegratortime() {\n return disintegratortime;\n }",
"@Override\n public Date getManufactureDate() {\n return manufacturedOn;\n }",
"@Override\n public Date getEffectiveDateForPerDiem(java.sql.Timestamp expenseDate) {\n if (getTripBegin() == null) {\n return new java.sql.Date(getDocumentHeader().getWorkflowDocument().getDateCreated().getMillis());\n }\n return new java.sql.Date(getTripBegin().getTime());\n }",
"public java.util.Date getRemoval_date() {\n return removal_date;\n }",
"Date getCheckedOut();",
"public Date getEffDate() {\r\n return this.effDate;\r\n }",
"public Date getDealingTime()\n/* */ {\n/* 159 */ return this.dealingTime;\n/* */ }",
"public Date getDeldte() {\r\n return deldte;\r\n }",
"@Override\n public Date getEffectiveDateForPerDiem(PerDiemExpense expense) {\n if (getTripBegin() == null) {\n return new java.sql.Date(getDocumentHeader().getWorkflowDocument().getDateCreated().getMillis());\n }\n return new java.sql.Date(getTripBegin().getTime());\n }",
"public LocalDate GetFechaActual() throws RemoteException;",
"public Date getFechaAutorizacionGastoExpediente() {\r\n return fechaAutorizacionGastoExpediente;\r\n }",
"public Date getDateFinContrat() {\r\n return dateFinContrat;\r\n }",
"public Date getNextrun() {\n return nextrun;\n }",
"public DateInfo getDate() {\r\n\t\treturn new DateInfo(super.getDate());\r\n\t\t//return new DateInfo(maturityDate);\r\n\t}",
"public java.sql.Date getDateassemb() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Date) __getCache(\"dateassemb\")));\n }",
"@Override\n public LocalDate getDate() {\n return null;\n }",
"LocalDate getDate();",
"public java.util.Date getDateOfExamination(){\n return localDateOfExamination;\n }",
"java.lang.String getDate();",
"public Date getSupEntRegdate() {\n return supEntRegdate;\n }",
"public java.util.Date getDateExamine () {\n\t\treturn dateExamine;\n\t}",
"public Date getNotiCreated() {\r\n return (Date) getAttributeInternal(NOTICREATED);\r\n }",
"public java.util.Date getRevocationDate() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: sun.security.x509.X509CRLEntryImpl.getRevocationDate():java.util.Date, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.security.x509.X509CRLEntryImpl.getRevocationDate():java.util.Date\");\n }",
"public String getDate_effet() {\r\n\t\treturn date_effet;\r\n\t}",
"public java.sql.Date getDatepr() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Date) __getCache(\"datepr\")));\n }",
"public String getLeavingDate();",
"public Date getRemittanceDay() {\n return remittanceDay;\n }",
"private Date getDeadlineDate() {\n String dateString = jtf_DeadLine.getText();\n Date date = Utils.parseDateFromString(dateString);\n System.out.println(\"Date:\" + date.toString());\n return date;\n }",
"public Date getDateofLaunch() {\n\treturn null;\n}",
"Date getForDate();",
"public void setDisbursmentDate (java.util.Date disbursmentDate) {\n\t\tthis.disbursmentDate = disbursmentDate;\n\t}",
"public Date getGioBatDau();",
"public Date getDepartureDate();",
"Date getCheckedOutDate();",
"public String getReturnDate();",
"public Date getDtInclusao() {\n\t\treturn dtInclusao;\n\t}",
"LocalDate getCheckInDate();",
"public Date getFechaDesde()\r\n/* 164: */ {\r\n/* 165:283 */ return this.fechaDesde;\r\n/* 166: */ }",
"@SuppressWarnings(\"static-access\")\n\tpublic String getCurrentProcDate() throws Exception {\n\t\t\n\t\tString queryCurrentProcDate = \n\t\t\t\t\"SELECT TOP 1 DI_PROC_DATE\\r\\n\" + \n\t\t\t\t\"FROM [\" + BaseTest.getWebsite() + \"].STAGING.T_STDI_DISBURSEMENTS\\r\\n\" + \n\t\t\t\t\"ORDER BY DI_PROC_DATE DESC;\";\n\t\t\n\t\tconn.createSQLServerConn();\n\t\ttry {\n\t\t\tcurrentProcDate=conn.fetchCurrentProcessDateFromDB(queryCurrentProcDate);\n\t\t} catch(Exception e) {\n\t\t\tReports.logAMessage(LogStatus.ERROR, \"Exception: \" + e.getMessage());\n\t\t\t//System.out.println(\"Exception error: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn currentProcDate;\n\t}",
"Date getDate();",
"Date getDate();",
"Date getDate();",
"public Date getEstablishDate() {\r\n return establishDate;\r\n }",
"public Date getIssuanceDate() {\n return (Date) getAttributeInternal(ISSUANCEDATE);\n }",
"public Date getFechaNacimiento()\r\n/* 133: */ {\r\n/* 134:242 */ return this.fechaNacimiento;\r\n/* 135: */ }",
"public LocalDate getDateDebut() {\n\t\treturn dateDebut;\n\n\t}",
"@Override\n\tpublic java.util.Date getPaymentDate() {\n\t\treturn _esfShooterAffiliationChrono.getPaymentDate();\n\t}",
"Date getCreateDate();",
"Date getCreateDate();",
"ValuationDate getValuationDate();",
"public java.util.Date getExpectedDateOfDelivery() {\r\n return expectedDateOfDelivery;\r\n }",
"public Date getClosingDate() {\n Date d = null;\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n try {\n d = sdf.parse(closingDate);\n }\n catch (Exception e) {e.printStackTrace();}\n return d;\n }",
"com.google.type.Date getAcquireDate();",
"public Date generarFechaSolicitudGarantia() {\r\n return new Date();\r\n }",
"public String getAccessionDeaccessionToDate() {\n return accessionDeaccessionToDate;\n }",
"public String getAccessionDeaccessionFromDate() {\n return accessionDeaccessionFromDate;\n }",
"public Date getDate_of_admission() {\r\n return date_of_admission;\r\n }",
"public Date getDueDate(String s){\r\n Date today = new Date();\r\n if (dueDate.after(today)){\r\n\r\n System.out.println(s);\r\n }\r\n return dueDate;\r\n }",
"@Override\n public long getDeviceDate() throws DeviceNotAvailableException {\n return 1476958891L;\n }",
"public LocalDate GetFechaUltimoCambio() throws RemoteException;",
"public java.sql.Date getDEPARTURE_FROM_LOC_DATE()\n {\n \n return __DEPARTURE_FROM_LOC_DATE;\n }",
"public void getREFDT()//get reference date\n\t{\n\t\ttry\n\t\t{\n\t\t\tDate L_strTEMP=null;\n\t\t\tM_strSQLQRY = \"Select CMT_CCSVL,CMT_CHP01,CMT_CHP02 from CO_CDTRN where CMT_CGMTP='S\"+cl_dat.M_strCMPCD_pbst+\"' and CMT_CGSTP = 'FGXXREF' and CMT_CODCD='DOCDT'\";\n\t\t\tResultSet L_rstRSSET = cl_dat.exeSQLQRY2(M_strSQLQRY);\n\t\t\tif(L_rstRSSET != null && L_rstRSSET.next())\n\t\t\t{\n\t\t\t\tstrREFDT = L_rstRSSET.getString(\"CMT_CCSVL\").trim();\n\t\t\t\tL_rstRSSET.close();\n\t\t\t\tM_calLOCAL.setTime(M_fmtLCDAT.parse(strREFDT)); // Convert Into Local Date Format\n\t\t\t\tM_calLOCAL.add(Calendar.DATE,+1); // Increase Date from +1 with Locked Date\n\t\t\t\tstrREFDT = M_fmtLCDAT.format(M_calLOCAL.getTime()); // Assign Date to Veriable \n\t\t\t\t//System.out.println(\"REFDT = \"+strREFDT);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"getREFDT\");\n\t\t}\n\t}",
"long getSettlementDate();",
"public Date getDATE_REJECTED() {\r\n return DATE_REJECTED;\r\n }",
"public Date getDATE_REJECTED() {\r\n return DATE_REJECTED;\r\n }",
"public java.util.Date getInspectedDate () {\n\t\treturn inspectedDate;\n\t}",
"Date getExpiredDate();",
"public int getDate() {\n return date ;\n }",
"public LocalDate getDate() {\r\n\t\treturn loanDate;\r\n\t}",
"public String getDate()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"EE d MMM yyyy\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }",
"public String getDsdate() {\n return dsdate;\n }",
"public int getDate() {\n\t\treturn date;\n\t}",
"public Date getFinancialDocumentRevolvingFundDate() {\r\n return financialDocumentRevolvingFundDate;\r\n }",
"protected Date getReturnDate() \t{ return this.returnDate; }",
"String getDate();",
"String getDate();",
"long getTradeDate();",
"Date getRequestedAt();",
"public Date getRegistDt() {\n return registDt;\n }",
"public String getDueDate()\r\n {\r\n return dueDate;\r\n }",
"@Override\n public final Date getDocumentDate() {\n return this.manufacture.getItsDate();\n }",
"public java.sql.Date getDatebldbeg() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Date) __getCache(\"datebldbeg\")));\n }",
"public Date getCommencDate() {\n return commencDate;\n }",
"public String getDepartingDate() {\r\n return departingDate;\r\n }"
] | [
"0.68500996",
"0.6567901",
"0.65595806",
"0.65183353",
"0.65183353",
"0.64388245",
"0.6337749",
"0.62658966",
"0.62634754",
"0.62441427",
"0.6241412",
"0.6217062",
"0.6200462",
"0.6185372",
"0.61785984",
"0.61688846",
"0.6115057",
"0.60961896",
"0.6086325",
"0.60547835",
"0.60436195",
"0.6023165",
"0.6015851",
"0.6003504",
"0.6003273",
"0.60004026",
"0.5996855",
"0.59856665",
"0.5985588",
"0.5983213",
"0.59831697",
"0.59727335",
"0.59699637",
"0.59647006",
"0.59640825",
"0.59474945",
"0.5943476",
"0.5942009",
"0.5937522",
"0.5933048",
"0.59329087",
"0.5926858",
"0.59180653",
"0.59163195",
"0.5915512",
"0.59152114",
"0.5914718",
"0.591411",
"0.5910131",
"0.59029484",
"0.5891837",
"0.588265",
"0.5878863",
"0.5873177",
"0.58709717",
"0.58663195",
"0.58663195",
"0.58663195",
"0.5865994",
"0.5863885",
"0.58545434",
"0.58460987",
"0.5844613",
"0.5844587",
"0.5844587",
"0.58425",
"0.58387893",
"0.58233726",
"0.58200324",
"0.5819462",
"0.5818962",
"0.5815097",
"0.5813992",
"0.58132464",
"0.5812648",
"0.5802286",
"0.57902235",
"0.5787855",
"0.5778088",
"0.5773894",
"0.5773894",
"0.5763618",
"0.5755695",
"0.5741017",
"0.57391375",
"0.5738256",
"0.57352155",
"0.57342255",
"0.5733914",
"0.57292706",
"0.5726784",
"0.5726784",
"0.5723116",
"0.5717619",
"0.5714812",
"0.57130474",
"0.5712913",
"0.5706379",
"0.57043374",
"0.57041997"
] | 0.68672925 | 0 |
Check sides for attached lever required for automation | public Block findAttachedLever(Block block) {
Block lever = null;
for (BlockFace face : REDSTONE_FACES) {
lever = block.getRelative(face);
if (lever.getType() == Material.LEVER) {
BlockFace attached = getAttachedFace(lever);
if (attached != null && attached == face) {
return lever;
}
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkConditionsToInteroperate(AID client) {\r\n\t\tif (!client.equals(TRUSTED_AID_1))\r\n\t\t\tISOException.throwIt(SW_CLIENT_UNAUTHORISED);\r\n\t\tif (image.isActive())\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t}",
"@Override\n public void loop() {\n rightArm.setTargetPosition((int)(.125* TICKS_PER_WHEEL_ROTATION*8));\n leftArm.setTargetPosition((int)(.125* TICKS_PER_WHEEL_ROTATION*8));\nrightArm.setPower(.6);\nleftArm.setPower(.6);\nif(runtime.seconds()>4&& stage==-1){\n stage++;\n}\n// telemetry.addData(\"IsAligned\" , detector.getAligned()); // Is the bot aligned with the gold mineral?\n// telemetry.addData(\"X Pos\" , detector.getXPosition()); // Gold X position.\n\n //Point screenpos = detector.getScreenPosition();\n if(stage==0) {\n Rect bestRect = detector.getFoundRect();\n\n double xPos = bestRect.x + (bestRect.width / 2);\n\n if (xPos < alignXMax && xPos > alignXMin) {\n aligned = true;\n } else {\n aligned = false;\n }\n telemetry.addData(\"aligned \", aligned);\n\n telemetry.addData(\"xpos \", xPos);\n telemetry.addData(\"amax \", alignXMax);\n telemetry.addData(\"amin \", alignXMin);\n if(!(xPos>0)){\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n telemetry.addLine(\"not detected\");\n }\n else if (xPos > alignXMax) {\n double power = ((xPos - alignXMax) / scale) * .3 + .4;\n rightWheel.setPower(power);\n leftWheel.setPower(-power);\n telemetry.addData(\"powL: \", power);\n telemetry.addLine(\"turning left\");\n runtime.reset();\n } else if (xPos < alignXMin) {\n double power = ((alignXMin - xPos) / scale) * .3 + .4;\n rightWheel.setPower(-power);\n leftWheel.setPower(power);\n telemetry.addData(\"powR: \", power);\n telemetry.addLine(\"turning right\");\n runtime.reset();\n } else {\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n telemetry.addLine(\"found\");\n telemetry.addData(\"secks: \", runtime.seconds());\n if(runtime.seconds()>.1){\n runtime.reset();\n stage++;\n resetDriveEncoders();\n }\n }\n\n\n }\n else if (stage==1){\n rightWheel.setTargetPosition(-3*TICKS_PER_WHEEL_ROTATION);\n leftWheel.setTargetPosition(-3*TICKS_PER_WHEEL_ROTATION);\n leftWheel.setPower(.5);\n rightWheel.setPower(.5);\n if(runtime.seconds()>5){\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n }\n\n }\n\n\n telemetry.addData(\"stage: \", stage);\n telemetry.update();\n }",
"boolean hasSide();",
"@Test(priority=2)\n\tpublic void verifyPresenceOfLinksinLeftsideMenu() throws Exception {\n\t\t\n\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.overviewOptioninSiderBar),\n\t\t\t\t\"Overview option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.leadsOptioninSiderBar),\n\t\t\t\t\"Leads option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.myStockOptioninSiderBar),\n\t\t\t\t\"My stock option is not present in side bar\");\n\t\tclick(overviewObj.myStockOptioninSiderBar);\n\t\twaitTill(1000);\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.allMyStockOptioninSiderBar);\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.createMyStockOptioninSiderBar),\n\t\t\t\t\"Create my stock option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.allMyStockOptioninSiderBar),\n\t\t\t\t\"All my stock option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.marketInsightOptioninSiderBar),\n\t\t\t\t\"Market insight option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.profileOptioninSiderBar),\n\t\t\t\t\"Profile option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.monthlyPackageOptioninSiderBar),\n\t\t\t\t\"Monthly package option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.contactOptioninSiderBar),\n\t\t\t\t\"Contact option is not present in side bar\");\n\t\tclick(overviewObj.contactOptioninSiderBar);\n\t\twaitTill(1000);\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.privacyOptionunderContactlinkSiderBar);\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.termsOptionunderContactlinkSiderBar),\n\t\t\t\t\"Terms link under Contact option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.privacyOptionunderContactlinkSiderBar),\n\t\t\t\t\"Privacy link under Contact option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.contactOptionunderContactlinkSiderBar),\n\t\t\t\t\"Contact link under Contact option is not present in side bar\");\n\t}",
"public void approachTargetWithVision() {\n final double STEER_P = 0.005; \n final double DRIVE_P = 0.05; \n final double DESIRED_TARGET_AREA = 4; // Area of the target when the robot reaches the wall\n final double MAX_DRIVE = 0.75; // Simple speed limit so we don't drive too fast\n final double STEER_I = 0.005;\n final double DRIVE_I = 0.0;\n final double STEER_D = 0.02;\n final double xError;\n final double aError;\n double DRIVE_INTEGRAL = 0;\n\n \n\n double tv = NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"tv\").getDouble(0);\n double tx = NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"tx\").getDouble(0);\n double ta = NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ta\").getDouble(0);\n xError = tx;\n aError = (DESIRED_TARGET_AREA - ta);\n // SmartDashboard.putNumber(\"TA\", ta);\n // SmartDashboard.putNumber(\"TA Error\", aError);\n SmartDashboard.putNumber(\"TX Error\", xError);\n STEER_INTEGRAL = STEER_INTEGRAL + (xError*0.02);\n DRIVE_INTEGRAL = DRIVE_INTEGRAL + (aError * 0.02);\n STEER_DERIVATIVE = (xError - STEER_ERROR_PRIOR)/0.02;\n SmartDashboard.putNumber(\"Integral\", STEER_INTEGRAL);\n SmartDashboard.putNumber(\"Derivative\", STEER_DERIVATIVE);\n SmartDashboard.putNumber(\"TA\", ta);\n\n\n if (tv < 1.0) {\n m_LimelightHasValidTarget = false;\n drive_cmd = 0.0;\n steer_cmd = 0.0;\n } else {\n m_LimelightHasValidTarget = true;\n // Start with proportional steering\n steer_cmd = (xError * STEER_P) + (STEER_INTEGRAL * STEER_I) + (STEER_DERIVATIVE * STEER_D);\n\n // try to drive forward until the target area reaches our desired area\n drive_cmd = (aError * DRIVE_P) + (DRIVE_INTEGRAL * DRIVE_I);\n // don't let the robot drive too fast into the goal\n if (drive_cmd > MAX_DRIVE){\n drive_cmd = MAX_DRIVE;\n }\n }\n\n Robot.driveTrain.setLeftMotors(-drive_cmd - steer_cmd);\n Robot.driveTrain.setRightMotors(-drive_cmd + steer_cmd);\n\n STEER_ERROR_PRIOR = xError;\n\n }",
"public static void testEdgeDetection()\n {\n Picture swan = new Picture(\"swan.jpg\");\n swan.edgeDetection();\n swan.explore();\n }",
"@Test\n\tpublic void planeCanTakeOff() {\n\t\ttry {\n\t\t\theathrow.landing(tap);\n\t\t} catch (Exception exception) {\n\n\t\t}\n\n\t\ttry {\n\t\t\theathrow.takeoff(tap);\n\t\t} catch (Exception exception) {\n\n\t\t}\n\n\t\tassertEquals(expectedPlanes, heathrow.hangar);\n\t\tassertTrue(heathrow.hangar.isEmpty());\n\t}",
"public boolean checkDiagonalWin(){\n\t\treturn true;\n\t}",
"private void checkWalls() {\n\t\tcheckSideWalls();\n\t\tcheckTopWall();\n\t\tcheckBottomWall();\n\t}",
"public void checkInputs() {\n\n gearShift = driveStick.getXButtonReleased();\n slow = driveStick.getAButtonReleased();\n\n manualClimb = driveStick.getBumper(Hand.kLeft) && driveStick.getBumper(Hand.kRight);\n\n //climbToggle = driveStick.getBumperReleased(Hand.kLeft);\n climbToggle = false;\n climbRelease = driveStick.getStartButton();\n\n resetBalls = gunnerStick.getStartButtonReleased();\n visionShoot = gunnerStick.getBButtonReleased();\n manualShoot = gunnerStick.getYButton();\n distShoot = gunnerStick.getAButton();\n intakeToggle = gunnerStick.getBumperReleased(Hand.kRight);\n hoodToggle = gunnerStick.getBumperReleased(Hand.kLeft);\n intakeReverse = gunnerStick.getXButtonReleased();\n magazineReverse = gunnerStick.getBackButton();\n\n\n //Switch statement to determine controls for the driver\n switch (driverScheme) {\n case \"Reverse Turning\":\n XSpeed = -driveStick.getY(Hand.kLeft);\n ZRotation = driveStick.getX(Hand.kRight);\n break;\n default:\n XSpeed = driveStick.getY(Hand.kLeft);\n ZRotation = -driveStick.getX(Hand.kRight);\n break;\n }\n\n //Switch statement to determine controls for the gunner\n switch (gunnerScheme) {\n case \"Fun Mode\":\n\n discoToggle = gunnerStick.getBackButtonReleased();\n break;\n\n default:\n\n // if ((gunnerStick.getTriggerAxis(Hand.kRight) >= 0.75) && (gunnerStick.getTriggerAxis(Hand.kLeft) >= 0.75) && !overriding) {\n // overrideSafeties = !overrideSafeties;\n // overriding = true;\n // } else if ((gunnerStick.getTriggerAxis(Hand.kRight) <= 0.75) && (gunnerStick.getTriggerAxis(Hand.kLeft) <= 0.75)) {\n // overriding = false;\n // }\n\n break;\n }\n }",
"protected boolean checkAndEquipArrows() {\n // Check if nothing is equipped in left hand\n if (getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND) == null) {\n final ItemInstance activeWeapon = getActiveWeaponInstance();\n if (activeWeapon != null) {\n if (activeWeapon.getItemType() == WeaponType.BOW) {\n _arrowItem = getInventory().findArrowForBow(activeWeapon.getTemplate());\n } else if (activeWeapon.getItemType() == WeaponType.CROSSBOW) {\n getInventory().findArrowForCrossbow(activeWeapon.getTemplate());\n }\n }\n\n // Equip arrows needed in left hand\n if (_arrowItem != null) {\n getInventory().setPaperdollItem(Inventory.PAPERDOLL_LHAND, _arrowItem);\n }\n } else\n // Get the L2ItemInstance of arrows equipped in left hand\n {\n _arrowItem = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);\n }\n\n return _arrowItem != null;\n }",
"public void check2Minerals(){\n\t\t/*if (tfod != null) {\n\t\t\t// getUpdatedRecognitions() will return null if no new information is available since\n\t\t\t// the last time that call was made.\n\t\t\tList<Recognition> updatedRecognitions = tfod.getRecognitions();\n\n\t\t\tif (updatedRecognitions != null) {\n\n\t\t\t\tfloat goldMineral;\n\t\t\t\tfloat silverMineral;\n\n\t\t\t\tif(updatedRecognitions.size()==3){\n\t\t\t\t\tcheckMinerals();\n\t\t\t\t}\n\t\t\t\telse if (updatedRecognitions.size() >= 2) {\n\t\t\t\t\tif(updatedRecognitions.get(0).getLabel().equals(LABEL_GOLD_MINERAL)) {\n\t\t\t\t\t\tgoldMineral = updatedRecognitions.get(0).getLeft();\n\t\t\t\t\t\tsilverMineral = updatedRecognitions.get(1).getLeft();\n\t\t\t\t\t}\n\t\t\t\t\telse if(updatedRecognitions.get(1).getLabel().equals(LABEL_GOLD_MINERAL)){\n\t\t\t\t\t\tgoldMineral = updatedRecognitions.get(1).getLeft();\n\t\t\t\t\t\tsilverMineral = updatedRecognitions.get(0).getLeft();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tposition=\"right\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\ttelemetry.clearAll();\n\t\t\t\t\ttelemetry.addData(\"minerals\", updatedRecognitions.size());\n\t\t\t\t\ttelemetry.addData(\"goldMineral\", goldMineral);\n\t\t\t\t\ttelemetry.addData(\"silverMineral\", silverMineral);\n\t\t\t\t\ttelemetry.addData(\"position\", position);\n\t\t\t\t\ttelemetry.update();\n\n\n\t\t\t\t\tif(goldMineral<528){\n\t\t\t\t\t\tposition=\"center\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(goldMineral>528){\n\t\t\t\t\t\tposition=\"left\";\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tposition=\"rotate\";\n\t\t\t\t\t}*/\n\n\t\t//\t\t}\n\t\t//\t}\n\t\t//}\n\t}",
"public static boolean checkSensors() {\n //Default booleans set to true\n rightLineDetect = true;\n leftLineDetect = true;\n \n //If the left sensor detects the line first\n if (Math.abs(leftRedVal - initialRedValue) > rgbThres) {\n leftMotor.stop(true);\n rightMotor.stop(false);\n //if the right sensor does not detect a line\n if(Math.abs(rightRedVal - initialRedValue) < rgbThres) {\n rightLineDetect = false;\n return false;\n }\n }\n \n //if the right sensor detects the line first\n else if(Math.abs(rightRedVal - initialRedValue) > rgbThres) {\n leftMotor.stop(true);\n rightMotor.stop(false);\n //if the left sensor does not detect a line\n if(Math.abs(leftRedVal - initialRedValue) < rgbThres) {\n leftLineDetect = false;\n return false;\n }\n }\n return true;\n }",
"@Override\n protected void setup(){\n /* if(\"red\".equals(contrast) && \"round\".equals(ShapeAgent.shape)){\n System.out.println(\"Detected \"+count +\" Microneurysms in input image\");\n \n\n }\n else if((\"light yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape)) || (\"yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape))){\n System.out.println(\"Detected \"+count +\" exudates in input image\");\n\n }\n else if((\"dark yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape)) || (\"yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape))){\n System.out.println(\"Detected \"+count +\" exudates in input image\");\n\n }\n else{\n System.out.println(\"Complecated situation appeared with count agent\");\n\n }*/\n \n if(((1.12<BrightnessAgent.contrast) && (3.12>BrightnessAgent.contrast)) && ShapeAgent.shape >=0.8){\n System.out.println(\"Detected \"+count +\" Microneurysms in input image\"); \n }\n else if(((3.12<BrightnessAgent.contrast) && (4.12>BrightnessAgent.contrast)) && ShapeAgent.shape < 0.8){\n System.out.println(\"Detected \"+count +\" exudates in input image\"); \n }\n else if(((3.12<BrightnessAgent.contrast) && (4.12>BrightnessAgent.contrast)) && ShapeAgent.shape >= 0.8){\n System.out.println(\"Detected \"+count +\" exudates in input image\"); \n }\n else{\n System.out.println(\"Complecated situation occured in shape identification\");\n }\n doDelete();\n}",
"@Test\n public void GivenRobotInLaserBeamThenRobotGetsHitByLaser() {\n int healthRobotBeforeHit = robot.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after hit by laser\n int healthRobotAfterHit = robot.getRobotHealthPoint();\n\n //should evaluate to true\n assertNotEquals(healthRobotBeforeHit, healthRobotAfterHit);\n }",
"@Test(priority=1)\n\tpublic void verifyTradusProLogoAlongWithEnabledRadioButtonToTheLeftSide() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.overviewPageVerificationElement);\n Assert.assertTrue(verifyElementPresent(overviewPage.tradusProLogo), \"Tradus logo is not displaying after login to account\");\n Assert.assertTrue(verifyElementPresent(overviewPage.togglerUnderLogo), \"Enabled radio button is not displaying after login to account\");\n\t}",
"@Test\n public void checkIfSupportedTest() {\n assertTrue(EngineController.checkIfSupported(\"getMaxRotateSpeed\"));\n assertTrue(EngineController.checkIfSupported(\"rotate 10 1\"));\n assertTrue(EngineController.checkIfSupported(\"orient\"));\n // check interface, that specific for engine\n assertTrue(EngineController.checkIfSupported(\"getMaxThrust\"));\n assertTrue(EngineController.checkIfSupported(\"getCurrentThrust\"));\n assertTrue(EngineController.checkIfSupported(\"setThrust 333\"));\n }",
"protected boolean checkStandardArrow() {\n\t\tboolean passed = true;\n\t\tStroke last = m_subStrokes.get(m_subStrokes.size() - 1);\n\t\tStroke secondLast = m_subStrokes.get(m_subStrokes.size() - 2);\n\t\tStroke thirdLast = m_subStrokes.get(m_subStrokes.size() - 3);\n\t\tStroke fourthLast = m_subStrokes.get(m_subStrokes.size() - 4);\n\t\tdouble lastLength = StrokeFeatures.getStrokeLength(last);\n\t\tdouble secondLastLength = StrokeFeatures.getStrokeLength(secondLast);\n\t\tdouble thirdLastLength = StrokeFeatures.getStrokeLength(thirdLast);\n\n\t\t// test 1: last two sub-strokes must be close in size\n\t\tm_lastTwoDiff = Math.abs(lastLength - secondLastLength)\n\t\t\t\t/ (lastLength + secondLastLength);\n\t\tif (m_lastTwoDiff > 0.5)\n\t\t\tpassed = false;\n\n\t\t// test 2: two points at the \"head\" of the arrow should be close\n\t\tm_headDistance = last.getFirstPoint().distance(\n\t\t\t\tthirdLast.getFirstPoint())\n\t\t\t\t/ m_features.getStrokeLength();\n\t\tif (m_headDistance > 0.11)\n\t\t\tpassed = false;\n\t\tm_standardSum = m_headDistance;\n\n\t\t// test 3: line connecting tips of arrow head should intersect shaft of\n\t\t// arrow\n\t\tLine2D.Double line1 = new Line2D.Double(\n\t\t\t\tthirdLast.getLastPoint().getX(), thirdLast.getLastPoint()\n\t\t\t\t\t\t.getY(), last.getLastPoint().getX(), last\n\t\t\t\t\t\t.getLastPoint().getY());\n\t\tArrayList<Point2D> intersect = StrokeFeatures.getIntersection(\n\t\t\t\tfourthLast, line1);\n\t\tm_numIntersect = intersect.size();\n\t\tif (m_numIntersect <= 0)\n\t\t\tpassed = false;\n\t\t// Line2D.Double line2 = new Line2D.Double(fourthLast.getPoints().get(\n\t\t// fourthLast.getNumPoints() / 2).getX(), fourthLast.getPoints()\n\t\t// .get(fourthLast.getNumPoints() / 2).getY(), fourthLast\n\t\t// .getLastPoint().getX(), fourthLast.getLastPoint().getY());\n\t\t// double perpDiff = Math.abs(getSlope(line1) - (1.0 /\n\t\t// getSlope(line2)));\n\t\t// if (perpDiff > 5)\n\t\t// passed = false;\n\n\t\t// if passed make a beautified standard arrow\n\t\tif (passed) {\n\n\t\t\tm_arrowType = Type.STANDARD;\n\t\t\t\n\t\t\tGeneralPath arrowPath = new GeneralPath();\n\n\t\t\t// generate beginning path of stroke;\n\t\t\tif (m_subStrokes.size() == 4) {\n\n\t\t\t\tm_linear = true;\n\n\t\t\t\t// we have a linear arrow so beautify accordingly\n\t\t\t\tarrowPath.moveTo(fourthLast.getFirstPoint()\n\t\t\t\t\t\t.getX(), fourthLast.getFirstPoint().getY());\n\t\t\t\tarrowPath.lineTo(\n\t\t\t\t\t\tfourthLast.getLastPoint().getX(), fourthLast\n\t\t\t\t\t\t\t\t.getLastPoint().getY());\n\t\t\t} else {\n\n\t\t\t\tm_linear = false;\n\n\t\t\t\t// we have some other general arrow path\n\t\t\t\tfor (int i = 0; i < m_subStrokes.size() - 3; i++) {\n\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\tarrowPath.moveTo(m_subStrokes.get(i)\n\t\t\t\t\t\t\t\t.getFirstPoint().getX(), m_subStrokes.get(i)\n\t\t\t\t\t\t\t\t.getFirstPoint().getY());\n\t\t\t\t\tfor (int j = 0; j < m_subStrokes.get(i).getNumPoints(); j++)\n\t\t\t\t\t\tarrowPath.lineTo(m_subStrokes.get(i)\n\t\t\t\t\t\t\t\t.getPoint(j).getX(), m_subStrokes.get(i)\n\t\t\t\t\t\t\t\t.getPoint(j).getY());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// compute and generate ideal head of arrow\n\t\t\tdouble size = (thirdLastLength + secondLastLength + lastLength) / 3;\n\t\t\tdouble angle = 0;\n\n\t\t\t// if linear, the angle of the shaft is the angle of the first line\n\t\t\tif (m_linear) {\n\t\t\t\tangle = Math.atan2(fourthLast.getFirstPoint().getY()\n\t\t\t\t\t\t- fourthLast.getLastPoint().getY(), fourthLast\n\t\t\t\t\t\t.getFirstPoint().getX()\n\t\t\t\t\t\t- fourthLast.getLastPoint().getX());\n\t\t\t}\n\n\t\t\t// compute angle of \"curved\" shaft as the line between the midpoint\n\t\t\t// and the last point of the segment before the arrow head\n\t\t\telse {\n\t\t\t\tangle = Math.atan2(\n\t\t\t\t\t\tfourthLast.getPoints()\n\t\t\t\t\t\t\t\t.get(fourthLast.getNumPoints() / 2).getY()\n\t\t\t\t\t\t\t\t- fourthLast.getLastPoint().getY(), fourthLast\n\t\t\t\t\t\t\t\t.getPoints().get(fourthLast.getNumPoints() / 2)\n\t\t\t\t\t\t\t\t.getX()\n\t\t\t\t\t\t\t\t- fourthLast.getLastPoint().getX());\n\t\t\t}\n\n\t\t\t// make arrow heads be 45 degree angles when beautified\n\t\t\tdouble deltaAngle = Math.PI / 4.0;\n\n\t\t\t// make beautified arrow head\n\t\t\tPoint2D.Double p1 = new Point2D.Double(fourthLast.getLastPoint()\n\t\t\t\t\t.getX() - Math.sin(angle - deltaAngle) * size, fourthLast\n\t\t\t\t\t.getLastPoint().getY()\n\t\t\t\t\t+ Math.cos(angle - deltaAngle)\n\t\t\t\t\t* size);\n\t\t\tPoint2D.Double p2 = new Point2D.Double(fourthLast.getLastPoint()\n\t\t\t\t\t.getX() + Math.sin(angle + deltaAngle) * size, fourthLast\n\t\t\t\t\t.getLastPoint().getY()\n\t\t\t\t\t- Math.cos(angle + deltaAngle)\n\t\t\t\t\t* size);\n\t\t\tarrowPath.lineTo(p1.getX(), p1.getY());\n\t\t\tarrowPath.lineTo(fourthLast.getLastPoint().getX(),\n\t\t\t\t\tfourthLast.getLastPoint().getY());\n\t\t\tarrowPath.lineTo(p2.getX(), p2.getY());\n\t\t\t\n\t\t\tm_shape = new SVGPath(arrowPath);\n\t\t}\n\n\t\t/*\n\t\t * System.out.println(\"StandardArrow: passed = \" + passed + \" diff = \" +\n\t\t * diff + \" dis = \" + dis + \" intersect = \" + intersect.size() +\n\t\t * \" perp diff = \" + perpDiff);\n\t\t */\n\n\t\treturn passed;\n\t}",
"public void checkEdge()\n {\n if(getX() < 10 || getX() > getWorld().getWidth() - 10)\n {\n speed *= -1;\n }\n }",
"private void checkPaths(){\r\n\t\tif(noBeepersPresent()){\r\n\t\t\tif(leftIsClear()){\r\n\t\t\t\tif(frontIsBlocked()&&rightIsBlocked()&&cornerColorIs(RED)){\r\n\t\t\t\t\tturnLeft(); \r\n\t\t\t\t\tmakeMove();\r\n\t\t\t\t\tpaintCorner(RED);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tturnLeft(); \r\n\t\t\t\t\tcheckColors();\r\n\t\t\t\t}\r\n\t\t\t\tfollowPath();\r\n\t\t\t}\r\n\t\t\tif(frontIsClear()){\r\n\t\t\t\tcheckColors();\r\n\t\t\t\tfollowPath();\r\n\t\t\t}\r\n\t\t\tif(rightIsClear()){\r\n\t\t\t\tif(frontIsBlocked()&&leftIsBlocked()&&cornerColorIs(RED)){\r\n\t\t\t\t\tturnRight();\r\n\t\t\t\t\tmakeMove();\r\n\t\t\t\t\tpaintCorner(RED);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tturnRight();\r\n\t\t\t\t\tcheckColors();\r\n\t\t\t\t}\r\n\t\t\t\tfollowPath();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"DoorMat getHingeOnRightSide(boolean onRightSide) throws RuntimeException;",
"private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Now Playing - Live - DMCA Restricted - Linear tuner arrows \", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-228:EVQAAND-300\" })\n\tpublic void dmcaRestrictedLinearTuner() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying Now Playing - Live - DMCA Restricted - Linear tuner arrows MOBANDEVER-228\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().verifyLinerTuner();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"private void checkBlFunctAdvert() {\n if (blAdapt.isMultipleAdvertisementSupported()) {\n checkPermLocation();\n } else {\n DialogCreator.createDialogAlert(this, R.string.txt_bl_adv_needed, R.string.txt_bl_descr_adv_needed, R.string.txt_ok, null,\n new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialog) {\n finish();\n }\n });\n }\n }",
"boolean checkValidity(int side1, int side2, int side3);",
"void object_calculations_doesnt_touch_ground(){\n if(angle_with_ground>0&&down_angle>0&&up_angle<0)\n object_on_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle<0&&up_angle<0)\n object_upper_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle>0&&up_angle>0)\n object_below_eyes_level_calc();\n }",
"@Test\n\tpublic void lowerLeft2SWCSpecial()\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 112);\n\t\td.set(1, 113);\n\t\td.set(13, 101);\n\t\td.set(14, 102);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(114);\n\t\tassertTrue(2==test_arr.get(0).getX() && 10==test_arr.get(0).getY()\n\t\t\t&& 1==test_arr.get(1).getX() && 10==test_arr.get(1).getY());\n\t}",
"@Test\n\tpublic void upperLeft2SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 2);\n\t\td.set(1, 3);\n\t\td.set(2, 4);\n\t\td.set(13, 13);\n\t\td.set(15, 14);\n\t\td.set(16, 15);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(5);\n\t\tassertTrue(3==test_arr.get(0).getX() && 0==test_arr.get(0).getY()\n\t\t\t&& 2==test_arr.get(1).getX() && 0==test_arr.get(1).getY()\n\t\t\t&& 1==test_arr.get(2).getX() && 0==test_arr.get(2).getY());\n\t}",
"boolean isWinner() {\n if(checkTopLeftDownDiag('X') || checkTopLeftDownDiag('O')) {\n return true;\n } else if (checkBottomLeftUpDiag('X') || checkBottomLeftUpDiag('O')) {\n return true;\n } else if (checkRows('X') || checkRows('O')){\n return true;\n }\n else if (checkColumns('X') || checkColumns('O')){\n return true;\n }\n\n return false;\n }",
"@Test\n public void testAircraftPartNoOnlyApplicableOffWing() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem <> 787 AND rootpart.part_no_oem <> 777\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify on wing engine 787 is not applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify off wing engine is applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n }",
"public boolean checkDiagonal() {\n\t\t// conditions fo player X\n\t\tif ((bt[0].getText().equals(\"X\") && bt[4].getText().equals(\"X\") && bt[8].getText().equals(\"X\"))\n\t\t\t\t|| (bt[2].getText().equals(\"X\") && bt[4].getText().equals(\"X\") && bt[6].getText().equals(\"X\"))) {\n\t\t\tjtf.setText(\" PLAYER X WON!\");\n\t\t\tjtf.setForeground(Color.red);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t// conditions fo player O\n\t\tif ((bt[0].getText().equals(\"O\") && bt[4].getText().equals(\"O\") && bt[8].getText().equals(\"O\"))\n\t\t\t\t|| (bt[2].getText().equals(\"O\") && bt[4].getText().equals(\"O\") && bt[6].getText().equals(\"O\"))) {\n\t\t\tjtf.setText(\" PLAYER O WON!\");\n\t\t\tjtf.setForeground(Color.blue);\n\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tbt[i].setEnabled(false);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean checkSystem() {\n print(\"Testing ELEVATOR.--------------------------------------------------\");\n final double kCurrentThres = 0.5;\n if(getPosition() < 0){\n zeroPosition();\n }\n spx.set(ControlMode.PercentOutput, -0.1);\n srx.set(ControlMode.PercentOutput, -0.1);\n Timer.delay(0.2);\n srx.set(ControlMode.PercentOutput, 0.0);\n spx.set(ControlMode.PercentOutput, 0.0);\n Timer.delay(0.1);\n; srx.setNeutralMode(NeutralMode.Coast);\n spx.setNeutralMode(NeutralMode.Coast);\n\n double testSpeed = .75;\n double testDownSpeed = -0.05;\n double testUpTime = 1;\n\n\n if(getPosition() < 0){\n zeroPosition();\n }\n // test climber srx\n final double SRXintialEncoderPos = Math.abs(getPosition());\n srx.set(ControlMode.PercentOutput, testSpeed);\n Timer.delay(testUpTime);\n srx.set(ControlMode.PercentOutput, 0.0);\n final double currentSRX = RobotContainer.PDP.getCurrent(Constants.ELEVATOR_SRX_PDP);\n final double positionSRX = getPosition();\n //srx.set(ControlMode.PercentOutput, testDownSpeed);\n //Timer.delay(0.1);\n \n Timer.delay(2.0);\n\n if(getPosition() < 0){\n zeroPosition();\n }\n\n // Test climber spx\n final double SPXintialEncoderPos = Math.abs(getPosition());\n spx.set(ControlMode.PercentOutput, testSpeed);\n Timer.delay(testUpTime);\n final double currentSPX = RobotContainer.PDP.getCurrent(Constants.ELEVATOR_SPX_PDP);\n final double positionSPX = getPosition();\n spx.set(ControlMode.PercentOutput, testDownSpeed);\n Timer.delay(0.1);\n spx.set(ControlMode.PercentOutput, 0.0);\n\n Timer.delay(1.0);\n //Reset Motors\n spx.follow(srx); \n srx.setNeutralMode(NeutralMode.Brake);\n spx.setNeutralMode(NeutralMode.Brake);\n\n print(\"ELEVATOR SRX CURRENT: \" + currentSRX + \" SPX CURRENT: \" + currentSPX);\n print(\"ELEVATOR SRX ENCODER INIT POS: \" + SRXintialEncoderPos + \" END POS: \" + positionSRX);\n print(\"ELEVATOR SPX ENCODER INIT POS: \" + SRXintialEncoderPos + \" END POS: \" + positionSPX);\n\n boolean failure = false;\n\n print(\"!%!%#$!%@ - WRITE A TEST FOR THE ELEVATOR LIMIT SWITCHES!!!!!!!!!\");\n\n if (currentSRX < kCurrentThres) {\n failure = true;\n print(\"!!!!!!!!!!!!!!!!! ELEVATOR SRX Current Low !!!!!!!!!!!!!!!!!\");\n }\n\n if (currentSPX < kCurrentThres) {\n failure = true;\n print(\"!!!!!!!!!!!!!!!! ELEVATOR SPX Current Low !!!!!!!!!!!!!!!!!!!\");\n }\n\n if (!Util.allCloseTo(Arrays.asList(currentSRX, currentSPX), currentSRX, 5.0)) {\n failure = true;\n print(\"!!!!!!!!!!!!!!!! ELEVATOR Currents Different !!!!!!!!!!!!!!!!!\");\n }\n\n if (Math.abs(positionSRX - SRXintialEncoderPos) <= 0){\n failure = true;\n print(\"!!!!!!!!!!!! ELEVATOR Encoder didn't change position SRX !!!!!!!!!!!!!\");\n }\n\n if (Math.abs(positionSPX - SPXintialEncoderPos) <= 0){\n failure = true;\n print(\"!!!!!!!!!!!! ELEVATOR Encoder didn't change position SPX !!!!!!!!!!!!!\");\n }\n\n return failure;\n }",
"@Test\n\tpublic void lowerRight2SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 99);\n\t\td.set(1, 110);\n\t\td.set(13, 98);\n\t\td.set(14, 109);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(88);\n\t\tassertTrue(10==test_arr.get(0).getX() && 8==test_arr.get(0).getY()\n\t\t\t&& 10==test_arr.get(1).getX() && 9==test_arr.get(1).getY());\n\t}",
"public void motorSafetyCheck() {\r\n if (leftMotor_0.getMotorType() == MotorType.kBrushed\r\n || leftMotor_1.getMotorType() == MotorType.kBrushed\r\n || leftMotor_2.getMotorType() == MotorType.kBrushed\r\n || rightMotor_0.getMotorType() == MotorType.kBrushed\r\n || rightMotor_1.getMotorType() == MotorType.kBrushed\r\n || rightMotor_2.getMotorType() == MotorType.kBrushed) {\r\n System.out.println(\"Brushed motor selected\");\r\n System.exit(0);\r\n }\r\n }",
"@Test\n\tpublic void upperLeft1SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 12);\n\t\td.set(1, 23);\n\t\td.set(13, 13);\n\t\td.set(14, 24);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(34);\n\t\tassertTrue(0==test_arr.get(0).getX() && 2==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 1==test_arr.get(1).getY());\n\t}",
"@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public void VerifyMainMenuItems() {\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Dashboard);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Initiatives);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_LiveMediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_MediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Audiences);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Offers);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_CreativeAssets);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Reports);\n\t}",
"boolean hasMainUtteranceTargetLevel();",
"private void splitEdgeDetection() {\n\t\tif(!currentlyDetecting)\n {\n detectRisingEdge();\n }else{//if currentlyDetecting is true, then we are looking for a falling edge\n detectFallingEdge();\n }\n\t}",
"@Test\n public void testAircraftPartNoNotApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem <> 787\";\n\n // verify on wing engine 777 is applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify on wing engine 787 is not applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify off wing engine is applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n }",
"public void checkAvaliableElevators()\r\n\t{\r\n\t\tSystem.out.println(\"--------- Checking Elevators Current Status ------\");\t\r\n\t\t\r\n\t\tif(availableElevadors.isEmpty())\r\n\t\t{\r\n\t\t\tfor(int i=0; i <numberOfElevators-3; i++) {\r\n\t\t\t\tavailableElevadors.add(occupiedElevadors.remove(i));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"--------- Elevators are available again ------\");\r\n\t\t\r\n\t\t}else {\r\n\t\t\tfor(int i=0;i<availableElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + availableElevadors.get(i).getElevatorNumber() +\" ready for Requests\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<occupiedElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + occupiedElevadors.get(i).getElevatorNumber() +\" is Occupied\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t}\r\n\r\n\t}",
"public void sideCheck() {\n /*Be careful when creating tiles, especially ones that allow Sonic's bottom and middle sensors to intersect \n the same tile*/\n mLCollide = false;\n mRCollide = false;\n if(grounded) {\n if(groundSpeed > 0) {\n sideCollision(middleRight);\n }\n else if(groundSpeed < 0) {\n sideCollision(middleLeft);\n } \n }\n else if(!grounded) {\n if(xSpeed < 0) {\n sideCollision(middleLeft);\n }\n else if(xSpeed > 0) {\n sideCollision(middleRight);\n }\n }\n }",
"boolean testIsOffScreenBullet(Tester t) {\n return t.checkExpect(bullet1.isOffScreen(0, 0), true)\n && t.checkExpect(bullet2.isOffScreen(1000, 1000), false)\n && t.checkExpect(bullet1.isOffScreen(250, 300), false);\n }",
"public static void trackCheck() {\n\t\t// reset the motor\n\t\tfor (EV3LargeRegulatedMotor motor : new EV3LargeRegulatedMotor[] { leftMotor, rightMotor }) {\n\t\t\tmotor.stop();\n\t\t\tmotor.setAcceleration(3000);\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(200);\n\t\t} catch (InterruptedException e) {\n\t\t\t// There is nothing to be done here\n\t\t}\n\t\t\n\t\t//move the robot forward until the Y asis is detected\n\t\tleftMotor.setSpeed(400);\n\t\trightMotor.setSpeed(400);\n\t\tleftMotor.rotate(Navigation_Test.convertAngle(Project_Test.WHEEL_RAD, Project_Test.TRACK, 720), true);\n\t\trightMotor.rotate(-Navigation_Test.convertAngle(Project_Test.WHEEL_RAD, Project_Test.TRACK, 720), false);\n\t}",
"public void checkMovementZMinimum(ITestContext context) throws Exception {\n Reporter.testStart();\n String caseFolder=context.getName()+\"/\";\n String importFile=context.getCurrentXmlTest().getParameter(\"importFile\");\n String expectationFile=context.getCurrentXmlTest().getParameter(\"expectationFile\");\n String methodName=Thread.currentThread().getStackTrace()[1].getMethodName();\n String screenWithinCase=caseFolder+methodName;\n MeshViewPage meshViewPage=new MeshViewPage(getWebDriverWrapper());\n if(meshViewPage.isThePage()){\n\n uploadDCM(meshViewPage,importFile);\n\n OrientationAdjustment oa= meshViewPage.clickOrientationAdjustment();\n Reporter.log(\"click Orientation Adjustment tab on left bar\");\n String text=\"0.1\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n Integer clickTimes=40;\n String disResult=oa.clickDistanceMinus(clickTimes);\n String higher=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n\n clickTimes=5;\n disResult=oa.clickDistanceMinus(clickTimes);\n String middle=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n\n clickTimes=6;\n disResult=oa.clickDistanceMinus(clickTimes);//click times: 51\n String lower=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"-5\",\"distance is not same as expected result\");\n\n embededCompareResult(higher,middle,lower, IComFolder.RESULT_ACTUAL_FOLDER +caseFolder, IComFolder.RESULT_EXPECTATION_FOLDER+expectationFile);\n\n disResult=oa.clickDistanceReset();\n embededScreenShot(screenWithinCase+\"_reset_\"+disResult,\"click Z reset(1 times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"0\",\"distance is not same as expected result\");\n }\n Reporter.testEnd();\n }",
"public boolean haveLitElevatorLamps() {\n\t\tCollection<ElevatorButton> buttons = elevatorButtons.values();\n\t\n\t\tfor (ElevatorButton b : buttons) {\n\t\t\tif (b.getButtonLamp()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"boolean hasHingeOnRightSide() throws RuntimeException;",
"private void combinedEdgeDetection() {\n if(isDetectingEdge())\n {\n if(currentCount == 0)\n {\n debugTimer.start();\n }\n currentCount++;\n// SmartDashboard.putInt(\"current count: \", currentCount);\n }\n else{//otherwise, leave the count at 0\n currentCount = 0;\n }\n //once the count reaches the minimum required for detection\n if(currentCount >= minDetectionCount)\n {\n //invert the current state of detection\n currentlyDetecting = !currentlyDetecting;\n// SmartDashboard.putDouble(\"timer count: \", debugTimer.get());\n debugTimer.stop();\n debugTimer.reset();\n }\n\t}",
"private void checkIfR2D2Found() throws Exception {\n\t\tint tortoiseLocationX = Tortoise.getX();\n\t\tint tortoiseLocationY = Tortoise.getY();\n\n\t\tif (tortoiseLocationX <= 510 && tortoiseLocationX >= 505 && tortoiseLocationY >= 110 && tortoiseLocationY <= 115)\n\t\t\tplayEureka();\n\t}",
"private boolean checkEssentialConnects() {\r\n\t\treturn (animalsHash != null && questionChooser != null);\r\n\t}",
"public Boolean checkCapture(ArrayList<Point> points){\n int length = points.size();\n\n for (int i = 1; i < length; i++) {\n Point lineA = points.get(i);\n\n for (int j = i + 1; j < length; j++) {\n Point lineB = points.get(j);\n\n //Check if one of the lines goes through the monster by using its size\n boolean left = lineline(lineA.x,lineA.y,lineB.x,lineB.y,mX,mY,mX,mY+monsterHeight);\n boolean right = lineline(lineA.x,lineA.y,lineB.x,lineB.y,mX + monsterWidth,mY, mX+monsterWidth,mY+monsterHeight);\n boolean top = lineline(lineA.x,lineA.y,lineB.x,lineB.y, mX,mY, mX+monsterWidth,mY);\n boolean bottom = lineline(lineA.x,lineA.y,lineB.x,lineB.y, mX,mY+monsterHeight, mX+monsterWidth,mY+monsterHeight);\n\n //If any are true then its captured\n if(left || right || top || bottom){\n return true;\n }\n }\n }\n return false;\n }",
"public void determineNodeBoundary(boolean drivable) {\r\n \t\t//System.out.println(\"Determine node boundary of \" + name);\r\n \t\tArrayList<Point2D.Double> pointCloud = new ArrayList<Point2D.Double>(); \r\n \t\t// Add all end points of (drive-able) crossSectionElements to the pointCloud\r\n \t\tfor (DirectionalLink dl : links) {\r\n \t\t\tCrossSection cs = dl.link.getCrossSectionAtNode(dl.incoming);\r\n \t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"selecting crosssection %s %s %s\", cs.toString(), dl.incoming ? \"from\" : \"to\", dl.incoming ? dl.link.getFromNode_r().getName_r() : dl.link.getToNode_r().getName_r());\r\n \t\t\tfor (int index = 2 * cs.getCrossSectionElementList_r().size(); --index >= 0; )\r\n \t\t\t\tif ((! drivable) || cs.elementFromNode(dl.incoming, true, index).getCrossSectionElementTypology().getDrivable()) {\r\n \t\t\t\t\tLine2D.Double dlLine = cs.vectorAtNode(dl.incoming, true, index, false);\r\n \t\t\t\t\tif (null == dlLine)\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\tpointCloud.add((Point2D.Double) dlLine.getP1());\r\n \t\t\t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"added endpoint %d %.3f,%.3f\", index, dlLine.x1, dlLine.y1);\r\n \t\t\t\t\t// Add the intersections of the boundaries of different (drive-able) crossSectionElements\r\n \t\t\t\t\tfor (DirectionalLink otherDL : links) {\r\n \t\t\t\t\t\tif (otherDL.angle >= dl.angle) // only search up to dl (and NEVER include dl itself)\r\n \t\t\t\t\t\t\tbreak;\t// this way we'll find each intersection only ONCE\r\n \t\t\t\t\t\tCrossSection otherCS = otherDL.link.getCrossSectionAtNode(otherDL.incoming);\r\n \t\t\t\t\t\tfor (int otherIndex = 2 * otherCS.getCrossSectionElementList_r().size(); --otherIndex >= 0; )\r\n \t\t\t\t\t\t\tif ((! drivable) || (otherCS.elementFromNode(otherDL.incoming, true, otherIndex).getCrossSectionElementTypology().getDrivable())) {\r\n \t\t\t\t\t\t\t\tLine2D.Double otherDLLine = otherCS.vectorAtNode(otherDL.incoming, true, otherIndex, false);\r\n \t\t\t\t\t\t\t\tif (null == otherDLLine)\r\n \t\t\t\t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t\t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t\t\t\t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"checking intersection between %s and %s\", GeometryTools.Line2DToString(dlLine), GeometryTools.Line2DToString(otherDLLine));\r\n \t\t\t\t\t\t\t\tif (Planar.lineIntersectsLine(dlLine, otherDLLine)) {\r\n \t\t\t\t\t\t\t\t\tPoint2D.Double intersection = Planar.intersection(dlLine, otherDLLine);\r\n \t\t\t\t\t\t\t\t\t//System.out.println(\"Adding boundary intersection \" + intersection);\r\n \t\t\t\t\t\t\t\t\tpointCloud.add(intersection);\r\n \t\t\t\t\t\t\t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t\t\t\t\t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"added boundary intersection %.3f,%.3f\", intersection.x, intersection.y);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t}\r\n \r\n \t\t//System.out.println(\"pointCloud of \" + name + \" contains these points: \" + pointCloud.toString());\r\n \t\tif (0 == pointCloud.size())\r\n \t\t\tpointCloud.add(getPoint());\t// add design point of this node\r\n \t\tcircle = Planar.circleCoveringPoints(pointCloud);\r\n \t\t//ArrayList<Point2D.Double> ppp = new ArrayList<Point2D.Double>();\r\n \t\t//ppp.add(new Point2D.Double(this.x, this.y));\r\n \t\t//circle = GeometryTools.circleCoveringPoints(ppp);\r\n \t\t//System.out.format(Main.Locale, \"covering circle is %s\\r\\n\", circle.toString());\r\n \t\t// Create the convex hull consisting of the points where the drive-able parts of the links enter the covering circle\r\n \t\tArrayList<Point2D.Double> points = new ArrayList<Point2D.Double>();\r\n \t\tfor (DirectionalLink dl : links) {\r\n \t\t\tCrossSection cs = dl.link.getCrossSectionAtNode(dl.incoming);\r\n \t\t\tfor (int index = 2 * cs.getCrossSectionElementList_r().size(); --index >= 0; )\r\n \t\t\t\tif (cs.elementFromNode(dl.incoming, true, index).getCrossSectionElementTypology().getDrivable()) {\r\n \t\t\t\t\tLine2D.Double line = cs.vectorAtNode(dl.incoming, true, index, false);\r\n \t\t\t\t\tif (null == line)\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\tPoint2D.Double intersections[] = Planar.intersectRayAndCircle(line, circle);\r\n \t\t\t\t\t//System.out.format(Main.Locale, \"line %s intersects circle %s at %d point(s)\\r\\n\", GeometryTools.Line2DToString(line), circle.toString(), intersections.length);\r\n \t\t\t\t\tif (intersections.length > 1) {\r\n \t\t\t\t\t\tSystem.err.println(\"Peter thinks this never happens...\");\r\n \t\t\t\t\t\t// use the one that is closest to the far end of the line\r\n \t\t\t\t\t\tif (intersections[0].distance(line.getP2()) < intersections[1].distance(line.getP2()))\r\n \t\t\t\t\t\t\tpoints.add(intersections[0]);\r\n \t\t\t\t\t\telse\r\n \t\t\t\t\t\t\tpoints.add(intersections[1]);\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (intersections.length > 0)\r\n \t\t\t\t\t\tpoints.add(intersections[0]);\r\n \t\t\t\t\telse {\r\n \t\t\t\t\t\tSystem.out.println(\"line \" + Planar.Line2DToString(line) + \" does not intersect the circle \" + circle.toString());\r\n \t\t\t\t\t\t// probably a very near miss\r\n \t\t\t\t\t\tdouble ratio = circle.radius() / line.getP1().distance(circle.center());\r\n \t\t\t\t\t\tif ((ratio > 0.99) && (ratio < 1.01))\r\n \t\t\t\t\t\t\tpoints.add(Planar.logPoint(\"adding almost intersection\", (Point2D.Double)(line.getP1())));\r\n \t\t\t\t\t\telse\r\n \t\t\t\t\t\t\tSystem.err.println(\"Total miss: ratio is \" + ratio + \" (\" + circle.radius() / line.getP2().distance(circle.center()) + \")\");\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t}\r\n \t\tif (points.size() == 0)\r\n \t\t\treturn;\r\n \t\t// Compute the convex hull (in 2D) and convert that into an ArrayList<Vertex>\r\n \t\t//System.out.println(\"Computing convex hull of \" + points.toString());\r\n \t\t//if (name.equals(\"node_een\"))\r\n \t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"points is %s\", points.toString());\r\n \t\tconflictArea = new ArrayList<Vertex>();\r\n \t\tfor (Point2D.Double p : Planar.convexHull(points))\r\n \t\t\tconflictArea.add(new Vertex(p, z));\t// use Z-component of this node\r\n \t\tconflictArea.add(conflictArea.get(0));\t// close the polygon\r\n \t\t//System.out.println(\"convex hull is \" + conflictArea.toString());\r\n \t\t//if (name.equals(\"node_een\"))\r\n \t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"hull is %s\", conflictArea.toString());\r\n \t}",
"private void doWiperAvailabiltiyCheck()\n {\n // Hardcode for now to make sure WPS is not triggered\n bWiperAvailable = true;\n\n mWifi = (WifiManager)getSystemService(mContext.WIFI_SERVICE);\n\n if ((mWifi == null) || ( (locationManager == null)|| ((locationProvider = locationManager.getProvider(LocationManager.NETWORK_PROVIDER )) == null)))\n {\n Log.e(TAG,\" Disable wiper : No object for WPS / Wifi Scans \");\n bWiperAvailable = false;\n }\n\n\n // call native function to trigger RPC from A11-> A9\n // informing about WPS capability\n //\n native_notify_wiper_available(bWiperAvailable);\n\n if (Config.LOGV)\n {\n Log.v(TAG, \"Wiper: Availability Check \"+ bWiperAvailable);\n }\n }",
"private boolean checkStatus() {\r\n //\tSystem.out.println(\"Left \" + Left.getX() + \",\" + Left.getY());\r\n \t//System.out.println(\"Head \" + head.getX() + \",\" + head.getY());\r\n \tboolean result = false;\r\n \tif(Left.getX() >= -4 && Left.getX() <= -3.5f) {\r\n \t\t\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= -2 && Left.getX() <= -0.5f) {\r\n \t\tthis.die = 1;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 0 && Left.getX() <= 1.5f) {\r\n \t\tthis.die = 2;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 2 && Left.getX() <= 3.5f) {\r\n \t\tthis.die = 3;\r\n \t\tresult = true;\r\n \t}\r\n \treturn result;\r\n }",
"public boolean istrianglevalid() {\n //if all of the sides are valid, then return true, else return false\n if (sideA > 0 && sideB > 0 && sideC > 0) {\n return true;\n } else {\n return false;\n }\n }",
"@Test\n public void GivenTwoRobotsInLaserBeamThenOnlyClosestOneGetsHitByLaser() {\n int healthRobot1BeforeLaser = robot.getRobotHealthPoint();\n int healthRobot2BeforeLaser = robot2.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after laser\n int healthrobot1afterlaser = robot.getRobotHealthPoint();\n int healthrobot2afterlaser = robot2.getRobotHealthPoint();\n\n //only the assert for robot close to laser should fail (this is intentional)\n assertNotEquals(healthRobot1BeforeLaser, healthrobot1afterlaser);\n assertEquals(healthRobot2BeforeLaser, healthrobot2afterlaser);\n }",
"public boolean checkDualExciters() {\r\n return dualExciter.isSelected();\r\n }",
"public void checkPaper(ActorRef communicationActor){\r\n log.info(self.path().name()+\" starting checkPaper function\");\r\n communicationActor.tell(new Protocol37Format(Protocol37UnformattedMessage.checkPaper()), ActorRef.noSender());\r\n }",
"public boolean playerThrough(int px, int py, int pw, int ph){\r\n Line2D.Double line = new Line2D.Double(p1,p2); //the gate line\r\n //check if line intersects the player's rectangle of space\r\n if(line.intersects(px, py, pw, ph)){\r\n return true; //gate triggered\r\n }\r\n return false; //gate not triggered\r\n }",
"@Override\r\n\tpublic void canMoveArmLeg() {\n\t\tSystem.out.println(\"팔다리를 움직일 수 있습니다.\");\r\n\t}",
"@Test\n public void testAircraftPartNoApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem = 787\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify on wing engine 787 is applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify off wing engine is not applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n }",
"@Test\n\tpublic void testAdjacenciesInsideRooms()\n\t{\n\t\t// Test a corner\n\t\tSet<BoardCell> testList = board.getAdjList(0, 0);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one that has walkway above\n\t\ttestList = board.getAdjList(7, 19);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one that is in middle of room\n\t\ttestList = board.getAdjList(20, 3);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one beside a door\n\t\ttestList = board.getAdjList(18, 11);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one in a edge of board\n\t\ttestList = board.getAdjList(11, 24);\n\t\tassertEquals(0, testList.size());\n\t}",
"@Override\n\tpublic boolean isAWin(int side) {\n\t\treturn false;\n\t}",
"public void checkWin() {\n if (rockList.isEmpty() && trackerRockList.isEmpty() && bigRockList.isEmpty() && bossRockList.isEmpty()) {\n if (ship.lives < 5) {\n ship.lives++;\n }\n Level++;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n }\n }",
"public void checkMovementZMaximum(ITestContext context) {\n Reporter.testStart();\n String caseFolder=context.getName()+\"/\";\n String importFile=context.getCurrentXmlTest().getParameter(\"importFile\");\n String expectationFile=context.getCurrentXmlTest().getParameter(\"expectationFile\");\n String methodName=Thread.currentThread().getStackTrace()[1].getMethodName();\n String screenWithinCase=caseFolder+methodName;\n MeshViewPage meshViewPage=new MeshViewPage(getWebDriverWrapper());\n if(meshViewPage.isThePage()){\n\n uploadDCM(meshViewPage,importFile);\n\n OrientationAdjustment oa= meshViewPage.clickOrientationAdjustment();\n\n Reporter.log(\"click Orientation Adjustment tab on left bar\");\n String text=\"0.05\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n Integer clickTimes=98;\n String valueOnLabel=oa.clickDistancePlus(clickTimes);\n String lower=embededScreenShot(screenWithinCase+\"_distance_\"+valueOnLabel,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"4.9\",\"distance is not same as expected result\");\n\n clickTimes=1;\n valueOnLabel=oa.clickDistancePlus();\n String middle=embededScreenShot(screenWithinCase+\"_distance_\"+valueOnLabel,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"4.95\",\"distance is not same as expected result\");\n\n text=\"0.1\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n valueOnLabel=oa.clickDistancePlus(clickTimes);\n String higher=embededScreenShot(screenWithinCase+\"_distance_\"+valueOnLabel,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"5\",\"distance is not same as expected result\");\n\n embededCompareResult(lower,middle,higher, IComFolder.RESULT_ACTUAL_FOLDER +caseFolder, IComFolder.RESULT_EXPECTATION_FOLDER+expectationFile);\n\n valueOnLabel=oa.clickDistanceReset();\n embededScreenShot(screenWithinCase+\"_reset_\"+valueOnLabel,\"click Z reset(1 times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"0\",\"distance is not same as expected result\");\n }\n Reporter.testEnd();\n }",
"public boolean checkWin() {\r\n\t\tif (checkAcross() || checkDiagonal() || checkUpDown()) {\r\n\t\t\t//win = true;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private boolean poleSwitchEngaged(){\n return true; //poleSwitch.get();\n }",
"@Test\n\tpublic void lowerRight1SWCSpecial()\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 99);\n\t\td.set(1, 110);\n\t\td.set(13, 98);\n\t\td.set(14, 109);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(88);\n\t\tassertTrue(10==test_arr.get(0).getX() && 8==test_arr.get(0).getY()\n\t\t\t&& 10==test_arr.get(1).getX() && 9==test_arr.get(1).getY());\n\t}",
"public static int isVehicleInSight(Player curr) {\n ArrayList<Integer> dirs = new ArrayList();\n int bodyDir = curr.getBodyDirection();\n if (bodyDir == UP) {\n dirs.add(UP);\n dirs.add(RIGHT);\n dirs.add(LEFT);\n if (curr.head360())\n dirs.add(DOWN);\n } else if (bodyDir == RIGHT) {\n dirs.add(RIGHT);\n dirs.add(UP);\n dirs.add(DOWN);\n if (curr.head360())\n dirs.add(LEFT);\n } else if (bodyDir == DOWN) {\n dirs.add(DOWN);\n dirs.add(RIGHT);\n dirs.add(LEFT);\n if (curr.head360())\n dirs.add(UP);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n dirs.add(LEFT);\n dirs.add(UP);\n dirs.add(DOWN);\n if (curr.head360())\n dirs.add(RIGHT);\n }\n\n if (dirs == null || dirs.size() == 0)\n return -1;\n for (int vi = 0; vi < players.length; vi++) {\n if (players[vi] == null || players[vi].getName().equals(\"NONE\") || (players[vi] instanceof Monster)) //we don't want the AI monster to consider itself or other monsters a target\n continue;\n Player veh = players[vi];\n boolean isAir = veh.isFlying();\n int vR = veh.getRow();\n int vC = veh.getCol();\n if (veh.getName().endsWith(\"civilian\"))\n continue;\n for (int i = 0; i < dirs.size(); i++) {\n int dir = dirs.get(i);\n boolean skip = false;\n if (dir == UP) {\n for (int r = curr.getRow(); r >= 1; r--) {\n if (isAir && r == vR && curr.getCol() == vC)\n return dir + 10;\n if (r == vR && curr.getCol() == vC)\n return dir;\n }\n } else if (dir == DOWN) {\n for (int r = curr.getRow(); r < board.length - 1; r++) {\n if (isAir && r == vR && curr.getCol() == vC)\n return dir + 10;\n if (r == vR && curr.getCol() == vC)\n return dir;\n }\n } else if (dir == RIGHT) {\n for (int c = curr.getCol(); c < board[0].length - 1; c++) {\n if (isAir && c == vC && curr.getRow() == vR)\n return dir + 10;\n if (curr.getRow() == vR && c == vC)\n return dir;\n }\n } else if (dir == LEFT) {\n for (int c = curr.getCol(); c >= 1; c--) {\n if (isAir && c == vC && curr.getRow() == vR)\n return dir + 10;\n if (curr.getRow() == vR && c == vC)\n return dir;\n }\n }\n if (skip)\n continue;\n }\n }\n return -1;\n }",
"public void checkRep() {\n assert(wall.p1().x() >= BOARD_MIN_BOUND && wall.p1().x() <= BOARD_MAX_BOUND) :\n \"x coordinate of p1 must be within in the board\";\n assert(wall.p2().x() >= BOARD_MIN_BOUND && wall.p2().x() <= BOARD_MAX_BOUND) :\n \"x coordinate of p2 must be within in the board\";\n assert(wall.p1().y() >= BOARD_MIN_BOUND && wall.p1().y() <= BOARD_MAX_BOUND) :\n \"y coordinate of p1 must be within in the board\";\n assert(wall.p2().y() >= BOARD_MIN_BOUND && wall.p2().y() <= BOARD_MAX_BOUND) :\n \"y coordinate of p2 must be within in the board\";\n }",
"public boolean hitSide()\n {\n if(accel.getAcceleration(ADXL345_I2C.Axes.kX)>0)\n return true;\n else\n return false;\n }",
"public boolean checkWin() throws Exception {\r\n\t\treturn getOcean().checkWin();\r\n\t}",
"@Test\n\tpublic void upperRight1SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 22);\n\t\td.set(1, 33);\n\t\td.set(13, 21);\n\t\td.set(14, 32);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(44);\n\t\tassertTrue(10==test_arr.get(0).getX() && 2==test_arr.get(0).getY()\n\t\t\t&& 10==test_arr.get(1).getX() && 1==test_arr.get(1).getY());\n\t}",
"void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }",
"private void checkRep() {\n assert (width <= Board.SIDELENGTH);\n assert (height <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.x() >= 0 && this.boundingBoxPosition.x() <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.y() >= 0 && this.boundingBoxPosition.y() <= Board.SIDELENGTH);\n }",
"void check_alien_direction() {\n // Aliens are moving right, check if aliens will move off screen\n if (Alien.direction == Alien.Directions.RIGHT) {\n double max_x = rightmost_alien_x();\n // Alien1 has largest width, so we use that one to calculate if all aliens will fit\n if (max_x + Dimensions.ALIEN1_WIDTH + Dimensions.X_PADDING > scene_width){\n Alien.changeDirections();\n }\n }\n\n // Aliens are moving left, check if aliens will move off screen\n else if (Alien.direction == Alien.Directions.LEFT) {\n double min_x = leftmost_alien_x();\n if (min_x < Dimensions.X_PADDING){\n Alien.changeDirections();\n }\n }\n\n // Aliens are moving down, check if they finished moving down\n else if (Alien.direction == Alien.Directions.DOWN &&\n Alien.down_distance_travelled >= Dimensions.ALIEN_VERTICAL_SPACE){\n random_alien_fires(); // After aliens all descend one row, one of the ships fires at the player\n Alien.changeDirections();\n }\n }",
"private void checkStench(int top, int left, int bottom, int right) {\n\t\tif (top > height - 1) {\n\t\t\ttop = height - 1;\n\t\t}\n\t\tif (bottom < 0) {\n\t\t\tbottom = 0;\n\t\t}\n\t\tif (left < 0) {\n\t\t\tleft = 0;\n\t\t}\n\t\tif (right > width - 1) {\n\t\t\tright = width - 1;\n\t\t}\n\t\tboolean stench = false;\n\t\tfor (int i = bottom; i <= top; i++) {\n\t\t\tfor (int j = left; j <= right; j++) {\n\t\t\t\tstench = false;\n\t\t\t\tif (i > 0) {\n\t\t\t\t\tSet s = (Set) agentPositions.get(new Point(i - 1, j));\n\t\t\t\t\tfor (Iterator it = s.iterator(); it.hasNext(); ) {\n\t\t\t\t\t\tif (it.next() instanceof Wumpus) {\n\t\t\t\t\t\t\tstench = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (i < width - 1) {\n\t\t\t\t\tSet s = (Set) agentPositions.get(new Point(i + 1, j));\n\t\t\t\t\tfor (Iterator it = s.iterator(); it.hasNext(); ) {\n\t\t\t\t\t\tif (it.next() instanceof Wumpus) {\n\t\t\t\t\t\t\tstench = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (j > 0) {\n\t\t\t\t\tSet s = (Set) agentPositions.get(new Point(i, j - 1));\n\t\t\t\t\tfor (Iterator it = s.iterator(); it.hasNext(); ) {\n\t\t\t\t\t\tif (it.next() instanceof Wumpus) {\n\t\t\t\t\t\t\tstench = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (j < height - 1) {\n\t\t\t\t\tSet s = (Set) agentPositions.get(new Point(i, j + 1));\n\t\t\t\t\tfor (Iterator it = s.iterator(); it.hasNext(); ) {\n\t\t\t\t\t\tif (it.next() instanceof Wumpus) {\n\t\t\t\t\t\t\tstench = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stench) {\n\t\t\t\t\tif (!checkImage(i, j, STENCH_FILE)) {\n\t\t\t\t\t\taddImage(i, j, STENCH_FILE, STENCH_FILE);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (checkImage(i, j, STENCH_FILE)) {\n\t\t\t\t\t\tremoveImage(i, j, STENCH_FILE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean isLever() {\n return this.type == Type.LEVER;\n }",
"public int checkGoals() {\n\t\tupdateUnsupportedPreconditionInconsistencies(maxLevel);\n\t\tcountInconsistencies();\n\t\tgraphQuality = calculateQuality();\n\t\treturn this.inconsistencyCount;\n\t}",
"public boolean canPlaceRoad(Player p, Edge e){\r\n for(Corner c: e.getConnectingCorners()){\r\n if(c.getOwner()==p) return true;\r\n }\r\n return false;\r\n }",
"public boolean isLevel(){\n return Math.abs(gyro_board.getPitch()) < LEVEL_TOLERANCE && Math.abs(gyro_board.getRoll()) < LEVEL_TOLERANCE;\n }",
"void find_steady_conditions () {\n // System.out.println(\"-- find_steady_conditions: \" + can_do_gui_updates);\n // double min_lift = parse_force_constraint(tf_tkoff_min_lift);\n double max_drag = parse_force_constraint(tf_tkoff_max_drag);\n boolean saved_flag = can_do_gui_updates;\n can_do_gui_updates = false;\n vpp.steady_flight_at_given_speed(5, 0);\n can_do_gui_updates = saved_flag;\n recomp_all_parts();\n\n\n // this animation idea alas does not work now... \n // //add a bit of animation in case the rider crosses the takeoff speed.\n // if (alt_val == 0 && foil_lift() >= load) { // need to raise up\n // while (alt_val < 70 && foil_lift() >= load) {\n // alt_val += 0.1;\n // loadPanel();\n // viewer.repaint();\n // // try { Thread.sleep(100); } catch (InterruptedException e) {}\n // saved_flag = can_do_gui_updates;\n // can_do_gui_updates = false;\n // vpp.steady_flight_at_given_speed(5, 0);\n // can_do_gui_updates = saved_flag;\n // }\n // }\n\n if (alt_val == 0 && foil_lift() >= load) { // need to raise up\n // viewer.start_raise = true; // this is experimentsl, has quirks....\n alt_val = 70;\n } else if (alt_val > 0 && foil_lift() < load) { // must splash\n // viewer.start_descend = true; // this is experimentsl, has quirks....\n alt_val = 0;\n }\n\n \n loadPanel();\n if (total_drag() > max_drag) \n dash.outTotalDrag.setForeground(Color.red);\n if (foil_lift() < load) \n dash.outTotalLift.setForeground(Color.red);\n }",
"@Test\n\tpublic void verifyNavigationonClickingLinksfromSideMenu() throws Exception {\n\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\tif(!driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms\")) {\n\t\t\toverviewObj.doLogIn(userName,pwd);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\ttry {\n\t\tclick(overviewObj.overviewOptioninSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.overviewOptioninSiderBar);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\tAssert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms\"), \n\t\t\t\t\"Overview page not displayed\");\n\t\ttry {\n\t\tclick(overviewObj.leadsOptioninSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.leadsOptioninSiderBar);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.leadsPageVerificationElement);\n\t\tAssert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/leads\"), \n\t\t\t\t\"Leads page not displayed\");\n\t\ttry {\n\t\tclick(overviewObj.myStockOptioninSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.myStockOptioninSiderBar);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.allMyStockOptioninSiderBar);\n\t\ttry {\n\t\tclick(overviewObj.createMyStockOptioninSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.createMyStockOptioninSiderBar);\n\t\t}\n\t\t\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.createStockPageVerificationElement);\n\t\tAssert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/ads/create\"), \n\t\t\t\t\"Create stock page not displayed\");\n\t\ttry {\n\t\tclick(overviewObj.allMyStockOptioninSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.allMyStockOptioninSiderBar);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.allStockPageVerificationElement);\n\t\tAssert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/ads\"), \n\t\t\t\t\"All stock page not displayed\");\n\t\ttry {\n\t\tclick(overviewObj.marketInsightOptioninSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.marketInsightOptioninSiderBar);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.marketInsightpageVerificationElement);\n\t\tAssert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/market-insights\"), \n\t\t\t\t\"Market insight page is not displaying\");\n\t\ttry {\n\t\tclick(overviewObj.profileOptioninSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.profileOptioninSiderBar);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.profilePageVerificationElement);\n\t\tAssert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/profile\"), \n\t\t\t\t\"Profile page is not displaying\");\n\t\t\n\t\ttry {\n\t\tclick(overviewObj.subscriptionDetailsinSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.subscriptionDetailsinSiderBar);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.monthlyPackageOptioninSiderBar);\n\t\ttry {\n\t\t\tclick(overviewObj.monthlyPackageOptioninSiderBar);\n\t\t\t}catch(Exception e) {\n\t\t\t\tjsClick(driver,overviewObj.monthlyPackageOptioninSiderBar);\n\t\t\t}\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.monthlyPackagePageVerificationElement);\n\t\t\tAssert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/subscription-details\"), \n\t\t\t\t\t\"Monthly package page is not displaying\");\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.billingButtonunderMonthlyPackage);\n\t\ttry {\n\t\tclick(overviewObj.billingButtonunderMonthlyPackage);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.billingButtonunderMonthlyPackage);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.billingPageverificationElement);\n\t\tAssert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/billing\"), \n\t\t\t\t\"Billing page is not displaying\");\n\t\t\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.contactsLinkUnderSubscriptionDetails);\n\t\ttry {\n\t\tclick(overviewObj.contactsLinkUnderSubscriptionDetails);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.contactsLinkUnderSubscriptionDetails);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.contactsLinkVerificationElement);\n\t\tAssert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/contracts\"), \n\t\t\t\t\"Contacts page under Subscription Details is not displaying\");\n\t\t/*try {\n\t\t\tclick(overviewObj.monthlyPackageOptioninSiderBar);\n\t\t\t}catch(Exception e) {\n\t\t\t\tjsClick(driver,overviewObj.monthlyPackageOptioninSiderBar);\n\t\t\t}\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.monthlyPackagePageVerificationElement);\n\t\t\tAssert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/subscription-details\"), \n\t\t\t\t\t\"Monthly package page is not displaying\");*/\n\t\ttry {\n\t\tclick(overviewObj.contactOptioninSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.contactOptioninSiderBar);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.privacyOptionunderContactlinkSiderBar);\n\t\tString parentWindow=driver.getWindowHandle();\n\t\ttry {\n\t\tclick(overviewObj.termsOptionunderContactlinkSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.termsOptionunderContactlinkSiderBar);\n\t\t}\n\t\tswitchWindow(driver, parentWindow);\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.termsPageVerificationElement), \n\t\t\t\t\"Terms page is not displaying\");\n\t\tdriver.close();\n\t\tdriver.switchTo().window(parentWindow);\n\t\ttry {\n\t\tclick(overviewObj.privacyOptionunderContactlinkSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.privacyOptionunderContactlinkSiderBar);\n\t\t}\n\t\tswitchWindow(driver, parentWindow);\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.privacyPolicayPageVerificationElement), \n\t\t\t\t\"Privacy page is not displaying\");\n\t\tdriver.close();\n\t\tdriver.switchTo().window(parentWindow);\n\t\ttry {\n\t\tclick(overviewObj.contactOptionunderContactlinkSiderBar);\n\t\t}catch(Exception e) {\n\t\t\tjsClick(driver,overviewObj.contactOptionunderContactlinkSiderBar);\n\t\t}\n\t\tswitchWindow(driver, parentWindow);\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.conatctPageVerificationElement), \n\t\t\t\t\"Contact page is not displaying\");\n\t\tdriver.close();\n\t\tdriver.switchTo().window(parentWindow);\n\t}",
"private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }",
"@Test\n\tpublic void diagLRWin_test()\n\t{\n\t\tb.set(0,0, 'x');\n\t\tb.set(1,0, 'o');\n\t\tb.set(1,1, 'x');\n\t\tb.set(2,0, 'o');\n\t\tb.set(2,2, 'x');\n\t\tassertTrue(b.diagLRWin());\t\n\t}",
"private void checkRep() {\n for (Ball ball : balls) {\n assert ball.getPosition().d1 >= 0\n && ball.getPosition().d1 <= WIDTH - 1;\n assert ball.getPosition().d2 >= 0\n && ball.getPosition().d2 <= HEIGHT - 1;\n }\n for (Gadget gadget : gadgets) {\n assert gadget.getPosition().d1 >= 0\n && gadget.getPosition().d1 <= WIDTH - 1;\n assert gadget.getPosition().d2 >= 0\n && gadget.getPosition().d2 <= HEIGHT - 1;\n }\n\n assert GRAVITY > 0 && MU2 > 0 && MU > 0;\n }",
"@Test(testName = \"VerificationCheckTriangleReturnedMessage\", dataProvider = \"verifyCheckTrianglePositiveTests\")\n public void verifyCheckTriangleReturnedMessage(ArrayList<Double> sides) {\n String excpected = \"\";\n Triangle triangle = new Triangle(sides.get(0), sides.get(1), sides.get(2));\n triangle.checkTriangle();\n assertEquals(triangle.getMessage(), excpected, \"method 'checkTriangle' returned wrong string message, sides: \" + sides);\n }",
"@Override\n\tprotected void checkHardware() {\n\t\tsuper.checkHardware();\n\t}",
"public void clickDemandSideManagement();",
"private void visionDrive(double throttle) {\n if(limelight.isValidTarget()) {\n// DriverStation.reportWarning(\"\"+SmartDashboard.getNumber(\"Vision P\", Constants.visionDriveP),false);\n// visionDrive.setP(SmartDashboard.getNumber(\"Vision P\", Constants.visionDriveP));\n// visionDrive.setI(SmartDashboard.getNumber(\"Vision I\", Constants.visionDriveI));\n// visionDrive.setD(SmartDashboard.getNumber(\"Vision D\", Constants.visionDriveD));\n// visionDrive.setMaxIOutput(.225);\n double error = limelight.getCenter().x;\n double output = Constants.outsideP * -error;\n if(Math.abs(error) < 4) {\n// SmartDashboard.putString(\"In PID?\", \"PID\");\n output = visionDrive.getOutput(error);\n left.set(ControlMode.PercentOutput, throttle - output);\n right.set(ControlMode.PercentOutput, throttle + output);\n// SmartDashboard.putNumber(\"PID Output\", output);\n }\n else if(Math.abs(error) < 7 && Math.abs(error) > 2){\n double val = .2;\n if (error < 0){\n// SmartDashboard.putString(\"In PID?\", \"1\");\n left.set(ControlMode.PercentOutput, -val);\n right.set(ControlMode.PercentOutput, val);\n }\n else if (error > 0){\n// SmartDashboard.putString(\"In PID?\", \"2\");\n left.set(ControlMode.PercentOutput, val);\n right.set(ControlMode.PercentOutput, -val);\n }\n }\n else if (error < 0){\n// SmartDashboard.putString(\"In PID?\", \"3\");\n left.set(ControlMode.PercentOutput, -.25);\n right.set(ControlMode.PercentOutput, .25);\n }\n else if (error > 0){\n// SmartDashboard.putString(\"In PID?\", \"4\");\n left.set(ControlMode.PercentOutput, .25);\n right.set(ControlMode.PercentOutput, -.25);\n }\n\n SmartDashboard.putNumber(\"Error\", error);\n } else {\n visionDrive.reset();\n setOutput(0, 0);\n }\n }",
"public boolean checkRequirements(PlayerBoard playerBoard);",
"public boolean canSurf()\n\t{\n\t\treturn getTrainingLevel() >= 25;\n\t}",
"@Override\n public boolean isGoodForSides()\n {\n return false;\n }",
"@Test\r\n\tpublic void testAdjacenciesInsideRooms()\r\n\t{\r\n\t\t// Test a corner\r\n\t\tSet<BoardCell> testList = board.getAdjList(0, 0);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one that has walkway underneath\r\n\t\ttestList = board.getAdjList(7, 0);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one that has walkway above\r\n\t\ttestList = board.getAdjList(13, 0);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one that is in middle of room\r\n\t\ttestList = board.getAdjList(14, 17);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one beside a door\r\n\t\ttestList = board.getAdjList(6, 16);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one in a corner of room\r\n\t\ttestList = board.getAdjList(10, 15);\r\n\t\tassertEquals(0, testList.size());\r\n\t}",
"@Test\n public void testAircraftPartNoNotApplicable777() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem <> 777\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify on wing engine 787 is applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify off wing engine is applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n }",
"@Test\n public void testTargetSquares_cannotEnterGate() {\n Board board = new Board(p1, p2);\n Token ant = p1.getFromSupply(BugType.SPIDER);\n board.addToken(ant, 0, 3);\n board.addToken(p2.getFromSupply(BugType.QUEEN_BEE), 1, 0);\n board.addToken(p2.getFromSupply(BugType.SPIDER), 2, 0);\n board.addToken(p2.getFromSupply(BugType.GRASSHOPPER), 2, 1);\n board.addToken(p2.getFromSupply(BugType.SOLDIER_ANT), 0, 1);\n board.addToken(p2.getFromSupply(BugType.BEETLE), 0, 2);\n\n List<Hex> targets = Rules.getInstance().getTargetHexes(ant, board);\n assertEquals(2, targets.size());\n assertTrue(targets.contains(board.getHex(-1, 1)));\n assertTrue(targets.contains(board.getHex(3, 1)));\n }",
"private void checkValid() {\n getSimType();\n getInitialConfig();\n getIsOutlined();\n getEdgePolicy();\n getNeighborPolicy();\n getCellShape();\n }",
"boolean CanUseRoadBuilder(EdgeLocation spot1, EdgeLocation spot2);",
"@Test\n\tpublic void lowerLeft1SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 100);\n\t\td.set(1, 89);\n\t\td.set(29, 79);\n\t\td.set(8, 78);\n\t\td.set(23, 90);\n\t\td.set(21, 101);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(67);\n\t\tassertTrue(0==test_arr.get(0).getX() && 7==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 8==test_arr.get(1).getY()\n\t\t\t&& 0==test_arr.get(2).getX() && 9==test_arr.get(2).getY());\n\t}",
"private void checkLeftWall(Invader invader) {\n\t\t\n\t\tif (invader.getX() <= 0) {\n\t\t\tInvader.setDirectionRight(false);\n\t\t\t\n\t\t\tadvanceInvaders();\n\t\t\t\n\t\t\tInvader.setDirectionRight(true);\n\t\t}\n\t}",
"public abstract boolean interactionPossible(Robot robot);"
] | [
"0.5475013",
"0.54238605",
"0.5343773",
"0.5322568",
"0.5307484",
"0.52819526",
"0.527002",
"0.5266827",
"0.5259148",
"0.52391",
"0.5233284",
"0.5198983",
"0.5179988",
"0.51581955",
"0.51486796",
"0.5142477",
"0.5125932",
"0.51146466",
"0.51126117",
"0.51075375",
"0.5096969",
"0.50946397",
"0.5094295",
"0.5084993",
"0.50841564",
"0.50833833",
"0.50792",
"0.5070529",
"0.5065665",
"0.5058739",
"0.50564283",
"0.50555074",
"0.5043946",
"0.5043727",
"0.50406384",
"0.5038005",
"0.5033786",
"0.5027461",
"0.502121",
"0.50154525",
"0.5003973",
"0.49855828",
"0.49669594",
"0.49667075",
"0.49660861",
"0.49606436",
"0.49591848",
"0.49538118",
"0.49530149",
"0.49473292",
"0.49437776",
"0.4933805",
"0.4930315",
"0.49256778",
"0.49233997",
"0.49232927",
"0.49219957",
"0.49202567",
"0.4918887",
"0.49102828",
"0.49079928",
"0.4904276",
"0.48968193",
"0.48930654",
"0.48881745",
"0.4884197",
"0.48777646",
"0.48654777",
"0.48588523",
"0.48563874",
"0.48442727",
"0.4843914",
"0.4824005",
"0.48231888",
"0.48223498",
"0.48127562",
"0.48121405",
"0.48109612",
"0.48075077",
"0.48053974",
"0.48035407",
"0.48019025",
"0.48006022",
"0.4795173",
"0.47871885",
"0.47858912",
"0.4785143",
"0.478385",
"0.4779889",
"0.4777502",
"0.47735807",
"0.47724274",
"0.47719476",
"0.47717375",
"0.47709194",
"0.47661415",
"0.47611353",
"0.4758931",
"0.47547963",
"0.47509736",
"0.47501606"
] | 0.0 | -1 |
Sets the toggled state of a single lever No Lever type check is performed | private static void setLever(org.bukkit.block.Block lever, boolean down) {
if (lever.getType() != Material.LEVER) {
return;
}
byte data = lever.getData();
int newData;
if (down) {
newData = data | 0x8;
} else {
newData = data & 0x7;
}
if (newData != data) {
// CraftBukkit start - Redstone event for lever
int old = !down ? 1 : 0;
int current = down ? 1 : 0;
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(lever, old, current);
Bukkit.getServer().getPluginManager().callEvent(eventRedstone);
if ((eventRedstone.getNewCurrent() > 0) != down) {
return;
}
// CraftBukkit end
lever.setData((byte) newData, true);
lever.getState().update();
Block attached = lever.getRelative(((Attachable) lever.getState().getData()).getAttachedFace());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void toggle(){\n isOn = !isOn;\n }",
"protected void toggleLaser() {\n laserOn = !laserOn;\n }",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"public void toggleEnable();",
"protected void toggleStateChanged() \r\n\t{\r\n\t\tgetSoccerMaster().setShowBallCoord( isToggledOn() );\r\n\t}",
"public void toggle() {\n setChecked(!checked);\n }",
"public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }",
"public void toggle() {\n if (isOn()) {\n turnOff();\n } else {\n turnOn();\n }\n }",
"@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagLianxiren = !bFlagLianxiren;\r\n\t\t\t\t lianxiren_btn.setChecked(bFlagLianxiren);\r\n\t\t\t }",
"public void toggle(){\r\n isDown = !isDown;\r\n }",
"@Override\n public void Toggle() {\n\t \n }",
"public void setLaneChange(java.lang.Boolean value);",
"public void toggle() {\n toggle(false);\n }",
"public Dargle toggle()\n\t{ m_bBoolean = ! m_bBoolean ; return this ; }",
"public Toggle (Boolean setting, String name){\r\n \t\t\tthis.setting = setting;\r\n \t\t\tthis.name = name;\r\n \t\t\ttrueName = \"enabled\"; //Default names.\r\n \t\t\tfalseName = \"disabled\";\r\n \t\t}",
"void toggle();",
"public void turnOn() {\n\t\tisOn = true;\n\t}",
"public abstract void toggle();",
"void setShutterLEDState(boolean on);",
"public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }",
"public Toggle (Boolean setting, String name, String trueName, String falseName){\r\n \t\t\tthis.setting = setting;\r\n \t\t\tthis.name = name;\r\n \t\t\tthis.trueName = trueName;\r\n \t\t\tthis.falseName = falseName;\r\n \t\t}",
"public void turn_on () {\n this.on = true;\n }",
"@Override\n public void onCheckedChanged(CompoundButton toggleButton, boolean isChecked) {\n if (!isChecked) {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_off));\n state[0] = 0;\n } else {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_on));\n state[0] = 255;\n }\n // If the values are modified while the user does not check/unckeck the checkbox, then we update the value from the controller.\n int exist = mode.getPayload().indexOf(c);\n if (exist != -1) {\n mode.getPayload().get(exist).setV(state[0]);\n }\n }",
"@Override\n\tpublic void toggle() {\n\t\tsetChecked(!checked);\n\t}",
"public void changeStatus(){\n Status = !Status;\n\n }",
"public void setToggle(boolean value) {\n getElement().setToggle(value);\n }",
"public void setTallied(java.lang.Boolean value);",
"public final void setLed(boolean on_off){\n LIBRARY.CLEyeCameraLED(camera_, on_off ? 1 :0);\n }",
"@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagHehuo = !bFlagHehuo;\r\n\t\t\t\t hehuo_btn.setChecked(bFlagHehuo);\r\n\t\t\t }",
"void set(boolean on);",
"public void setOff(){\n state = false;\n //System.out.println(\"El requerimiento esta siendo atendido!\");\n }",
"public void turnOn(boolean truth) {\r\n setEnabled(truth);\r\n }",
"public void toggleLightSpheres() {\r\n\t\tmodel.control(AbstractModel.TOGGLE_LIGHT_SPHERES, null);\r\n\t}",
"public void setToggle(int toggle) {\n\t\tToggle[SortType - 1] = toggle;\n\t}",
"public void turnOn() {\n\t\tOn = true;\n\t}",
"public void turn_off () {\n this.on = false;\n }",
"public void toggleSwitch() {\r\n if (this.radioToggleGroup.getSelectedToggle().equals(this.inHouseRadio)) {\r\n machineOrCompanyLabel.setText(\"Machine ID\");\r\n inHouseSelected = true;\r\n } else {\r\n machineOrCompanyLabel.setText(\"Company Name\");\r\n inHouseSelected = false;\r\n }\r\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"public boolean switchOn(){\n if(this.is_Switched_On){\n return false;\n }\n this.is_Switched_On = true;\n return true;\n }",
"private void toggle(int a) {\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < et.size(); i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), false);\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < toggle; i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), true);\r\n\t\t\t}\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"T\".concat(Library.toString(a)), \"Activated\"));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"Error\", \"Activated\"));\r\n\t\t}\r\n\t}",
"public Light(boolean isOn) {\n\t\tthis.isOn = isOn;\n\t}",
"public void toggleGearState() {\n shifter.set(!shifter.get());\n }",
"public void toggleMod(){\r\n this.enabled = !this.enabled;\r\n this.onToggle();\r\n if(this.enabled)\r\n this.onEnable();\r\n else\r\n this.onDisable();\r\n }",
"void setNightModeState(boolean b);",
"private void setLightStatus() {\n if (mCmd.equals(MSG_ON)) {\n setLighIsOn(true);\n } else {\n setLighIsOn(false);\n }\n }",
"@JsProperty void setToggles(boolean value);",
"public void set(boolean bol);",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"public void setOn(boolean arg) {\n isOn = arg;\n }",
"@Override\n public void toggle() {\n checkBox.toggle();\n }",
"public void toggle()\n\t{\n\t\tbitHolder.setValue(Math.abs(bitHolder.getValue() - 1 ));\n\t\t\n\t}",
"@Override\n\tpublic void setLED(int index, boolean state) throws emException, TException {\n\n\t}",
"public void setIsModifier(java.lang.Boolean value);",
"public void setTurning(java.lang.Boolean value);",
"public void toggleMode() {\n if (edit_rbmi.isSelected()) filter_rbmi.setSelected(true);\n // else if (filter_rbmi.isSelected()) edgelens_rbmi.setSelected(true);\n // else if (edgelens_rbmi.isSelected()) timeline_rbmi.setSelected(true);\n else edit_rbmi.setSelected(true);\n }",
"public void switchOn();",
"public void setStaticLight(boolean staticLight);",
"@Test\n public void testToggle() {\n // Toggle on test.\n boolean before = plug.getCondition();\n clickOn(\"ON\");\n assertNotEquals(before, plug.getCondition());\n\n // Toggle off test which also implies that the ON/OFF status is displayed.\n before = plug.getCondition();\n clickOn(\"OFF\");\n assertNotEquals(before, plug.getCondition());\n }",
"void setemisoraRadio(){\n emisoraRadio = !emisoraRadio;\n }",
"public void toggle() { this.isOpen = !this.isOpen; }",
"private void stelDoelIn(boolean isDoel)\n {\n this.isDoel = isDoel; \n }",
"void setIsManaged(boolean isManaged);",
"@Override\r\n\t\t\t\t public void onClick(View v) {\n\t\t\t\t\t bFlagGongsi = !bFlagGongsi;\r\n\t\t\t\t\t gongsi_btn.setChecked(bFlagGongsi);\r\n\t\t\t\t }",
"@FXML\n public void isSelectedOn() {\n reset();\n off.setSelected(false);\n // off.\n lab4.setVisible(true);\n txt4.setVisible(true);\n lab5.setVisible(true);\n txt5.setVisible(true);\n lab6.setVisible(true);\n txt6.setVisible(true);\n }",
"void onSwitched(ToggleableView toggleableView, boolean isOn);",
"void toggled(ToggledEvent event);",
"@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagZhaopin = !bFlagZhaopin;\r\n\t\t\t\t zhaopin_btn.setChecked(bFlagZhaopin);\r\n\t\t\t }",
"public void setState( boolean bool ) { state = bool; }",
"public void set_state(boolean etat) {\r\n this.etat = etat;\r\n }",
"private void updateSwitchState() {\n this.mDisabled = !MiuiStatusBarManager.isShowNetworkSpeedForUser(this.mContext, -2);\n }",
"@Override\n public void set(boolean state) {\n if (isInverted) {\n super.set(!state);\n } else {\n super.set(state);\n }\n }",
"public void toggleSignal() {\n if (green) {\n green = false;\n } else {\n green = true;\n }\n }",
"public static void setEnemyOne(boolean state)\r\n\t{\r\n\t\tenemyOne = state;\r\n\t}",
"public void change() {\r\n this.mode = !this.mode;\r\n }",
"public void setIsDoel(boolean isDoel)\n {\n stelDoelIn(isDoel);\n }",
"public void setDataSwitchEnable(boolean bEnable){\n mDataSwitch = bEnable;\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tindoorFlag = !indoorFlag;\n\t\t\t//indoorFlag = true;\n\t\t}",
"public void turnOff() {\n\t\tisOn = false;\n\t}",
"public void Power() {\n if (Estado == false){\r\n Estado = true;\r\n } else if (Estado == true){\r\n Estado = false;\r\n }\r\n }",
"public void onClick(View v) {\n is_enabled=!is_enabled;\n if(!is_enabled){\n textView_current_Status.setText(R.string.switcher_is_being_enabled_please_wait);\n //sayHello();\n Set_Switch_On();\n }else{\n textView_current_Status.setText(R.string.switcher_is_currently_disabled);\n Set_Switch_Off();\n }\n }",
"@Override\r\n public void turnOn(){\r\n isOn = true;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_ON);\r\n if (isOn){\r\n engageLoads();\r\n }\r\n }",
"public void onToggleClicked(View view) {\n boolean on = ((ToggleButton) view).isChecked();\n if (on) {\n if (!BA.isEnabled()) {\n Intent turnOn = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(turnOn, 0);\n Toast.makeText(getApplicationContext(), \"Turned on\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Already on\", Toast.LENGTH_LONG).show();\n }\n } else {\n BA.disable();\n Toast.makeText(getApplicationContext(), \"Turned off\", Toast.LENGTH_LONG).show();\n }\n }",
"private void toggleLight(){\n\t\tmyGLView.queueEvent(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmRenderer.toggleLight();\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"public void toggleAlive() {\n\t\tthis.isAlive = !isAlive;\n\t}",
"public void handleToggleButtonLowPass() {\n\t\tif (toggleButtonLowPass.isSelected() == true) {\n\t\t\tcontroller.audioManipulatorUseLowPassProcessor(true);\n\t\t\tsliderLowPass.setDisable(false);\n\t\t\ttextFieldLowPass.setDisable(false);\n\t\t\ttoggleButtonLowPass.setText(bundle.getString(\"mixerToggleButtonOn\"));\n\t\t} else {\n\t\t\tcontroller.audioManipulatorUseLowPassProcessor(false);\n\t\t\tsliderLowPass.setDisable(true);\n\t\t\ttextFieldLowPass.setDisable(true);\n\t\t\ttoggleButtonLowPass.setText(bundle.getString(\"mixerToggleButtonOff\"));\n\t\t}\n\n\t}",
"public void setEnabled(boolean aFlag) { _enabled = aFlag; }",
"public void lighting(boolean onOrOff)\r\n {\r\n \tint i;\r\n \tfor (i=0;i<LightSet.size();i++) {\r\n \t\t((Light)LightSet.elementAt(i)).setState(onOrOff);\r\n \t}\r\n }",
"public void setOn(boolean isOn) {\n\t\tisOn = isOn;\n\t}",
"@Override\n public void togglePrimaryCaregiver(boolean b) {\n }",
"@Override\n public void toggle(boolean active) {\n }",
"public void setT(boolean t) {\n\tthis.t = t;\n }",
"void updateCommonToggleStatus(boolean shown);",
"public void toggle() {\n main.getState().toggle();\n if (main.tree.getSelectionPath() == null) return;\n TreeNode tn =\n (TreeNode) main.tree.getSelectionPath().getLastPathComponent();\n if (tn.isLeaf()) setSkills(tn.toString());\n }",
"public void setSwitchOn() throws UnavailableDeviceException, ClosedDeviceException, IOException{\n\t\tswitch1.setValue(false);\n\t\tthis.switchState = true; \n\t}",
"void setState(boolean state);",
"public void enableLime(LimeState val);",
"@Override\n public void onClick(View v) {\n object.referenceGuestCitizenActive(flat).child(model.getKeyUID()).child(\"stop\").setValue(!model.getSTOP());\n object.referenceGuestGuardActive().child(model.getKeyUID()).child(\"stop\").setValue(!model.getSTOP());\n }",
"public void setNeutralState() {\n redLED.set(true);\n greenLED.set(true);\n blueLED.set(true);\n }",
"public void onStatusClicked(View view){\n Log.i(TAG, \"-- ON STATUS CLICKED --\");\n ToggleButton tb = (ToggleButton) view;\n\n //let setStatus change the check status instead\n tb.setChecked(false);\n\n if(!tb.isChecked()){\n Log.i(TAG, \"-- ON STATUS CHECKED --\");\n // Launch the DeviceListActivity to see devices and do scan\n Intent serverIntent = new Intent(this, DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE_INSECURE);\n }\n else{\n Log.i(TAG, \"-- ON STATUS UNCHECKED --\");\n }\n\n }",
"public void setRoad(Boolean bool) {\r\n\t \tthis.road = bool;\r\n\t }"
] | [
"0.7054669",
"0.6801077",
"0.67795247",
"0.65851295",
"0.6535447",
"0.6419999",
"0.64151424",
"0.6388819",
"0.6384588",
"0.6363048",
"0.63605046",
"0.62617284",
"0.6249438",
"0.62332106",
"0.6230183",
"0.62221086",
"0.6198835",
"0.6198546",
"0.6195733",
"0.6166478",
"0.61386985",
"0.61298656",
"0.6122828",
"0.61215264",
"0.61186635",
"0.6113407",
"0.6083851",
"0.60828686",
"0.60693944",
"0.6051414",
"0.60493374",
"0.6040333",
"0.6022728",
"0.60181475",
"0.60043955",
"0.599161",
"0.58991736",
"0.5889926",
"0.5889352",
"0.5883378",
"0.5863283",
"0.5860089",
"0.58566785",
"0.5843038",
"0.5836329",
"0.5836081",
"0.58343905",
"0.58340997",
"0.58320606",
"0.5831778",
"0.5825798",
"0.58201694",
"0.581567",
"0.5800111",
"0.5799599",
"0.57978576",
"0.57975197",
"0.5787362",
"0.57742745",
"0.57710844",
"0.57702214",
"0.5765093",
"0.5761882",
"0.5758469",
"0.5749113",
"0.5745362",
"0.57441276",
"0.573339",
"0.57332826",
"0.57305413",
"0.5730507",
"0.57282424",
"0.57282406",
"0.5718305",
"0.5717972",
"0.5714744",
"0.57142067",
"0.5711285",
"0.56895185",
"0.5685976",
"0.5683862",
"0.56826645",
"0.56646985",
"0.5653322",
"0.5651659",
"0.56414986",
"0.5636512",
"0.56305534",
"0.56240416",
"0.56037617",
"0.5602902",
"0.5602378",
"0.55969757",
"0.5593064",
"0.55917335",
"0.5590875",
"0.5581823",
"0.5580238",
"0.5577214",
"0.5575624"
] | 0.5899073 | 37 |
returns the Location of the central block of the factory | public Location getCenterLocation()
{
return factoryLocation;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@NotNull\n public Location<World> getCenterBlock() {\n int centerX = getMinChunk().getX() + 16;\n int centerZ = getMinChunk().getZ() + 16;\n return Tungsten.INSTANCE.getIslandWorld().getLocation(centerX * 16, 86, centerZ * 16);\n }",
"public phaseI.Hdfs.BlockLocations getNewBlock() {\n if (newBlockBuilder_ == null) {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n } else {\n return newBlockBuilder_.getMessage();\n }\n }",
"public phaseI.Hdfs.BlockLocations getNewBlock() {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n }",
"phaseI.Hdfs.BlockLocations getNewBlock();",
"public int getLocation() {\n\t\treturn 0;\n\t}",
"public BlockLocation getLocation() {\n return location;\n }",
"public int getBlock(){\n return this.position.getCurrentBlock();\n }",
"public Double2D getCentral() {\n\n int width = (int)Math.sqrt(state.numAgents);\n if (Math.sqrt(state.numAgents) / width == 1.0) {\n\n double halfWidth = width / 2.0;\n int x = id / width;\n int y = id % width;\n\n double length = state.simWidth / width;\n double halfLength = length / 2.0;\n\n double dx = ((x - halfWidth) * length + halfLength) + meanLocation.getX();\n double dy = ((y - halfWidth) * length + halfLength) + meanLocation.getY();\n //state.printlnSynchronized(\"Dx = \" + dx + \" dy = \" + dy);\n return new Double2D(dx, dy);\n }else {\n return meanLocation;\n }\n }",
"phaseI.Hdfs.BlockLocations getBlockInfo();",
"public BCLocation bcLocation() {\n return bcLocation;\n }",
"@Override\n\tpublic final Tile getLocation() {\n\t\tfinal Client client = Loader.getClient();\n\t\treturn new Tile(client.getBaseX() + getLocalRegionX(),\n\t\t\t\tclient.getBaseY() + getLocalRegionY(), client.getPlane());\n\t}",
"public phaseI.Hdfs.BlockLocationsOrBuilder getNewBlockOrBuilder() {\n if (newBlockBuilder_ != null) {\n return newBlockBuilder_.getMessageOrBuilder();\n } else {\n return newBlock_ == null ?\n phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n }\n }",
"public int getLocation()\r\n {\n }",
"public Location getBedLocation ( ) {\n\t\treturn extract ( handle -> handle.getBedLocation ( ) );\n\t}",
"public Point getLocation() {\r\n\t\treturn this.center;\r\n\t}",
"public ILocation east()\n {\n Location east = new Location(x + 1, y);\n return east;\n }",
"public BwLocation getLocation() {\n if (location == null) {\n location = BwLocation.makeLocation();\n }\n\n return location;\n }",
"public int getLocation() {\n\t\tint location=super.getLocation();\n\t\treturn location;\n\t}",
"public phaseI.Hdfs.BlockLocations getBlockInfo() {\n if (blockInfoBuilder_ == null) {\n return blockInfo_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : blockInfo_;\n } else {\n return blockInfoBuilder_.getMessage();\n }\n }",
"public phaseI.Hdfs.BlockLocations getBlockInfo() {\n return blockInfo_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : blockInfo_;\n }",
"public LocatorIF getBase() {\n return base_address;\n }",
"public Point getLocation() {\r\n return layout.location;\r\n }",
"BodyPart getGearLocation();",
"public GridLocation getLocation();",
"public Location getBedSpawnLocation ( ) {\n\t\treturn extract ( handle -> handle.getBedSpawnLocation ( ) );\n\t}",
"public String getLocationString() {\n return getCenter().toString();\n }",
"public phaseI.Hdfs.BlockLocationsOrBuilder getNewBlockOrBuilder() {\n return newBlock_ == null ? phaseI.Hdfs.BlockLocations.getDefaultInstance() : newBlock_;\n }",
"public Location getStartLocation() {\r\n \treturn new Location(0,0);\r\n }",
"public FrillLoc getLocation() {\n return MyLocation;\n }",
"public String getBlockPosition()\r\n\t{\r\n\t\treturn blockPosition;\r\n\t}",
"String getLocation();",
"String getLocation();",
"String getLocation();",
"public Location getRandomLocation() {\n\t\tfinal Random randomGenerator = new Random();\n\n\t\tLocation result = new Location(getWorld(), highPoint.getBlockX(), highPoint.getBlockY(), highPoint.getBlockZ());\n\t\t\n\t\tif (getSize() > 1) {\n\t\t\tfinal double randomX = lowPoint.getBlockX() + randomGenerator.nextInt(getXSize());\n\t\t\tfinal double randomY = lowPoint.getBlockY() + randomGenerator.nextInt(getYSize());\n\t\t\tfinal double randomZ = lowPoint.getBlockZ() + randomGenerator.nextInt(getZSize());\n\t\t\t\n\t\t\tresult = new Location(Bukkit.getWorld(world), randomX, randomY, randomZ);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public Point getTopLeft() {\n return location.topLeft();\n }",
"public int getLocation()\r\n {\r\n return location;\r\n }",
"public Location getLocation() {\n return getLocation(null);\n }",
"public Location getInventoryLocation() \n\t{\n\t\treturn factoryInventoryLocation;\n\t}",
"public final Coord getLocation() {\n return location;\n }",
"public Location mainSpawn(){\r\n\t\treturn mainSpawn;\r\n\t}",
"public Location east()\r\n {\r\n // return new Location(x + 1, y);\r\n Location loc = new Location(x + 1, y);\r\n return loc;\r\n }",
"public ILocation north()\n {\n Location north = new Location(x, y - 1);\n return north;\n }",
"public Location getCenter() {\n return new Location(location.getWorld(), (float) getRectangle().getCenterX(), (float) getRectangle().getCenterY());\n }",
"String requestBlockLocation(final long blockId, final long initialBytes) throws IOException;",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"public Location3D getCenter() {\n\t\treturn new Location3D(world, lowPoint.getBlockX() + getXSize() / 2, lowPoint.getBlockY() + getYSize() / 2, lowPoint.getBlockZ() + getZSize() / 2);\n\t}",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"FieldLocation getFieldLocation(ByteBlock block, BigInteger offset, FieldFactory[] factorys) {\n\t\tfor (BlockInfo blockInfo : blockInfoMap.values()) {\n\t\t\tif (blockInfo.block == block) {\n\t\t\t\tBigInteger byteIndex = blockInfo.blockStart.add(offset);\n\t\t\t\tBigInteger index = byteIndex.divide(bytesInLine);\n\t\t\t\tint lineOffset = byteIndex.remainder(bytesInLine).intValue();\n\n\t\t\t\t//int fieldOffset = lineOffset / fields.length;\n\t\t\t\tint nbytesPerField = bytesInLine.intValue() / factorys.length;\n\t\t\t\tint fieldOffset = (lineOffset / nbytesPerField) * nbytesPerField;\n\n\t\t\t\tint byteOffset = lineOffset % nbytesPerField;\n\n\t\t\t\tint fieldNum = getFieldNum(index, fieldOffset, factorys);\n\t\t\t\tint col = factorys[fieldNum].getColumnPosition(block, byteOffset);\n\t\t\t\treturn new FieldLocation(index, fieldNum, 0, col);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public final Point getLocation() {\n return this.location ;\n }",
"@Override\n public PointF getLocation() {\n return location;\n }",
"public final Location getLocation() {\n\t\treturn location.clone();\n\t}",
"public Point getCenter() {\n return location.center();\n }",
"public Location getLocation() \n\t{\n\t\treturn location;\n\t}",
"public Location getLocation(){\n\t\tWorld w = Bukkit.getWorld(worldName);\n\t\tif(w==null){\n\t\t\tSystem.out.println(\"Error, null world in Location from SQL\");\n\t\t\treturn null;\n\t\t}\n\t\treturn new Location(w, x+0.5, y, z+0.5);\n\t\t\n\t}",
"public Vector2f getLocation() {\r\n\t\treturn location.getLocation();\r\n\t}",
"phaseI.Hdfs.BlockLocationsOrBuilder getNewBlockOrBuilder();",
"URI location() {\n if (module.isNamed() && module.getLayer() != null) {\n Configuration cf = module.getLayer().configuration();\n ModuleReference mref\n = cf.findModule(module.getName()).get().reference();\n return mref.location().orElse(null);\n }\n return null;\n }",
"public Coordinate getLocation();",
"public Location getLocation() {\n\t\treturn location.clone();\n\t}",
"public Point getLocation() {\n\t\treturn location.getCopy();\n\t}",
"public Planet getLocation() {\n\t\treturn currentLocation;\n\t}",
"public Point getLocation() {\n\t\treturn location;\n\t}",
"public phaseI.Hdfs.BlockLocationsOrBuilder getBlockInfoOrBuilder() {\n if (blockInfoBuilder_ != null) {\n return blockInfoBuilder_.getMessageOrBuilder();\n } else {\n return blockInfo_ == null ?\n phaseI.Hdfs.BlockLocations.getDefaultInstance() : blockInfo_;\n }\n }",
"public double getLocation(){\n\t\treturn location;\n\t}",
"public String getLocation() {\r\n\t\treturn location; \r\n\t}",
"public PVector getLocation()\n\t{\n\t\treturn location;\n\t}",
"public Location getLocation() {\n\t\treturn location;\n\t}",
"public String getLocation() {\n\t\treturn \"-12.9990189,-38.5140298\";\n\t}",
"public Location getLocation() {\r\n\t\treturn location;\r\n\t}",
"public Location getLocation() {\r\n\t\treturn location;\r\n\t}",
"public final String getLocation() {\n return location;\n }",
"public Block getBlockAt(Location location) {\n\t\treturn getBlockAt(location.getX(), location.getY(), location.getZ());\n\t}",
"public byte[] getLocation() {\r\n return location;\r\n }",
"public String getLocation() {\r\n\t\treturn location;\r\n\t}",
"public Block getBlock()\n {\n return block;\n }",
"@Override\n public Location getDisplayedLocation() {\n this.displayedLocation = new Location((int)pane.getHvalue(), (int)pane.getVvalue(), curFloor, \"Unknown\");\n return displayedLocation;\n }",
"public ILocation west()\n {\n Location west = new Location(x - 1, y);\n return west;\n }",
"public int getSquareLocation()\n\t\t{\n\t\t\treturn location; // return location of square\n\t\t}",
"public Location getLocation ( ) {\n\t\treturn extract ( handle -> handle.getLocation ( ) );\n\t}",
"public ChunkCoordinates getEntrancePortalLocation() {\n\t\treturn new ChunkCoordinates(100, 50, 0);\n\t}",
"public Location getLocation() {\n\t\treturn loc;\n\t}",
"public Location north()\r\n {\r\n\r\n return new Location(x, y - 1);\r\n }",
"public Location getCurrentLocation() { return entity.getLocation(); }",
"public Object getLocation() {\n return leftSide.getLocation();\n }",
"public MapLocation getEnemySwarmCenter() {\n\t\treturn new MapLocation(centerEnemyX, centerEnemyY);\n\t}",
"public String getLocation() {\n\t\treturn location;\n\t}",
"phaseI.Hdfs.DataNodeLocation getLocation();",
"phaseI.Hdfs.BlockLocationsOrBuilder getBlockInfoOrBuilder();",
"phaseI.Hdfs.BlockLocations getBlockLocations(int index);",
"public Coordinate getLocation() {\n return location;\n }"
] | [
"0.71727157",
"0.6820347",
"0.67480624",
"0.67037165",
"0.6689701",
"0.6681881",
"0.6422006",
"0.635949",
"0.635735",
"0.6336246",
"0.6272121",
"0.6199357",
"0.6187774",
"0.61823964",
"0.6153782",
"0.61533624",
"0.61523277",
"0.6150101",
"0.61269414",
"0.6102589",
"0.60992926",
"0.6091202",
"0.60641384",
"0.6043813",
"0.60334784",
"0.60203457",
"0.60097855",
"0.59869057",
"0.5984151",
"0.59517527",
"0.5951313",
"0.5951313",
"0.5951313",
"0.5945314",
"0.594376",
"0.59366846",
"0.5929981",
"0.5925618",
"0.5924031",
"0.59161663",
"0.5915962",
"0.589303",
"0.587489",
"0.5874783",
"0.5873526",
"0.5873526",
"0.5873526",
"0.5873526",
"0.5873526",
"0.5873526",
"0.5873526",
"0.5873526",
"0.58684635",
"0.5867102",
"0.5867102",
"0.5867102",
"0.5867102",
"0.5864046",
"0.5845595",
"0.5842116",
"0.5820004",
"0.58145934",
"0.5810607",
"0.5809702",
"0.58072406",
"0.5786717",
"0.57772225",
"0.5767772",
"0.5751607",
"0.57471937",
"0.5739967",
"0.5721274",
"0.5713569",
"0.57098836",
"0.5708343",
"0.57013345",
"0.5697633",
"0.56975126",
"0.56859916",
"0.56859916",
"0.5673479",
"0.5672652",
"0.56726277",
"0.56705946",
"0.5668636",
"0.566557",
"0.5663534",
"0.5662556",
"0.56584704",
"0.56572217",
"0.56555253",
"0.56502616",
"0.5649724",
"0.5648511",
"0.56397486",
"0.56381494",
"0.56257194",
"0.5625095",
"0.56246877",
"0.5611714"
] | 0.75816286 | 0 |
returns the Location of the factory Inventory | public Location getInventoryLocation()
{
return factoryInventoryLocation;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic long getLocation() {\n\t\treturn _buySellProducts.getLocation();\n\t}",
"public int getLocation()\r\n {\r\n return location;\r\n }",
"public int getLocation()\r\n {\n }",
"public FrillLoc getLocation() {\n return MyLocation;\n }",
"public int getLocation() {\n\t\treturn 0;\n\t}",
"public PVector getLocation()\n\t{\n\t\treturn location;\n\t}",
"public Location getLocation() \n\t{\n\t\treturn location;\n\t}",
"@Override\n\tpublic final Tile getLocation() {\n\t\tfinal Client client = Loader.getClient();\n\t\treturn new Tile(client.getBaseX() + getLocalRegionX(),\n\t\t\t\tclient.getBaseY() + getLocalRegionY(), client.getPlane());\n\t}",
"public double getLocation(){\n\t\treturn location;\n\t}",
"public Vector2f getLocation() {\r\n\t\treturn location.getLocation();\r\n\t}",
"public String getLocation()\n {\n return location;\n }",
"public String getLocation() {\r\n\t\treturn location; \r\n\t}",
"public BwLocation getLocation() {\n if (location == null) {\n location = BwLocation.makeLocation();\n }\n\n return location;\n }",
"public String getLocation() {\r\n return location;\r\n }",
"public String getLocation(){\r\n return location;\r\n }",
"public String getLocation() {\r\n\t\treturn location;\r\n\t}",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\r\n return location;\r\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public GridLocation getLocation();",
"public String getLocation(){\n return location;\n }",
"public String getLocation(){\r\n return Location;\r\n }",
"public Location getCenterLocation() \n\t{\n\t\treturn factoryLocation;\n\t}",
"public String getLocation() {\n\t\treturn location;\n\t}",
"public String getLocation() { return location; }",
"public String getLocation() { return location; }",
"public Location getLocation(){\n return location;\n }",
"public Location getEnterLocation() {\r\n return location;\r\n }",
"public Location getLocation() {\r\n\t\treturn location;\r\n\t}",
"public Location getLocation() {\r\n\t\treturn location;\r\n\t}",
"public int getLocation() {\n\t\tint location=super.getLocation();\n\t\treturn location;\n\t}",
"public Location getLocation() {\n\t\treturn location;\n\t}",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"public PVector getLoc() {\n return location;\n }",
"public PVector getLoc() {\n return location;\n }",
"public String getLocation() {\n\t\t\treturn location;\n\t\t}",
"public Location getPowerSourceLocation() \n\t{\n\t\treturn factoryPowerSourceLocation;\n\t}",
"@Override\n\tpublic String getLocation() {\n\t\treturn location;\n\t}",
"String getLocation();",
"String getLocation();",
"String getLocation();",
"public Location location()\n {\n return myLoc;\n }",
"public Location getLocation() {\n return location;\n }",
"public Location getLocation() {\n return location;\n }",
"public Location getLocation() {\n return location;\n }",
"public Location getLocation() {\n return location;\n }",
"public final String getLocation() {\n return location;\n }",
"public Location getLocation() {\n\t\treturn location.clone();\n\t}",
"public Location getLocation(){\n\t\tWorld w = Bukkit.getWorld(worldName);\n\t\tif(w==null){\n\t\t\tSystem.out.println(\"Error, null world in Location from SQL\");\n\t\t\treturn null;\n\t\t}\n\t\treturn new Location(w, x+0.5, y, z+0.5);\n\t\t\n\t}",
"public String getLocation(){\n return this.location;\n }",
"public DeviceDescriptionLocation getLocation() {\n return location;\n }",
"@Override\n public PointF getLocation() {\n return location;\n }",
"public Vector getLocation();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"public Planet getLocation() {\r\n return location;\r\n }",
"public Coordinate getLocation() {\n return location;\n }",
"public final Coord getLocation() {\n return location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public Location getLocation() {\n\t\treturn loc;\n\t}",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public java.lang.String getLocation() {\n return location;\n }",
"public Location getLocation() {\n return getLocation(null);\n }",
"public Location getLocation() {\n return loc;\n }",
"public Location getLocation() {\n return loc;\n }",
"public String getLocation() {\n\t\treturn \"-12.9990189,-38.5140298\";\n\t}",
"public java.lang.String getLocation() {\n return location;\n }",
"public String location() {\n return this.location;\n }",
"public String location() {\n return this.location;\n }",
"@Override\n public String getLocation() {\n return location;\n }",
"public Point getLocation() {\n\t\treturn location;\n\t}",
"public TileLocation getLocation() {\n return location;\n }",
"public String getLocation() {\n\t\treturn mLocation;\n\t}",
"public String getLocation() throws ServiceLocalException {\n\t\treturn (String) this.getPropertyBag().getObjectFromPropertyDefinition(\n\t\t\t\tAppointmentSchema.Location);\n\t}",
"@Override\n\tpublic String getLocation() {\n\t\treturn this.location;\n\t}"
] | [
"0.64515996",
"0.64326733",
"0.6400411",
"0.6298291",
"0.6289785",
"0.6256657",
"0.62149405",
"0.62112343",
"0.61973935",
"0.6190423",
"0.6178009",
"0.61747384",
"0.6148431",
"0.6143394",
"0.6137788",
"0.61346596",
"0.61319566",
"0.61238664",
"0.61137915",
"0.61137915",
"0.61137915",
"0.61137915",
"0.61137915",
"0.61137915",
"0.61137915",
"0.61137915",
"0.61137915",
"0.61137915",
"0.61137915",
"0.61137915",
"0.6112853",
"0.61086863",
"0.61083263",
"0.6107901",
"0.6098351",
"0.60978603",
"0.60837626",
"0.60837626",
"0.6071928",
"0.60716695",
"0.60608715",
"0.60608715",
"0.6057353",
"0.605589",
"0.6034614",
"0.6034614",
"0.6034614",
"0.6034614",
"0.6026768",
"0.6026768",
"0.6024015",
"0.6020854",
"0.6016311",
"0.6013483",
"0.6013483",
"0.6013483",
"0.6011582",
"0.60096294",
"0.60096294",
"0.60096294",
"0.60096294",
"0.6007799",
"0.6005671",
"0.6003907",
"0.5980418",
"0.5977386",
"0.59711605",
"0.59590197",
"0.5957981",
"0.5957981",
"0.5957981",
"0.5957981",
"0.5957981",
"0.5957981",
"0.5957981",
"0.5957981",
"0.595458",
"0.59525913",
"0.59415",
"0.5939064",
"0.5930885",
"0.59292805",
"0.59292805",
"0.59292805",
"0.59292805",
"0.59292805",
"0.59286433",
"0.59267396",
"0.5925935",
"0.5925935",
"0.5925484",
"0.59246695",
"0.5912091",
"0.5912091",
"0.59084266",
"0.5908018",
"0.5905238",
"0.58950436",
"0.5894776",
"0.5892141"
] | 0.89504933 | 0 |
returns the Location of the factory power source | public Location getPowerSourceLocation()
{
return factoryPowerSourceLocation;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Location getInventoryLocation() \n\t{\n\t\treturn factoryInventoryLocation;\n\t}",
"String getLocation();",
"String getLocation();",
"String getLocation();",
"public String getSpLocation() {\r\n return spLocation;\r\n }",
"@java.lang.Override public google.maps.fleetengine.v1.PowerSource getPowerSource() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.PowerSource result = google.maps.fleetengine.v1.PowerSource.valueOf(powerSource_);\n return result == null ? google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result;\n }",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"@java.lang.Override\n public google.maps.fleetengine.v1.PowerSource getPowerSource() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.PowerSource result = google.maps.fleetengine.v1.PowerSource.valueOf(powerSource_);\n return result == null ? google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result;\n }",
"public BwLocation getLocation() {\n if (location == null) {\n location = BwLocation.makeLocation();\n }\n\n return location;\n }",
"public int getLocation() {\n\t\tint location=super.getLocation();\n\t\treturn location;\n\t}",
"public String getLocation() {\r\n\t\treturn location; \r\n\t}",
"public Location getCenterLocation() \n\t{\n\t\treturn factoryLocation;\n\t}",
"@HippoEssentialsGenerated(internalName = \"katharsisexampleshippo:location\")\n public String getLocation() {\n return getProperty(LOCATION);\n }",
"@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:12.107 -0500\", hash_original_method = \"958E0B7EB30F5353747022B831D2FD74\", hash_generated_method = \"ADF84B7CD584A3086AA314B699B00CEF\")\n \npublic String getLocation() {\n return location;\n }",
"public String getLocation() {\r\n\t\treturn location;\r\n\t}",
"public int getLocation()\r\n {\n }",
"public String getLocation() {\n\t\treturn location;\n\t}",
"public String getLocation() {\n\t\t\treturn location;\n\t\t}",
"public double getLocation(){\n\t\treturn location;\n\t}",
"public DeviceDescriptionLocation getLocation() {\n return location;\n }",
"java.lang.String getLocation();",
"public int getLocation() {\n\t\treturn 0;\n\t}",
"public String getLocation()\n {\n return location;\n }",
"public String getLocation() {\r\n return location;\r\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n\t\treturn \"-12.9990189,-38.5140298\";\n\t}",
"public PVector getLocation()\n\t{\n\t\treturn location;\n\t}",
"public Location getDest() {\n return ticketsCalculator.getDest();\n }",
"public java.lang.String getLocation() {\n return location;\n }",
"URI location() {\n if (module.isNamed() && module.getLayer() != null) {\n Configuration cf = module.getLayer().configuration();\n ModuleReference mref\n = cf.findModule(module.getName()).get().reference();\n return mref.location().orElse(null);\n }\n return null;\n }",
"public String getLocation() {\r\n return location;\r\n }",
"@Override\n\tpublic long getLocation() {\n\t\treturn _buySellProducts.getLocation();\n\t}",
"public String getLocation() {\n return location;\n }",
"public String getRunLocation();",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"public Location getLocation ( ) {\n\t\treturn extract ( handle -> handle.getLocation ( ) );\n\t}",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public java.lang.String getLocation() {\n return location;\n }",
"public String getLocation(){\r\n return Location;\r\n }",
"public final String getLocation() {\n return location;\n }",
"@Override\n\tpublic String getLocation() {\n\t\treturn location;\n\t}",
"public StarSystem getCurrentLocation() {\n\t\treturn player.getLocation();\n\t}",
"@Override\n\tpublic String getLocation() {\n\t\treturn this.location;\n\t}",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() { return location; }",
"public String getLocation() { return location; }",
"public FrillLoc getLocation() {\n return MyLocation;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public Location getLocation() \n\t{\n\t\treturn location;\n\t}",
"public int getLocation()\r\n {\r\n return location;\r\n }",
"public Location getLocation() {\n return getLocation(null);\n }",
"private String getPickUpLocation() {\n return priceDetailsModule.findElement(By.className(\"seleniumPickupLocation\")).getText();\n }",
"public String getStore_location()\n {\n \treturn store_location;\n }",
"public String location() {\n return this.location;\n }",
"public String location() {\n return this.location;\n }",
"public String getPCodeNRGeneratorLocation()\n\t{\n\t\treturn getUserStringPref(PCodeNRGeneratorLocation, null);\n\t}",
"public Location getStartLocation() {\r\n \treturn new Location(0,0);\r\n }",
"public Path getProvLocation() {\n return getSimulationLocation().resolve(FileManager.PROV_FOLDER_NAME);\n }",
"public String getLocation(){\r\n return location;\r\n }",
"public String get_station_location () {\n if (!this.on) {\n return null;\n }\n\n return this.stationLocation;\n }",
"public static String location(SensorDetails details) {\r\n\t\treturn details.location;\r\n\t}",
"public WotlasLocation getLocation() {\n return this.getBasicChar().getLocation();\n }",
"Path getLocation();",
"public String getOfficeLocation() {\n\t\treturn officeLocation;\n\t}",
"@Override\n public String getLocation() {\n return location;\n }",
"public String getLocation(){\n return location;\n }",
"public Vector2f getLocation() {\r\n\t\treturn location.getLocation();\r\n\t}",
"public Location getLocation() {\n\t\treturn location;\n\t}",
"public String getLocation(){\n return this.location;\n }",
"public String getLocation() {\n\t\treturn mLocation;\n\t}",
"public PSLocator getSrcFolder()\n {\n return m_srcFolder;\n }",
"public Location getLocation() {\r\n\t\treturn location;\r\n\t}",
"public Location getLocation() {\r\n\t\treturn location;\r\n\t}",
"@Override\n public PointF getLocation() {\n return location;\n }",
"public GridLocation getLocation();"
] | [
"0.6444966",
"0.6416073",
"0.6416073",
"0.6416073",
"0.63842744",
"0.6360959",
"0.6357353",
"0.6357353",
"0.6357353",
"0.6357353",
"0.6357353",
"0.6357353",
"0.6357353",
"0.6357353",
"0.63092804",
"0.630455",
"0.6286647",
"0.62528133",
"0.62514967",
"0.62002605",
"0.6198246",
"0.6196749",
"0.6183909",
"0.61833394",
"0.6171432",
"0.6166989",
"0.616462",
"0.6161537",
"0.616077",
"0.6142372",
"0.61362875",
"0.61332726",
"0.61331296",
"0.61297804",
"0.6126125",
"0.61216205",
"0.61139697",
"0.6112944",
"0.61102885",
"0.6108952",
"0.61077625",
"0.610582",
"0.610582",
"0.610582",
"0.610582",
"0.610491",
"0.6099646",
"0.6099646",
"0.6099646",
"0.6099646",
"0.6099646",
"0.6099646",
"0.6099646",
"0.6099646",
"0.6099646",
"0.6099646",
"0.6099646",
"0.6099646",
"0.60957897",
"0.60802376",
"0.6078588",
"0.6075071",
"0.6073211",
"0.60728645",
"0.6071277",
"0.6062209",
"0.6062209",
"0.6061227",
"0.60610366",
"0.60610366",
"0.60610366",
"0.60610366",
"0.60610366",
"0.605126",
"0.60280937",
"0.6021539",
"0.60212535",
"0.6020893",
"0.60180914",
"0.60180914",
"0.60161304",
"0.59985054",
"0.5995841",
"0.5977154",
"0.59745294",
"0.5953603",
"0.5946436",
"0.5944775",
"0.59326816",
"0.59210587",
"0.5920468",
"0.5919803",
"0.5917411",
"0.5916008",
"0.59127575",
"0.5910549",
"0.59016633",
"0.59016633",
"0.5896204",
"0.58957064"
] | 0.8195204 | 0 |
Checks if there is enough fuel Available for atleast once energy cycle | public boolean isFuelAvailable()
{
Inventory inv = getPowerSourceInventory();
if (inv == null) {
return false;
} else {
return getFuel().allIn(inv);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }",
"public boolean fuelIsFull() throws Exception;",
"public boolean isFullySupplied()\n {\n boolean isFull = !model.needsFuel() || (model.maxFuel == fuel);\n isFull &= (model.maxAmmo == ammo);\n return isFull;\n }",
"public boolean fuelIsEmpty() throws Exception;",
"@Test\n public void checkFuelEmpty() {\n Game.getInstance().getPlayer().setSolarSystems(SolarSystems.SOMEBI);\n Game.getInstance().getPlayer().setFuel(0);\n assertFalse(SolarSystems.SOMEBI.canTravel(SolarSystems.ADDAM));\n \n \n \n }",
"@Test\n public void checkFuelEnough() {\n Game.getInstance().getPlayer().setSolarSystems(SolarSystems.SOMEBI);\n Game.getInstance().getPlayer().setFuel(SolarSystems.SOMEBI.getDistance(SolarSystems.ADDAM) + 1);\n assertTrue(SolarSystems.SOMEBI.canTravel(SolarSystems.ADDAM));\n }",
"public Boolean isFull() {\n\t\tif (this.mVehicles.size() == this.mCapacity)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public static boolean inventoryIsFull() {\n\t\treturn Inventory.getCount() == 28;\n\t}",
"boolean hasHasEnergyCF();",
"public boolean goldilocksCheck() {\n\t\treturn (waterConcentration > 0.25 && heat > 32);\r\n\t}",
"@Test\r\n\tpublic void testFillChargingNonlinear_EmptyCar_ExhaustiveDesiredCapacity() {\n\t\tSimulation.verbosity = 0;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\tdouble desiredCapacityInterval = 1; \r\n\t\t\r\n\t\tdouble desiredCapacity = desiredCapacityInterval;\r\n\t\twhile (desiredCapacity <= car.getMaxCapacity()) {\r\n\t\t\t\r\n\t\t\t//System.out.println(\"desiredCapacity=\" + desiredCapacity);\r\n\t\t\tcar.setCurrentPlan(new double[96]);\r\n\t\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\t\tstartTimeSeconds);\r\n\t\t\t\r\n\t\t\tassertEquals(desiredCapacity, schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds), 1e-2);\r\n\t\t\tdesiredCapacity += desiredCapacityInterval;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }",
"private boolean hasCapacity() {\n int used = 0 + evaluations.size() * 2;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return used < available;\n }",
"private void checkChargeTime() {\n\t\tif (elapsedTimeSeconds > chargeTimeP1) {\n\t\t\tplayerCharge.put(dolphinNodeOne, false);\n\t\t}\n\t}",
"public boolean isFull(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean is_full(){\n return this.habitant.size() >= Constantes.HOUSE_FULL;\n }",
"public boolean isAvailable(){\r\n // return statement\r\n return (veh == null);\r\n }",
"public int energyRequired(Time time) {\n\n Random r = new Random();\n Time universeTime = universe.getUniverseTime();\n\n /*\n If we are basing our calculation on the current Universe time, the\n appliance will be on thanks to the TimedEvent handler so we do not need\n to check for matching ApplianceTimedEvents, we can just check isOn\n */\n if (time.equals(universeTime)) {\n return energy = isOn ? minUsage + r.nextInt(maxUsage - minUsage) : 0;\n \n }\n else { // THIS IS A FORECAST\n\n //Check usage hours for a TimedEvent where the appliance is used at time\n //usage hours are ordered in acsending order of start times\n for (Iterator<ApplianceTimedEvent> i = usageHours.iterator(); i.hasNext();) {\n ApplianceTimedEvent event = i.next();\n\n //start time comes after time. Therefore for all succeeding TimedEvents\n //the start time would also come after time (ascending order)\n //energy remains at zero and breaks out of iteration\n if (event.getStartTime().compare(time) > 0) \n break;\n \n\n //time occurs within a TimedEvent\n //energy is updated to value and breaks out of iteration\n if (event.containsTime(time)) {\n return energy = minUsage + r.nextInt(maxUsage - minUsage);\n \n }\n\n }\n return energy = 0; /*EXIT AT THIS POINT HAVING NOT FOUND ANY ENERGY USAGE AT THIS TIME FOR THIS APPLIANCE*/\n\n }\n }",
"private boolean checkGreedyIronCurtain() {\r\n return (myself.health < 30 || enTotal.get(0) >= 8 || opponent.isIronCurtainActive || this.myTotal.get(0) < this.enTotal.get(0));\r\n }",
"public boolean isInventoryFull()\n\t{\n\t\tif (myWorker.getLoadInInventory() >= getMyPlayer().getPlayerInfo()\n\t\t\t\t.getMaxCarryingLoadByWorker())\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"private boolean DeriveStockWith_FundIsAvailable() {\n\t\tif (getFunds() > 0) {\n\t\t\tif (calculateInputStock_Items() > getFunds()) {\n\t\t\t\tSystem.err.println(\"Insufficient Funds, Cannot restock\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t\t// available funds can accommodate input stock requirement\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Insufficient Funds\");\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isFull() {\n return numOfGoods == cargoSpace;\n }",
"public boolean isAfternoonFilledUp() {\n\n\t\treturn afternoonSession.getCurrentConsumedCapacity() == PropertiesConfig.getAfternoonMaxUnitsCapacity();\n\t}",
"public boolean canProvideEquipment(EquipmentType equipmentType) {\n for (AbstractGoods goods : equipmentType.getGoodsRequired()) {\n int available = getGoodsCount(goods.getType());\n \n int breedingNumber = goods.getType().getBreedingNumber();\n if (breedingNumber != GoodsType.INFINITY) {\n available -= breedingNumber;\n }\n \n if (available < goods.getAmount()) return false;\n }\n return true;\n }",
"private boolean isSelectedArmyForceBigEnough() {\n return selectedArmyForce.getTotalPower() >= selectedTerritoryByPlayer.getArmyThreshold();\n }",
"private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }",
"private void consumeEnergyIfExist() {\n\n\t\tif (newPlayerCell.isHasEnergy()) {\n\t\t\tGame.getPlayer().getExperience().addStars(1);\n\t\t\tnewPlayerCell.setHasEnergy(false);\n\t\t\tnewPlayerCell.setType(RealmCellType.EMPTY);\n\t\t}\n\t}",
"public boolean checkAvailability(int num_used) {\n return num_used != this.num_uses;\n }",
"@Test\r\n\tpublic void testFillChargingNonlinear_HighInitialSoC_ExhaustiveDesiredCapacity() {\n\t\tSimulation.verbosity = 0;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\t// Charge until soc=0.9\r\n\t\tdouble initialSoC = 0.9;\r\n\t\twhile (car.carBattery.getSoC() < initialSoC) {\r\n\t\t\tcar.addChargedCapacity(1, 32);\r\n\t\t}\r\n\t\t\r\n\t\tdouble desiredCapacity = 0.1;\r\n\t\twhile (desiredCapacity <= car.getMissingCapacity()) {\r\n\t\t\t\r\n\t\t\tcar.setCurrentPlan(new double[96]);\r\n\t\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\t\tstartTimeSeconds);\r\n\t\t\t\r\n\r\n\t\t\tdouble plannedCapacity = schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds);\r\n\t\t\t//System.out.println(\"desiredCapacity=\" + desiredCapacity + \"Ah, plannedCapacity=\" + plannedCapacity);\r\n\t\t\t\r\n\t\t\tassertEquals(desiredCapacity, plannedCapacity, 1e-2);\r\n\t\t\tdesiredCapacity+=0.1;\r\n\t\t}\r\n\t\t\r\n\t}",
"public static int getSupplyFree() {\n return getSupplyTotal() - getSupplyUsed();\n }",
"public boolean hasBust() {\n\t\treturn this.hand.countValue().first() > 21;\n\t}",
"public boolean isDeviceLimitExceedErrorMessagePresent() {\r\n\t\treturn isElementPresent(addVehiclesHeader.replace(\"Add Vehicle\", \"Your Site Devices limit exceed.\"), SHORTWAIT);\r\n\t}",
"@Override\n public boolean validate() {\n int numFeathers = c.getInventory().count(FEATHERS);\n return (c.getSkills().getRealLevel(Skill.FISHING) >= 20 && !c.isCollectFeathers());\n }",
"public boolean IsPackmanReachedFruit(double time, double timeTotal)\n\t{\n\t\tif(time<timeTotal) \n\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t\telse\n\t\t\t\treturn true;\n\t}",
"public double calcEnergyToBeBought(double neededEnergy) {\n double energyLossIncluded = neededEnergy/cableEnergyLoss; //Here the amount of energy lost is calculated, see cable.getCost() and http://large.stanford.edu/courses/2010/ph240/harting1/\n return energyOffer.getEnergy() <= energyLossIncluded ? (energyOffer.getEnergy()) : energyLossIncluded;\n }",
"private void checkProductAvailability()\n\t{\n\n\t\tprodMsg = \"\";\n\t\tcartIsEmpty = false;\n\n\t\tMap <String,Product> products = getProducts();\n\n\t\tint qtyRequested, qtyAvailable;\n\n\t\t// Check for unavailable products\n\t\tfor ( Product p : shoppingCart.getProducts().keySet() )\n\t\t{\n\t\t\tfor ( String s : products.keySet() )\n\t\t\t{\n\t\t\t\tif ( products.get(s).getName().equals(p.getName()) )\n\t\t\t\t{\n\t\t\t\t\t// Modify product to write to file\n\t\t\t\t\tqtyRequested = shoppingCart.getProducts().get(p);\n\t\t\t\t\tqtyAvailable = products.get(s).getQtyAvailable();\n\n\t\t\t\t\tif ( qtyAvailable < qtyRequested )\n\t\t\t\t\t\tunavailableProds.put(p, new ArrayList <>(Arrays.asList(qtyRequested, qtyAvailable)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Show warning\n\t\tif ( !unavailableProds.isEmpty() )\n\t\t{\n\t\t\tprodMsg = \"The cart products were not available anymore in the requested quantity, only the available quantity has been bought:\\n\\n\";\n\n\t\t\tfor ( Product p : unavailableProds.keySet() )\n\t\t\t{\n\t\t\t\tprodMsg += p.getName() + \": requested: \" + unavailableProds.get(p).get(0) + \", available: \"\n\t\t\t\t\t\t+ unavailableProds.get(p).get(1) + \"\\n\";\n\n\t\t\t\tif ( unavailableProds.get(p).get(1) == 0 )\n\t\t\t\t\tshoppingCart.removeProduct(p);\n\t\t\t\telse\n\t\t\t\t\tshoppingCart.getProducts().replace(p, unavailableProds.get(p).get(1));\n\t\t\t}\n\n\t\t\tif ( shoppingCart.getProducts().size() == 0 )\n\t\t\t{\n\t\t\t\tcartIsEmpty = true;\n\t\t\t\tprodMsg = \"All of your products were not available anymore for purchase: payment cancelled.\\nPlease select some new products.\";\n\t\t\t}\n\t\t}\n\t}",
"private void checkSpeedAndReserved()\n\t{\n\t\t// only check every 5 seconds\n\t\tif(mainloop_loop_count % MAINLOOP_FIVE_SECOND_INTERVAL != 0)\n\t\t\treturn;\n\n\t\tfinal int\t\t\t\tnbPieces\t=_nbPieces;\n\t\tfinal PEPieceImpl[] pieces =pePieces;\n\t\t//for every piece\n\t\tfor (int i =0; i <nbPieces; i++)\n\t\t{\n\t\t\t// placed before null-check in case it really removes a piece\n\t\t\tcheckEmptyPiece(i);\n\n\n\t\t\tfinal PEPieceImpl pePiece =pieces[i];\n\t\t\t// these checks are only against pieces being downloaded\n\t\t\t// yet needing requests still/again\n\t\t\tif (pePiece !=null)\n\t\t\t{\n\t\t\t\tfinal long timeSinceActivity =pePiece.getTimeSinceLastActivity()/1000;\t\t\t\t\n\n\t\t\t\tint pieceSpeed =pePiece.getSpeed();\n\t\t\t\t// block write speed slower than piece speed\n\t\t\t\tif (pieceSpeed > 0 && timeSinceActivity*pieceSpeed*0.25 > DiskManager.BLOCK_SIZE/1024)\n\t\t\t\t{\n\t\t\t\t\tif(pePiece.getNbUnrequested() > 2)\n\t\t\t\t\t\tpePiece.setSpeed(pieceSpeed-1);\n\t\t\t\t\telse\n\t\t\t\t\t\tpePiece.setSpeed(0);\n\t\t\t\t}\n\n\n\t\t\t\tif(timeSinceActivity > 120)\n\t\t\t\t{\n\t\t\t\t\tpePiece.setSpeed(0);\n\t\t\t\t\t// has reserved piece gone stagnant?\n\t\t\t\t\tfinal String reservingPeer =pePiece.getReservedBy();\n\t\t\t\t\tif(reservingPeer !=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal PEPeerTransport pt = getTransportFromAddress(reservingPeer);\n\t\t\t\t\t\t// Peer is too slow; Ban them and unallocate the piece\n\t\t\t\t\t\t// but, banning is no good for peer types that get pieces reserved\n\t\t\t\t\t\t// to them for other reasons, such as special seed peers\n\t\t\t\t\t\tif (needsMD5CheckOnCompletion(i))\n\t\t\t\t\t\t\tbadPeerDetected(reservingPeer, i);\n\t\t\t\t\t\telse if (pt != null)\n\t\t\t\t\t\t\tcloseAndRemovePeer(pt, \"Reserved piece data timeout; 120 seconds\", true);\n\n\t\t\t\t\t\tpePiece.setReservedBy(null);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!piecePicker.isInEndGameMode()){\n\t\t\t\t\t\tpePiece.checkRequests();\n\t\t\t\t\t}\n\n\t\t\t\t\tcheckEmptyPiece(i);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}",
"public boolean hasBust()\n {\n return getSumOfCards(false) > 21;\n }",
"public boolean lowQuantity(){\r\n if(getToolQuantity() < 40)\r\n return true;\r\n return false;\r\n }",
"boolean hasCapacity();",
"public boolean isFull(){\n \treturn count==capacity;\n }",
"@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }",
"public boolean couldBeProfitable(){\n return this.priceBought < this.maximumMachineProfit;\n }",
"private void check() {\n ShedSolar.instance.haps.post( Events.WEATHER_REPORT_MISSED );\n LOGGER.info( \"Failed to receive weather report\" );\n\n // check again...\n startChecker();\n }",
"public boolean hasFainted() {\n return hp <= 0;\n }",
"private void checkIsAbleToFire() {\n\n\t\tif (ticksToNextFire <= currentTickCount) {\n\t\t\tisAbleToFire = true;\n\t\t} else {\n\t\t\tisAbleToFire = false;\n\t\t}\n\t}",
"private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }",
"public boolean isSeatAllReserved() {\n return airplane.isFull();\n }",
"public void checkAvaliableElevators()\r\n\t{\r\n\t\tSystem.out.println(\"--------- Checking Elevators Current Status ------\");\t\r\n\t\t\r\n\t\tif(availableElevadors.isEmpty())\r\n\t\t{\r\n\t\t\tfor(int i=0; i <numberOfElevators-3; i++) {\r\n\t\t\t\tavailableElevadors.add(occupiedElevadors.remove(i));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"--------- Elevators are available again ------\");\r\n\t\t\r\n\t\t}else {\r\n\t\t\tfor(int i=0;i<availableElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + availableElevadors.get(i).getElevatorNumber() +\" ready for Requests\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<occupiedElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + occupiedElevadors.get(i).getElevatorNumber() +\" is Occupied\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t}\r\n\r\n\t}",
"boolean expendEnergy(double amount) {\r\n if (amount <= energy) {\r\n energy -= amount;\r\n return true;\r\n }\r\n else\r\n return false;\r\n }",
"private boolean ifTooEmpty() {\n if (items.length <= 8) {\n return false;\n }\n float efficiency = (float) size / (float) items.length;\n return efficiency < 0.25;\n }",
"private static void checkFreeSpace()\n {\n boolean isSpaceAvailable = false;\n int numOfFreeSpaces = 0;\n for(int index=1;index<board.length;index++)\n {\n if((board[index] == ' '))\n {\n isSpaceAvailable = true;\n numOfFreeSpaces++;\n }\n }\n if(isSpaceAvailable == false)\n {\n System.err.println(\"Board is full! You can't make another move\");\n System.exit(0);\n }\n else\n {\n System.out.println(\"Free space is available! you have \"+numOfFreeSpaces+ \" moves left\");\n }\n }",
"private void checkHeatLevels()\n {\n // Computer is switched on and has power reserves.\n if (this.isPowered() && this.isRedstonePowered())\n {\n if (this.getEnergyStored(ForgeDirection.UNKNOWN) <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN))\n {\n // Running computer consumes energy from internal reserve.\n this.consumeInternalEnergy(this.getEnergyConsumeRate());\n }\n\n // Running computer generates heat with excess energy it wastes.\n if (!this.isHeatAboveZero() && worldObj.getWorldTime() % 5L == 0L)\n {\n if (!this.isOverheating() && !this.isHeatedPastTriggerValue())\n {\n // Raise heat randomly from zero to five if we are not at optimal temperature.\n this.setHeatLevelValue(this.getHeatLevelValue() + worldObj.rand.nextInt(10));\n }\n else if (!this.isOverheating() && this.isHeatedPastTriggerValue() && this.getFluidAmount() > FluidContainerRegistry.BUCKET_VOLUME)\n {\n // Computer has reached operating temperature and has water to keep it cool.\n this.setHeatLevelValue(this.getHeatLevelValue() + worldObj.rand.nextInt(2));\n }\n else if (!this.isOverheating() && this.getFluidAmount() <= FluidContainerRegistry.BUCKET_VOLUME)\n {\n // Computer is running but has no water to keep it cool.\n this.setHeatLevelValue(this.getHeatLevelValue() + worldObj.rand.nextInt(5));\n }\n }\n }\n\n // Water acts as coolant to keep running computer components cooled.\n if (!this.isHeatAboveZero() && !this.isFluidTankEmpty() && this.isPowered() && this.isRedstonePowered() && worldObj.getWorldTime() % 16L == 0L)\n {\n if (this.getHeatLevelValue() <= this.getHeatLevelMaximum() && this.isHeatAboveZero())\n {\n // Some of the water evaporates in the process of cooling off the computer.\n // Note: water is drained in amount of heat computer has so hotter it gets\n // the faster it will consume water up to rate of one bucket\n // every few ticks.\n if (this.getFluidAmount() >= this.getHeatLevelValue())\n {\n // The overall heat levels of the computer drop so long as there is water though.\n this.removeFluidAmountExact(this.getHeatLevelValue() / 4);\n this.decreaseHeatValue();\n }\n }\n }\n else if (this.isHeatAboveZero() && worldObj.getWorldTime() % 8L == 0L)\n {\n // Computer will slowly dissipate heat while powered off but nowhere near as fast with coolant.\n this.decreaseHeatValue();\n }\n }",
"private boolean shouldBecomeCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount <= this.combatEngineerTriggerPercentageEnroll;\r\n\t}",
"private void checkForNewAppliancesAndUpdateConstants()\n\t{\n\t\t// This could be more sophisticated, but for now all this needs to do is\n\t\t// make sure that\n\t\t// the wattbox assigns load only according to the rated heat pump and\n\t\t// immersion capacity\n\t\t// of its owner\n\t\tthis.maxHeatPumpElecDemandPerTick = (this.owner.ratedPowerHeatPump * 24 / this.ticksPerDay);\n\t\tthis.maxImmersionHeatPerTick = Consts.MAX_DOMESTIC_IMMERSION_POWER * 24 / this.ticksPerDay;\n\t}",
"boolean checkFireEnergy(AbstractFirePokemon pokemon);",
"@Override\n public boolean check(RealPlayer realPlayer) {\n for (Map.Entry<Resource, Integer> entry : productionPowerInput.entrySet()) {\n if (entry.getValue() > realPlayer.getPersonalBoard().getSpecificResourceCount(entry.getKey().getResourceType()))\n return false;\n }\n return true;\n }",
"private boolean boardIsFull() {\n int numberOfFieldsOnBoard = boardSize * boardSize;\n return (numberOfFieldsOnBoard == this.numberOfOccupiedFields);\n }",
"public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }",
"private Boolean calculateTotalEmission() {\n\t\ttry {\n\n\t\t\tfoodCO2E = Double.valueOf(JTFFood.getText().isEmpty() ? \"0.0\" : JTFFood.getText())\n\t\t\t\t\t* energySourceDetail.get(FoodIntake).get(JCBFoodUnit.getSelectedItem().toString());\n\n\t\t\tlandfillingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFLandfillingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFLandfillingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(LandfillingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBLandfillingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t\tcompostingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFCompostingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFCompostingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(CompostingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBCompostingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t} catch (NumberFormatException ne) {\n\t\t\tSystem.out.println(\"Number Format Exception while calculating House Hold Emission\" + ne);\n\t\t\treturn false;\n\t\t}\n\t\t//\n\t\ttotalFoodCO2E = foodCO2E + landfillingFoodWasteCO2E + compostingFoodWasteCO2E;\n\t\ttotalFoodCO2E = Math.round(totalFoodCO2E * 100D) / 100D;\n\t\treturn true;\n\t}",
"protected boolean isfull() {\n return this.numSeats == this.bookedSeats;\n }",
"public boolean isMinimumBatteryReady(Context context) throws PxBatteryException {\n return isBatteryReady(context,minimumBatteryThreshold);\n }",
"public boolean isRequirementUnfulfilled() {\n return false;\n }",
"public boolean hasIllegalGoods() {\n return cargoHold.hasIllegalGoods();\n }",
"public boolean isAvailable() {\n return LocalTime.now().isAfter(busyEndTime);\n }",
"public boolean isFull() {\n\t\t\n\t\tif (currentOccup < maxOccup)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"private boolean checkBatteryLevelOK() {\n return true;\n }",
"int gas_station() {\n int sol = 0; // numar minim de opriri\n int fuel = m; // fuel este cantitatea curenta de combustibil din rezervor (a.k.a cat a ramas)\n\n for (int i = 1; i <= n; ++i) {\n fuel -= (dist[i] - dist[i - 1]); // ma deplasez de la locatia anterioara la cea curenta\n // intotdeauna cand ajung intr-o benzinarie ma asigur am suficient\n // combustibil sa ajung la urmatoarea - initial pot sa ajung de la A la dist[1]\n\n // daca nu am ajuns in ultima benziarie\n // verifica daca trebuie sa reincarc (rezervor gol sau cantitate insuficienta pentru a ajunge la benzinaria urmatoare)\n if (i < n && (fuel == 0 || dist[i+1] - dist[i] > fuel)) {\n ++sol;\n fuel = m;\n }\n }\n\n return sol;\n }",
"private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }",
"private void checkForCPUChance()\n\t\t\t{\n\t\t\t\tf12 = false;\n\t\t\t\tfor (m = 0; m < 8; ++m)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (lose[m] == 2 && win[m] == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tf12 = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\tif (f12 == false)\n\t\t\t\t\tm = 10;\n\n\t\t\t}",
"boolean checkElectricEnergy(AbstractElectricPokemon pokemon);",
"public final boolean inUse()\n{\n\tif (_buildTime > 0)\n\t{\n\t\treturn false;\n\t}\n\treturn (_base.getAvailableQuarters() - _rules.getPersonnel() < _base.getUsedQuarters() ||\n\t\t\t_base.getAvailableStores() - _rules.getStorage() < _base.getUsedStores() ||\n\t\t\t_base.getAvailableLaboratories() - _rules.getLaboratories() < _base.getUsedLaboratories() ||\n\t\t\t_base.getAvailableWorkshops() - _rules.getWorkshops() < _base.getUsedWorkshops() ||\n\t\t\t_base.getAvailableHangars() - _rules.getCrafts() < _base.getUsedHangars());\n}",
"private boolean needsToRecalcStats() {\n\n return this.equipsChanged;\n }",
"@Override\n public void isEnough(Coffee coffee) throws NotEnoughException {\n String msg = \"\";\n int neededBeans = coffee.getBeansAmount();\n int neededMilk = coffee.getMilkAmount();\n int neededWater = coffee.getWaterAmount();\n\n int beansDiffer = coffeeMachine.getLoadedBeans() - neededBeans;\n int milkDiffer = coffeeMachine.getLoadedMilk() - neededMilk;\n int waterDiffer = coffeeMachine.getLoadedWater() - neededWater;\n\n if (waterDiffer < 0) {\n msg += notEnoughResourceMsg(\"water\", coffeeMachine.getLoadedWater(), neededWater);\n }\n if (milkDiffer < 0) {\n msg += notEnoughResourceMsg(\"milk\", coffeeMachine.getLoadedMilk(), neededMilk);\n }\n if (beansDiffer < 0) {\n msg += notEnoughResourceMsg(\"beans\", coffeeMachine.getLoadedBeans(), neededBeans);\n }\n if (msg.isEmpty()) {\n coffeeMachine.setLoadedBeans(beansDiffer);\n coffeeMachine.setLoadedWater(waterDiffer);\n coffeeMachine.setLoadedMilk(milkDiffer);\n } else {\n throw new NotEnoughException(msg);\n }\n }",
"public static boolean isPreservedFoodAvailable(Person person) {\n\t\tboolean result = false;\n\t\tUnit containerUnit = person.getTopContainerUnit();\n\t\tif (!(containerUnit instanceof MarsSurface)) {\n\t\t\tInventory inv = containerUnit.getInventory();\n\t\t\tif (inv != null && foodConsumptionRate > MIN)\n\t\t\t\tresult = inv.getAmountResourceStored(ResourceUtil.foodID, false) > MIN;\n//\t\t\t\tStorage.retrieveAnResource(foodConsumptionRate, ResourceUtil.foodID, inv, false);\n\t\t}\n\t\treturn result;\n\t}",
"public boolean needUnits(){\n\t\tif(units.size() >= maxUnits){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isBurning()\n {\n return this.fuel > 0 && this.canSmelt();\n }",
"private static boolean hasCapacityForMultiEvaluation() {\n // return true;\n int threshold = 3;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return available >= threshold;\n }",
"public boolean BWidthAvailableUL(int cycle){\n\t\treturn this.ul_bwidth.available(cycle);\n\t}",
"private void checkFreeDiskSpace(List<File> inputFiles) {\n //Check for free space\n long usableSpace = 0;\n long totalSize = 0;\n for (File f : inputFiles) {\n if (f.exists()) {\n totalSize += f.length();\n usableSpace = f.getUsableSpace();\n }\n }\n log.info(\"Total expected store size is {} Mb\",\n new DecimalFormat(\"#,##0.0\").format(totalSize / (1024 * 1024)));\n log.info(\"Usable free space on the system is {} Mb\",\n new DecimalFormat(\"#,##0.0\").format(usableSpace / (1024 * 1024)));\n if (totalSize / (double) usableSpace >= 0.66) {\n throw new OutOfDiskSpace(\"Aborting because there isn't enough free disk space\");\n }\n }",
"public boolean canBuildEquipment(EquipmentType equipmentType) {\n for (AbstractGoods requiredGoods : equipmentType.getGoodsRequired()) {\n if (getGoodsCount(requiredGoods.getType()) < requiredGoods.getAmount()) {\n return false;\n }\n }\n return true;\n }",
"public boolean isAvailable(){\r\n return blockingQueue.size() < maxWorkQueueSize;\r\n }",
"public boolean isFull() {\n return (this.count == this.capacity);\n }",
"public void checkRecipe() {\n \t\tIStationRecipe previous = currentRecipe;\n \t\tif ((currentRecipe == null) || !currentRecipe.matches(crafting)) {\n \t\t\tcurrentRecipe = BetterStorageCrafting.findMatchingStationRecipe(crafting);\n \t\t\tif (currentRecipe == null)\n \t\t\t\tcurrentRecipe = VanillaStationRecipe.findVanillaRecipe(this);\n \t\t}\n \t\tif ((previous != currentRecipe) || !recipeOutputMatches()) {\n \t\t\tprogress = 0;\n \t\t\tcraftingTime = ((currentRecipe != null) ? currentRecipe.getCraftingTime(crafting) : 0);\n \t\t\texperience = ((currentRecipe != null) ? currentRecipe.getExperienceDisplay(crafting) : 0);\n \t\t\tif (!outputIsReal)\n \t\t\t\tfor (int i = 0; i < output.length; i++)\n \t\t\t\t\toutput[i] = null;\n \t\t}\n \t\tArrays.fill(requiredInput, null);\n \t\tif (currentRecipe != null)\n \t\t\tcurrentRecipe.getCraftRequirements(crafting, requiredInput);\n \t\tupdateLastOutput();\n \t}",
"public void lastChanceGas()\n {\n System.out.print( \"Tank capacity: \" );\n int capacity = scan.nextInt();\n System.out.print( \"Gage reading: \" );\n int gage = scan.nextInt();\n System.out.print( \"Miles per gallon: \" );\n int mpg = scan.nextInt();\n double gasLeft = capacity * ( gage * 0.01 );\n double milesDriveable = gasLeft * mpg;\n if ( milesDriveable >= 200 )\n {\n System.out.println( \"Safe to Proceed!\" );\n }\n else\n {\n System.out.println( \"Get Gas!\" );\n }\n\n }",
"@Override\n public boolean waitForNextFlight() {\n this.lock.lock();\n try {\n boolean wait = this.passengersStillMissing != 0;\n\n // update hostess state\n this.repository.updateHostessState(HostessState.WAIT_FOR_NEXT_FLIGHT);\n\n if (wait) {\n // wait for pilot\n while (!this.planeReadyForBoarding) {\n this.hostessWaitPlaneReadyToTakeOff.await();\n }\n this.planeReadyForBoarding = false;\n }\n\n return wait;\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n this.lock.unlock();\n }\n return false;\n }",
"public boolean isFull() {\n return count == capacity;\n }",
"@Test\n\tpublic void testFindFreeFacilityRoomNotAvailible() {\n\t\t// get current date\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, 1);\n\t\t// start is current date + 1\n\t\tDate startDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 24);\n\t\tDate reservationEndDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\t\tDate findEndDate = cal.getTime();\n\n\t\tdataHelper.createPersistedReservation(\"aID\", Arrays.asList(room1.getId()), startDate, reservationEndDate);\n\n\t\t// search for one workplace in room1\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 1);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, startDate, findEndDate, false);\n\n\t\t// should find no room because room is not available\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}",
"private boolean hasEatenPowerUp() {\r\n if (snake[HEAD].row == powerUp.row && \r\n snake[HEAD].column == powerUp.column) { \r\n growSnake();\r\n newPowerUp();\r\n MainClass.totalPoints++;\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean waterLevelFailure() {\n if (this.levelMessage.getDoubleParameter() < 0) {\n return true;\n } else if (this.levelMessage.getDoubleParameter() >= this.configuration.getCapacity()) {\n return true;\n } else if ((this.mode != State.READY && this.mode != State.WAITING)\n && (this.levelMessage.getDoubleParameter() > (this.waterLevel * 2))) {\n return true;\n } else if ((this.mode != State.READY && this.mode != State.WAITING)\n && (this.levelMessage.getDoubleParameter() < (this.waterLevel - (this.waterLevel / 2)))) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean isThereFreeRegenAt(TranslucentCircuit circuit, Node nodeX){\n\t\tint numberRegeneratorsRequired = nodeX.getRegenerators().getAmountOfRequiredRegenerators(circuit);\n\t\t\n\t\tif(nodeX.getRegenerators().canRegenerate(numberRegeneratorsRequired)){ // Check if you can regenerate\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"boolean checkFighterEnergy(AbstractFighterPokemon pokemon);",
"private int waitUntilReady()\r\n {\r\n int rc = 0;\r\n // If a stock Item is in the Table, We do not want to start\r\n // The Lookup, if the name of the stock has not been identified.\r\n // here we will wait just a couple a second at a time.\r\n // until, the user has entered the name of the stock.\r\n // MAXWAIT is 20 minutes, since we are 1 second loops.\r\n // 60 loops is 1 minute and 20 of those is 20 minutes\r\n final int MAXWAIT = 60 * 20;\r\n int counter = 0;\r\n do\r\n {\r\n try\r\n {\r\n Thread.currentThread().sleep(ONE_SECOND);\r\n }\r\n catch (InterruptedException exc)\r\n {\r\n // Do Nothing - Try again\r\n }\r\n if (counter++ > MAXWAIT)\r\n { // Abort the Lookup for historic data\r\n this.cancel();\r\n return -1;\r\n }\r\n }\r\n while (\"\".equals(sd.getSymbol().getDataSz().trim()));\r\n\r\n return 0;\r\n }",
"private boolean checkMachineAvailable ()\n throws Exception\n {\n try {\n log.info(\"Claiming free machine\");\n\n Machine freeMachine = Machine.getFreeMachine(session);\n if (freeMachine == null) {\n Scheduler scheduler = Scheduler.getScheduler();\n log.info(String.format(\n \"No machine available for scheduled sim %s, retry in %s seconds\",\n game.getGameId(), scheduler.getSchedulerInterval() / 1000));\n return false;\n }\n\n game.setMachine(freeMachine);\n freeMachine.setStateRunning();\n session.update(freeMachine);\n log.info(String.format(\"Game: %s running on machine: %s\",\n game.getGameId(), game.getMachine().getMachineName()));\n return true;\n } catch (Exception e) {\n log.warn(\"Error claiming free machine for game \" + game.getGameId());\n throw e;\n }\n }",
"public static int consumedPower(){\n int consumedPower = 0;\n for (ElectricalHomeDevice device : allTrunedOnDevices){\n consumedPower += device.getDevicePower();\n }\n return consumedPower;\n }",
"public boolean checkWeight() {\r\n\t\tif ((_15mWeight + _1hWeight + _4hWeight + _12hWeight + _1dWeight + _2dWeight + _7dWeight) == 100) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//make sure to handle this\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public boolean checkFull() {\n\t\tif (studlist.size() == maxstudents) {\n\t\t\tfull = true;\n\t\t}\n\t\treturn full;\n\t}",
"boolean checkWaterEnergy(AbstractWaterPokemon pokemon);",
"public boolean isFull()\r\n\t{\r\n\t\treturn (count == capacity);\r\n\t}",
"@Override\n public boolean checkRequirement(PlayerContext playerContext) {\n int sumOfRightColourAndLevelCard = 0;\n for (DevelopmentCard developmentCard : playerContext.getAllDevelopmentCards()){\n if (developmentCard.getColour() == cardColour && developmentCard.getLevel() == cardLevel)\n sumOfRightColourAndLevelCard ++;\n }\n return sumOfRightColourAndLevelCard >= numberOfCards;\n }"
] | [
"0.75544137",
"0.73002815",
"0.68027717",
"0.6556077",
"0.64534706",
"0.6382868",
"0.6350377",
"0.622167",
"0.6218887",
"0.6176236",
"0.6133467",
"0.60893977",
"0.602332",
"0.60071075",
"0.5996448",
"0.5965453",
"0.5962703",
"0.59587157",
"0.5948203",
"0.5944505",
"0.59339184",
"0.59079945",
"0.5876575",
"0.5865438",
"0.58531207",
"0.5852652",
"0.5840088",
"0.5833412",
"0.5816481",
"0.5800081",
"0.5796321",
"0.57819414",
"0.5747974",
"0.5737291",
"0.5731393",
"0.5728912",
"0.5722848",
"0.5722346",
"0.5692571",
"0.5692384",
"0.5689379",
"0.5684988",
"0.56803966",
"0.5672265",
"0.5663477",
"0.56553864",
"0.56515175",
"0.5650076",
"0.5649067",
"0.5644766",
"0.56268734",
"0.5620216",
"0.56120276",
"0.56067383",
"0.5577247",
"0.5576121",
"0.55707425",
"0.5569344",
"0.55643475",
"0.5560321",
"0.5554265",
"0.5552559",
"0.5549874",
"0.5544033",
"0.5531015",
"0.55260116",
"0.5508651",
"0.55017525",
"0.55009335",
"0.5499032",
"0.54981637",
"0.5490492",
"0.5487159",
"0.5479158",
"0.54778147",
"0.5477633",
"0.54652846",
"0.54583764",
"0.54557943",
"0.5455621",
"0.54543495",
"0.5451589",
"0.54419386",
"0.54391223",
"0.54385257",
"0.5435814",
"0.5435105",
"0.5430639",
"0.54289883",
"0.54225624",
"0.54201883",
"0.5419967",
"0.54075027",
"0.5406863",
"0.540594",
"0.5402104",
"0.53996503",
"0.53984416",
"0.53973776",
"0.5388469"
] | 0.6830967 | 2 |
Called by the block listener when the player(or a entity) destroys the factory Drops the build materials if the config says it should | public void destroy(Location destroyLocation)
{
FactoryModPlugin.sendConsoleMessage(new StringBuilder("Factory destroyed: ")
.append(subFactoryType)
.append(" at ")
.append(StringUtils.formatCoords(getCenterLocation()))
.toString());
powerOff();
currentRepair = getMaxRepair();
timeDisrepair = System.currentTimeMillis();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onDestroy() {\n if ((getChangingConfigurations() & 128) == 128 && this.f12125b != null) {\n this.f12125b.mo6021b(true);\n }\n super.onDestroy();\n }",
"public void onDestroy() {\n if ((getChangingConfigurations() & 128) == 128 && this.f14954b != null) {\n this.f14954b.mo6021b(true);\n }\n if (this.f14955c != null) {\n this.f14955c.mo10814a();\n }\n if (this.f14957e != null) {\n this.f14957e.mo10691a();\n }\n super.onDestroy();\n }",
"@Override\r\n\tpublic void destroy() {\r\n\t\tsuper.destroy();\r\n\t\t// gotta remove cont effects when this ability leaves game...\r\n\r\n\t\tfor (Effect effect : effects) {\r\n\t\t\tref.getGame().getState().getContinuousEffects()\r\n\t\t\t\t\t.remove(effect);\r\n\t\t}\r\n\r\n\t}",
"void destroy() {\n\t\tdespawnHitbox();\n\t\tinventory.clear();\n\t\texperience = 0;\n\t\tinvalid = true;\n\t}",
"@Override\n public void onDestroy(boolean isChangingConfigurations) {\n // Destroy the model.\n getModel().onDestroy(isChangingConfigurations);\n }",
"@Override\n public void onDestroy(boolean isChangingConfiguration) {\n\n }",
"@Override\n public void onRemoval() {\n try {\n if (eOutputHatches != null) {\n for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eOutputHatches) {\n hatch_elemental.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eInputHatches) {\n hatch_elemental.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_OutputData hatch_data : eOutputData) {\n hatch_data.id = -1;\n hatch_data.q = null;\n }\n for (GT_MetaTileEntity_Hatch_InputData hatch_data : eInputData) {\n hatch_data.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_Uncertainty hatch : eUncertainHatches) {\n hatch.getBaseMetaTileEntity().setActive(false);\n }\n for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) {\n hatch.getBaseMetaTileEntity().setActive(false);\n }\n }\n cleanOutputEM_EM();\n if (ePowerPass && getEUVar() > V[3] || eDismantleBoom && mMaxProgresstime > 0 && areChunksAroundLoaded_EM()) {\n explodeMultiblock();\n }\n } catch (Exception e) {\n if (DEBUG_MODE) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n\tpublic void destroy(LevelAccessor world, BlockPos blockPos, BlockState blockState)\n\t{\n\n\t\tsuper.destroy(world, blockPos, blockState);\n\t}",
"@Override\n public void onDestroy() {\n super.onDestroy();\n if (!isChangingConfigurations()) {\n pickiT.deleteTemporaryFile(this);\n }\n }",
"public void cleanup(Entity e)\n {\n\t\tif(my_mesh != null)\n\t\t{\n\t\t\tRenderManagerCallback rc = new RenderManagerCallback()\n\t\t\t{\n\t\t\t\tpublic void onSuccess()\n\t\t\t\t{\n\t\t\t\t\t//System.err.println(\"Removing from world\");\n\t\t\t\t\tmy_geom.removeFromParent();\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tRenderManager.addCallback(rc);\n\t\t}\n }",
"public void destroyDefense(){\n\t\tif(currentConstruct != null)\n\t\t\tcurrentConstruct.receiveDamage(currentConstruct.getHitpoints());\n\t}",
"public void detach() {\n body.destroyFixture(fixture);\n world.destroyBody(body);\n engineSound.stop();\n }",
"@Override\n public void destroy() {\n super.destroy();\n dungeon.removeEntity(this);\n }",
"public void destroy()\r\n\t{\r\n\t\tlog.fine(\"destroy\");\r\n\t}",
"void onCleanup() {\n\t\tdimensionMap.forEachValue(e -> {\n\t\t\te.releaseAllChunkData();\n\t\t\treturn true;\n\t\t});\n\t\tdimensionMap.clear();\n\t\tconnectedPlayers.clear();\n\t}",
"@Override\r\n\tpublic void onDestroy()\r\n\t{\n\t\tsuper.onDestroy();\r\n\t\tcollider.destroy();\r\n\t}",
"public void onDestroy(Bundle params) {\n }",
"@Override\n protected void onDestroy() {\n EasyImage.clearConfiguration(this);\n super.onDestroy();\n }",
"public void destroy(){\n destroyed = true;\n }",
"public void destroy() {\n destroying = true;\n }",
"private void onModuleDestroy() {\n //!\n //! Handle the destroy notification.\n //!\n mLifecycle.onPause();\n mLifecycle.onDispose();\n\n //!\n //! Unload resource module.\n //!\n mResources.onModuleDestroy();\n mResources.unloadAll();\n\n //!\n //! Unload input module.\n //!\n mInputThread.cancel();\n mInput.onModuleDestroy();\n\n //!\n //! Unload audio module.\n //!\n mAudioThread.cancel();\n mAudio.onModuleDestroy();\n\n //!\n //! Unload render module.\n //!\n //! NOTE: Update the render to destroy all render component(s)\n //!\n mRender.onModuleDestroy();\n\n //!\n //! Unload display module.\n //!\n mDisplay.onModuleDestroy();\n }",
"public void destroyBlock(Point3d position, boolean spawnDrops){\r\n\t\tworld.destroyBlock(new BlockPos(position.x, position.y, position.z), spawnDrops);\r\n\t}",
"@Override\n\tpublic void destroy() {\n\t\tgeneralServices.getCallbackApi().removeReplayOpsPopupMenuItem(\n\t\t\t\tshowSc2ConverterForPatternMiningItemHandler);\n\t}",
"private void onModuleDestroy() {\n //!\n //! Handle the destroy notification.\n //!\n mLifecycle.onPause();\n mLifecycle.onDispose();\n\n //!\n //! Unload resource module.\n //!\n mResources.onModuleDestroy();\n\n mResources.unloadAll();\n\n //!\n //! Unload input module.\n //!\n mInputThread.cancel();\n mInput.onModuleDestroy();\n\n //!\n //! Unload audio module.\n //!\n mAudioThread.cancel();\n mAudio.onModuleDestroy();\n\n //!\n //! Unload render module.\n //!\n //! NOTE: Update the render to destroy all render component(s)\n //!\n mRender.onModuleUpdate();\n mRender.onModuleDestroy();\n\n //!\n //! Unload display module.\n //!\n mDisplay.onModuleDestroy();\n }",
"@Destroy\r\n\tpublic void destroy() {\r\n\t\t// Component disposal code.\r\n\t\t// All properties are disposed.\r\n\t\temailConfiguration=null;\r\n\t}",
"public void destroy(){\n runner.destroy();\n }",
"@Override\r\n\tpublic void destroy()\r\n\t{\n\t\t\r\n\t}",
"public void destroy() {\n \t\n }",
"void deactivate() {\n\t\tanimalTemplate = null;\n\t\tscope=null;\n\t\ttriggerOnID=false;\n\t\tstate = null;\n\t\tlog.debug(bundleMarker, \"deactivating...\");\n\t}",
"@Override\n\tpublic void despawn() {\n\t\t\n\t}",
"public void destroy()\n {\n GeneticRobots.rmCollider(this.collider);\n GeneticRobots.rmObject(this);\n }",
"@Override\n public void destroy() {\n }",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\t\n\t\tLog.d(TAG,\"onDestroy\");\n\t\tif(mCameraDevices!=null){\n\t\t\tmCameraDevices.release();\n\t\t}\n\t\tshowFloatTool(false);\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"@Override\n\tpublic void destroy() {\n\n\t}",
"public void destroy() {\n\t\t\r\n\t}",
"public void destroy() {\n\t\t\r\n\t}",
"public void destroy() {\n\t\t\r\n\t}",
"public void destroy() {\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void destroy() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tprotected void destroyLogic() {\n\r\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy()\r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.v(TAG, \"onDestroy\");\r\n\t\t//Toast.makeText(getActivity(), TAG+ \" \"+i+\" onDestroy\", Toast.LENGTH_SHORT).show();\r\n\t\tbigSceneListAdapter.destroy();\r\n\t\tbigSceneListAdapter = null;\r\n\t}",
"public void destroy() {\r\n\t\ttexture.destroy();\r\n\t}",
"@Override\n public void Destroy() {\n }",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t\n\t}"
] | [
"0.66327727",
"0.65956795",
"0.6242915",
"0.6139514",
"0.60747945",
"0.6039707",
"0.5974045",
"0.59476244",
"0.5932888",
"0.58802617",
"0.5879689",
"0.5858942",
"0.5830539",
"0.5812758",
"0.580572",
"0.57845455",
"0.57642406",
"0.5748936",
"0.57326394",
"0.57202774",
"0.5720087",
"0.57033217",
"0.57007104",
"0.5692528",
"0.56915087",
"0.56879103",
"0.56838596",
"0.5677728",
"0.5674935",
"0.56746805",
"0.56616503",
"0.56527156",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5649985",
"0.5645681",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56309396",
"0.56285214",
"0.56285214",
"0.56285214",
"0.56285214",
"0.5625117",
"0.5615722",
"0.56036985",
"0.56036985",
"0.56036985",
"0.56036985",
"0.56036985",
"0.56036985",
"0.55967873",
"0.55848265",
"0.5582191",
"0.55772084",
"0.55765015",
"0.55765015",
"0.55765015",
"0.55765015",
"0.55765015",
"0.55765015"
] | 0.0 | -1 |
/ Repairs the factory | protected void repair(int amountRepaired)
{
currentRepair-=amountRepaired;
if(currentRepair<0)
{
currentRepair=0;
}
if(currentRepair<getMaxRepair())
{
timeDisrepair=3155692597470L;//Year 2070, default starting value
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetFactory() {\n\t\ttry {\n\t\t\tif(null != rawSrv){\n\t\t\trawSrv.resetCfgGroup(ConfigType.RESET_FACTORY);\n\t\t\t}\n\t\t} catch (TVMException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void reseed();",
"public void revise()\n {\n \n super.revise();\n }",
"@Override\n\tpublic void resetToExisting() {\n\t\t\n\t}",
"public void revoke();",
"public void reConfigure();",
"abstract protected void revert();",
"int reInitializeCommunities();",
"@Override\n protected void reconfigureService() {\n }",
"public void recreateAccount(int sin)\n\t{\n\t\tthis.name=name;\n\t\tthis.sin=sin;\n\t\tthis.balance=this.balance;\n\t}",
"Schueler createSchueler();",
"protected abstract CreateRemoteClassic<Msg, Ref> make_create();",
"public synchronized void reset() {\r\n \ttry {\r\n \t\trecreate();\r\n \t} catch (CoreException e) {\r\n \t\tResourcesPlugin.getPlugin().getLog().log(e.getStatus());\r\n \t}\r\n }",
"TrustedIdProvider refresh();",
"@Override\n public AbstractRelic makeCopy() {\n return new SpiritualRecovery();\n }",
"@Override\n\tpublic void recycle()\n\t{\n\t}",
"protected abstract CreateRemoteClassic<Msg, Ref> make_factCreate();",
"@Override\n\tpublic void recreo() {\n\n\t}",
"public void reOpe1FromOther(OpeMsg msg) {\n\t\t\n\t}",
"RkFactory getRkFactory();",
"@Override\n public void reconfigure()\n {\n }",
"public void revise()\n {\n // check the easy stuff -- out of range parameters\n super.revise();\n \n String nm = model.get(\"name\", \"Untitled\");\n String newnm = revisePatchName(nm);\n if (!nm.equals(newnm))\n model.set(\"name\", newnm);\n \n // deal with modulation amount destinations\n for(int i = 3; i < 16; i++)\n {\n if (model.get(\"mod\" + i + \"destination\") == i + 17) // can't refer to yourself\n model.set(\"mod\" + i + \"destination\", 0); // off\n for(int j = 3; j < 16; j++)\n {\n if (model.get(\"mod\" + j + \"destination\") == i + 17 && // someone is referring to you\n model.get(\"mod\" + i + \"destination\") >= 18) // you're using a modulation destination, not legal \n model.set(\"mod\" + i + \"destination\", 0); // off\n }\n }\n }",
"@Override\n\tpublic AbstractReine createReine() {\n\t\treturn new ReineSN();\n\t}",
"public void reFreshUuid() {\n\t\tthis.uuid=Application.getSnowflakeIdWorker().nextId()+\"\";\r\n\t}",
"public void makeReal(FlockInfo info) {\n\tthrow new UnimplementedException();\n/*\nudanax-top.st:16800:FakePacker methodsFor: 'stubs'!\n{void} makeReal: info {FlockInfo unused}\n\t\"Retrieve from the disk the flock at index within the specified snarf. Since\n\t stubs are canonical, and this only gets called by stubs, the existing stub will \n\t *become* the shepherd for the flock.\"\n\tself unimplemented!\n*/\n}",
"public void recycle();",
"public void rebind(String name, Remote ref) throws RemoteException;",
"public void retract(){\n\t\tsolenoid1.set(false);\n\t\tsolenoid2.set(false);\n\t}",
"IData reify();",
"void dissociate(RTMPConnection rtmpConn);",
"public void testdeassociate2() throws Exception {\r\n try {\r\n this.dao.deassociate(new Address(), -1, true);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }",
"ORGateway createORGateway();",
"public void recycle() {\n/* 1835 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public static void shut () {\r\n if(factory != null) { \t \r\n factory.finalixe(); \r\n }\r\n factory = null ;\r\n }",
"public void resetPatient(String newName, String newID)\r\n {\r\n setName(newName);\r\n id=newID;\r\n }",
"public abstract void restore();",
"public interface RaspiroverFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tRaspiroverFactory eINSTANCE = rover.raspirover.raspirover.impl.RaspiroverFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Ras Pi Board</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Ras Pi Board</em>'.\n\t * @generated\n\t */\n\tRasPiBoard createRasPiBoard();\n\n\t/**\n\t * Returns a new object of class '<em>Project</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Project</em>'.\n\t * @generated\n\t */\n\tProject createProject();\n\n\t/**\n\t * Returns a new object of class '<em>Sketch</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Sketch</em>'.\n\t * @generated\n\t */\n\tSketch createSketch();\n\n\t/**\n\t * Returns a new object of class '<em>Block</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Block</em>'.\n\t * @generated\n\t */\n\tBlock createBlock();\n\n\t/**\n\t * Returns a new object of class '<em>Digital Pin</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Digital Pin</em>'.\n\t * @generated\n\t */\n\tDigitalPin createDigitalPin();\n\n\t/**\n\t * Returns a new object of class '<em>Pin</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Pin</em>'.\n\t * @generated\n\t */\n\tPin createPin();\n\n\t/**\n\t * Returns a new object of class '<em>Analog Pin</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Analog Pin</em>'.\n\t * @generated\n\t */\n\tAnalogPin createAnalogPin();\n\n\t/**\n\t * Returns a new object of class '<em>Rover Program</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Rover Program</em>'.\n\t * @generated\n\t */\n\tRoverProgram createRoverProgram();\n\n\t/**\n\t * Returns a new object of class '<em>Param</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Param</em>'.\n\t * @generated\n\t */\n\tParam createParam();\n\n\t/**\n\t * Returns a new object of class '<em>Var Assignment</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Var Assignment</em>'.\n\t * @generated\n\t */\n\tVarAssignment createVarAssignment();\n\n\t/**\n\t * Returns a new object of class '<em>Conditional</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Conditional</em>'.\n\t * @generated\n\t */\n\tConditional createConditional();\n\n\t/**\n\t * Returns a new object of class '<em>Loop</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Loop</em>'.\n\t * @generated\n\t */\n\tLoop createLoop();\n\n\t/**\n\t * Returns a new object of class '<em>Rcl Block</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Rcl Block</em>'.\n\t * @generated\n\t */\n\tRclBlock createRclBlock();\n\n\t/**\n\t * Returns a new object of class '<em>Temperature Query</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Temperature Query</em>'.\n\t * @generated\n\t */\n\tTemperatureQuery createTemperatureQuery();\n\n\t/**\n\t * Returns a new object of class '<em>Humidity Query</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Humidity Query</em>'.\n\t * @generated\n\t */\n\tHumidityQuery createHumidityQuery();\n\n\t/**\n\t * Returns a new object of class '<em>Message Query</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Message Query</em>'.\n\t * @generated\n\t */\n\tMessageQuery createMessageQuery();\n\n\t/**\n\t * Returns a new object of class '<em>Obstacle Query</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Obstacle Query</em>'.\n\t * @generated\n\t */\n\tObstacleQuery createObstacleQuery();\n\n\t/**\n\t * Returns a new object of class '<em>Numeric Expression</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Numeric Expression</em>'.\n\t * @generated\n\t */\n\tNumericExpression createNumericExpression();\n\n\t/**\n\t * Returns a new object of class '<em>String Expression</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>String Expression</em>'.\n\t * @generated\n\t */\n\tStringExpression createStringExpression();\n\n\t/**\n\t * Returns a new object of class '<em>Boolean Expression</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Boolean Expression</em>'.\n\t * @generated\n\t */\n\tBooleanExpression createBooleanExpression();\n\n\t/**\n\t * Returns a new object of class '<em>Rover Value</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Rover Value</em>'.\n\t * @generated\n\t */\n\tRoverValue createRoverValue();\n\n\t/**\n\t * Returns a new object of class '<em>Number Value</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Number Value</em>'.\n\t * @generated\n\t */\n\tNumberValue createNumberValue();\n\n\t/**\n\t * Returns a new object of class '<em>String Value</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>String Value</em>'.\n\t * @generated\n\t */\n\tStringValue createStringValue();\n\n\t/**\n\t * Returns a new object of class '<em>Boolean Value</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Boolean Value</em>'.\n\t * @generated\n\t */\n\tBooleanValue createBooleanValue();\n\n\t/**\n\t * Returns a new object of class '<em>Forward Action</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Forward Action</em>'.\n\t * @generated\n\t */\n\tForwardAction createForwardAction();\n\n\t/**\n\t * Returns a new object of class '<em>Forward Min Action</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Forward Min Action</em>'.\n\t * @generated\n\t */\n\tForwardMinAction createForwardMinAction();\n\n\t/**\n\t * Returns a new object of class '<em>Backward Action</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Backward Action</em>'.\n\t * @generated\n\t */\n\tBackwardAction createBackwardAction();\n\n\t/**\n\t * Returns a new object of class '<em>Backward Min Action</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Backward Min Action</em>'.\n\t * @generated\n\t */\n\tBackwardMinAction createBackwardMinAction();\n\n\t/**\n\t * Returns a new object of class '<em>Turn Action</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Turn Action</em>'.\n\t * @generated\n\t */\n\tTurnAction createTurnAction();\n\n\t/**\n\t * Returns a new object of class '<em>Turn Deg Action</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Turn Deg Action</em>'.\n\t * @generated\n\t */\n\tTurnDegAction createTurnDegAction();\n\n\t/**\n\t * Returns a new object of class '<em>Stop Action</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Stop Action</em>'.\n\t * @generated\n\t */\n\tStopAction createStopAction();\n\n\t/**\n\t * Returns a new object of class '<em>Log Action</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Log Action</em>'.\n\t * @generated\n\t */\n\tLogAction createLogAction();\n\n\t/**\n\t * Returns a new object of class '<em>Send Action</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Send Action</em>'.\n\t * @generated\n\t */\n\tSendAction createSendAction();\n\n\t/**\n\t * Returns a new object of class '<em>Var Ref</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Var Ref</em>'.\n\t * @generated\n\t */\n\tVarRef createVarRef();\n\n\t/**\n\t * Returns a new object of class '<em>Centimeter</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Centimeter</em>'.\n\t * @generated\n\t */\n\tCentimeter createCentimeter();\n\n\t/**\n\t * Returns a new object of class '<em>Millimeter</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Millimeter</em>'.\n\t * @generated\n\t */\n\tMillimeter createMillimeter();\n\n\t/**\n\t * Returns a new object of class '<em>Meter</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Meter</em>'.\n\t * @generated\n\t */\n\tMeter createMeter();\n\n\t/**\n\t * Returns a new object of class '<em>Foot</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Foot</em>'.\n\t * @generated\n\t */\n\tFoot createFoot();\n\n\t/**\n\t * Returns a new object of class '<em>Inch</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Inch</em>'.\n\t * @generated\n\t */\n\tInch createInch();\n\n\t/**\n\t * Returns a new object of class '<em>Yard</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Yard</em>'.\n\t * @generated\n\t */\n\tYard createYard();\n\n\t/**\n\t * Returns a new object of class '<em>Radian</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Radian</em>'.\n\t * @generated\n\t */\n\tRadian createRadian();\n\n\t/**\n\t * Returns a new object of class '<em>Degree</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Degree</em>'.\n\t * @generated\n\t */\n\tDegree createDegree();\n\n\t/**\n\t * Returns a new object of class '<em>Turn</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Turn</em>'.\n\t * @generated\n\t */\n\tTurn createTurn();\n\n\t/**\n\t * Returns a new object of class '<em>Gradian</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Gradian</em>'.\n\t * @generated\n\t */\n\tGradian createGradian();\n\n\t/**\n\t * Returns a new object of class '<em>Quantity</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Quantity</em>'.\n\t * @generated\n\t */\n\tQuantity createQuantity();\n\n\t/**\n\t * Returns a new object of class '<em>Length</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Length</em>'.\n\t * @generated\n\t */\n\tLength createLength();\n\n\t/**\n\t * Returns a new object of class '<em>Angle</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Angle</em>'.\n\t * @generated\n\t */\n\tAngle createAngle();\n\n\t/**\n\t * Returns a new object of class '<em>Length Add</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Length Add</em>'.\n\t * @generated\n\t */\n\tLengthAdd createLengthAdd();\n\n\t/**\n\t * Returns a new object of class '<em>Length Subtract</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Length Subtract</em>'.\n\t * @generated\n\t */\n\tLengthSubtract createLengthSubtract();\n\n\t/**\n\t * Returns a new object of class '<em>Length Scalar Multiply</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Length Scalar Multiply</em>'.\n\t * @generated\n\t */\n\tLengthScalarMultiply createLengthScalarMultiply();\n\n\t/**\n\t * Returns a new object of class '<em>Length Scalar Divide</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Length Scalar Divide</em>'.\n\t * @generated\n\t */\n\tLengthScalarDivide createLengthScalarDivide();\n\n\t/**\n\t * Returns a new object of class '<em>Length Equals</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Length Equals</em>'.\n\t * @generated\n\t */\n\tLengthEquals createLengthEquals();\n\n\t/**\n\t * Returns a new object of class '<em>Length Distinct</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Length Distinct</em>'.\n\t * @generated\n\t */\n\tLengthDistinct createLengthDistinct();\n\n\t/**\n\t * Returns a new object of class '<em>Length Smaller</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Length Smaller</em>'.\n\t * @generated\n\t */\n\tLengthSmaller createLengthSmaller();\n\n\t/**\n\t * Returns a new object of class '<em>Length Greater</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Length Greater</em>'.\n\t * @generated\n\t */\n\tLengthGreater createLengthGreater();\n\n\t/**\n\t * Returns a new object of class '<em>Angle Add</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Angle Add</em>'.\n\t * @generated\n\t */\n\tAngleAdd createAngleAdd();\n\n\t/**\n\t * Returns a new object of class '<em>Angle Subtract</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Angle Subtract</em>'.\n\t * @generated\n\t */\n\tAngleSubtract createAngleSubtract();\n\n\t/**\n\t * Returns a new object of class '<em>Angle Scalar Multiply</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Angle Scalar Multiply</em>'.\n\t * @generated\n\t */\n\tAngleScalarMultiply createAngleScalarMultiply();\n\n\t/**\n\t * Returns a new object of class '<em>Angle Scalar Divide</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Angle Scalar Divide</em>'.\n\t * @generated\n\t */\n\tAngleScalarDivide createAngleScalarDivide();\n\n\t/**\n\t * Returns a new object of class '<em>Angle Equals</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Angle Equals</em>'.\n\t * @generated\n\t */\n\tAngleEquals createAngleEquals();\n\n\t/**\n\t * Returns a new object of class '<em>Angle Distinct</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Angle Distinct</em>'.\n\t * @generated\n\t */\n\tAngleDistinct createAngleDistinct();\n\n\t/**\n\t * Returns a new object of class '<em>Angle Smaller</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Angle Smaller</em>'.\n\t * @generated\n\t */\n\tAngleSmaller createAngleSmaller();\n\n\t/**\n\t * Returns a new object of class '<em>Angle Greater</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Angle Greater</em>'.\n\t * @generated\n\t */\n\tAngleGreater createAngleGreater();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tRaspiroverPackage getRaspiroverPackage();\n\n}",
"public CreateRemoteClassic<Msg, Ref> factCreate();",
"public interface RememberFactory extends EFactory {\r\n\t/**\r\n\t * The singleton instance of the factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tRememberFactory eINSTANCE = se.remember.impl.RememberFactoryImpl.init();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Folder</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Folder</em>'.\r\n\t * @generated\r\n\t */\r\n\tFolder createFolder();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Task</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Task</em>'.\r\n\t * @generated\r\n\t */\r\n\tTask createTask();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Key Manager</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Key Manager</em>'.\r\n\t * @generated\r\n\t */\r\n\tKeyManager createKeyManager();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Customer</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Customer</em>'.\r\n\t * @generated\r\n\t */\r\n\tCustomer createCustomer();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Project</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Project</em>'.\r\n\t * @generated\r\n\t */\r\n\tProject createProject();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Customers</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Customers</em>'.\r\n\t * @generated\r\n\t */\r\n\tCustomers createCustomers();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Key Id Pair</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Key Id Pair</em>'.\r\n\t * @generated\r\n\t */\r\n\tKeyIdPair createKeyIdPair();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Time Spent</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Time Spent</em>'.\r\n\t * @generated\r\n\t */\r\n\tTimeSpent createTimeSpent();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Year</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Year</em>'.\r\n\t * @generated\r\n\t */\r\n\tYear createYear();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Invoice Specification</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Invoice Specification</em>'.\r\n\t * @generated\r\n\t */\r\n\tInvoiceSpecification createInvoiceSpecification();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Years</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Years</em>'.\r\n\t * @generated\r\n\t */\r\n\tYears createYears();\r\n\r\n\t/**\r\n\t * Returns the package supported by this factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the package supported by this factory.\r\n\t * @generated\r\n\t */\r\n\tRememberPackage getRememberPackage();\r\n\r\n}",
"public ReAuthAnswer createReAuthAnswer(Answer answer) {\n return null;\r\n }",
"protected abstract void restartImpl();",
"abstract State refinePseudoState (String kind, String name, String id);",
"public void revert()\n {\n throw new UnsupportedOperationException(\"this is a security delegate object\"); \n }",
"public abstract void ResloveService() throws IOException;",
"@Override\n\t\t\tpublic boolean retractFact(Object fact) {\n\t\t\t\tthrow new IllegalStateException(\"Not implemented yet\");\n\t\t\t}",
"public interface RentalFactory {\n\n Rental createRental(String pickUpdate, String returnDate, List<PaymentMethod> paymentMethod);\n\n}",
"public synchronized void remind() {\n if (state != State.REGISTRATION && state != State.WAITING_TO_START) {\n sendPublicMessage(\"Round \" + pickTeamState.getSituation().getRoundNumber() +\n \" of 5\\n\" +\n pickTeamState.getSituation().getMissionSuccess() + \" successes | \" +\n pickTeamState.getSituation().getMissionFails() + \" fails\\n\" +\n \"The leader rotation is \" + GameMessageUtil.listOrder(getPlayerCharacters()) + \"\\n*\" +\n pickTeamState.getSituation().getLeader().getUserName() + \"* is the leader.\\n\\n\" +\n lastMessage);\n }\n }",
"public void createResident(Resident resident);",
"public void reinit(Object[] parameters) {\n\t\n\t}",
"public LWTRTPdu disConnect() throws IncorrectTransitionException;",
"public void renew(){\n kickOut();\n cashOut();\n for(Player player: players){\n player.renew();\n }\n dealer.renew();\n go();\n }",
"@Test\n public void shouldPredictByRotatingPreviousMoveInReverseDirection() {\n ReverseRotationStrategy strategy = new ReverseRotationStrategy();\n\n strategy.addHistory(Shape.ROCK, Shape.PAPER);\n assertTrue(Arrays.equals(strategy.getNextMoves(), Shape.ROCK.defeatedBy()));\n\n strategy.addHistory(Shape.ROCK, Shape.ROCK);\n assertTrue(Arrays.equals(strategy.getNextMoves(), Shape.SPOCK.defeatedBy()));\n }",
"ShadowProtocol.Factory getShadowProtocolFactory();",
"public void swap() {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->swap() unimplemented!\\n\");\n }",
"@Override\n \tpublic void reconnectionSuccessful() {\n \t}",
"@Override\n\tpublic boolean renew() {\n\t\treturn false;\n\t}",
"private void recycle() {\n attributes.clear();\n creationTime = 0L;\n expiring = false;\n id = null;\n lastAccessedTime = 0L;\n maxInactiveInterval = -1;\n\n isNew = false;\n valid = false;\n Manager savedManager = manager;\n manager = null;\n\n // Tell our Manager that this Session has been recycled\n if ((savedManager != null) && (savedManager instanceof ManagerBase))\n ((ManagerBase) savedManager).recycle(this);\n //setAuthType(null);\n //notes.clear();\n //setPrincipal(null);\n }",
"@Test\n\tpublic void redberriesContractRedberriesDiseased()\n\t{\n\t\tfinal FarmingPatch patch = farmingGuildPatches.get(Varbits.FARMING_4772);\n\n\t\tassertNotNull(patch);\n\n\t\twhen(farmingTracker.predictPatch(patch))\n\t\t\t.thenReturn(new PatchPrediction(Produce.REDBERRIES, CropState.DISEASED, 0, 2, 3));\n\n\t\tfarmingContractManager.setContract(Produce.REDBERRIES);\n\n\t\tassertEquals(SummaryState.IN_PROGRESS, farmingContractManager.getSummary());\n\t\tassertEquals(CropState.DISEASED, farmingContractManager.getContractCropState());\n\t}",
"public interface CourseRegFactory\n{\n\n /**\n * Test the existence of an instance\n * @param name The name of the instance to test the existence of\n * @return \n */\n public boolean exists(String name) throws IOException;\n\n /**\n * Create a new instance\n * @param edma_name The name of the instance to create\n * @param schoolInfo The initial values for the singleton SchoolInfo\n * @return \n */\n public CourseRegInstance newInstance(String edma_name, SchoolInfo schoolInfo) throws IOException;\n\n /**\n * Get an instance from its name\n * @param name The name of the instance to get\n * @return \n */\n public CourseRegInstance getInstance(String name) throws IOException;\n\n /**\n * Delete an instance\n * @param name The name of the instance to delete\n * @return <tt>true</tt> if the instance was deleted\n */\n public boolean deleteInstance(String name) throws IOException;\n\n}",
"For createFor();",
"private void recreateSolver(SolverType t) {\n\t\tswitch (t) {\n\t\tcase ACO:\n\t\t\tsolver = new SolverACO(distanceMatrix, vehicleCapacity);\n\t\t\tbreak;\n\t\tcase GA:\n\t\t\tsolver = new SolverGA(distanceMatrix, vehicleCapacity);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Found unknown solver type while recreating solver\");\n\t\t\tsolver = new SolverGA(distanceMatrix, vehicleCapacity);\n\t\t}\n\t\tresetRoute();\n\t}",
"public interface IFactory {\n\t/**\n\t * créer un service transactionel (un proxy de service) gérant les Users\n\t * \n\t * @param caller\n\t * objet transactionel appelant ce service. null si début de\n\t * transaction\n\t * @return\n\t */\n\tpublic abstract IUserService createUserService(ITransactional caller);\n\n\t/**\n\t * créer un dao transactionel dédié à la table utilisateur (un proxy de dao)\n\t * \n\t * @param caller\n\t * objet transactionel appelant ce service. null si début de\n\t * transaction\n\t * @return\n\t */\n\tpublic abstract IUtilisateurDAO createUserDAO(ITransactional caller);\n\n\t/**\n\t * créer un dao transactionel dédié à la table cursus (un proxy de dao)\n\t * \n\t * @param caller\n\t * objet transactionel appelant ce service. null si début de\n\t * transaction\n\t * @return\n\t */\n\tpublic abstract ICursusDAO createCursusDAO(ITransactional caller);\n\n\t/**\n\t * créer un dao transactionel dédié à la table competence (un proxy de dao)\n\t * \n\t * @param caller\n\t * objet transactionel appelant ce service. null si début de\n\t * transaction\n\t * @return\n\t */\n\tpublic abstract ICompetenceDAO createCompetenceDAO(ITransactional caller);\n\n\tpublic abstract INiveauxDAO createNiveauDAO(ITransactional caller);\n\n\tpublic abstract IProfilDAO createProfilDAO(ITransactional caller);\n\n\tpublic abstract IGroupeDAO createGroupeDAO(ITransactional caller);\n\n\tpublic abstract IFenetreDAO createFenetreDAO(ITransactional caller);\n\n\tpublic abstract IFonctionDAO createFonctionDAO(ITransactional caller);\n\n\tpublic abstract INatureDAO createNatureDAO(ITransactional caller);\n\n\tpublic abstract IDroitDAO createDroitDAO(ITransactional caller);\n\n\tpublic abstract ISecurityService createSecurityService(ITransactional caller);\n\n\tpublic abstract IProjectService createProjectService(ITransactional caller);\n\n\tpublic abstract IKeywordDAO createKeywordDAO(ITransactional caller);\n\n\tpublic abstract IStatutDAO createStatutDAO(ITransactional caller);\n\n\tpublic abstract IAdresseDAO createAdresseDAO(ITransactional caller);\n\t\n}",
"@Test\n public void testUserDestructionOfFactory() {\n ServiceHandle<SprocketFactory> sprocketFactoryHandle1 = locator.getServiceHandle(SprocketFactory.class);\n Assert.assertNotNull(sprocketFactoryHandle1);\n \n SprocketFactory sprocketFactory1 = sprocketFactoryHandle1.getService();\n \n Widget widget1 = locator.getService(Widget.class);\n Assert.assertNotNull(widget1);\n \n Assert.assertSame(sprocketFactory1, widget1.getSprocketFactory());\n \n Assert.assertFalse(sprocketFactory1.isDestroyed());\n \n sprocketFactoryHandle1.destroy();\n \n Assert.assertTrue(sprocketFactory1.isDestroyed());\n \n // Now ensure we can still get a widget!\n Widget widget2 = locator.getService(Widget.class);\n Assert.assertNotNull(widget2);\n \n Assert.assertNotSame(sprocketFactory1, widget2.getSprocketFactory());\n }",
"Secuencia createSecuencia();",
"XORGateway createXORGateway();",
"public abstract void retrain(Call serviceCall, Response serviceResponse, CallContext messageContext);",
"public abstract void rebalance();",
"public abstract void revokeMembership(String nickname);",
"@Override\n \tpublic void reconnectionFailed(Exception arg0) {\n \t}",
"public void reiniciar() {\n // TODO implement here\n }",
"@Override\r\n\tpublic void onReCalculateRouteForYaw() {\n\r\n\t}",
"synchronized void revise(String location, InputStream is)\n throws Exception\n {\n m_archive.revise(location, is);\n try\n {\n Module module = createModule();\n addModule(module);\n }\n catch (Exception ex)\n {\n m_archive.rollbackRevise();\n throw ex;\n }\n }",
"public interface DaifuWayFactory {\n TwoStepDaifu createTwoStepDaifu();\n}",
"TrustedIdProvider refresh(Context context);",
"public interface Factory {\r\n}",
"public void recycle()\n\t{\n\t\tparams = null;\n\t\tconfigured = false;\n\t\tattributes = null;\n\t\tmyConfig = null;\n\t\tpreviousRequest = null;\n\t\tmyModel = null;\n\t\tvalidationErrors = new HashMap();\n\t\theaders = null;\n\t\tsource = null;\n\t\tlocale = null;\n\n\t\tif (log.isDebugEnabled())\n\t\t{\n\t\t\tlog.debug(\"Request \" + toString() + \" recycled\");\n\t\t}\n\t}",
"@Override\n T restart();",
"public interface RmFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tRmFactory eINSTANCE = ru.capralow.dt.conversion.plugin.core.rm.impl.RmFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Registration Module</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Registration Module</em>'.\n\t * @generated\n\t */\n\tRegistrationModule createRegistrationModule();\n\n\t/**\n\t * Returns a new object of class '<em>Exchange Plan Content</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Exchange Plan Content</em>'.\n\t * @generated\n\t */\n\tExchangePlanContent createExchangePlanContent();\n\n\t/**\n\t * Returns a new object of class '<em>Registration Rule</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Registration Rule</em>'.\n\t * @generated\n\t */\n\tRegistrationRule createRegistrationRule();\n\n\t/**\n\t * Returns a new object of class '<em>Object Selection Rule</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Object Selection Rule</em>'.\n\t * @generated\n\t */\n\tObjectSelectionRule createObjectSelectionRule();\n\n\t/**\n\t * Returns a new object of class '<em>Exchange Plan Selection Rule</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Exchange Plan Selection Rule</em>'.\n\t * @generated\n\t */\n\tExchangePlanSelectionRule createExchangePlanSelectionRule();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tRmPackage getRmPackage();\n\n}",
"Client createNewClient(Client client);",
"void recreated(TwoWayEvent.Recreated<DM, UMD, DMD> evt);",
"public void revise()\n {\n super.revise();\n\n String nm = model.get(\"name\", \"Init\");\n String newnm = revisePatchName(nm);\n if (!nm.equals(newnm))\n model.set(\"name\", newnm);\n }",
"public interface Factory {\n /* renamed from: a */\n Call mo35727a(Request request);\n }",
"@External\n\tpublic void untether() {\n\t\tif (!Context.getOrigin().equals(Context.getOwner()))\n\t\t\tContext.revert(\"Only the owner can call the untether method.\");\n\t}",
"@Override\n public void reset() {\n // Crea instancia y define el tipo del personaje.\n this.personaje = new Personaje();\n this.personaje.setTipo(\"Agua\");\n }",
"public void reconnected() { }",
"public String revert(State state) throws Exception;",
"void prepareRelocate(Identity id, long newNodeId) throws IOException;",
"public void resetConversationFlow(){\n conversationDao.init();\n }",
"public void reuse() {}",
"private void resetPassword() {\n AdminKeyFile keyFile = new AdminKeyFile(instance);\n keyFile.read();\n if (keyFile.isReset()) {\n String password = AdminKeyFile.randomPassword(\n AdminKeyFile.RANDOM_PASSWORD_LENGTH); \n instance.setAdminPassword(password);\n keyFile.setPassword(password);\n try {\n PayaraInstance.writeInstanceToFile(instance);\n } catch(IOException ex) {\n LOGGER.log(Level.INFO,\n \"Could not store Payara server attributes\", ex);\n }\n keyFile.write();\n }\n }",
"public void rebind(Name name, Object obj) throws NamingException {\n }",
"public interface SignatureFactory \n{\n /** \n * initializes the implementation class \n */\n public void init()\n throws SignedDocException;\n \n /**\n * Method returns an array of strings representing the \n * list of available token names.\n * @return an array of available token names.\n * @throws SignedDocException if reading the token information fails.\n */\n public String[] getAvailableTokenNames()\n throws SignedDocException;\n \n /**\n * Method returns a digital signature. It finds the RSA private \n * key object from the active token and\n * then signs the given data with this key and RSA mechanism.\n * @param digest digest of the data to be signed.\n * @param token token index\n * @param pin users pin code\n * @return an array of bytes containing digital signature.\n * @throws SignedDocException if signing the data fails.\n */\n public byte[] sign(byte[] digest, int token, String pin) \n throws SignedDocException;\n \n /**\n * Method returns a X.509 certificate object readed \n * from the active token and representing an\n * user public key certificate value.\n * @return X.509 certificate object.\n * @throws SignedDocException if getting X.509 public key certificate \n * fails or the requested certificate type X.509 is not available in \n * the default provider package\n */\n public X509Certificate getCertificate(int token, String pin)\n throws SignedDocException;\n \n /**\n * Resets the previous session\n * and other selected values\n */\n public void reset() \n throws SignedDocException;\n \n\t/**\n\t * Method decrypts the data with the RSA private key\n\t * corresponding to this certificate (which was used\n\t * to encrypt it). Decryption will be done on the card.\n\t * This operation closes the possibly opened previous\n\t * session with signature token and opens a new one with\n\t * authentication token if necessary\n\t * @param data data to be decrypted.\n\t * @param token index of authentication token\n\t * @param pin PIN code\n\t * @return decrypted data.\n\t * @throws SignedDocException for all decryption errors\n\t */\n\tpublic byte[] decrypt(byte[] data, int token, String pin) \n\t\tthrows SignedDocException;\n\t\t\t\t\n}",
"public ReturnInfo createRemind(Integer serviceId,Integer caseId);",
"@Override\n\tpublic void updateCreator(CreatorDTO creator) {\n\t\t\n\t}",
"public void resetFactory() {\n\t\tcurrent = null;\n\t\tnb_rounds = 0;\n\t\tnb_to_train = 0;\n\t\twhile(!training_queue.isEmpty())\n\t\t\ttraining_queue.remove();\n\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"public CorrespondenceFactoryImpl() {\n super();\n }",
"public void RefillDeck()\n\t{\n\t\tRefillDeck(false);\n\t}"
] | [
"0.5688352",
"0.56792784",
"0.52405524",
"0.5239604",
"0.5196178",
"0.50752306",
"0.50414807",
"0.49945578",
"0.49389434",
"0.49386808",
"0.49090543",
"0.49070516",
"0.4878885",
"0.48652488",
"0.4863102",
"0.4859412",
"0.48528194",
"0.4844799",
"0.4842138",
"0.48020607",
"0.47933444",
"0.47867793",
"0.4784966",
"0.47845483",
"0.4765284",
"0.47617534",
"0.47584513",
"0.474463",
"0.4710921",
"0.46995035",
"0.46831074",
"0.46815318",
"0.4673219",
"0.46703455",
"0.46654195",
"0.4660614",
"0.46579152",
"0.4655904",
"0.46537536",
"0.46497795",
"0.46497005",
"0.4633807",
"0.46308535",
"0.46263504",
"0.4617649",
"0.46166682",
"0.46134055",
"0.4599468",
"0.45986858",
"0.45973274",
"0.4593397",
"0.45901206",
"0.45887348",
"0.4580847",
"0.45689243",
"0.45639881",
"0.45614034",
"0.45591053",
"0.45557484",
"0.45503762",
"0.45490113",
"0.45410213",
"0.45409632",
"0.45345575",
"0.4519086",
"0.45185164",
"0.45072246",
"0.44991836",
"0.4496978",
"0.4496547",
"0.4495678",
"0.44944066",
"0.44893125",
"0.44853973",
"0.44796142",
"0.44791967",
"0.44767183",
"0.4472345",
"0.446812",
"0.44670117",
"0.44660503",
"0.44634852",
"0.44628745",
"0.4459552",
"0.4457314",
"0.44570282",
"0.44516757",
"0.44498542",
"0.44479793",
"0.44450545",
"0.44420773",
"0.4439954",
"0.4439427",
"0.4435702",
"0.4434039",
"0.44333443",
"0.44333443",
"0.44333443",
"0.44333443",
"0.44331932",
"0.4432717"
] | 0.0 | -1 |
Checks that a factory hasn't degraded too much | public boolean isBroken()
{
return currentRepair>=getMaxRepair()&&getMaxRepair()!=0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isDegraded();",
"private void tryMakeFactoryUnavailable(final FactoryInternal factory)\n {\n try\n {\n factory.makeUnavailable();\n }\n catch (final Exception e)\n {\n m_Logging.error(e, \"Unable to make factory with product type [%s] unavailable\", \n factory.getProductType());\n }\n }",
"public void isDeceased(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"@Override\n public StabilityResult check() {\n boolean serviceStability = false;\n int count = 0;\n int count1 = 0;\n int count2 = 0;\n while (!serviceStability && count < attempts) {\n try {\n // We use the getAllServiceReferences method to ignore classloading issues. Anyway, we are not using\n // the service, just counting them.\n ServiceReference[] refs = context.getAllServiceReferences(null, null);\n count1 = refs.length;\n grace();\n refs = context.getAllServiceReferences(null, null);\n count2 = refs.length;\n serviceStability = count1 == count2;\n } catch (Exception e) {\n LOGGER.warn(\"An exception was thrown while checking the service stability\", e);\n serviceStability = false;\n // Nothing to do, while recheck the condition\n }\n count++;\n }\n\n if (count == attempts) {\n LOGGER.error(\"Service stability has not been reached after {} tries ({} != {})\", attempts, count1, count2);\n return StabilityResult.unstable(\"Cannot reach the service stability\");\n }\n return StabilityResult.stable();\n }",
"private void tryCleanupFactory(final FactoryInternal factory)\n {\n try\n {\n factory.cleanup();\n }\n catch (final Exception e)\n {\n m_Logging.error(e, \"Unable to cleanup factory with product type [%s]\", factory.getProductType());\n }\n }",
"public boolean mustDie() {\n\t\tif (this.not_fed == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\r\n\tpublic void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)\r\n\t\t\tthrows BeansException {\n\t\tdoCheckDatabaseDependon(beanFactory);\r\n\t}",
"public void checkUnsatisfiability() throws Exception{\n\t\t\n\t\tLogOutput.printAlways(\"\\nUNSATISFIABILITY\");\n\t\t\n\t\t\n\t\t//Transform mappings 2 owl\n\t\tgetOWLAxioms4Mappings();\n\t\t\t\t\n\t\t//Reason\n\t\tsetUpReasoner(false);\n\t\t\n\t\tinit = Calendar.getInstance().getTimeInMillis();\n\t\t\n\t\tint unsat=0;\n\t\tint unknown=0;\n\t\t\n\t\tint num_class=0;\n\t\t\n\t\tint state;\n\t\t\n\t\tfor (OWLClass cls: reasoner_access.getOntology().getClassesInSignature()){\n\t\t\t\n\t\t\t//LogOutput.printAlways(\"Is unsat?? \" + cls.toString());\n\t\t\t\n\t\t\t/*if (!reasoner_access.isSatisfiable(cls)){\n\t\t\t\tunsat++;\n\t\t\t\tLogOutput.printAlways(cls + \"- UNSAT\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tLogOutput.printAlways(cls + \"- SAT\");\n\t\t\t}*/\n\t\t\t\n\t\t\tnum_class++;\n\t\t\t\n\t\t\tstate = reasoner_access.isSatisfiable_withTimeout(cls, 10);\n\t\t\t\n\t\t\tif (state == reasoner_access.UNSAT){\n\t\t\t\tunsat++;\n\t\t\t\t//LogOutput.printAlways(cls + \"- UNSAT\");\n\t\t\t}\n\t\t\telse if (state == reasoner_access.UNKNOWN){\n\t\t\t\tunknown++;\n\t\t\t\tLogOutput.printAlways(\"\\t\" + cls.getIRI().toString() + \"- UNKNOWN SAT. Test: \" + num_class);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tfin = Calendar.getInstance().getTimeInMillis();\n\t\t\n\t\tdouble time = (float)((double)fin-(double)init)/1000.0;\n\t\t\n\t\t\n\t\tLogOutput.printAlways(\"\\tUNSAT classes: \" + unsat + \" of \" + reasoner_access.getOntology().getClassesInSignature().size());\n\t\tLogOutput.printAlways(\"\\tUNKNOWN classes: \" + unknown + \" of \" + reasoner_access.getOntology().getClassesInSignature().size());\n\t\tLogOutput.printAlways(\"\\tTIME checking unsatisfiability (s): \" + time + \n\t\t\t\t\", Averageper class: \" + Utilities.getRoundValue(\n\t\t\t\t\t\t(time/((double)reasoner_access.getOntology().getClassesInSignature().size())),\n\t\t\t\t\t\t8));\n\t}",
"public boolean checkIfAnyUnsat() throws Exception{\n\t\t\n\t\tLogOutput.printAlways(\"\\nUNSATISFIABILITY\");\n\t\t\n\t\tlong initlocal = Calendar.getInstance().getTimeInMillis();\n\t\t\n\t\t\n\t\tint state;\n\t\tint num_class=0;\n\t\t\n\t\tfor (OWLClass cls: reasoner_access.getOntology().getClassesInSignature()){\n\t\t\t\n\t\t\tnum_class++;\n\t\t\t\n\t\t\tstate = reasoner_access.isSatisfiable_withTimeout(cls, 10);\n\t\t\t\n\t\t\tif (state == reasoner_access.UNSAT){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse if (state == reasoner_access.UNKNOWN){\n\t\t\t\tLogOutput.printAlways(\"\\t\" + cls.getIRI().toString() + \"- UNKNOWN SAT. Test: \" + num_class);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tfin = Calendar.getInstance().getTimeInMillis();\n\t\t\n\t\tdouble time = (float)((double)fin-(double)initlocal)/1000.0;\n\t\t\n\t\treturn false;\n\t\t\n\t\t\n\t}",
"private boolean failInReporting() {\n\t\tboolean toForget = false;\n\t\t//synchronized (this) {\n\t\t\tif (++this.failureCount >= this.config.getNumOfFailuresBeforeForgetCollector()) {\n\t\t\t\ttoForget = true;\n\t\t\t\tthis.failureCount = 0;\n\t\t\t}\n\t\t//}\n\n\t\t// forget\n\t\tif (toForget) {\n\t\t\tlogger.log(Level.WARNING, \"Forget a stat collector.\");\n\n\t\t\tthis.provider.setMessagingCollectorAddress(null);\n\t\t}\n\n\t\treturn toForget;\n\t}",
"@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}",
"@Test\n\tpublic void testDepartedGoodScenario() {\n\t\tgateInfoDatabase.allocate(0, 112);\n\t\tgateInfoDatabase.allocate(1, 332);\n\t\t\t\t\n\t\t/* Test if the allocations were successful. The returned status code should be 1 (RESERVED)\n\t\tfor both gates. */\n\t\tassertEquals(1, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(1, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (1 - RESERVED).\t\t\t\t\n\t\tassertEquals(1, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(1, gateInfoDatabase.getStatuses()[1]);\n\t\t\n\t\t// Then, the planes are docked.\n\t\tgateInfoDatabase.docked(0);\n\t\tgateInfoDatabase.docked(1);\n\t\t\n\t\t/* Test if the aircrafts have successfully docked. \n\t\tThe returned status codes should be 2 (OCCUPIED) for both gates. */\n\t\tassertEquals(2, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(2, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (2 - OCCUPIED).\t\t\n\t\tassertEquals(2, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(2, gateInfoDatabase.getStatuses()[1]);\n\t\t\n\t\t// Finally, the planes depart. \t\t\n\t\tgateInfoDatabase.departed(0);\n\t\tgateInfoDatabase.departed(1);\n\t\t\n\t\t/* Test that the aircrafts have successfully departed.\n\t\tThe returned status codes should be 0 (FREE) for both gates, since the planes have \n\t\talready departed and the gates have been freed. */\n\t\tassertEquals(0, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(0, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (0 - FREE).\t\t\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[1]);\n\t}",
"@Override\r\n\tpublic boolean checkBudget() {\n\t\treturn false;\r\n\t}",
"private boolean isConsideredFresh() {\n \t\treturn this.isNew || this.area.getPolygon() == null;\n \t}",
"@Test\n\tpublic void testDepartedBadScenario() { \n\t\tgateInfoDatabase.departed(0);\n\t\tgateInfoDatabase.departed(1);\n\t\tassertEquals(0, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(0, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (0 - FREE).\t\t\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[1]);\n\t\t\n\t\t// Test second bad scenario:\n\t\t\n\t\t/* Without the allocation of gates first, the docked and departed methods should not change \n\t\tanything. The returned status code should be 0 (FREE) for both gates. */ \n\t\tgateInfoDatabase.docked(0);\n\t\tgateInfoDatabase.docked(1);\t\t\n\t\tgateInfoDatabase.departed(0);\n\t\tgateInfoDatabase.departed(1);\t\t\n\t\tassertEquals(0, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(0, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (0 - FREE).\t\t\t\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(0, gateInfoDatabase.getStatuses()[1]);\n\t\t\n\t\t// Test third bad scenario:\n\t\t\n\t\t/* Without docking after allocation, the departed method should not change anything for either gates.\n\t\tThe mCodes are dummy values here. The returned status code should be 1 (RESERVED) \n\t\tfor both gates after the allocation is done for them. */\n\t\tgateInfoDatabase.allocate(0, 123);\n\t\tgateInfoDatabase.allocate(1, 345);\n\t\tgateInfoDatabase.departed(0);\n\t\tgateInfoDatabase.departed(1);\t\n\t\tassertEquals(1, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(1, gateInfoDatabase.getStatus(1));\n\t\t\n\t\t// Test if the getStatuses method returns an array storing the correct status codes (1 - RESERVED).\t\t\t\n\t\tassertEquals(1, gateInfoDatabase.getStatuses()[0]);\n\t\tassertEquals(1, gateInfoDatabase.getStatuses()[1]);\n\t}",
"public boolean checkForGourds() {return false;}",
"boolean updateDeathsTillForget() {\n\t\tdeathsTillForget -= 1;\n\t\treturn (deathsTillForget < 1);\n\t}",
"@Test\n\tpublic void testTAlive1() {\n\t\tassertEquals(false, tank.isDeceased());\n\t}",
"private boolean needsToRecalcStats() {\n\n return this.equipsChanged;\n }",
"public void testIsNewDependency() {\n assertTrue(\"Un-implemented method.\", true);\n }",
"@Test\n public void testNotDeployedStateNotDeployedService() {\n cleanUp();\n\n State notDeployed = makeState(2L, \"State 2\");\n\n assertFalse(propertyService.isServiceDeployedInState(Service.MOBILE_ACADEMY, notDeployed));\n }",
"@Override\r\n\tpublic void factoryRemoved(String factoryName, EntityManagerFactory factory) {\r\n\t\tif (this.factoryName.compareTo(factoryName) == 0) {\r\n\t\t\tlogger.trace(\"JPA: {} entity manager factory removed. invalidating [{}]\", factoryName, pojoClassName);\r\n\t\t\tsetValidity(false);\r\n\t\t}\r\n\t}",
"public boolean isDowngrade( )\n {\n return _bDowngrade;\n }",
"boolean hasFump();",
"@Test(timeout = 4000)\n public void test058() throws Throwable {\n DBUtil.assertAllDbResourcesClosed(true);\n // Undeclared exception!\n try { \n ContextService.getFactory();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // \n //\n verifyException(\"org.apache.derby.iapi.services.context.ContextService\", e);\n }\n }",
"@Test\n\tpublic void withExistingFlower() {\n\t\tboolean delete;\n\t\ttry {\n\t\t\tdelete = FlowerManager.deleteFlower(\"Natural\", \"Normal Flowers\");\n\t\t\tassertTrue(delete);\n\t\t} catch (ServiceException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void checkUpdateCheckFailed(PackageVersions packageVersions) {\n mFakeIntentHelper.assertReliabilityTriggerScheduled();\n\n // Assert the storage was updated.\n checkPackageStorageStatus(PackageStatus.CHECK_COMPLETED_FAILURE, packageVersions);\n }",
"public boolean isStale()\n {\n return (_iMdChecksum != TypeSystem.getRefreshChecksum() && !isProxy());\n }",
"@Test\n\tpublic void testTAlive2() {\n\t\tassertEquals(false, tank.isDeceased());\n\t}",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.379 -0400\", hash_original_method = \"AA9956729CDDEA75EF3CDA9B48AC7516\", hash_generated_method = \"A1C0583673DED01556F86A0826E69463\")\n \n public static boolean unloadDriver(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }",
"void doCheckHealthy();",
"boolean getHealthy();",
"private void ensureImplementationIsNotSet() {\n if (factory != null) {\n binder.addError(source, ErrorMessages.IMPLEMENTATION_ALREADY_SET);\n }\n }",
"@Test(expected = IllegalStateException.class)\r\n public final void testCreateNewVersionForDesignDevContestFailureUserServiceMissed() throws Exception {\r\n DirectServiceFacadeBean currentDirectServiceFacadeBean = new DirectServiceFacadeBean();\r\n FailureTestHelper\r\n .initializeDirectServiceFacadeBean(currentDirectServiceFacadeBean, true, false, true);\r\n currentDirectServiceFacadeBean.createNewVersionForDesignDevContest(new TCSubject(998), 999);\r\n }",
"public Check_State(Factory factory) {\n this.factory = factory;\n }",
"@Test\n public void testCreateOnlyNeededModelVersionsWhenNoHostsAllocated() {\n CountingModelFactory factory700 = createHostedModelFactory(Version.fromString(\"7.0.0\"));\n CountingModelFactory factory720 = createHostedModelFactory(Version.fromString(\"7.2.0\"));\n List<ModelFactory> modelFactories = List.of(factory700, factory720);\n\n DeployTester tester = createTester(createHosts(1, (String) null), modelFactories, prodZone);\n tester.deployApp(\"src/test/apps/hosted-routing-app/\", \"7.2.0\");\n assertFalse(factory700.creationCount() > 0);\n assertTrue(\"Newest is always included\", factory720.creationCount() > 0);\n }",
"private static boolean isReadyForUse(IReasoner reasoner) {\r\n boolean result = false;\r\n if (null != reasoner) {\r\n ReasonerDescriptor desc = reasoner.getDescriptor();\r\n if (null != desc) {\r\n result = desc.isReadyForUse();\r\n }\r\n }\r\n return result;\r\n }",
"public boolean hasDetonated()\r\n\t{\r\n\t\treturn detonated;\r\n\t}",
"@Override\n\tpublic boolean isFresh() {\n\t\treturn false;\n\t\t//return fresh;\n\t}",
"private void checkSeeds() {\n\t\t//proceed on mainloop 1 second intervals if we're a seed and we want to force disconnects\n\t\tif ((mainloop_loop_count % MAINLOOP_ONE_SECOND_INTERVAL) != 0)\n\t\t\treturn;\n\n\t\tif (!disconnect_seeds_when_seeding ){\n\t\t\treturn;\n\t\t}\n\n\t\tArrayList to_close = null;\n\n\t\tfinal ArrayList peer_transports = peer_transports_cow;\n\t\tfor (int i = 0; i < peer_transports.size(); i++) {\n\t\t\tfinal PEPeerTransport pc = (PEPeerTransport) peer_transports.get(i);\n\n\t\t\tif (pc != null && pc.getPeerState() == PEPeer.TRANSFERING && ((isSeeding() && pc.isSeed()) || pc.isRelativeSeed())) {\n\t\t\t\tif( to_close == null ) to_close = new ArrayList();\n\t\t\t\tto_close.add( pc );\n\t\t\t}\n\t\t}\n\n\t\tif( to_close != null ) {\t\t\n\t\t\tfor( int i=0; i < to_close.size(); i++ ) { \t\t\t\n\t\t\t\tcloseAndRemovePeer( (PEPeerTransport)to_close.get(i), \"disconnect other seed when seeding\", false );\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testDealerRefusesWhenOutOfCards() {\n }",
"public boolean checkChangeDetection() throws Exception{\n\t\t\tint length = -1 ;\n\t\t\tFuzzyRule ruleRemove = null ;\n\t\t\tfor (FuzzyRule rule: rs){\n\t\t\t\tif (rule.getChangeStatus()){\n\t\t\t\t\tif (rule.getHistory().size()>length){\n\t\t\t\t\t\tlength = rule.getHistory().size() ;\n\t\t\t\t\t\tif (rule!=defaultRule)\n\t\t\t\t\t\t\truleRemove = rule ;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tboolean drift = false ;\n\t\t\tif (ruleRemove!=null && rs.size()>1){\n\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\t\t\trs.remove(ruleRemove) ;\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tfor (FuzzyRule rule: rs){ \n\t\t\t\t\t\tif (rule!=ruleRemove){\n\t\t\t\t\t\t\tboolean tempDrift = rule.mergeWithSibling(ruleRemove) ;\n\t\t\t\t\t\t\tif (tempDrift){\n\t\t\t\t\t\t\t\trule.clearExtendedCandidates();\n\t\t\t\t\t\t\t\trule.clearStats();\n\t\t\t\t\t\t\t\trule.buildExtendedCandidates();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t drift = drift || tempDrift ;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trs.remove(ruleRemove) ;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\treturn drift ;\n\t\t}",
"public final boolean mo44057f() {\n Boolean b = mo44050b(\"firebase_analytics_collection_deactivated\");\n return b != null && b.booleanValue();\n }",
"@Test\n public void testUserDestructionOfFactory() {\n ServiceHandle<SprocketFactory> sprocketFactoryHandle1 = locator.getServiceHandle(SprocketFactory.class);\n Assert.assertNotNull(sprocketFactoryHandle1);\n \n SprocketFactory sprocketFactory1 = sprocketFactoryHandle1.getService();\n \n Widget widget1 = locator.getService(Widget.class);\n Assert.assertNotNull(widget1);\n \n Assert.assertSame(sprocketFactory1, widget1.getSprocketFactory());\n \n Assert.assertFalse(sprocketFactory1.isDestroyed());\n \n sprocketFactoryHandle1.destroy();\n \n Assert.assertTrue(sprocketFactory1.isDestroyed());\n \n // Now ensure we can still get a widget!\n Widget widget2 = locator.getService(Widget.class);\n Assert.assertNotNull(widget2);\n \n Assert.assertNotSame(sprocketFactory1, widget2.getSprocketFactory());\n }",
"public boolean fuelIsFull() throws Exception;",
"public boolean hasFainted() {\n return hp <= 0;\n }",
"@Test\n\tpublic void redberriesContractRedberriesDiseased()\n\t{\n\t\tfinal FarmingPatch patch = farmingGuildPatches.get(Varbits.FARMING_4772);\n\n\t\tassertNotNull(patch);\n\n\t\twhen(farmingTracker.predictPatch(patch))\n\t\t\t.thenReturn(new PatchPrediction(Produce.REDBERRIES, CropState.DISEASED, 0, 2, 3));\n\n\t\tfarmingContractManager.setContract(Produce.REDBERRIES);\n\n\t\tassertEquals(SummaryState.IN_PROGRESS, farmingContractManager.getSummary());\n\t\tassertEquals(CropState.DISEASED, farmingContractManager.getContractCropState());\n\t}",
"boolean hasUknown();",
"public void checkFirmwareVersion()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfor (SensorData sensorData : sCollect.getList())\n\t\t\t{\n\t\t\t\tif (sensorData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t\t{\n\t\t\t\t\tif (!ConnectionManager.getInstance().currentSensor(0).getFirwareVersion()\n\t\t\t\t\t\t\t.equals(sensorData.getFirmware()))\n\t\t\t\t\t{\n\t\t\t\t\t\trestApiUpdate(ConnectionManager.getInstance().currentSensor(0).getSerialNumber(), \"firmware\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}catch (SensorNotFoundException e){\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t\t\n\n\t}",
"boolean hasDefense();",
"boolean hasDefense();",
"boolean hasDefense();",
"boolean hasDefense();",
"boolean hasDefense();",
"boolean hasDefense();",
"@Override\n public boolean isOutdated() {\n return false;\n }",
"@Test(expected = IllegalStateException.class)\r\n public final void testCreateNewVersionForDesignDevContestFailureContestServiceMissed() throws Exception {\r\n DirectServiceFacadeBean currentDirectServiceFacadeBean = new DirectServiceFacadeBean();\r\n FailureTestHelper\r\n .initializeDirectServiceFacadeBean(currentDirectServiceFacadeBean, false, true, true);\r\n currentDirectServiceFacadeBean.createNewVersionForDesignDevContest(new TCSubject(998), 999);\r\n }",
"boolean hasOldConfig();",
"public boolean needsProblem();",
"boolean hasMaximumBackoff();",
"boolean hasMinimumBackoff();",
"@Test\n public void testDeployedStateNotDeployedService() {\n cleanUp();\n\n State state = makeState(1L, \"State 1\");\n deployedServiceDataService.create(new DeployedService(state, Service.MOBILE_ACADEMY));\n\n assertFalse(propertyService.isServiceDeployedInState(Service.KILKARI, state));\n }",
"public static boolean purge(){\r\n if((Math.random()*1000)<5) return true;\r\n return false;\r\n }",
"@Test\n public void testCreateOnlyNeededModelVersions() {\n List<Host> hosts = createHosts(9, \"6.0.0\", \"6.1.0\", null, \"6.1.0\"); // Use a host without a version as well.\n\n CountingModelFactory factory600 = createHostedModelFactory(Version.fromString(\"6.0.0\"));\n CountingModelFactory factory610 = createHostedModelFactory(Version.fromString(\"6.1.0\"));\n CountingModelFactory factory620 = createHostedModelFactory(Version.fromString(\"6.2.0\"));\n CountingModelFactory factory700 = createHostedModelFactory(Version.fromString(\"7.0.0\"));\n CountingModelFactory factory710 = createHostedModelFactory(Version.fromString(\"7.1.0\"));\n CountingModelFactory factory720 = createHostedModelFactory(Version.fromString(\"7.2.0\"));\n List<ModelFactory> modelFactories = List.of(factory600, factory610, factory620,\n factory700, factory710, factory720);\n\n DeployTester tester = createTester(hosts, modelFactories, prodZone);\n // Deploy with version that does not exist on hosts, the model for this version should also be created\n tester.deployApp(\"src/test/apps/hosted/\", \"7.0.0\");\n assertEquals(9, tester.getAllocatedHostsOf(tester.applicationId()).getHosts().size());\n\n // Check >0 not ==0 as the session watcher thread is running and will redeploy models in the background\n assertTrue(factory600.creationCount() > 0);\n assertTrue(factory610.creationCount() > 0);\n assertFalse(factory620.creationCount() > 0); // Latest model version on a major, but not for the latest major\n assertTrue(factory700.creationCount() > 0); // Wanted version, also needs to be built\n assertFalse(factory710.creationCount() > 0);\n assertTrue(\"Newest is always included\", factory720.creationCount() > 0);\n }",
"boolean isDrooping();",
"private void checkStatus() {\n if (switchOff) {\n String msg = \"Locker is switched off - no data source accessible.\";\n log.error(msg);\n throw new IllegalStateException(msg);\n }\n }",
"@Test\n public void testFactoryCreatedServiceDestruction() {\n ServiceHandle<Widget> widgetHandle = locator.getServiceHandle(Widget.class);\n Assert.assertNotNull(widgetHandle);\n \n Widget widget = widgetHandle.getService();\n Assert.assertNotNull(widget);\n \n widgetHandle.destroy();\n \n Assert.assertTrue(widget.isDestroyed());\n \n try {\n widget.badUse();\n Assert.fail(\"The underlying sprocket should be closed and hence throw\");\n }\n catch (IllegalStateException ise) {\n // This is good\n }\n \n // Now test that the factory itself was not destroyed\n SprocketFactory sprocketFactory = locator.getService(SprocketFactory.class);\n Assert.assertNotNull(sprocketFactory);\n \n Assert.assertFalse(sprocketFactory.isDestroyed());\n \n Assert.assertSame(sprocketFactory, widget.getSprocketFactory());\n }",
"private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }",
"@Test\n public void testNotDeployedStateDeployedService() {\n cleanUp();\n\n State deployed = makeState(1L, \"State 1\");\n deployedServiceDataService.create(new DeployedService(deployed, Service.MOBILE_ACADEMY));\n\n State notDeployed = makeState(2L, \"State 2\");\n\n assertFalse(propertyService.isServiceDeployedInState(Service.MOBILE_ACADEMY, notDeployed));\n }",
"@Test\n public void isGameOver()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertFalse(adjudicator.isGameOver(environment));\n }",
"public boolean isInflated() {\n // TODO(cgavidia): This rule needs to be improved!\n\n boolean fixIsDelayed = false;\n\n if (this.isReportedSevere()) {\n fixIsDelayed = isFixDelayed(MAXIMUM_RELEASES_FOR_SEVERE);\n }\n\n if (this.isReportedDefault()) {\n fixIsDelayed = isFixDelayed(MAXIMUM_RELEASES_FOR_DEFAULT);\n }\n\n boolean fixIsRejected = isFixRejected();\n boolean issueIsIgnored = isIssueIgnored();\n\n return fixIsDelayed || fixIsRejected || issueIsIgnored;\n }",
"@Test\n public void trackingEnabled_reliabilityTrigger_tooSoon() throws Exception {\n // Set up device configuration.\n configureTrackingEnabled();\n\n int retriesAllowed = 5;\n int checkDelayMillis = 5 * 60 * 1000;\n configureReliabilityConfigSettings(retriesAllowed, checkDelayMillis);\n\n PackageVersions oldPackageVersions = new PackageVersions(1, 1);\n PackageVersions currentPackageVersions = new PackageVersions(2, 2);\n\n // Simulate there being a newer version installed than the one recorded in storage.\n configureValidApplications(currentPackageVersions);\n\n // Force the storage into a state we want.\n mPackageStatusStorage.forceCheckStateForTests(\n PackageStatus.CHECK_COMPLETED_FAILURE, oldPackageVersions);\n\n // Initialize the package tracker.\n assertTrue(mPackageTracker.start());\n\n // Check the intent helper is properly configured.\n checkIntentHelperInitializedAndReliabilityTrackingEnabled();\n\n // Check the initial storage state.\n checkPackageStorageStatus(PackageStatus.CHECK_COMPLETED_FAILURE, oldPackageVersions);\n\n // Simulate a reliability trigger.\n mPackageTracker.triggerUpdateIfNeeded(false /* packageChanged */);\n\n // Assert the PackageTracker did trigger an update.\n checkUpdateCheckTriggered(currentPackageVersions);\n CheckToken token1 = mFakeIntentHelper.captureAndResetLastToken();\n\n // Increment the clock, but not enough.\n mFakeClock.incrementClock(checkDelayMillis - 1);\n\n // Simulate a reliability trigger.\n mPackageTracker.triggerUpdateIfNeeded(false /* packageChanged */);\n\n // Assert the PackageTracker did not trigger an update.\n mFakeIntentHelper.assertUpdateNotTriggered();\n checkPackageStorageStatus(PackageStatus.CHECK_STARTED, currentPackageVersions);\n mFakeIntentHelper.assertReliabilityTriggerScheduled();\n\n // Increment the clock slightly more. Should now consider the response overdue.\n mFakeClock.incrementClock(2);\n\n // Simulate a reliability trigger.\n mPackageTracker.triggerUpdateIfNeeded(false /* packageChanged */);\n\n // Triggering should have happened.\n checkUpdateCheckTriggered(currentPackageVersions);\n CheckToken token2 = mFakeIntentHelper.captureAndResetLastToken();\n\n // Check a new token was generated.\n assertFalse(token1.equals(token2));\n }",
"public final boolean hasDeponents() {\r\n synchronized (f_seaLock) {\r\n return !f_deponents.isEmpty();\r\n }\r\n }",
"boolean hasPossiblyBad();",
"private boolean isStateFullyDetermined() {\n switch (hasSubstance) {\n case No:\n case Unknown:\n return false;\n case Yes:\n // if already established has substance, continue checking only until\n // reach threshold\n return (substanceMin <= 0) ? true : substanceCnt >= substanceMin;\n }\n throw new ShouldNotHappenException();\n }",
"@Test\n\tpublic void redberriesContractCadavaDead()\n\t{\n\t\tfinal FarmingPatch patch = farmingGuildPatches.get(Varbits.FARMING_4772);\n\n\t\tassertNotNull(patch);\n\n\t\twhen(farmingTracker.predictPatch(patch))\n\t\t\t.thenReturn(new PatchPrediction(Produce.CADAVABERRIES, CropState.DEAD, 0, 2, 3));\n\n\t\tfarmingContractManager.setContract(Produce.REDBERRIES);\n\t\tassertEquals(SummaryState.OCCUPIED, farmingContractManager.getSummary());\n\t}",
"@Test(timeout = 4000)\n public void test44() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.enumerateConnectionFactory();\n ConnectionFactory[] connectionFactoryArray0 = connectionFactories0.getConnectionFactory();\n assertEquals(0, connectionFactoryArray0.length);\n }",
"private void checkStability() {\n double maxDeviation = Double.NEGATIVE_INFINITY;\n\n DeviationIterator itr = new DeviationIterator(currentOutcome, nActs);\n while (itr.hasNext()) {\n int[] devOutcome = itr.next();\n\n // this shouldn't happen\n if (eGame.getNumSamples(devOutcome) <= 0) {\n System.out.println(\"BRD: checking equilibrium with unsampled deviations!\");\n System.out.println(\"Current: \" + Arrays.toString(currentOutcome));\n System.out.println(\"Unsampled: \" + Arrays.toString(devOutcome));\n return;\n }\n\n double devBenefit = eGame.getPayoff(devOutcome, itr.getDeviatingPlayer()) -\n eGame.getPayoff(currentOutcome, itr.getDeviatingPlayer());\n\n maxDeviation = Math.max(maxDeviation, devBenefit);\n\n // terminate early; not better than one we have already confirmed\n if (maxDeviation >= confirmedStability) return;\n }\n\n if (maxDeviation < confirmedStability) {\n confirmedStability = maxDeviation;\n mostStableConfirmed = currentOutcome.clone();\n if (samplesToConfirmEquilibrium < 0 &&\n confirmedStability <= 0) {\n samplesToConfirmEquilibrium = eGame.getTotalNumSamples();\n }\n }\n }",
"@Test(expected = FacilityNotFreeException.class)\n\tpublic void testBookNotFree() throws Exception {\n\t\t// create a reservation\n\t\tdataHelper.createPersistedReservation(\"aUser\", Arrays.asList(room1.getId()), validStartDate, validEndDate);\n\t\t// book should fail..\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), validStartDate, validEndDate);\n\t}",
"public boolean upgradeSoftwareInjector(SoftwareInjector injector) {\r\n if(injector.getCost() <= this.getBitcoins())\r\n {\r\n try {\r\n if(injector.upgrade()) \r\n { \r\n\r\n this.removeBitcoins(injector.getCost()); \r\n return true;\r\n\r\n }\r\n }\r\n catch (NotEnoughBitcoinsException | NoUpgradeAllowedException ex) {\r\n new Log(LogState.ERROR, ex.getMessage());\r\n }\r\n }\r\n return false;\r\n }",
"private void verifyGradient(Instance instance,\r\n\t\t\tMap<Integer, Double> mpFeatureIdToGradient) {\r\n\t\tdouble before = getObjectiveFunctionValueForSingleInstanceOriginal(instance);\r\n\t\tfor (int featureId : mpFeatureIdToGradient.keySet()) {\r\n\t\t\tdouble delta = param.gradientVerificationDelta;\r\n\t\t\tx[featureId][0] += delta;\r\n\t\t\tsum_x[0] += delta;\r\n\t\t\tdouble after = getObjectiveFunctionValueForSingleInstanceOriginal(instance);\r\n\t\t\tdouble gradientCalculated = mpFeatureIdToGradient.get(featureId);\r\n\t\t\tif (Math.abs(before + delta * gradientCalculated - after) > Constant.SMALL_THAN_AS_ZERO) {\r\n\t\t\t\tSystem.out.println(before + delta * gradientCalculated);\r\n\t\t\t\tSystem.out.println(after);\r\n\t\t\t}\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(\r\n\t\t\t\t\t\t\tMath.abs(before + delta * gradientCalculated\r\n\t\t\t\t\t\t\t\t\t- after) < Constant.SMALL_THAN_AS_ZERO,\r\n\t\t\t\t\t\t\t\"Gradient verification fails!\");\r\n\t\t\t// Revert the actions.\r\n\t\t\tx[featureId][0] -= delta;\r\n\t\t\tsum_x[0] -= delta;\r\n\t\t}\r\n\t}",
"boolean hasUsage();",
"private boolean DeriveStockWith_FundIsAvailable() {\n\t\tif (getFunds() > 0) {\n\t\t\tif (calculateInputStock_Items() > getFunds()) {\n\t\t\t\tSystem.err.println(\"Insufficient Funds, Cannot restock\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t\t// available funds can accommodate input stock requirement\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Insufficient Funds\");\n\t\t}\n\t\treturn false;\n\t}",
"@Test\n\tpublic void redberriesContractRedberriesDead()\n\t{\n\t\tfinal FarmingPatch patch = farmingGuildPatches.get(Varbits.FARMING_4772);\n\n\t\tassertNotNull(patch);\n\n\t\twhen(farmingTracker.predictPatch(patch))\n\t\t\t.thenReturn(new PatchPrediction(Produce.REDBERRIES, CropState.DEAD, 0, 2, 3));\n\n\t\tfarmingContractManager.setContract(Produce.REDBERRIES);\n\n\t\tassertEquals(SummaryState.IN_PROGRESS, farmingContractManager.getSummary());\n\t\tassertEquals(CropState.DEAD, farmingContractManager.getContractCropState());\n\t}",
"boolean isExplosivesUsed();",
"@Override\r\n\tint check_sweetness() {\n\t\treturn 10;\r\n\t}",
"boolean hasDeprecatedHadithNo();",
"private void check() {\n ShedSolar.instance.haps.post( Events.WEATHER_REPORT_MISSED );\n LOGGER.info( \"Failed to receive weather report\" );\n\n // check again...\n startChecker();\n }",
"@Override\r\n\tpublic void factoryAdded(String factoryName, EntityManagerFactory factory) {\r\n\t\tif (this.factoryName.compareTo(factoryName) == 0) {\r\n\t\t\tlogger.trace(\"JPA: {} entity manager factory added. validating [{}]\", factoryName, pojoClassName);\r\n\t\t\tsetValidity(true);\r\n\t\t}\r\n\t}",
"protected boolean asEaten() {\n return false;\n }",
"public boolean willNotBeResurrected() {\n return state == State.FRESH || state == State.ERROR;\n }",
"@Test\n\tpublic void testTAlive6() {\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}",
"public boolean beforeDownstream() {\n return true;\n }",
"boolean isValidForNow ();",
"public boolean downgrades(ApplicationVersion version) {\n return application.map(version::compareTo).orElse(0) > 0;\n }",
"boolean hasCompatibilityState();",
"boolean isFullfilled() throws IllegalStateException;",
"public final boolean inUse()\n{\n\tif (_buildTime > 0)\n\t{\n\t\treturn false;\n\t}\n\treturn (_base.getAvailableQuarters() - _rules.getPersonnel() < _base.getUsedQuarters() ||\n\t\t\t_base.getAvailableStores() - _rules.getStorage() < _base.getUsedStores() ||\n\t\t\t_base.getAvailableLaboratories() - _rules.getLaboratories() < _base.getUsedLaboratories() ||\n\t\t\t_base.getAvailableWorkshops() - _rules.getWorkshops() < _base.getUsedWorkshops() ||\n\t\t\t_base.getAvailableHangars() - _rules.getCrafts() < _base.getUsedHangars());\n}",
"private void checkLost() {\n\t\tRobotStates state;\n\t\t\n\t\tif (attackRobots.isEmpty()) {\n\t\t\tsetLost();\n\t\t} else {\n\t\t\tfor (AttackRobot ar : attackRobots) {\n\t\t\t\tif (ar.getState() != RobotStates.INACTIVE && ar.getState() != RobotStates.DESTROYED) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (supportRobots.isEmpty()) {\n\t\t\tsetLost();\n\t\t} else {\n\t\t\tfor (int i = 0; i < supportRobots.size(); i++) {\n\t\t\t\tstate = supportRobots.get(i).getState();\n\t\t\t\tif (state != RobotStates.INACTIVE && state != RobotStates.DESTROYED) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsetLost();\n\t}",
"private void checkLeakyEpsilon() {\r\n if (cbUseLeakyLearning.isSelected()) {\r\n tfLeakyEpsilon.setEnabled(true);\r\n } else {\r\n tfLeakyEpsilon.setEnabled(false);\r\n }\r\n }",
"@Test\n public void testReservationFactory() {\n assertNotNull(reservationFactory);\n }"
] | [
"0.7124877",
"0.5990225",
"0.57771444",
"0.5661239",
"0.5616701",
"0.55939525",
"0.5524213",
"0.5401258",
"0.53890556",
"0.5376612",
"0.5370428",
"0.53574723",
"0.53365684",
"0.5335093",
"0.53195536",
"0.53039944",
"0.5293296",
"0.525059",
"0.52402306",
"0.5232094",
"0.52244335",
"0.5218236",
"0.52181995",
"0.5200318",
"0.5190501",
"0.51844585",
"0.51810205",
"0.5175943",
"0.5175544",
"0.5171334",
"0.5162943",
"0.5146559",
"0.51455116",
"0.513714",
"0.5136364",
"0.5133831",
"0.5129",
"0.5125614",
"0.51176935",
"0.51013404",
"0.509407",
"0.5093784",
"0.50921655",
"0.5089282",
"0.5087003",
"0.50785",
"0.50622237",
"0.5060385",
"0.50599957",
"0.5057113",
"0.5057113",
"0.5057113",
"0.5057113",
"0.5057113",
"0.5057113",
"0.50532156",
"0.5048129",
"0.5044074",
"0.5033437",
"0.5028979",
"0.5018083",
"0.50148916",
"0.5013919",
"0.5012545",
"0.5003326",
"0.4998667",
"0.49962685",
"0.49894622",
"0.49874532",
"0.49759537",
"0.49747956",
"0.49722964",
"0.49605486",
"0.49575585",
"0.49483946",
"0.49464244",
"0.4943855",
"0.4943712",
"0.4942971",
"0.49371895",
"0.49362606",
"0.49354193",
"0.49334434",
"0.4922223",
"0.49094728",
"0.49046773",
"0.49002224",
"0.48971492",
"0.4893332",
"0.48916182",
"0.4884546",
"0.48839965",
"0.48764196",
"0.48756525",
"0.48705956",
"0.48685178",
"0.48661822",
"0.48590624",
"0.4852896",
"0.48528373",
"0.48483697"
] | 0.0 | -1 |
Returns the production timer | public int getProductionTimer()
{
return currentProductionTimer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}",
"public int getTimer() {\n return timer;\n }",
"public Timer getOverallTimer();",
"public String getTimer() {\n return timer;\n }",
"Timer getTimer();",
"public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }",
"public Timer getTimer(){\n\t\treturn timer;\n\t}",
"public Timer getTimer() {\r\n\t\treturn timer;\r\n\t}",
"RampDownTimer getRampDownTimer();",
"long getTimerPref();",
"public long getTimerTime() {\n return timerTime;\n }",
"public String getTimerType() {\n\t\treturn Main.STANDARDTIMER;\n\t}",
"private UimaTimer getTimer() throws Exception {\n String uimaTimerClass = cpeFactory.getCPEConfig().getCpeTimer().get();\n if (uimaTimerClass != null) {\n new TimerFactory(uimaTimerClass);\n return TimerFactory.getTimer();\n }\n // If not timer defined return default timer based on System.currentTimeMillis()\n return new JavaTimer();\n }",
"public int getTimer() {\n return worldTimer;\n }",
"public final Pair<String, Integer> startTimer() {\r\n long j = (long) 1000;\r\n this.remainTime -= j;\r\n long j2 = this.remainTime;\r\n long j3 = j2 - j;\r\n long j4 = j3 / ((long) 3600000);\r\n long j5 = (long) 60;\r\n long j6 = (j3 / ((long) 60000)) % j5;\r\n long j7 = (j3 / j) % j5;\r\n double d = (double) j2;\r\n double d2 = (double) this.totalRemainTime;\r\n Double.isNaN(d);\r\n Double.isNaN(d2);\r\n double d3 = d / d2;\r\n double d4 = (double) AbstractSpiCall.DEFAULT_TIMEOUT;\r\n Double.isNaN(d4);\r\n double d5 = d3 * d4;\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(designTimeUnit(j4));\r\n String str = \" : \";\r\n sb.append(str);\r\n sb.append(designTimeUnit(j6));\r\n sb.append(str);\r\n sb.append(designTimeUnit(j7));\r\n return new Pair<>(sb.toString(), Integer.valueOf((int) Math.ceil(d5)));\r\n }",
"public GameTimer getTimer()\n {\n return timer;\n }",
"public Timer getTimer() {\n\t//if (heartbeat_==null) heartbeat_ = new Timer(100, 1000); // on demand: don't slow down startup\n\tif (timer_==null) timer_ = new java.util.Timer();\n\treturn timer_;\n }",
"public String timerPause(){\n return mTimer;\n }",
"static public Timer theTimer() {\n return TheTimer;\n }",
"@Override\n\tpublic long getResolution() {\n\t\treturn TIMER_RESOLUTION;\n\t}",
"public Timer getTime() {\n\t\treturn time;\n\t}",
"public double getStopTime();",
"RampUpTimer getRampUpTimer();",
"Double getRemainingTime();",
"public int getEnergyTimer()\n\t{\n\t\treturn currentEnergyTimer;\n\t}",
"Double getScheduleDuration();",
"public static long startTimer() {\n return System.currentTimeMillis();\n }",
"public double getStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STOPTIME$24);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }",
"public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}",
"public TaskTimer\n getTimer() \n {\n return pTimer;\n }",
"public float getCurrentTime () {\n\t\treturn timer;\n\t}",
"static public String soutAllTimer() {\n return HeartCore.t + \" - \" + HeartMoveBird.internalTime + \" - \" + HeartMoveObstacle.tWall;\n }",
"public double getCBRTime();",
"public double getWorkTime()\n {\n if (cFixedServiceTimed)\n {\n return (mServerConfig.mServiceTime);\n }\n double tBase;\n double tDelta;\n switch (mHoldType)\n {\n case cHoldNormal:\n return (cRandom.normal(mServerConfig.mServiceTime, mServerConfig.mServiceTime * 0.1)); //0.3\n\n case cHoldNegexp:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = 1.0 / (mServerConfig.mServiceTime * 0.50);\n return (tBase + cRandom.negexp(tDelta));\n\n case cHoldPoisson:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = mServerConfig.mServiceTime * 0.50;\n return (tBase + cRandom.poisson(tDelta));\n\n case cHoldUniform:\n return (cRandom.uniform(mServerConfig.mServiceTime * 0.75, mServerConfig.mServiceTime * 1.5));\n }\n return 0.0;\n }",
"private String production() {\r\n\t\tint[] prod=tile.getProductionNeedsMet();\r\n\t\tString out=\"Production Met: \"+prod[0]+\" || Production Not Met: \"+prod[1];\r\n\t\treturn out;\r\n\t}",
"@Override\n\tpublic TimerValuesInterface getTimes() {\n\t\treturn timer;\n\t}",
"public org.landxml.schema.landXML11.GPSTime xgetStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STOPTIME$24);\r\n return target;\r\n }\r\n }",
"public abstract double sensingTime();",
"public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}",
"public double getStartTime();",
"private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }",
"TimerType createTimerType();",
"public int getSecond() {\n return this.timeRuunableThread.getSecond();\n }",
"public void pickUpTimer()\r\n\t{\t\t\r\n\t\tSystem.out.println(timer.get());\r\n\t\tif(timer.get() < Config.Auto.timeIntakeOpen)\r\n\t\t{\r\n\t\t\t//claw.openClaw();\r\n\t\t\tSystem.out.println(\"in second if\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeElevatorStack)\r\n\t\t{\r\n\t\t\t//elevator.setLevel(elevatorLevel);\r\n\t\t\t//elevatorLevel++;\r\n\t\t}\r\n\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeIntakeClose)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"in first if\");\r\n\t\t\t//claw.closeClaw();\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tendRoutine();\r\n\t}",
"BusinessCenterTime getValuationTime();",
"private CountDownTimer getGameTimer() {\n CountDownTimer countDownTimer;\n countDownTimer = new CountDownTimer(gameTimeLeftYet, 100) {\n @Override\n public void onTick(long millisUntilFinished) {\n gameTimerOnTick(millisUntilFinished);\n }\n\n @Override\n public void onFinish() {\n gameTimerOnFinish();\n }\n };\n return countDownTimer;\n }",
"private int getActiveTime() {\n\t\treturn 15 + level;\n\t}",
"int getTtiSeconds();",
"int getChronicDelayTime();",
"double getStaStart();",
"public static double ParaTimer(){\n return (System.nanoTime() - timer)/(1000000000.);\n }",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"public int getTime(){\n return (timerStarted > 0) ? (int) ((System.currentTimeMillis() - timerStarted) / 1000L) : 0;\n }",
"int getEvalTm();",
"public Integer getScheduledproduction() {\n return scheduledproduction;\n }",
"int getSchedulingValue();",
"int getStartTime();",
"int getStartTime();",
"int getStartTime();",
"double getMinTimerTrig();",
"public Rational getStartTime ()\r\n {\r\n return startTime;\r\n }",
"public long getStartTime () {\n if (isPerformance) {\n return System.currentTimeMillis();\n }\n else\n {\n return 0;\n }\n }",
"public static long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}",
"public String getElapsedTime() {\n /**\n * Joda instruction credit to BalusC @ stackoverflow.com\n * http://stackoverflow.com/posts/2179831/revisions\n */\n Period delta = new Period(getOccurrenceTime(), DateTime.now());\n return\n // 1+ weeks\n (delta.getWeeks() >= 1) ? delta.getWeeks()+\"w\" :\n // 1+ days\n (delta.getDays() >= 1) ? delta.getDays()+\"d\" :\n // 1+ hours\n (delta.getHours() >= 1) ? delta.getHours()+\"h\" :\n // 1+ minutes\n (delta.getMinutes() >= 1) ? delta.getMinutes()+\"m\" :\n // 1+ seconds\n delta.getSeconds()+\"s\";\n }",
"int getCPU_time();",
"public double getServiceTime() {\r\n\t\treturn serviceTime.sample();\r\n\t}",
"public Unit<Time> second() {return second;}",
"long getStartTime();",
"public double getScheduledTime() {\n return scheduledTime;\n }",
"double getFullTime();",
"public String getStopTime() {\n\t\treturn (new Parser(value)).skipString().getString();\n\t}",
"public int getTT()\n {\n return toTime;\n }",
"public String getPerformanceTime()\r\n {\r\n return performanceTime;\r\n }",
"public double getHoldTime();",
"public long getEventTime();",
"@Override\r\n\tpublic String getTimerValueStatus() {\n\t\treturn \"this is the timer status!!\";\r\n\t}",
"java.lang.String getPlayTime();",
"public Integer getCusTime() {\r\n return cusTime;\r\n }",
"Timer(int tempTotalTime) {\n totalTime = tempTotalTime;\n }",
"public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }",
"String makeNewSleep(){\n\t\tbeginSleepTime = new SimpleDateFormat(\"HH:mm\").format(new Date());\n\t\treturn beginSleepTime;\n\t}",
"public String startTime(){\r\n\t\treturn startTime;\r\n\t}",
"@Override\r\n\tpublic double getManufactureTime() {\r\n\t\tdouble highTime = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\tif(p.getManufactureTime() > highTime)\r\n\t\t\t\thighTime = p.getManufactureTime();\r\n\t\t}\r\n\t\t\r\n\t\treturn highTime;\r\n\t}",
"protected void processTimer(){\n if(timer != null){\n timer.cancel();\n timer = null;\n }\n // Verificamos si el partido esta en progreso\n if(match.status == Match.STATUS_PENDING || match.status == Match.STATUS_ENDED){\n return;\n }\n // Creamos temporizador 90 * 60 * 1000 = 5.400.000\n timer = new CountDownTimer(5400000, 1000) {\n @Override\n public void onTick(long l) {\n // Calcular los segundos que pasaron\n long seconds = (new Date().getTime() - matchDayLong) / 1000;\n // Calcular los minutos del partido\n long minutes = seconds / 60;\n //long minutes = TimeUnit.MILLISECONDS.toMinutes(uptime);\n if(minutes < 0){\n minutes = 0;\n seconds = 0;\n statusMedium.setText(\"PT\");\n }if(minutes > 45 && minutes < 60){\n minutes = 45;\n seconds = 60;\n }else if(minutes > 90){\n minutes = 90;\n seconds = 60;\n statusMedium.setText(\"ST\");\n }else if(minutes >= 60){\n minutes -= 15;\n statusMedium.setText(\"ST\");\n }else{\n statusMedium.setText(\"PT\");\n }\n\n statusTime.setText(String.format(\"%02d:%02d\", minutes, (seconds%60)));\n }\n\n @Override\n public void onFinish() {\n\n }\n }.start();\n }",
"public int getTempoSec() {\n return tempoSec;\n }",
"SwTimerResource createSwTimerResource();",
"public String elapsedTime() {\n return totalWatch.toString();\n }",
"public IdleTimer getIdleTimer()\n {\n return idleTimer;\n }",
"public int getSystemTime() {\n\t\treturn this.systemTime;\n\t}",
"long getExecutionTime();",
"public String getElapsedTime() {\n\n long elapsed;\n int mins;\n int secs;\n int millis;\n\n if (running) {\n elapsed = System.currentTimeMillis() - startTime;\n } else {\n elapsed = stopTime - startTime;\n }\n\n mins = (int) (elapsed / 60000);\n secs = (int) (elapsed - mins * 60000) / 1000;\n millis = (int) (elapsed - mins * 60000 - secs * 1000);\n\n //Keeps 3 digits when a second rolls over. Perhaps find a better way of doing this\n return (String.format(\"%02d\", mins) + \":\" + String.format(\"%02d\", secs) + \":\"\n + String.format(\"%03d\", millis));\n }",
"public long getMinTime()\n {\n return times[0];\n }",
"public long getStartTime ()\r\n {\r\n return startTime;\r\n }",
"public static Timer getSharedNonDeamonTimer() {\n if ( sharedNonDeamonTimer == null ) {\n sharedNonDeamonTimer = new Timer(\"Shared Non-Deamon Timer\", false);\n }\n\n return sharedNonDeamonTimer;\n }",
"public YangUInt8 getRequestTimerValue() throws JNCException {\n YangUInt8 requestTimer = (YangUInt8)getValue(\"request-timer\");\n if (requestTimer == null) {\n requestTimer = new YangUInt8(\"5\"); // default\n }\n return requestTimer;\n }",
"Duration getRemainingTime();",
"T getEventTime();",
"public int getRunTime() { \n\t\t\treturn RunTime;\n\t\t}",
"public int getTotalTime();"
] | [
"0.69922674",
"0.69739175",
"0.6972191",
"0.6948175",
"0.6882546",
"0.6864546",
"0.6651776",
"0.65371084",
"0.6526028",
"0.65119684",
"0.6456288",
"0.6444286",
"0.6405032",
"0.6397494",
"0.63691825",
"0.63562614",
"0.6354749",
"0.63496566",
"0.6338188",
"0.6292607",
"0.62885183",
"0.6270117",
"0.62220025",
"0.62166107",
"0.6165049",
"0.60954976",
"0.6092819",
"0.6080176",
"0.60751915",
"0.6069767",
"0.6068299",
"0.60610247",
"0.60357594",
"0.6030622",
"0.5994549",
"0.5987469",
"0.59677696",
"0.5965674",
"0.59544027",
"0.5942953",
"0.5941764",
"0.5939242",
"0.59346956",
"0.5930442",
"0.5904971",
"0.5903159",
"0.5880012",
"0.5874426",
"0.5873186",
"0.58567524",
"0.5855374",
"0.584494",
"0.584494",
"0.5841803",
"0.58415926",
"0.5823513",
"0.582029",
"0.5814054",
"0.5814054",
"0.5814054",
"0.58134454",
"0.58131534",
"0.58090675",
"0.57978666",
"0.5793161",
"0.57847106",
"0.5783204",
"0.577553",
"0.57721496",
"0.5767787",
"0.5764768",
"0.57410485",
"0.5738841",
"0.5736797",
"0.57331055",
"0.5729882",
"0.5724757",
"0.57232714",
"0.5716776",
"0.57164395",
"0.5709772",
"0.57068336",
"0.56956977",
"0.5694641",
"0.5688104",
"0.56779146",
"0.56769687",
"0.5675786",
"0.5673671",
"0.56726384",
"0.5663511",
"0.56502527",
"0.5647963",
"0.5647776",
"0.56441474",
"0.56440675",
"0.56426173",
"0.56407136",
"0.5639253",
"0.56386864"
] | 0.8391144 | 0 |
Returns the energy timer | public int getEnergyTimer()
{
return currentEnergyTimer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getET()\n {\n return exTime;\n }",
"int getEnergy();",
"public double getEnergy() { return energy; }",
"public long getEventTime();",
"public double getEnergy() {\n\t\treturn energy;\n\t}",
"public int getEnergy()\n {\n return energy;\n }",
"public Energy getEnergy() {\n return energy;\n }",
"public int getEnergy() {\n return energy;\n }",
"protected int getEnergy() {\n\t\treturn energy;\n\t}",
"@Override\r\n\tpublic double getEnergy(Robot robot)\r\n\t{\r\n\t\treturn robot.getEnergy(EnergyUnit.WATTSECOND);\r\n\t}",
"public double getEnergy(){\n\t\t return energy;\n\t}",
"public double getEnergy() {\n\t\treturn _energy;\n\t}",
"public int getTimer() {\n return timer;\n }",
"public int getEnergy() {\n\t\treturn energy;\n\t}",
"@java.lang.Override\n public int getEnergy() {\n return energy_;\n }",
"double getMinTimerTrig();",
"@java.lang.Override\n public int getEnergy() {\n return energy_;\n }",
"@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}",
"@ComputerMethod\n private FloatingLong getEnergyUsage() {\n return getActive() ? energyContainer.getEnergyPerTick() : FloatingLong.ZERO;\n }",
"public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }",
"Timer getTimer();",
"T getEventTime();",
"public int getTimer() {\n return worldTimer;\n }",
"@Override\n public double getEnergyLevel() {\n return energy;\n }",
"@ComputerMethod\n private FloatingLong getEnergyUsage() {\n return energyContainer.getEnergyPerTick();\n }",
"public double getSlowToFire();",
"public int getEnergy(){ return energy; }",
"public int getEat_time()\n\t{\n\t\treturn eat_time;\n\t}",
"public Date getEventTime() {\n\t\treturn time;\n\t}",
"public long getTimerTime() {\n return timerTime;\n }",
"public GameTimer getTimer()\n {\n return timer;\n }",
"public String getTimer() {\n return timer;\n }",
"public Timer getTime() {\n\t\treturn time;\n\t}",
"public float getEnergyRate() { return EnergyRate; }",
"public Float getEulDowntime() {\n return eulDowntime;\n }",
"public int getEventTime() {\n\t\treturn scheduledTime;\n\t}",
"Double getRemainingTime();",
"public int energy_consumed_GET()\n { return (int)((int) get_bytes(data, 29, 4)); }",
"RampDownTimer getRampDownTimer();",
"double getFullTime();",
"public Timer getOverallTimer();",
"public Timer getTimer(){\n\t\treturn timer;\n\t}",
"public double getStopTime();",
"protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}",
"public int energyRequired(Time time) {\n\n Random r = new Random();\n Time universeTime = universe.getUniverseTime();\n\n /*\n If we are basing our calculation on the current Universe time, the\n appliance will be on thanks to the TimedEvent handler so we do not need\n to check for matching ApplianceTimedEvents, we can just check isOn\n */\n if (time.equals(universeTime)) {\n return energy = isOn ? minUsage + r.nextInt(maxUsage - minUsage) : 0;\n \n }\n else { // THIS IS A FORECAST\n\n //Check usage hours for a TimedEvent where the appliance is used at time\n //usage hours are ordered in acsending order of start times\n for (Iterator<ApplianceTimedEvent> i = usageHours.iterator(); i.hasNext();) {\n ApplianceTimedEvent event = i.next();\n\n //start time comes after time. Therefore for all succeeding TimedEvents\n //the start time would also come after time (ascending order)\n //energy remains at zero and breaks out of iteration\n if (event.getStartTime().compare(time) > 0) \n break;\n \n\n //time occurs within a TimedEvent\n //energy is updated to value and breaks out of iteration\n if (event.containsTime(time)) {\n return energy = minUsage + r.nextInt(maxUsage - minUsage);\n \n }\n\n }\n return energy = 0; /*EXIT AT THIS POINT HAVING NOT FOUND ANY ENERGY USAGE AT THIS TIME FOR THIS APPLIANCE*/\n\n }\n }",
"public double getHoldTime();",
"public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"long getElapsedTime();",
"long getTimerPref();",
"public Timer getTimer() {\r\n\t\treturn timer;\r\n\t}",
"static public Timer theTimer() {\n return TheTimer;\n }",
"public float getLeftRightTimer() {\n return leftRightTimer;\n }",
"public long getEventTime() {\n return eventTime;\n }",
"int time()\n\t{\n\t\treturn totalTick;\n\t}",
"double getStaStart();",
"double getDefaultTimerTrig();",
"public double getTime() { return time; }",
"public double getElapsedTime()\n\t{\n\t\treturn elapsedTime;\n\t}",
"public EventTime getTime() {\n return this.time;\n }",
"public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}",
"public YangUInt8 getRequestTimerValue() throws JNCException {\n YangUInt8 requestTimer = (YangUInt8)getValue(\"request-timer\");\n if (requestTimer == null) {\n requestTimer = new YangUInt8(\"5\"); // default\n }\n return requestTimer;\n }",
"public float getElapsed()\n {\n return this.elapsed;\n }",
"long elapsedTime();",
"public double getFireTime() {\n\t\treturn fireTime;\n\t}",
"Energy getLoad();",
"public int getTime(){\n return (timerStarted > 0) ? (int) ((System.currentTimeMillis() - timerStarted) / 1000L) : 0;\n }",
"public double getEnginePower(){\n return enginePower;\n }",
"public double getEnergia() { return energia; }",
"public float getCurrentTime () {\n\t\treturn timer;\n\t}",
"private UimaTimer getTimer() throws Exception {\n String uimaTimerClass = cpeFactory.getCPEConfig().getCpeTimer().get();\n if (uimaTimerClass != null) {\n new TimerFactory(uimaTimerClass);\n return TimerFactory.getTimer();\n }\n // If not timer defined return default timer based on System.currentTimeMillis()\n return new JavaTimer();\n }",
"protected double getEnginePower(){\n return enginePower;\n }",
"@Override\n\tpublic TimerValuesInterface getTimes() {\n\t\treturn timer;\n\t}",
"protected void onGetRatedPowerConsumptionOfHPUnitInWintertime(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getManagementElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(MANAGEMENTELAPSED_PROP.get());\n }",
"int getTtiSeconds();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getManagementElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(MANAGEMENTELAPSED_PROP.get());\n }",
"public int getYellowTime() {\r\n return yellowTime;\r\n }",
"public double getElapsedTime() {\r\n return (double) (elapsedTime / 1000.0); // convert from milliseconds to seconds\r\n }",
"public int getHardwareTimeout();",
"EDataType getReactivePower();",
"double energy() {\n\n // brightness values\n double brU = 0;\n double brD = 0;\n double brR = 0;\n double brL = 0;\n double brDR = 0;\n double brTR = 0;\n double brDL = 0;\n double brTL = 0;\n if (this.up != null) {\n brU = this.up.brightness;\n }\n if (this.down != null) {\n brD = this.down.brightness;\n }\n\n if (this.right != null) {\n brR = this.right.brightness;\n }\n\n if (this.left != null) {\n brL = this.left.brightness;\n }\n\n if (this.downRight() != null) {\n brDR = this.downRight().brightness;\n }\n\n if (this.downLeft() != null) {\n brDL = this.downLeft().brightness;\n }\n\n if (this.topLeft() != null) {\n brTL = this.topLeft().brightness;\n }\n\n if (this.topRight() != null) {\n brTR = this.topRight().brightness;\n }\n\n\n double vertEnergy = (brTL + brL + brDL) - (brTR + brR + brDR);\n double horizEnergy = (brTL + brU + brTR) - (brDL + brD + brDR);\n\n return Math.sqrt((vertEnergy * vertEnergy) + (horizEnergy * horizEnergy));\n\n }",
"@Override\r\n\tpublic float getEnergyConsumption() {\r\n\t\treturn 2500 - robot.getBatteryLevel();\r\n\t}",
"public double getTime();",
"public String elapsedTime() {\n return totalWatch.toString();\n }",
"public int getEnergie() {\r\n\t\treturn energie;\r\n\t}",
"public abstract double sensingTime();",
"public long getElapsedTime() {\n\t\treturn this.getTime();\n\t}",
"double getTime();",
"public double getTime() {return _time;}",
"public Timer getTimer() {\n\t//if (heartbeat_==null) heartbeat_ = new Timer(100, 1000); // on demand: don't slow down startup\n\tif (timer_==null) timer_ = new java.util.Timer();\n\treturn timer_;\n }",
"public static long GetElapsedTime() {\n\t\treturn System.currentTimeMillis() - _lTime;\n\t}",
"public String getElapsedTime() {\n /**\n * Joda instruction credit to BalusC @ stackoverflow.com\n * http://stackoverflow.com/posts/2179831/revisions\n */\n Period delta = new Period(getOccurrenceTime(), DateTime.now());\n return\n // 1+ weeks\n (delta.getWeeks() >= 1) ? delta.getWeeks()+\"w\" :\n // 1+ days\n (delta.getDays() >= 1) ? delta.getDays()+\"d\" :\n // 1+ hours\n (delta.getHours() >= 1) ? delta.getHours()+\"h\" :\n // 1+ minutes\n (delta.getMinutes() >= 1) ? delta.getMinutes()+\"m\" :\n // 1+ seconds\n delta.getSeconds()+\"s\";\n }",
"public static long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}",
"public String getEventTime1()\n {\n EventTime1 = timeField1.getText();\n return EventTime1;\n }",
"int getChronicDelayTime();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }",
"public double getTime() {\n return this.time;\n }",
"public final Pair<String, Integer> startTimer() {\r\n long j = (long) 1000;\r\n this.remainTime -= j;\r\n long j2 = this.remainTime;\r\n long j3 = j2 - j;\r\n long j4 = j3 / ((long) 3600000);\r\n long j5 = (long) 60;\r\n long j6 = (j3 / ((long) 60000)) % j5;\r\n long j7 = (j3 / j) % j5;\r\n double d = (double) j2;\r\n double d2 = (double) this.totalRemainTime;\r\n Double.isNaN(d);\r\n Double.isNaN(d2);\r\n double d3 = d / d2;\r\n double d4 = (double) AbstractSpiCall.DEFAULT_TIMEOUT;\r\n Double.isNaN(d4);\r\n double d5 = d3 * d4;\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(designTimeUnit(j4));\r\n String str = \" : \";\r\n sb.append(str);\r\n sb.append(designTimeUnit(j6));\r\n sb.append(str);\r\n sb.append(designTimeUnit(j7));\r\n return new Pair<>(sb.toString(), Integer.valueOf((int) Math.ceil(d5)));\r\n }"
] | [
"0.6966453",
"0.6958474",
"0.6842646",
"0.68246895",
"0.6762964",
"0.67576903",
"0.67511094",
"0.6710784",
"0.6708376",
"0.6698215",
"0.6643173",
"0.66232795",
"0.6615404",
"0.66096413",
"0.6584229",
"0.65785396",
"0.6570648",
"0.65510195",
"0.6531036",
"0.65300536",
"0.6529923",
"0.6519009",
"0.6474078",
"0.64526594",
"0.6368327",
"0.6356952",
"0.6335959",
"0.63160545",
"0.63129777",
"0.63077754",
"0.6273636",
"0.6231841",
"0.622715",
"0.6219559",
"0.620545",
"0.6173515",
"0.61698407",
"0.6156683",
"0.61477053",
"0.61331165",
"0.6130264",
"0.612971",
"0.61007404",
"0.60985076",
"0.6088485",
"0.60650206",
"0.6062051",
"0.604371",
"0.604371",
"0.60141426",
"0.59959066",
"0.5995076",
"0.59949225",
"0.5988507",
"0.5968233",
"0.59639406",
"0.5948108",
"0.59415585",
"0.5936845",
"0.59319836",
"0.59228337",
"0.5909553",
"0.58919764",
"0.587053",
"0.586912",
"0.58569944",
"0.58541566",
"0.5853716",
"0.585321",
"0.58508",
"0.58503854",
"0.5840847",
"0.5838489",
"0.58202726",
"0.581995",
"0.58176184",
"0.5813834",
"0.5808224",
"0.5806813",
"0.5797684",
"0.57963336",
"0.5786237",
"0.57814896",
"0.5774897",
"0.57737285",
"0.5767392",
"0.5757592",
"0.5756144",
"0.5751277",
"0.57454765",
"0.5734199",
"0.57288176",
"0.5728751",
"0.5726409",
"0.5726072",
"0.57259065",
"0.57157975",
"0.57132417",
"0.5711966",
"0.57107973"
] | 0.8479006 | 0 |
Check for in debug mode | public static boolean isDebugMode(Context context) {
SharedPreferences preference=context.getSharedPreferences(AppSectionsConstant.Storage.PREFERENCE_CONF_SETTING, Context.MODE_PRIVATE);
boolean bDebugMode=preference.getBoolean(KEY_SETTING_GENERAL_DEBUGMODE, DEFAULT_VAL_DEBUGMODE);
return bDebugMode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isDebug();",
"boolean isDebug();",
"public boolean isDebug();",
"public boolean isDebugEnabled();",
"boolean isDebugEnabled();",
"private final boolean isDebugMode() {\r\n\tString debug = m_ctx.getInitParameter(\"gateway.debug\");\r\n\tif (debug == null)\r\n\t return false;\r\n\tif (debug.equalsIgnoreCase(\"true\"))\r\n\t return true;\r\n\telse\r\n\t return false;\r\n }",
"public boolean isDebug( ) {\n\t\treturn debug;\n\t}",
"protected boolean isDebugEnable() {\n return BlurDialogEngine.DEFAULT_DEBUG_POLICY;\n }",
"public boolean isDebugMode() {\n return debugMode;\n }",
"public static void syncIsDebug(Context context) {\n if (isDebug == null) {\n isDebug = context.getApplicationInfo() != null\n && (context.getApplicationInfo().flags\n & ApplicationInfo.FLAG_DEBUGGABLE) != 0;\n }\n }",
"public boolean isDebug() {\n\t\treturn debug;\n\t}",
"public boolean isDebug() {\n\t\treturn debug;\n\t}",
"public boolean isDebug()\n\t{\n\t\treturn this.debug;\n\t}",
"@Override\r\n public boolean isDebug() {\n return BuildConfig.DEBUG;\r\n }",
"public boolean isDebug() {\n\t\treturn _debug;\n\t}",
"protected final boolean hasDebug() {\n return m_debug;\n }",
"public boolean getDebugMode() { return debugMode; }",
"@Override\n public boolean isDebug() {\n return BuildConfig.DEBUG;\n }",
"static boolean debug(Configuration conf) {\n return conf.getBoolean(DEBUG_FLAG, false);\n }",
"public boolean getDebugStatus() {\r\n return DEBUG;\r\n }",
"public static boolean debugOn()\r\n {\r\n on = true;\r\n System.out.println(\"Debug Mode On\");\r\n return on;\r\n }",
"public boolean isDebugEnabled() {\n return debugEnabled;\n }",
"public boolean isDebugged() {\r\n\t\treturn debugged;\r\n\t}",
"public boolean supportsDebugArgument();",
"protected boolean isDebugging() {\n\t\treturn debugging;\n\t}",
"public static boolean UnityAdsGetDebugMode() {\n Log.d(\"Unity cocos2dx Sample\", \"[UnityAds Demo] UnityAdsGetDebugMode\");\n return UnityAds.getDebugMode();\n }",
"@Override\n\tpublic boolean isDebugEnabled() {\n\t\treturn debugEnabled;\n\t}",
"public boolean getDebugMode()\n {\n return debugMode;\n }",
"public static final boolean isDebugInfo() { return true; }",
"public static void enableDebugging(){\n DEBUG = true;\n }",
"public boolean isDebugEnabled()\n/* */ {\n/* 250 */ return getLogger().isDebugEnabled();\n/* */ }",
"public static boolean debugging()\n {\n return info;\n }",
"public static boolean isDebuggable(Application app) {\n ApplicationInfo info = app.getApplicationInfo();\n return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;\n }",
"@Input\n public boolean isDebuggable() {\n return debug;\n }",
"@Override\n protected boolean isDebugEnable() {\n return false;\n }",
"private static void checkDebug() {\n try {\n if (Boolean.getBoolean(\"gfAgentDebug\")) {\n mx4j.log.Log.setDefaultPriority(mx4j.log.Logger.TRACE); // .DEBUG\n }\n } catch (VirtualMachineError err) {\n SystemFailure.initiateFailure(err);\n // If this ever returns, rethrow the error. We're poisoned\n // now, so don't let this thread continue.\n throw err;\n } catch (Throwable t) {\n // Whenever you catch Error or Throwable, you must also\n // catch VirtualMachineError (see above). However, there is\n // _still_ a possibility that you are dealing with a cascading\n // error condition, so you also need to check to see if the JVM\n // is still usable:\n SystemFailure.checkFailure();\n /* ignore */\n }\n }",
"public boolean isDisplayDebug() {\n return displayDebug;\n }",
"public final boolean isDebugOn()\n {\n return this.getPropertyValue(GUILoggerSeverityProperty.DEBUG);\n }",
"private void checkProductionMode() {\n if (getApplicationOrSystemProperty(SERVLET_PARAMETER_DEBUG, \"true\")\n .equals(\"false\")) {\n // \"Debug=true\" is the old way and should no longer be used\n productionMode = true;\n } else if (getApplicationOrSystemProperty(\n SERVLET_PARAMETER_PRODUCTION_MODE, \"false\").equals(\"true\")) {\n // \"productionMode=true\" is the real way to do it\n productionMode = true;\n }\n \n if (!productionMode) {\n /* Print an information/warning message about running in debug mode */\n // TODO Maybe we need a different message for portlets?\n logger.warning(NOT_PRODUCTION_MODE_INFO);\n }\n }",
"public boolean getDebug() {\n return debug;\n }",
"public boolean getDebug() {\n return debug;\n }",
"private static boolean development() {\n final String mode = mode();\n return \"dev\".equalsIgnoreCase(mode);\n }",
"public boolean isDebugEnabled() {\n return getFormat().getConverterService().isDebugEnabled();\n }",
"protected boolean isContinueDebug() {\n\t\treturn continueDebug;\n\t}",
"void setDebugEnabled(boolean value) {\r\n debug_enabled = value;\r\n }",
"public static boolean isDebugAccessible() {\r\n\t\treturn DEBUG_DEPENDENCY;\r\n\t}",
"public static boolean isDebugEnabled() {\n\n return debugLogger.isDebugEnabled();\n }",
"public void enableDebug() {\n this.debug = true;\n }",
"public static boolean isDebugging(final String trace) {\n return getDefault().isDebugging()\n && \"true\".equalsIgnoreCase(Platform.getDebugOption(trace)); //$NON-NLS-1$ \n }",
"static void debug() {\n ProcessRunnerImpl.setGlobalDebug(true);\n }",
"@Override\n\tpublic void setDebugMode(boolean debug) {\n\n\t}",
"@Override\n\tpublic void setDebug(boolean isDebug) {\n\t\t\n\t}",
"public static boolean debugOff()\r\n {\r\n on = false;\r\n System.out.println(\"Debug Mode Off\");\r\n return on;\r\n }",
"public boolean getDebug() {\n return this.debug;\n }",
"public boolean getDebug() {\n return this.debug;\n }",
"public void setDebug(boolean b) { debug = b; }",
"public void setDebugMode(final boolean dMode) { debugMode = dMode; }",
"@Override\n\tpublic boolean isDebugEnabled(Marker marker) {\n\t\treturn false;\n\t}",
"public void toggleDebug() {\n\t\tdebug = debug ? false : true;\n\t}",
"public void setDebugMode(boolean status)\n {\n debugMode = status;\n }",
"public void toggleDebugMode() {\r\n DEBUG = !DEBUG;\r\n }",
"public void continueDebugStep() {\n \tthis.continueDebug = true;\n }",
"public void setDebug(boolean value) {\n\t\tdebug = value;\n\t}",
"public static boolean canShowDebugMessage() {\r\n\t\treturn showDebugMessage;\r\n\t}",
"public boolean debug(Class<?> eventClass) {\n return debugGlobal?(debugPrivates.containsKey(eventClass)?debugPrivates.get(eventClass):defaultee(eventClass)):false;\n }",
"public static void setDebug(boolean d) {\n\t\tdebug = d;\n\t}",
"public void debug() {\n\n }",
"public static void disableDebugging(){\n DEBUG = false;\n }",
"public static void setDebugMode(boolean debugMode) {\n mDebug = debugMode;\n }",
"private static native boolean isDevelopmentMode()/*-{\n return typeof $wnd.__gwt_sdm !== 'undefined';\n }-*/;",
"public void setDebugMode(boolean debugMode)\r\n {\r\n this.debugMode = debugMode;\r\n }",
"public static boolean isDevEnv() {\n return (Boolean) Launch.blackboard.get(\"fml.deobfuscatedEnvironment\");\n }",
"public static void debug(boolean d) {\n D = d;\n }",
"@Override\n\tpublic void setDebugMode(int debugMode) {\n\n\t}",
"public void setDebug(boolean debug) {\n this.debug=debug;\n }",
"public void setDebugMode(boolean debugMode) {\n this.debugMode = debugMode;\n }",
"public static boolean debug(int keyCode, boolean debug) {\n if (keyCode == 32) { \n return !debug;\n } else {\n return debug;\n }\n\n }",
"public void setDebug(boolean debug) {\n this.debug = debug;\n }",
"public void setDebug(boolean debug) {\n this.debug = debug;\n }",
"static void debug(boolean b) {\n ProcessRunnerImpl.setGlobalDebug(b);\n }",
"public void setDebug(boolean f) {\n debug = f;\n }",
"public void setDebugEnabled(boolean debugEnabled) {\n this.debugEnabled = debugEnabled;\n }",
"public boolean isDojoDebug() {\n return mDojoDebug;\n }",
"public void setDebuggable(boolean debug) {\n this.debug = debug;\n }",
"public void debug() {\n\n\t\t// Establecemos el estado\n\t\tsetEstado(Estado.DEBUG);\n\n\t\t// Obtenemos la proxima tarea\n\t\ttarea = planificador.obtenerProximaTarea();\n\t}",
"public static void setDebug(boolean db) {\n\n\t\tdebug = db;\n\n\t}",
"@Property\n public native boolean isHandledWhileDebugging ();",
"public void setDebug(final boolean debug)\n {\n this.debug = debug;\n }",
"public boolean getSpecifyDebugCcl() {\n return specifyDebugCcl;\n }",
"public void setDebug(boolean debug) {\n\t\tthis._debug = debug;\n\t}",
"public void setDebug(boolean isDebug)\n {\n this.isDebug = isDebug;\n this.repaint();\n }",
"public void setDebugging(boolean on)\n\t{\n\t\t_options.setDebugging(on);\n\t}",
"public IRubyObject getDebug() {\n return debug ? trueObject : falseObject;\n }",
"public IRubyObject getDebug() {\n return debug ? trueObject : falseObject;\n }",
"public static void normalDebug(){\n enableVerbos = false;\n }",
"public static void setDebug(int b) {\n debug = b;\n }",
"void setDebug(boolean mode) {\n\t\tdebug = mode;\n\t}",
"public boolean hasDebugId() {\n return result.hasDebugId();\n }",
"void debug() {\n this.renderer.debug = !this.renderer.debug;\n reload();\n }",
"public void disableDebug() {\n this.debug = false;\n }"
] | [
"0.88283205",
"0.88283205",
"0.88074553",
"0.86922175",
"0.8675634",
"0.80166984",
"0.78616613",
"0.78171575",
"0.77558506",
"0.7738643",
"0.7708161",
"0.7708161",
"0.76542586",
"0.7634361",
"0.76322514",
"0.759718",
"0.7585189",
"0.75640535",
"0.7549845",
"0.7519374",
"0.7518812",
"0.7518213",
"0.7490723",
"0.74806696",
"0.74762374",
"0.74341244",
"0.74254906",
"0.7411428",
"0.7409999",
"0.73951507",
"0.73624706",
"0.73131096",
"0.731013",
"0.73077846",
"0.7295885",
"0.7288505",
"0.72568434",
"0.7243782",
"0.71671593",
"0.71647155",
"0.71647155",
"0.7159796",
"0.715039",
"0.71501774",
"0.71420944",
"0.71211606",
"0.711178",
"0.7063971",
"0.70494264",
"0.69897497",
"0.6978669",
"0.6971509",
"0.6959381",
"0.69568163",
"0.69568163",
"0.6934359",
"0.6923606",
"0.6880116",
"0.6857193",
"0.6837382",
"0.682526",
"0.6825175",
"0.6815014",
"0.67918026",
"0.67696345",
"0.6746036",
"0.6713864",
"0.67137074",
"0.6700565",
"0.6692826",
"0.66910195",
"0.6681435",
"0.66512257",
"0.6644427",
"0.6643096",
"0.6583155",
"0.6568097",
"0.6564146",
"0.6564146",
"0.65581346",
"0.6486759",
"0.6477902",
"0.64653134",
"0.6435678",
"0.64075845",
"0.6405581",
"0.63880527",
"0.6349063",
"0.6331924",
"0.63021874",
"0.630007",
"0.6284041",
"0.6281314",
"0.6281314",
"0.6254013",
"0.6240345",
"0.62348247",
"0.62281203",
"0.6224111",
"0.6196522"
] | 0.7593323 | 16 |
Check for main view shows more input in UI | public static boolean isTransactionUIShowMore(Context context) {
SharedPreferences preference=context.getSharedPreferences(AppSectionsConstant.Storage.PREFERENCE_CONF_SETTING, Context.MODE_PRIVATE);
boolean bTransactionUIShowMore=preference.getBoolean(KEY_TRANSACTIONUISHOWMORE, DEFAULT_VAL_TRANSACTIONUISHOWMORE);
return bTransactionUIShowMore;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void check_displaysInputOverlay() {\n onView(withId(R.id.voiceInput))\n .check(matches(isDisplayed()));\n // the permission overlay should not\n onView(withId(R.id.voicePermission))\n .check(doesNotExist());\n }",
"private void check_displaysListening() {\n onView(withId(R.id.title))\n .check(matches(withText(R.string.input_title_listening)));\n onView(withId(R.id.subtitle))\n .check(matches(withText(R.string.input_subtitle_listening)));\n // No hint should be visible\n onView(withId(R.id.hint))\n .check(matches(withEffectiveVisibility(ViewMatchers.Visibility.INVISIBLE)));\n }",
"private void check_displaysError() {\n onView(withId(R.id.title))\n .check(matches(withText(R.string.input_title_error)));\n onView(withId(R.id.subtitle))\n .check(matches(withText(R.string.input_subtitle_error)));\n\n // And the button to be labeled try again\n onView(withId(R.id.hint))\n .check(matches(isDisplayed()))\n .check(matches(withText(R.string.input_hint_error)));\n }",
"boolean isReadyForShowing();",
"private boolean hasInput(TextView numberInput) {\n return numberInput.getText().length() > 0;\n }",
"private boolean checkInput() {\n if (trackWindowSize.isSelected()) {\n inputSize = new int[] { 0, 0 };\n return true;\n }\n inputSize = null;\n int width, height;\n try {\n width = Integer.parseInt(widthInput.getText());\n }\n catch (NumberFormatException e) {\n error(I18n.tr(\"imagesizedialog.error.widthnotanumber\", widthInput.getText()));\n widthInput.selectAll();\n widthInput.requestFocus();\n return false;\n }\n try {\n height = Integer.parseInt(heightInput.getText());\n }\n catch (NumberFormatException e) {\n error(I18n.tr(\"imagesizedialog.error.heightnotanumber\", heightInput.getText())); \n heightInput.selectAll();\n heightInput.requestFocus();\n return false;\n }\n if (width < 10 || width > 5000) {\n error(I18n.tr(\"imagesizedialog.error.badwidth\", \"\"+width)); \n widthInput.selectAll();\n widthInput.requestFocus();\n return false;\n }\n else if (height < 10 || height > 5000) {\n error(I18n.tr(\"imagesizedialog.error.badheight\", \"\"+width)); \n heightInput.selectAll();\n heightInput.requestFocus();\n return false;\n }\n inputSize = new int[] { width, height };\n return true;\n }",
"private void isPopulateView() {\n if (!isPopulate) {\n llHeader.setVisibility(View.GONE);\n CoordinatorLayout.LayoutParams relativeParams = new CoordinatorLayout.LayoutParams(CoordinatorLayout.LayoutParams.MATCH_PARENT, CoordinatorLayout.LayoutParams.WRAP_CONTENT);\n relativeParams.setMargins(0, 0, 0, 0);\n rlMain.setLayoutParams(relativeParams);\n }\n }",
"private static boolean m36209e(View view) {\n return view == null || !view.isShown();\n }",
"boolean hasFeedPlaceholderView();",
"boolean isInview();",
"@Override\n public boolean isLearnMoreDisplayed() {\n\n setLogString(\"Check if Learn More is displayed\", true, CustomLogLevel.HIGH);\n return isDisplayed(getDriver(), By.cssSelector(\".help_icon.clickable\"), TINY_TIMEOUT);\n }",
"boolean hasClickView();",
"private void checkIfAtLogin(){\n checkIfIdDisplayed(R.id.login_main_view);\n checkIfIdDisplayed(R.id.username_text_input);\n checkIfIdDisplayed(R.id.password_text_input);\n checkIfIdDisplayed(R.id.login_button);\n }",
"boolean wasShownBefore(MultiViewElement element) {\n return shownElements.contains(element);\n }",
"private static boolean m36208d(View view) {\n return view != null && view.hasWindowFocus();\n }",
"private boolean isInTwoPaneMode() {\n\t\t\n Log.i(TAG, \"DailySelfieMainActivity.isInTwoPaneMode entered\");\n\n\t\treturn findViewById(R.id.selfie_list) != null;\n\t}",
"@Override\n public boolean isPromptAnswered() {\n return ((mSelectedIndex >= 0 && mSelectedIndex < mChoices.size()) || (mSelectedIndex >= 0 && mSelectedIndex < mChoices\n .size() + mCustomChoices.size()));\n }",
"public boolean canDisplay(){\n if(title.isEmpty() && body.isEmpty()){\n return false;\n }\n\n return true;\n }",
"boolean hasIsInputTo();",
"@Override\n public boolean isShown() {\n return super.isShown();\n }",
"private void checkIfEmpty() {\n\n if (emptyView != null && recyclerView.getAdapter() != null) {\n\n boolean emptyViewVisible = recyclerView.getAdapter().getItemCount() == 0;\n Log.d(Utility.LOG_TAG, \" Enabling empty view for list : No data found \" );\n emptyView.setVisibility(emptyViewVisible ? View.VISIBLE : View.GONE);\n recyclerView.setVisibility(emptyViewVisible ? View.GONE : View.VISIBLE);\n }\n }",
"private boolean checkMultiplePlaneEdit(){\r\n\t\tboolean flag=false;\r\n\t\tfor(UiAirplaneModel model:uiAirplaneModel.getAirplaneList()){\r\n\t\t\tif(model.isInputDisplayItem()){\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}",
"public boolean isTextShown() {\n return introText.getVisibility() == View.VISIBLE;\n }",
"private void checkSearchViewExists() {\n onView(withId(R.id.searchView)).check(matches(isDisplayed()));\n }",
"public boolean getMaximizeVisible() {\n checkWidget();\n return showMax;\n }",
"@Test\n public void checkInitialLayout(){\n\n onView(withId(R.id.lbsRBTN)).check(matches(isDisplayed()));\n onView(withId(R.id.kgsRBTN)).check(matches(isDisplayed()));\n onView(withId(R.id.maleRBTN)).check(matches(isDisplayed()));\n onView(withId(R.id.femaleRBTN)).check(matches(isDisplayed()));\n onView(withId(R.id.nextBTN)).check(matches(isDisplayed()));\n onView(withId(R.id.weightET)).check(matches(isDisplayed()));\n\n }",
"public boolean hasMoreChoices()\n\t{\n\t\treturn (queue.count() > 0);\n\n\t}",
"public final boolean mo5379l() {\n RecyclerView recyclerView = this.f9709b;\n return recyclerView != null && recyclerView.hasFocus();\n }",
"public void MonitorTextView()\n {\n TextView textview = (TextView) findViewById(R.id.textViewDelayLength);\n textview.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View v) {\n EditText editText = (EditText) findViewById(R.id.editTextMessageDelay);\n SeekBar seek = (SeekBar) findViewById(R.id.seekBarMessageDelay);\n if (editText.getVisibility() == View.GONE)\n {\n editText.setVisibility(View.VISIBLE);\n seek.setVisibility(View.GONE);\n }\n else if (editText.getVisibility() == View.VISIBLE)\n {\n editText.setVisibility(View.GONE);\n seek.setVisibility(View.VISIBLE);\n }\n }\n });\n }",
"@Override\n public void run() {\n if(body.getLineCount() < 4) {\n more.setVisibility(GONE);\n }\n body.setMaxLines(3);\n }",
"boolean hasDistanceView();",
"public boolean shouldShow()\n {\n Timestamp today = DateUtils.getToday();\n Timestamp lastHintTimestamp = prefs.getLastHintTimestamp();\n return (lastHintTimestamp.isOlderThan(today));\n }",
"boolean isContentDisplayed();",
"private boolean isCurrent(){\n return (getPageTitle().size() > 0);\n }",
"protected boolean shouldAddDisplayListener() {\n return true;\n }",
"private boolean more() {\n return regEx.length() > 0;\n }",
"private static boolean m36212h(View view) {\n return view.isShown() && ((double) view.getAlpha()) > 0.0d;\n }",
"private boolean eventInMainWindow(MouseEvent e) {\r\n\t\tPoint pt = e.getPoint();\r\n\t\treturn mainWindow.contains(pt) \r\n\t\t&& (!btnBuilding.down || !buildPanelRect.contains(pt))\r\n\t\t&& (!btnRadar.down || !radarPanelRect.contains(pt))\r\n\t\t&& (!btnBuildingInfo.down || !buildingInfoPanelRect.contains(pt))\r\n\t\t&& (!btnColonyInfo.test(pt)\r\n\t\t\t\t&& !btnPlanet.test(pt)\r\n\t\t\t\t&& !btnStarmap.test(pt)\r\n\t\t\t\t&& !btnBridge.test(pt)\r\n\t\t);\r\n\t}",
"private void setupMoreActionButton() {\n moreButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n InterfaceAction.startMoreActionButtonAnimation(moreButton);\n\n boolean isCurrentUserThePostCreator = Helper.isPrismUserCurrentUser(prismPost.getPrismUser());\n AlertDialog morePrismPostAlertDialog = InterfaceAction.createMorePrismPostAlertDialog(context, prismPost, isCurrentUserThePostCreator);\n morePrismPostAlertDialog.show();\n }\n });\n }",
"@Test\n public void checkAddMenuButtonPresent() {\n onView(withId(R.id.menu_add)).check(matches(isDisplayed()));\n }",
"boolean hasSearchTermView();",
"private boolean isInputValid(){\n boolean isUserInfoValid = userInfoCheck();\n boolean isProductInfoValid = productInfoCheck();\n ImageView iv_error_user_info = findViewById(R.id.iv_error_user_info);\n ImageView iv_error_product_info = findViewById(R.id.iv_error_product_info);\n if(!isUserInfoValid){\n iv_error_user_info.setVisibility(View.VISIBLE);\n }else{\n iv_error_user_info.setVisibility(View.INVISIBLE);\n }\n if (!isProductInfoValid){\n iv_error_product_info.setVisibility(View.VISIBLE);\n }else{\n iv_error_product_info.setVisibility(View.INVISIBLE);\n }\n\n return isUserInfoValid && isProductInfoValid;\n }",
"protected boolean hasPositiveButton() {\n return false;\n }",
"@Override\n public void show() {\n VisAQ.getInstance().userInput();\n }",
"public void onClick(View view) {\n if(Instruction.getText().length()>=0) {\n //do something\n\n }\n else {\n\n }\n\n }",
"public boolean reShowLayout(int flags) {\n if (mRootView != null) {\n hideOrShowSomeViews();\n setInputMode(flags);\n return true;\n }\n return false;\n }",
"private boolean hasValidLength()\n {\n final int length = mTextInputLayout.getText().length();\n return (length >= mMinLen && length <= mMaxLen);\n }",
"public boolean hasSelectionLimit()\n {\n return (this.getSelectionLimit() > 0L);\n }",
"public boolean isTargetVisible() {\n return getDouble(\"tv\") == 1;\n }",
"public boolean hasPokemonDisplay() {\n return pokemonDisplayBuilder_ != null || pokemonDisplay_ != null;\n }",
"protected void doCheckView() {\n // check the remotes first\n if (getAnnouncementRegistry() == null) {\n logger.info(\"announcementRegistry is null (will check view again later)\");\n return;\n }\n getAnnouncementRegistry().checkExpiredAnnouncements();\n }",
"private void updateViews() {\n String twtText = tweetInput.getText().toString();\n int elapsedLength = MAX_CHAR_COUNT - twtText.length();\n if (elapsedLength >= 0 && elapsedLength < MAX_CHAR_COUNT) {\n btnTweet.setEnabled(true);\n charCounter.setTextColor(getResources().getColor(COLOR_GRAY));\n } else {\n btnTweet.setEnabled(false);\n charCounter.setTextColor(getResources().getColor(COLOR_RED));\n }\n\n charCounter.setText(\"\" + elapsedLength);\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tif (addtoCompare2.getVisibility() == View.VISIBLE) {\r\n\t\t\t\t\tif (addtoCompare2.getText().toString().trim().length() > 2) {\r\n\t\t\t\t\t\tfetchSearchData(addtoCompare2.getText().toString()\r\n\t\t\t\t\t\t\t\t.trim());\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (addtoCompare.getVisibility() == View.VISIBLE) {\r\n\t\t\t\t\tif (addtoCompare.getText().toString().trim().length() > 2) {\r\n\t\t\t\t\t\tfetchSearchData(addtoCompare.getText().toString()\r\n\t\t\t\t\t\t\t\t.trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"@FXML\n\tprivate void MainEnterBt() throws IOException {\n\n\t\tmain.showSelectionPage(); // #1\n\n\t}",
"@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tString content = mEditTextContent.getText().toString();\n\t\t\t\tif (StringUtil.isEmpty(content)) {\n\t\t\t\t\ttv_send.setVisibility(View.GONE);\n\t\t\t\t\tmoreBtn.setVisibility(View.VISIBLE);\n\t\t\t\t} else {\n\t\t\t\t\ttv_send.setVisibility(View.VISIBLE);\n\t\t\t\t\tmoreBtn.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t}",
"@Override\n protected boolean isAppropriate() {\n return true; // always show\n }",
"public boolean isDisplayed() {\n return isValid() && (getLastSeen() > System.currentTimeMillis() - DAYS_30);\n }",
"@Override\n\tprotected boolean onMoreTouchUp(View moreView, int pullHeight) {\n\t\tif(pullHeight>moreView.getMeasuredHeight()){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean A0X(View view) {\n View view2;\n if (!(this instanceof AppBarLayout.BaseBehavior)) {\n return false;\n }\n WeakReference weakReference = ((AppBarLayout.BaseBehavior) this).A04;\n return weakReference == null || (view2 != null && view2.isShown() && !view2.canScrollVertically(-1));\n }",
"private boolean canViewOptions() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }",
"private boolean checkMultipleUnitEdit() {\r\n\t\tboolean flag=false;\r\n\t\tfor(UIUnitType model:uiUnitType.getUnitValueList()){\r\n\t\t\tif(model.isInputDisplayItem()){\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}",
"boolean isMore();",
"public boolean meetsMinimumLength(){\n\n return alg.meetsMinimumLength(input.getText().toString());\n }",
"private void processDisplayFlag(String size) {\r\n\t\tif (size.equals(\"all\") == true) {\r\n\t\t\tSystem.out.println(\"Now displaying all words.\");\r\n\t\t\tresults.setMaxResults(Results.ALL_WORDS);\r\n\t\t\treturn;\r\n\t\t} \r\n\t\ttry {\r\n\t\t\tint number = Integer.valueOf(size);\r\n\t\t\tif (number > 0) {\r\n\t\t\t\tSystem.out.format(\"Now displaying %d results%n\", number);\r\n\t\t\t\tresults.setMaxResults(number);\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.format(\"Invalid number: %d. Can't display zero or less words.%n\", number);\r\n\t\t\t\tprintHelp();\r\n\t\t\t}\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tSystem.out.format(\"Invalid number: %s%n\", size);\r\n\t\t\tprintHelp();\r\n\t\t}\r\n\t}",
"private boolean verifyObligedFields() {\n if(label.getText().toString().isEmpty() || label.getText().toString().equals(\"\"))\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.label_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(category.getSelectedItem().toString().isEmpty())\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.category_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(cost.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.cost_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(dateDue.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.date_due_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }",
"private boolean isScanResultShowing() {\n return getFragmentManager().findFragmentById(R.id.fragment_container) instanceof ScanResultFragment;\n }",
"public void onMainClick(){\r\n\t\tmyView.advanceToMain();\r\n\t}",
"@Test\n public void enterQueryString_showResults() {\n onView(withId(R.id.page_change_web_search_view)).check(matches(not(isDisplayed())));\n // Check recycler view is not visible at beginning\n onView(withId(R.id.web_search_list)).check(matches(not(isDisplayed())));\n\n // Enter search string and close the keyboard\n onView(allOf(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE),\n isAssignableFrom(EditText.class))).perform(typeText(mSearchQueryString), pressKey(66), closeSoftKeyboard());\n\n // Check if recycler view is visible\n onView(withId(R.id.web_search_list)).check(matches(isDisplayed()));\n // Check if page change view is visible\n onView(withId(R.id.page_change_web_search_view)).check(matches(isDisplayed()));\n }",
"@java.lang.Override\n public boolean hasInputsCount() {\n return inputsCount_ != null;\n }",
"private boolean shouldDisplayLoadoutsButton(MatchStats matchStats) {\n return matchStats.getMainPlayer().hasLoadouts();\n }",
"@Override\n\tpublic boolean isShowing() {\n\t\treturn false;\n\t}",
"public boolean isOutOfFocus() {\n\t\treturn isOutOfFocus;\n\t}",
"@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n switch (v.getId()) {\n case R.id.merchantET:\n if (_merchantET.getText().length() >= 30)\n Toast.makeText(getApplicationContext(), \"Please only input up to 30 characters.\",\n Toast.LENGTH_SHORT).show();\n return false;\n case R.id.descET:\n if (_descET.getText().length() >= 80)\n Toast.makeText(getApplicationContext(), \"Please only input up to 80 characters.\",\n Toast.LENGTH_SHORT).show();\n return false;\n }\n return false;\n }",
"private boolean isFirstTime() {\n SharedPreferences preferences = getActivity().getPreferences(MODE_PRIVATE);\n boolean ranBefore = preferences.getBoolean(\"RanBefore\", false);\n if (!ranBefore) {\n\n SharedPreferences.Editor editor = preferences.edit();\n editor.putBoolean(\"RanBefore\", true);\n editor.apply();\n mBind.topLayout.setVisibility(View.VISIBLE);\n mBind.topLayout.setOnTouchListener(new View.OnTouchListener() {\n\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n mBind.topLayout.setVisibility(View.INVISIBLE);\n return false;\n }\n\n });\n }\n return ranBefore;\n\n }",
"@FXML\n public void onEnter() {\n String userInput = inputField.getText();\n String response = duke.getResponse(userInput);\n lastCommandLabel.setText(response);\n ExpenseList expenseList = duke.expenseList;\n updateExpenseListView();\n inputField.clear();\n updateTotalSpentLabel();\n }",
"boolean isDisplay();",
"boolean isDisplay();",
"@Override\n\tpublic boolean updateView(View contentView) {\n\t\treturn false;\n\t}",
"private void pollInput() {\n\t\t// check to see if the w key is down\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\t\t\twKeyDown = true;\n\t\t} else\n\t\t\twKeyDown = false;\n\t\t// check to see if the a key is down\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n\t\t\taKeyDown = true;\n\t\t} else\n\t\t\taKeyDown = false;\n\t\t// check to see if the s key is down\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_S)) {\n\t\t\tsKeyDown = true;\n\t\t} else\n\t\t\tsKeyDown = false;\n\t\t// check to see if the d key is down\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n\t\t\tdKeyDown = true;\n\t\t} else\n\t\t\tdKeyDown = false;\n\t\t// check to see if the left mouse button is down\n\t\tif (Mouse.isButtonDown(0)) {\n\t\t\tmouseDown = true;\n\t\t} else\n\t\t\tmouseDown = false;\n\t\t// check to see if the F button is pressed and shows the shop screen if so\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_F)) {\n\t\t\tshowShopScreen();\n\t\t}\n\t\t// check to see if the esc button is pressed; if so, go to title screen\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) {\n\t\t\tshowTitleScreen();\n\t\t}\n\t}",
"public static boolean isShownOrQueued() {\n\treturn SnackbarMessage.mLastMessage != null && SnackbarMessage.mLastMessage.isShown();\n}",
"@Override\n public boolean canFinish() {\n IWizardPage page = getContainer().getCurrentPage();\n return super.canFinish() && page == getPages()[getPageCount()-1];\n }",
"private void isTwoPane() {\n FrameLayout fragmentItemDetail = (FrameLayout) findViewById(R.id.DetailFragment);\n if (fragmentItemDetail != null) {\n isTwoPane = true;\n }\n }",
"public MainView() {\n initComponents();\n addWindowListener(new AreYouSure());\n }",
"boolean hasInputConstraints();",
"@Override\n public void update() {\n if ((mLikesDialog != null) && (mLikesDialog.isVisible())) {\n return;\n }\n\n if ((mCommentariesDialog != null) && (mCommentariesDialog.isVisible())) {\n return;\n }\n\n if (!getUserVisibleHint()) {\n return;\n }\n\n updateUI();\n }",
"public void verifyUIElements(){\r\n\t\t\tisClickable(Txt_HomePage_Search);\r\n\t\t\tisClickable(Btn_HomePage_Search);\r\n\t\t}",
"private boolean check()\n\t{\n\t\tComponent[] comp = contentPanel.getComponents();\n\t\tint check=0;\n\t\tfor(Component c:comp)\n\t\t{\n\t\t\tif(c instanceof JTextField)\n\t\t\t{\n\t\t\t\tif(((JTextField)c).getText().trim().equals(\"\"))\n\t\t\t\t\tcheck++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\treturn check==0 ? true : false;\n\t}",
"public static void morecoupenShow() {\n if (coupenDialogContainer.getVisibility() == View.GONE) {\n coupenDialogContainer.setVisibility(View.VISIBLE);\n coupenDialogSelected.setVisibility(View.GONE);\n\n } else {\n coupenDialogContainer.setVisibility(View.GONE);\n coupenDialogSelected.setVisibility(View.VISIBLE);\n }\n\n\n }",
"public static void checkRepeatablefields() {\n\t\ttry {\n\t\t\tif (AndroidLocators.xpath(\"//*[@class='android.widget.LinearLayout']/android.widget.Button[@text='ADD']\")\n\t\t\t\t\t.isDisplayed()) {\n\t\t\t\tAndroidLocators.clickElementusingXPath(\"//*[@text='ADD']\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\" ---- Section fields form not found ---- \");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"private boolean isInputAllowed() {\n return entered && gameRenderer != null && gameRenderer.isDyingUnitAnimationCompleted() &&\n inGameContext != null && inGameContext.isActionCompleted() && inputAllowed && !blockAllInput;\n }",
"private boolean isLastView(int viewIndex){\r\n\t\treturn viewIndex == this.getChildCount() - 1;\r\n\t}",
"private boolean verifica(){\n if(et_nomeAddFamiliar.getText().length()>3 && spinnerParentesco.getSelectedItemPosition()>0){\n return true;\n }\n else return false;\n\n }",
"@Override\n public void onClick(View view) {\n\n if (l.getText().length()<1 && m.getText().length()<1 && n.getText().length()<1 && o.getText().length()<1 && p.getText().length()<1) {\n\n Toast toast3 = Toast.makeText(Main2Activity.this, \"Please Enter Valid Input\", Toast.LENGTH_LONG);\n toast3.show();\n\n }\n\n\n //If the content is correct returning back to the main screen\n else {\n startActivity(new Intent(Main2Activity.this, MainActivity.class));\n\n }\n\n }",
"public boolean hasMoreItems();",
"public int askPermitToGetBetweenVisible();",
"public boolean isDisplayed_txt_Pick_Up_Text(){\r\n\t\tif(txt_Pick_Up_Text.isDisplayed()) { return true; } else { return false;} \r\n\t}",
"protected boolean shouldUseActionsInsteadOfButtonBar() {\n DisplayMetrics metrics = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(metrics);\n\n return convertPxToDip(metrics.heightPixels) < 350;\n }",
"@Override\r\n public String[] getInputs() {\r\n // no inputs from this view it is the opening view that explains the game \r\n return null;\r\n }",
"boolean hasActiveView();",
"boolean hasDisplayKeywordView();",
"@FXML\n\tvoid mainMenuBtnClicked(ActionEvent event) {\n\t\t// if submitted before exam time ends ask the user if he sure of that\n\t\tif (flag1 && flag2) {\n\t\t\tAlert alert = new Alert(AlertType.CONFIRMATION);\n\t\t\talert.setTitle(\"Warning\");\n\t\t\talert.setHeaderText(\"Leaving the exam means you submitting a blank exam\");\n\t\t\talert.setContentText(\"Are you sure you want to do that?\");\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\tif (result.get() == ButtonType.OK) {\n\t\t\t\tsummbitBlank();\n\t\t\t\ttry {\n\t\t\t\t\tFXMLutil.swapScene(event, window.StudentMenu.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tFXMLutil.swapScene(event, window.StudentMenu.toString());\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.6476633",
"0.6189839",
"0.5902418",
"0.5889287",
"0.5830752",
"0.57727337",
"0.57635784",
"0.567869",
"0.55428886",
"0.5517354",
"0.54947245",
"0.54934794",
"0.5477504",
"0.5431252",
"0.54187584",
"0.5418394",
"0.5412022",
"0.53972256",
"0.5369837",
"0.5366812",
"0.5365212",
"0.5345793",
"0.53428894",
"0.53420794",
"0.532892",
"0.53252375",
"0.53052413",
"0.5298738",
"0.5298686",
"0.5290868",
"0.5277008",
"0.5276467",
"0.5264315",
"0.524735",
"0.5237223",
"0.52352047",
"0.5234116",
"0.5226364",
"0.52241826",
"0.5223908",
"0.5223464",
"0.5219663",
"0.52165824",
"0.52073216",
"0.5192401",
"0.51923925",
"0.5189593",
"0.5188399",
"0.5187706",
"0.5185796",
"0.51775956",
"0.5176509",
"0.5176221",
"0.5170939",
"0.51681465",
"0.5158507",
"0.51562744",
"0.51552707",
"0.51534164",
"0.5152236",
"0.51504034",
"0.515008",
"0.51493746",
"0.51318866",
"0.5125296",
"0.51202714",
"0.5120004",
"0.5119397",
"0.51169086",
"0.51164454",
"0.51160693",
"0.5104624",
"0.51019084",
"0.5101254",
"0.50961155",
"0.5094062",
"0.5094062",
"0.5092136",
"0.5087625",
"0.50801766",
"0.50767887",
"0.5075983",
"0.5075065",
"0.50749934",
"0.50726616",
"0.50712556",
"0.507072",
"0.5069981",
"0.50686187",
"0.506707",
"0.5065744",
"0.5059312",
"0.5054235",
"0.50515753",
"0.5039026",
"0.5035118",
"0.5030835",
"0.5030435",
"0.50283265",
"0.50238174",
"0.50237954"
] | 0.0 | -1 |
Set main view shows more input in UI | public void setTransactionUIShowMore(boolean flag) {
SharedPreferences preference=m_context.getSharedPreferences(AppSectionsConstant.Storage.PREFERENCE_CONF_SETTING, Context.MODE_PRIVATE);
preference.edit().putBoolean(KEY_TRANSACTIONUISHOWMORE, flag).commit();
refresh();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MainView() {\n initComponents();\n setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);\n }",
"public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }",
"@Override\n\tprotected void UpdateUI() {\n\t\tMaxFlowLevelDisplay(MaxFlowLevel);\n\t}",
"@Override\n public void show() {\n VisAQ.getInstance().userInput();\n }",
"@FXML\n\tprivate void MainEnterBt() throws IOException {\n\n\t\tmain.showSelectionPage(); // #1\n\n\t}",
"private void inputGridSize() {\n \ttest = new TextField();\n \ttest.setPrefSize(BUTTON_SIZE, TEXT_INPUT_BAR_HEIGHT);\n \tstartScreen.add(test, 2, 2);\n }",
"public void onMainClick(){\r\n\t\tmyView.advanceToMain();\r\n\t}",
"public InputView()\n\t{\n\t\tthis.layoutView();\n\t\tthis.registerButtons();\n\t}",
"@Override\n\tpublic void show() {\n\t\trefreshServerList();\n\t\t((InputMultiplexer)Gdx.input.getInputProcessor()).addProcessor(ui);\n\t}",
"protected void formMode() {\n\t\tif (mainLayout == null) {\n\t\t\tmainLayout = new DefaultVerticalLayout(false, true);\n\n\t\t\tText label = new Text(getTitle() == null ? \"\" : getTitle());\n\t\t\tmainLayout.add(label);\n\n\t\t\t// add the screen-specific content\n\t\t\tif (buildMainLayout != null) {\n\t\t\t\tbuildMainLayout.accept(mainLayout);\n\t\t\t}\n\t\t}\n\n\t\t// disable polling\n\t\tui.setPollInterval(-1);\n\t\tremoveAll();\n\t\tadd(mainLayout);\n\t\tif (afterFormModeEntered != null) {\n\t\t\tafterFormModeEntered.run();\n\t\t}\n\t}",
"public MainView() {\n initComponents();\n \n }",
"public void show(MainController mainController) {\n start(primaryStage);\n mainController.setSizeMessage();\n }",
"@Override \n protected void startup() {\n GretellaView view = new GretellaView(this);\n show( view );\n view.initView(); \n }",
"@Override\n public void run() {\n \n Admision main = new Admision();\n main.setExtendedState(MAXIMIZED_BOTH);\n main.setVisible(true);\n\n }",
"public frmMain() {\n initComponents();\n setExtendedState(MAXIMIZED_BOTH);\n }",
"private void userViewStep() {\n textUser.requestFocus();\n textUser.postDelayed(\n new Runnable() {\n public void run() {\n InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n inputMethodManager.showSoftInput(textUser, 0);\n }\n }, 200);\n EventBus.getDefault().postSticky(new EventOnboardingChanges(EventOnboardingChanges.ChangeType.REGISTER_CHANGE_TITLE, getResources().getString(R.string.tact_username_title)));\n }",
"public MainView() {\n initComponents();\n }",
"public MainView() {\n initComponents();\n }",
"protected void showViewContents() {\n\t\tnoData.heightHint = 0;\n\t\tyesData.heightHint = -1;\n\n\t\tnoData.exclude = true;\n\t\tyesData.exclude = false;\n\n\t\tnoLabel.setVisible(false);\n\t\tyesComposite.setVisible(true);\n\t\tredraw();\n\t}",
"public void initView() {\n setEllipsize(TruncateAt.MARQUEE);\n setSingleLine(true);\n setMarqueeRepeatLimit(-1);\n setFocusable(true);\n setFocusableInTouchMode(false);\n }",
"public ShowMain() {\n initComponents();\n this.tishi.setOpaque(false);\n this.tishi.setEditable(false);\n }",
"public MainView() {\n initComponents();\n addWindowListener(new AreYouSure());\n }",
"private void showMainMessageOnly()\n\t\t{\n\t\t\tint original_Width = parentFrame.getSize().width;\n\t\t\tremoveAll();\n\t\t\tdetailsButton.setText(\"Show details\");\n\t\t\tadd(mainPanel);\n\t\t\tsetSize(original_Width, this.getPreferredSize().height);\n\t\t}",
"@FXML\n private void showMenu(){\n Main.setPane(0);\n }",
"@Override protected void startup() {\n LoganoView main = new LoganoView(this);\n JFrame frame = main.getFrame();\n\n \n show(main);\n\n frame.setMinimumSize(new Dimension(800, 600));\n frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\n FrmLogin frmLogin = new FrmLogin();\n Helper.showForm(frmLogin);\n frmLogin.setLocationRelativeTo(frame);\n }",
"private void settings() {\n mainTitle = makeLabel(\"Settings\", true);\n add(mainTitle);\n add(content);\n add(diffSlider);\n add(colourChooser);\n add(mainB);//button to main menu\n diffSlider.requestFocus();\n }",
"public void configure(T aView)\n {\n aView.setMinSize(120,60);\n aView.addTab(\"One\", new BoxView());\n }",
"@Override\n public void run() {\n if(body.getLineCount() < 4) {\n more.setVisibility(GONE);\n }\n body.setMaxLines(3);\n }",
"private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}",
"@Override protected void startup() {\n show(new MIDLetParamsView(this));\n }",
"@Override\n\tpublic void InitView() {\n\t\t\n\t}",
"public void setupAndShow() {\n\t\t\tfMaxTextField.setText(BarGraphDisplayer.this.getMaxLabel());\n\t\t\tfMinTextField.setText(BarGraphDisplayer.this.getMinLabel());\n\t\t\tfMinTextField.selectAll();\n\t\t\tfMinTextField.requestFocus();\n\t\t\tthis.setVisible(true);\n\t\t}",
"void init() {\n setVisible(true);\n\n }",
"@Override\n\tprotected void initView() {\n\t\t\n\t}",
"@Override\n\tprotected void initView() {\n\t\t\n\t}",
"private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}",
"private void displayView() {\r\n\t\t/* Layout */\r\n\t\tmLayout = new StandardTitledLayout(this);\r\n\t\tmLayout.setTitle(getString(R.string.directory_searchView_title));\r\n\r\n\t\t//Add the little magnifying glass on the virtual keyboard\r\n\t\tmInputBar = new InputBarElement(this, null,getString(R.string.directory_searchView_hint));\r\n\t\t//and set what it does\r\n\t\tmInputBar.setImeOptions(EditorInfo.IME_ACTION_SEARCH);\r\n\t\tmInputBar.setOnEditorActionListener(new OnEditorActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\r\n\t\t\t\tif(actionId == EditorInfo.IME_ACTION_SEARCH){\r\n\t\t\t\t\tString query = mInputBar.getInputText();\r\n\t\t\t\t\tsearch(query);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmInputBar.setOnButtonClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tString query = mInputBar.getInputText();\r\n\t\t\t\tsearch(query);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmInputBar.setOnKeyPressedListener(new OnKeyPressedListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onKeyPressed(String text) {\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(mInputBar.getInputText().length() == 0){\r\n\t\t\t\t\tmInputBar.setButtonText(null);\r\n\t\t\t\t\tmAdapter = new ArrayAdapter<String>(getApplicationContext(), R.layout.sdk_list_entry, R.id.sdk_list_entry_text, new ArrayList<String>());\r\n\r\n\t\t\t\t\tmListView.setAdapter(mAdapter);\r\n\t\t\t\t\tmListView.invalidate();\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmInputBar.setButtonText(\"\");\r\n\t\t\t\t\tmController.getAutoCompleted(text);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmLayout.addFillerView(mInputBar);\r\n\t\tsetContentView(mLayout);\r\n\t\t\r\n\t\r\n\t}",
"@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}",
"@Override protected void startup() {\n show(new FFTView(this));\n }",
"public GUIView() {\n initComponents();\n setMaxThreads();\n setCountOfElements(1);\n setCountOfThreads(1);\n this.isReadyForCalculation = false;\n }",
"public seViewAnswerUI() {\n initComponents();\n }",
"private void setViews4Display() {\n nameView.setFocusable(false);\n nameView.setClickable(false);\n nameView.setInputType(InputType.TYPE_NULL);\n\n ageView.setFocusable(false);\n ageView.setClickable(false);\n ageView.setInputType(InputType.TYPE_NULL);\n\n phoneView.setFocusable(false);\n phoneView.setClickable(false);\n phoneView.setInputType(InputType.TYPE_NULL);\n\n workView.setFocusable(false);\n workView.setClickable(false);\n workView.setInputType(InputType.TYPE_NULL);\n\n emailView.setFocusable(false);\n emailView.setClickable(false);\n emailView.setInputType(InputType.TYPE_NULL);\n\n save.setVisibility(View.GONE);\n\n if (nameView.getText().toString().equals(\"\"))\n nameView.setVisibility(View.GONE);\n if (ageView.getText().toString().equals(\"\"))\n ageView.setVisibility(View.GONE);\n if (emailView.getText().toString().equals(\"\"))\n emailView.setVisibility(View.GONE);\n if (workView.getText().toString().equals(\"\"))\n workView.setVisibility(View.GONE);\n if (phoneView.getText().toString().equals(\"\"))\n phoneView.setVisibility(View.GONE);\n\n // check if user have past activities\n int childCount = past_activities.getChildCount();\n if (childCount == 1)\n past_activities.setVisibility(View.GONE);\n }",
"@Override protected void startup() {\n show(new FrontView());\n //show(new RestaurantManagementView(this));\n }",
"public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }",
"public MainView() {\r\n\t\tinitialize();\r\n\t}",
"private void setScene(int selected) {\n int y = 1;\n GridPane layout = new GridPane();\n layout.setPadding(new Insets(10, 10, 10, 10));\n HashMap<FieldName, TextField> input = new HashMap<>();\n\n Label source = new Label(\"Source:\");\n GridPane.setConstraints(source, 0, y);\n\n TextField setSource = new TextField(ref.getClass().getSimpleName());\n GridPane.setConstraints(setSource, 1, y++);\n setSource.setEditable(false);\n setSource.setDisable(true);\n\n Label required = new Label(\"Required fields\");\n required.getStyleClass().add(\"header\");\n GridPane.setConstraints(required, 0, y++);\n\n Label citkey = new Label(\"Citation key\");\n citkey.getStyleClass().add(\"header\");\n GridPane.setConstraints(citkey, 0, y);\n\n TextField citation = new TextField(ref.getCitationKey());\n GridPane.setConstraints(citation, 1, y++);\n citation.setEditable(false);\n citation.setDisable(true);\n\n for (FieldName fn : ref.getRequiredFields()) {\n y = createInputFields(fn, y, layout, input);\n }\n\n Label alternative = new Label(\"Alternative fields\");\n alternative.getStyleClass().add(\"header\");\n GridPane.setConstraints(alternative, 0, y++);\n\n for (FieldName fn : ref.getAlternativeFields()) {\n y = createInputFields(fn, y, layout, input);\n }\n\n Label optional = new Label(\"Optional fields\");\n optional.getStyleClass().add(\"header\");\n GridPane.setConstraints(optional, 0, y++);\n\n for (FieldName fn : ref.getOptionalFields()) {\n y = createInputFields(fn, y, layout, input);\n }\n\n Label tags = new Label(\"Tags\");\n tags.getStyleClass().add(\"header\");\n GridPane.setConstraints(tags, 0, y);\n\n TextField tagwords = new TextField(ref.getTags().replace(',', ' '));\n GridPane.setConstraints(tagwords, 1, y++);\n\n Label taginfo = new Label(\"Tags are keywords separated by whitespace.\");\n taginfo.getStyleClass().add(\"label\");\n GridPane.setRowIndex(taginfo, y++);\n GridPane.setColumnSpan(taginfo, 2);\n \n Button close = new Button(\"Cancel\");\n GridPane.setConstraints(close, 0, y);\n close.setOnAction(e -> window.close());\n\n Button edit = new Button(\"Save changes\");\n GridPane.setConstraints(edit, 1, y++);\n edit.setOnAction(e -> {\n if (validator.validateInput(input, citation, ref)) {\n if (validator.checkTagField(tagwords.getText())) {\n ref.setTags(tagwords.getText());\n App.getLogic().edit(ref);\n validator.getAlertGenerator().alert(\"Confirmation\", \"Reference has been saved.\");\n App.getGUI().setScene();\n window.close();\n App.getGUI().setScene();\n }\n }\n //validator.getAlertGenerator().alert(\"Confirmation\", \"Reference has been saved.\");\n// App.getGUI().setScene();\n// window.close();\n// App.getGUI().setScene();\n });\n\n layout.getChildren().addAll(source, setSource, close, edit, optional, required, citkey, citation, tags, tagwords, taginfo);\n if (!ref.getAlternativeFields().isEmpty()) {\n layout.getChildren().add(alternative);\n }\n layout.setVgap(8);\n layout.setHgap(10);\n layout.setPadding(new Insets(10, 10, 10, 10));\n\n Scene scene = new Scene(layout, 400, y * 35);\n scene.getStylesheets().add(\"style.css\");\n window.setResizable(false);\n window.setScene(scene);\n window.show();\n }",
"protected void setupUI() {\n\t\t\n\t\tcontentPane = new JPanel();\n\t\tlayerLayout = new CardLayout();\n\t\tcontentPane.setLayout(layerLayout);\n\t\tControlAgendaViewPanel agendaViewPanel = new ControlAgendaViewPanel(layerLayout,contentPane);\n\t\tagendaPanelFactory = new AgendaPanelFactory();\n\t\tdayView = agendaPanelFactory.getAgendaView(ActiveView.DAY_VIEW);\n\t\tweekView = agendaPanelFactory.getAgendaView(ActiveView.WEEK_VIEW);\n\t\tmonthView = agendaPanelFactory.getAgendaView(ActiveView.MONTH_VIEW);\n\t\t\n\t\tcontentPane.add(dayView,ActiveView.DAY_VIEW.name());\n\t\tcontentPane.add(weekView,ActiveView.WEEK_VIEW.name());\n\t\tcontentPane.add(monthView,ActiveView.MONTH_VIEW.name());\n\t\n\t\tJSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,agendaViewPanel, contentPane);\n\t\tthis.setContentPane(splitPane);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\t\n\t\t//MENU\n\t\tJMenu file, edit, help, view;\n\t\t\n\t\t//ITEM DE MENU\n\t\tJMenuItem load, quit, save;\n\t\tJMenuItem display, about;\n\t\tJMenuItem month, week, day;\n\t\t\n\t\t/* File Menu */\n\t\t/** EX4 : MENU : UTILISER L'AIDE FOURNIE DANS LE TP**/\n\t\t//Classe pour les listener des parties non implémentés\n\t\tclass MsgError implements ActionListener {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t//Menu File\t\n\t\tfile = new JMenu(ApplicationSession.instance().getString(\"file\"));\n\t\t\n\t\tmenuBar.add(file);\n\t\tfile.setMnemonic(KeyEvent.VK_A);\n\t\tfile.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(file);\n\t\t\n\n\t\t//a group of JMenuItems\n\t\tload = new JMenuItem(ApplicationSession.instance().getString(\"load\"),KeyEvent.VK_T);\n\t\tload.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tload.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(load);\n\t\tload.addActionListener(new MsgError());\n\t\t\n\t\tquit = new JMenuItem(ApplicationSession.instance().getString(\"quit\"),KeyEvent.VK_T);\n\t\tquit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tquit.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(quit);\n\t\t\n\t\t//LISTENER QUIT\n\t\tquit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\t//message box yes/no pour le bouton quitter\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsave = new JMenuItem(new String(ApplicationSession.instance().getString(\"save\")),KeyEvent.VK_T);\n\t\tsave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tsave.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(save);\n\t\tsave.addActionListener(new MsgError());\n\t\t\n\t\t\n\t//Menu Edit \n\t\tedit = new JMenu(new String(ApplicationSession.instance().getString(\"edit\")));\n\t\t\n\t\tmenuBar.add(edit);\n\t\tedit.setMnemonic(KeyEvent.VK_A);\n\t\tedit.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\t\n\t\t//Sous menu View\n\t\t\n\t\tview = new JMenu(new String(ApplicationSession.instance().getString(\"view\")));\n\t\tview.setMnemonic(KeyEvent.VK_A);\n\t\tview.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tedit.add(view);\n\t\t\n\t\tmonth = new JMenuItem(new String(ApplicationSession.instance().getString(\"month\")),KeyEvent.VK_T);\n\t\tmonth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmonth.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(month);\n\t\t\t\t\n\t\tweek = new JMenuItem(new String(ApplicationSession.instance().getString(\"week\")),KeyEvent.VK_T);\n\t\tweek.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tweek.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(week);\n\t\t\n\t\tday = new JMenuItem(new String(ApplicationSession.instance().getString(\"day\")),KeyEvent.VK_T);\n\t\tday.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tday.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(day);\n\t\t\n\t\t//LISTENER VIEW\n\t\t\n\t\t\n\t\tmonth.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.last(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tweek.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\tlayerLayout.next(contentPane);\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\tday.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t//Menu Help\n\t\thelp = new JMenu(new String(ApplicationSession.instance().getString(\"help\")));\n\t\t\n\t\tmenuBar.add(help);\n\t\thelp.setMnemonic(KeyEvent.VK_A);\n\t\thelp.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(help);\n\t\t\n\t\tdisplay = new JMenuItem(new String(ApplicationSession.instance().getString(\"display\")),KeyEvent.VK_T);\n\t\tdisplay.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tdisplay.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(display);\n\t\tdisplay.addActionListener(new MsgError());\n\t\t\n\t\tabout = new JMenuItem(new String(ApplicationSession.instance().getString(\"about\")),KeyEvent.VK_T);\n\t\tabout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tabout.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(about);\n\t\tabout.addActionListener(new MsgError());\n\t\t\n\t\t\n\n\t\tthis.setJMenuBar(menuBar);\n\t\tthis.pack();\n\t\tlayerLayout.next(contentPane);\n\t}",
"private void setupMoreActionButton() {\n moreButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n InterfaceAction.startMoreActionButtonAnimation(moreButton);\n\n boolean isCurrentUserThePostCreator = Helper.isPrismUserCurrentUser(prismPost.getPrismUser());\n AlertDialog morePrismPostAlertDialog = InterfaceAction.createMorePrismPostAlertDialog(context, prismPost, isCurrentUserThePostCreator);\n morePrismPostAlertDialog.show();\n }\n });\n }",
"@Override\n\tprotected void initContentView() {\n\t\t\n\t}",
"public mainUI() {\n initComponents();\n }",
"public void showInstructionsPanel()\n {\n setWidgetAsExample(introPanel);\n }",
"public ShowView() {\n\t\tsuper(null);\n\t\tcreateActions();\n\t\taddToolBar(SWT.FLAT | SWT.WRAP);\n\t\taddMenuBar();\n\t\taddStatusLine();\n\t}",
"public void routetopage() {\n this.setVisible(true);\n }",
"@Override\n\tpublic void initView() {\n\t\t\n\t}",
"@Override\n protected void initView() {\n }",
"@Override\n protected void initView() {\n }",
"@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}",
"public void configureGallery(T aView)\n {\n aView.setColCount(12); aView.setPromptText(\"TextField\");\n }",
"private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(2, 2, new Insets(30, 30, 30, 30), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n mainPanel.add(scrollPane1, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n chatPane = new JTextPane();\n chatPane.setText(\"\");\n scrollPane1.setViewportView(chatPane);\n chatField = new JTextField();\n mainPanel.add(chatField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n sendButton = new JButton();\n sendButton.setText(\"Send\");\n mainPanel.add(sendButton, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"private void refreshView(){\n\t\tMain.scroll.setViewportView(container);\n\t\t// setez scrollul jos\n\t\tMain.scroll.getVerticalScrollBar().setValue(Main.scroll.getVerticalScrollBar().getMaximum());\n\t}",
"@Override\n\tprotected void initView()\n\t{\n\n\t}",
"public viewDos() {\n initComponents();\n setTexFieldInList();\n controller= new Controller();\n this.setVisible(true);\n }",
"@Override\n\tprotected void UpdateUI() {\n\t\tFineModulationDisplay(FineModulation);\n\t\tAutoGreaseDisplay(AutoGrease);\n\t\tQuickcouplerDisplay(Quickcoupler);\n\t\tRideControlDisplay(RideControl);\n\t\tBeaconLampDisplay(BeaconLamp);\n\t\tMirrorHeatDisplay(MirrorHeat);\n//\t\tFNKeyDisplay(ParentActivity.LockEntertainment);\n\t}",
"@FXML\n\tprivate void initialize() {\n\t\t// make field displaying flesch score read-only\n\t\tfleschField.setEditable(false);\n\n\t\t// launch = new LaunchClass();\n\n\t\t// instantiate and add custom text area\n\t\tspelling.Dictionary dic = LaunchClass.getDictionary();\n\t\ttextBox = new AutoSpellingTextArea(LaunchClass.getAutoComplete(), LaunchClass.getSpellingSuggest(dic), dic);\n\t\ttextBox.setPrefSize(570, 492);\n\t\ttextBox.setStyle(\"-fx-font-size: 14px\");\n\t\ttextBox.setWrapText(true);\n\n\t\t// add text area as first child of left VBox\n\t\tObservableList<Node> nodeList = lowPane.getChildren();\n\t\tNode firstChild = nodeList.get(0);\n\t\tnodeList.set(0, textBox);\n\t\tnodeList.add(firstChild);\n\n\t\tVBox.setVgrow(textBox, Priority.ALWAYS);\n\t}",
"private void settings() {\n\t\tthis.setVisible(true);\n\t\tthis.setSize(800,200);\n\t}",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"private void displayGUI()\n {\n SpringLayout springLayout = new SpringLayout();\n setLayout(springLayout);\n\n displayTextAreas(springLayout);\n displayButtons(springLayout);\n displayLabels(springLayout);\n displayTables(springLayout);\n //displaySelectedQuestion();\n }",
"@Override\n\tprotected void iniView() {\n\t\ttxtHead = (TextView) findViewById(R.id.txtHead);\n\t\timgBack = (ImageView) findViewById(R.id.img_left);\n\n\t\ttxtHead.setText(\"回复列表\");\n\t\tlistview = (ListView) findViewById(R.id.listview_postlist);\n\t}",
"public FrmMainVIEW() {\n initComponents();\n }",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"public void start() {\r\n view.addListener(this);\r\n view.makeVisible();\r\n view.display();\r\n }",
"public void mostrar() {\n\t\tlimpiarCampos();\n\t\tthis.setVisible(true);\n\t}",
"@Override\n\tprotected void setView() {\n\t\tsetContentView(R.layout.activity_main);\n\t}",
"private void buildUpGUI() {\n\t\tsetLayout( new BorderLayout() );\n\t\tadd(new JScrollPane( summaryEditorPane) );\n\t}",
"@Override\n public void initView() {\n }",
"private void editorstart(int inputType) {\n canCompose = false;\n enterAsLineBreak = false;\n\n switch (inputType & InputType.TYPE_MASK_CLASS) {\n case InputType.TYPE_CLASS_TEXT:\n canCompose = true;\n int variation = inputType & InputType.TYPE_MASK_VARIATION;\n if (variation == InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE) {\n // Make enter-key as line-breaks for messaging.\n enterAsLineBreak = true;\n }\n break;\n }\n Rime.get();\n // Select a keyboard based on the input type of the editing field.\n mKeyboardSwitch.init(getMaxWidth()); //橫豎屏切換時重置鍵盤\n // mKeyboardSwitch.onStartInput(inputType);\n //setCandidatesViewShown(true);\n //escape();\n if (!onEvaluateInputViewShown()) setCandidatesViewShown(canCompose && !Rime.isEmpty()); //實體鍵盤\n if (display_tray_icon) showStatusIcon(R.drawable.status); //狀態欄圖標\n }",
"@Override\n\tpublic void showContents() {\n\t\tprogram.add(returnToMain);\n\t\tprogram.add(congratMessage);\n\t\tprogram.setBackground(Color.DARK_GRAY);\n\t\t\n\t}",
"public AdminMainView() {\n initComponents();\n setComponent(new SearchEmployeeView(), mainPanel);\n }",
"private void initView() {\n\n SwingUtilities.invokeLater(() -> {\n view = new MainWindow();\n view.setMinimumSize(new Dimension(1080, 720));\n view.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n view.setVisible(true);\n view.aboutListener(actionEvent -> showAboutDialog());\n view.helpListener(actionEvent -> showHelpDialog());\n view.addComboBox(comboBox);\n\n });\n\n }",
"public App() {\n \n initComponents();\n if(Data.nnn==1)\n {\n jPanel11.setVisible(false);\n jPanel12.setVisible(true);\n }\n else\n {\n jPanel11.setVisible(true);\n jPanel12.setVisible(false);\n }\n setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH);\n DefaultListModel model2 = new DefaultListModel();\n for(int i=Data.hist.size()-1;i>=0;i--)\n {\n\n model2.addElement(Data.hist.get(i));\n\n }\n History.setModel(model2);\n DefaultListModel model = new DefaultListModel();\n \n for(int i=0;i<Data.dict.size();i++)\n {\n model.addElement(Data.dict.get(i).word);\n\n }\n \n\n List.setModel(model);\n String x=Integer.toString(Data.nnn);\n truycap.setText(x);\n }",
"private void ini_TabMainView()\r\n\t{\r\n\r\n\t\tif (splashEndTime > System.currentTimeMillis()) return;\r\n\r\n\t\tLogger.DEBUG(\"ini_TabMainView\");\r\n\t\tGL.that.removeRenderView(this);\r\n\t\t((GdxGame) GL.that).switchToMainView();\r\n\r\n\t\tGL.setIsInitial();\r\n\t}",
"public ManipularView() {\n initComponents();\n }",
"@Override\r\n\tprotected void initView() {\n\t\tsetSingleLine(true);\r\n\t\tsetWillNotDraw(false);\r\n\t}",
"@FXML\n public void IngredAddBtnClicked(){\n subMenuDisplay(IngredientsSubMenu);\n IngredientsAddPane.toFront();\n MenuPane.toFront();\n }",
"public void setUpView() {\n\n\n\t\t//Make the components\n\t\tinputAnswer = new Button(\"Submit\");\n\t\tbegin\t\t= new Button(\"Begin level \" + gameLevel);\n\t\tblueButt\t= new Button();\n\t\tredButt = new Button();\n\t\tgreenButt = new Button();\n\t\tyellowButt = new Button();\n\t\tclear = new Button(\"Clear\");\n\t\tguessArea = new TextArea();\n\t\ttopPan = new Panel();\n\t\tinstructLab = new Label(\"Welcome to the great guessing game. Try and finish it, its fun honest!\");\n\t\treset = new Button(\"Start again?\");\n\t\tpointsLab = new Label(\"Points: \" + points);\n\t\t\n\t\t//Change the font\n\t\tFont font = new Font(\"Verdana\", Font.BOLD, 18);\n\t\tinstructLab.setFont(font);\n\t\t\n\t\t//Add the label to the top panel\n\t\ttopPan.add(instructLab);\n\t\t\n\t\t//Set layout\n\t\tsetLayout(new MigLayout());\n\t\n\t\t//Set the size of the components\n\t\tblueButt.setPreferredSize (new Dimension(60, 50));\n\t\tredButt.setPreferredSize (new Dimension(60, 50));\n\t\tgreenButt.setPreferredSize (new Dimension(60, 50));\n\t\tyellowButt.setPreferredSize(new Dimension(60, 50));\n\t\tguessArea.setPreferredSize (new Dimension(50, 10));\n\t\tpointsLab.setPreferredSize (new Dimension(100, 30));\n\t\t\n\t\t//Turn the submit button of until there is something to submit\n\t\tinputAnswer.setEnabled(false);\n\n\t\t//Set the button colour\n\t\tblueButt.setBackground (Color.blue);\n\t\tredButt.setBackground (Color.red);\n\t\tgreenButt.setBackground (Color.green);\n\t\tyellowButt.setBackground(Color.yellow);\n\t\t\n\t\t//Hide the reset button until it is needed\n\t\treset.setVisible(false);\n\n\t\t//Add the components to the applet\n\t\tadd(topPan, \"wrap\");\n\t\tadd(redButt, \"cell 0 1\");\n\t\tadd(blueButt, \"cell 0 1\");\t\t\n\t\tadd(greenButt, \"cell 0 1\");\n\t\tadd(yellowButt, \"cell 0 1\");\n\t\tadd(begin, \"wrap\");\n\t\tadd(guessArea, \"wrap\");\n\t\tadd(inputAnswer,\"split 2\");\t\n\t\tadd(clear, \"gap left 340, cell 0 2, wrap\");\n\t\tadd(reset, \t\t\"wrap\");\n\t\tadd(pointsLab);\n\n\n\n\t\t//If the status bar is present show the user there level\n\t\tshowStatus(\"You are on level: \" + gameLevel);\n\n\n\t\t//Set the size of the applet\n\t\tsetSize(new Dimension(1000, 1000));\n\n\t}",
"public OrdemCorteVIEW() {\n initComponents();\n setDefaultCloseOperation(ProdutoVIEW.HIDE_ON_CLOSE);\n setExtendedState(MAXIMIZED_BOTH);\n }",
"@Override\r\n\tpublic void createContents(Panel mainPanel) {\n\t\t\r\n\t\t\r\nsetTitle(\"¿Dónde invierto?\");\r\n\t\t\r\n\t\tmainPanel.setLayout(new VerticalLayout());\r\n\t\tnew Label(mainPanel).setText(\"Menú Principal\").setFontSize(15).setForeground(Color.RED);\r\n\t\tnew Label(mainPanel).setText(\"Seleccionar la opción deseada\").setFontSize(13).setForeground(Color.BLACK);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Carga Correcta de las Empresas!\").setFontSize(9).setForeground(Color.GREEN).bindVisibleToProperty(\"bloq\");\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Mostrar el valor de una cuenta predefinida\");\r\n\t\tButton bot_MostrarCuentas= new Button(mainPanel);\r\n\t\t\r\n\t\tbot_MostrarCuentas.setCaption(\"Mostrar valores de la Empresa\");//.bindEnabledToProperty(\"bloq\");\r\n\t\tbot_MostrarCuentas.onClick(() -> new mostrarValoresDeEmpresas(this,new mostrarValoresDeEmpresasViewModel()).open());\r\n\t\t\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Crear un nuevo indicador\");\r\n\t\tnew Button(mainPanel).setCaption(\"Escribir formula\").onClick(() -> new crearIndicadores(this,new crearIndicadoresViewModel()).open());\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Menu de Metodologias\");\r\n\t\t\r\n\t\tPanel parte1 =new Panel(mainPanel);\r\n\t\tparte1.setLayout(new ColumnLayout(2));\t\r\n\t\tButton bot_evaluarEmpresas= new Button(parte1);\r\n\t\tbot_evaluarEmpresas.setCaption(\"Evaluar una empresa\");\r\n\t\tbot_evaluarEmpresas.setWidth(125);\r\n\t\tbot_evaluarEmpresas.onClick(() -> new evaluarEmpresas(this, new evaluarEmpresasViewModel()).open());\r\n\t\r\n\t\tButton bot_configurarMetodologia= new Button(parte1);\r\n\t\tbot_configurarMetodologia.setCaption(\"Crear Metodologia\");\r\n\t\tbot_configurarMetodologia.setWidth(125);\r\n\t\tbot_configurarMetodologia.onClick(() ->crearNuevaMetodologia());\t\r\n\t\t\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t/*\tnew Label(mainPanel).setText(\"Importar/Exportar archivos\");\r\n\t\t\r\n\t\tButton bot_impExpArchivos = new Button(mainPanel);\r\n\t\tbot_impExpArchivos.setCaption(\"Importar Archivos o exportar\");\r\n\t\tbot_impExpArchivos.setWidth(125);\r\n\t\tbot_impExpArchivos.onClick(() -> new importarExportarArchivos(this, new importarExportarArchivosViewModel()).open());\r\n\t\t\r\n\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\"Desde aca abajo vuela todo y va a otra ventana \\\\|/\").setFontSize(8);\r\n\t */\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Cargar un archivo de empresas\");\r\n\t\tPanel panel2 = new Panel(mainPanel);\r\n\t\tpanel2.setLayout(new ColumnLayout(2));\r\n\t\t\r\n\t\tFileSelector fileSelector = new FileSelector(panel2);\r\n\t\tfileSelector.extensions(\"*.txt\");\r\n\t\tfileSelector.setCaption(\"Seleccionar archivo\");\r\n\t\tfileSelector.setWidth(125);\r\n\t\tfileSelector.bindValueToProperty(\"rutaArchivo\");\r\n\t\tfileSelector.onClick(() -> this.cargarArchivo());\r\n\t\t\r\n\t\tnew TextBox(panel2).setWidth(125).bindValueToProperty(\"rutaArchivo\");\r\n\t\t\r\n\t\t\r\n\t\tnew Button(mainPanel).setCaption(\"Procesar archivo\").onClick(() -> this.cargarArchivo());\r\n\r\n\t\tIOs.leerIndicadoresDeArchivo(\"archivoIndicadores.txt\");\r\n\t\t\r\n\t\tRepositorioDeEmpresas.traerEmpresasDeLaDB();\r\n\t}",
"public InputManager(){\n this.view = new View();\n }",
"@Override\n public void initView() {\n\n }",
"@Override protected void startup() {\n BlaiseGraphicsTestFrameView view = new BlaiseGraphicsTestFrameView(this);\n canvas1 = view.canvas1;\n root1 = view.canvas1.getGraphicRoot();\n canvas1.setSelectionEnabled(true);\n show(view);\n }",
"public void begin() {\n\t\tview.setVisible(true);\n\t}",
"public void setupUI(View view) {\n if (!(view instanceof EditText)) {\n\n view.setOnTouchListener(new View.OnTouchListener() {\n\n public boolean onTouch(View v, MotionEvent event) {\n Utility.hideSoftKeyboard(getActivity());\n return false;\n }\n\n });\n }\n //If a layout container, iterate over children and seed recursion.\n if (view instanceof ViewGroup) {\n for (int i = 0; i < ((ViewGroup) view).getChildCount(); i++) {\n View innerView = ((ViewGroup) view).getChildAt(i);\n setupUI(innerView);\n }\n }\n }",
"public void mainMenu(View view) {\n\t\t\n\t\t// Temporary save if any changes are made, so we can display\n\t\t// to the user later.\n\t\tLockedDocument mlocked = mObjects.getLockedDoc();\n\t\tif (mlocked != null) {\n\t\t\tmlocked.setTitle(text1.getText().toString());\n\t\t\tmlocked.setContents(text2.getText().toString());\n\t\t}\n \tIntent intent = new Intent().setClass(this, CollaboratorAndroidActivity.class);\n \tstartActivity(intent);\n }",
"@Override\n\tpublic void show()\n\t{\n\t\tGdx.input.setInputProcessor(this);\n\t}",
"@Override\r\n public void updateUI() {\r\n }",
"protected void updateUi() {\n final boolean canInput = mSaveAndFinishWorker == null;\n byte[] password = LockPatternUtils.charSequenceToByteArray(mPasswordEntry.getText());\n final int length = password.length;\n if (mUiStage == Stage.Introduction) {\n mPasswordRestrictionView.setVisibility(View.VISIBLE);\n final int errorCode = validatePassword(password);\n String[] messages = convertErrorCodeToMessages(errorCode);\n // Update the fulfillment of requirements.\n mPasswordRequirementAdapter.setRequirements(messages);\n // Enable/Disable the next button accordingly.\n setNextEnabled(errorCode == NO_ERROR);\n } else {\n // Hide password requirement view when we are just asking user to confirm the pw.\n mPasswordRestrictionView.setVisibility(View.GONE);\n setHeaderText(getString(mUiStage.getHint(mIsAlphaMode, getStageType())));\n setNextEnabled(canInput && length >= mPasswordMinLength);\n mSkipOrClearButton.setVisibility(toVisibility(canInput && length > 0));\n }\n int message = mUiStage.getMessage(mIsAlphaMode, getStageType());\n if (message != 0) {\n mMessage.setVisibility(View.VISIBLE);\n mMessage.setText(message);\n } else {\n mMessage.setVisibility(View.INVISIBLE);\n }\n\n setNextText(mUiStage.buttonText);\n mPasswordEntryInputDisabler.setInputEnabled(canInput);\n Arrays.fill(password, (byte) 0);\n }",
"public mainGUI() {\n initComponents();\n setSize(Toolkit.getDefaultToolkit().getScreenSize());\n }",
"public void setupUI(View view) {\n if (!(view instanceof EditText)) {\n view.setOnTouchListener(new View.OnTouchListener() {\n public boolean onTouch(View v, MotionEvent event) {\n hideSoftKeyboard(MainActivity.this);\n return false;\n }\n });\n }\n\n //If a layout container, iterate over children and seed recursion.\n if (view instanceof ViewGroup) {\n for (int i = 0; i < ((ViewGroup) view).getChildCount(); i++) {\n View innerView = ((ViewGroup) view).getChildAt(i);\n setupUI(innerView);\n }\n }\n }"
] | [
"0.642435",
"0.6253375",
"0.6154774",
"0.60829514",
"0.6043522",
"0.5936435",
"0.5899442",
"0.58606803",
"0.5852747",
"0.58411205",
"0.58391213",
"0.5800069",
"0.57918763",
"0.5755236",
"0.57483304",
"0.5744165",
"0.57001793",
"0.57001793",
"0.5697534",
"0.5696304",
"0.5694056",
"0.56875443",
"0.56775266",
"0.5668927",
"0.5653782",
"0.5653745",
"0.5645177",
"0.5638426",
"0.5635157",
"0.5632006",
"0.56233263",
"0.56085587",
"0.56030643",
"0.55976486",
"0.55976486",
"0.55908346",
"0.55846524",
"0.55824894",
"0.55824894",
"0.5579269",
"0.5573124",
"0.5566212",
"0.5565523",
"0.55607224",
"0.5556329",
"0.55550843",
"0.55502117",
"0.5541714",
"0.55212384",
"0.5517768",
"0.55145746",
"0.55097884",
"0.55095",
"0.55070007",
"0.5497166",
"0.5491145",
"0.5491145",
"0.54823864",
"0.54823864",
"0.54822254",
"0.5481369",
"0.5481051",
"0.5474449",
"0.54730326",
"0.5470373",
"0.54664516",
"0.54612243",
"0.54530513",
"0.5445151",
"0.5438273",
"0.5435978",
"0.5434867",
"0.5434867",
"0.54344666",
"0.54269207",
"0.5417142",
"0.54169756",
"0.5416226",
"0.5404271",
"0.5403528",
"0.5398594",
"0.5394286",
"0.5393381",
"0.53920996",
"0.538791",
"0.53833663",
"0.53819627",
"0.5380816",
"0.53807634",
"0.5379062",
"0.537787",
"0.53670496",
"0.53646684",
"0.5361975",
"0.53611386",
"0.53600156",
"0.5354915",
"0.5350955",
"0.53487134",
"0.53474003",
"0.53461534"
] | 0.0 | -1 |
Loads a script from a URL and evaluates it | void loadScript(URL url) throws IOException, ScriptRunnerException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Value eval(String script, String name, String contentType, boolean interactive) throws Exception;",
"public void load(String url);",
"public static void loadScript(String category, String key) {\r\n try {\r\n String lkey = key;\r\n if (!lkey.endsWith(\".js\"))\r\n lkey += \".js\";\r\n if(!\"\".equals(category))\r\n category += \"/\";\r\n Path path = Paths.get(\"./data/scripts/\" + category + lkey);\r\n String script = new String(Files.readAllBytes(path));\r\n ScriptEngine nashorn = scriptEngineManager.getEngineByName(\"nashorn\");\r\n nashorn.eval(script);\r\n loadedScripts.put(lkey, nashorn);\r\n } catch (Exception ex) { ex.printStackTrace(); }\r\n }",
"public CompletableFuture<Object> eval(final String script) {\n return eval(script, null, new SimpleBindings());\n }",
"@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }",
"ScriptEvaluator createScriptEvaluator();",
"public void loadFromSource(Object aSrc)\n{\n WebURL url = WebURL.getURL(aSrc);\n String jsonText = url.getText();\n loadFromString(jsonText);\n}",
"private void loadUrlInternal(String url) {\n\t\twebEngine.load(url);\n\t}",
"public CompletableFuture<Object> eval(final String script, final Bindings boundVars) {\n return eval(script, null, boundVars);\n }",
"private void loadFromURL(String url) throws IOException {\n URL destination = new URL(url);\r\n URLConnection conn = destination.openConnection();\r\n Reader r = new InputStreamReader(conn.getInputStream());\r\n load(r);\r\n }",
"default Value eval(String script, String name, boolean literal) throws Exception {\n if (name.endsWith(\".mjs\")) {\n return eval(script, name, \"application/javascript+module\", literal);\n } else {\n return eval(script, name, \"application/javascript\", literal);\n }\n }",
"private static native void eval(String script)\n /*-{\n try {\n if (script == null) return;\n $wnd.eval(script);\n } catch (e) {\n }\n }-*/;",
"default Value eval(String script) throws Exception {\n return eval(script, false);\n }",
"public void includeScript(String command, Vector args) throws Throwable {\n String scriptUrl = (String)args.elementAt(0);\n checkArgument(scriptUrl, \"Missing script url in \" + command);\n \n if (!scriptUrl.startsWith(\"http:\") && !scriptUrl.startsWith(\"file:\")) {\n int upCount = 0;\n while(scriptUrl.startsWith(\"..\")) {\n scriptUrl = scriptUrl.substring(\"../\".length());\n upCount++;\n }\n if (baseUrl != null) {\n String newBaseUrl = baseUrl;\n for(int i=0; i<upCount; i++) {\n int index = newBaseUrl.lastIndexOf('/');\n newBaseUrl = newBaseUrl.substring(0, index);\n }\n scriptUrl = newBaseUrl + \"/\" + scriptUrl;\n }\n }\n String tmpBaseUrl = baseUrl;\n runScriptFileI(scriptUrl, false);\n baseUrl = tmpBaseUrl;\n }",
"Object eval(String script, int keyCount, String... params);",
"private boolean isScript( String URI ) {\r\n\t\tFile file = new File( URI );\r\n\t\treturn SCRIPT_PATTERN.matcher( file.getName() ).matches();\r\n\t}",
"protected void onLoad() {\n \t\tsuper.onLoad();\n \t\teval(scripts);\n \t}",
"protected Script getScript(String scriptName, boolean withSrc) {\n \t\tScript s = getConfiguration().getScriptByName(scriptName);\n \t\tFile scriptSrc = new File(getScriptDirectory(), scriptName);\n \t\tif (withSrc) {\n \t\t\ttry {\n \t\t\t\tReader reader = new FileReader(scriptSrc);\n \t\t\t\tString src = IOUtils.toString(reader);\n \t\t\t\ts.setScript(src);\n \t\t\t} catch (IOException e) {\n \t\t\t\tLOGGER.log(Level.SEVERE, \"not able to load sources for script [\" + scriptName + \"]\", e);\n \t\t\t}\n \t\t}\n \t\treturn s;\n \t}",
"public Object parse() throws Throwable {\n List<URL> urlsToLoad = new ArrayList<URL>();\n if (!loadLines.isEmpty()) {\n for (String jar : loadLines) {\n String loadPath = jar.substring(LoaderConfigurationHelper.LOAD_PREFIX.length()).trim();\n urlsToLoad = LoaderConfigurationHelper.load(loadPath);\n }\n }\n // Process \"codebase\" and set codebase variable\n urlsToLoad.addAll(LoaderConfigurationHelper.setCodebase(codebaseLines, websterStrUrl, out));\n try {\n scriptThread = new ScriptThread(script, urlsToLoad.toArray(new URL[urlsToLoad.size()]), classLoader, out, config, debug);\n this.target = scriptThread.getTarget();\n return target;\n }\n // Parse Groovy errors and replace line numbers to adjust according to show the actual line number with an error\n catch (GroovyRuntimeException e) {\n int lineNum = 0;\n if (e instanceof CompilationFailedException) {\n String msg = e.getMessage();\n for (String groovyErrMsg : GROOVY_ERR_MSG_LINE) {\n lineNum = findLineNumAfterText(msg, groovyErrMsg);\n if (lineNum>0) msg = msg.replace(groovyErrMsg + lineNum,\n groovyErrMsg + (lineNum- getLineOffsetForGroovyErrors()));\n }\n throw new ScriptExertException(msg, e, lineNum - getLineOffsetForGroovyErrors());\n }\n for (StackTraceElement st : e.getStackTrace()) {\n if (st.getClassName().equals(\"Script1\")) {\n lineNum = st.getLineNumber();\n break;\n }\n }\n throw new ScriptExertException(e.getLocalizedMessage(),e, lineNum - getLineOffsetForGroovyErrors());\n }\n catch (Exception e) {\n logger.log(Level.SEVERE,\"error while parsing\", e);\n throw new ScriptExertException(e.getLocalizedMessage(),e, - getLineOffsetForGroovyErrors());\n }\n }",
"void eval(Reader reader) throws ScriptRunnerException, IOException;",
"private native void eval(String script) /*-{\n \t try {\n \t eval(\"{ var document = $doc; var window = $wnd; \"+ script + \"}\");\n \t } catch (e) {\n \t }\n \t }-*/;",
"void pushScriptLoadError(String resourceUrl);",
"private static native void eval(String script)\n /*-{\n try {\n \t if (script != null) \n eval(\"{ var document = $doc; var window = $wnd; \"+ script + \"}\");\n } catch (e) {\n }\n }-*/;",
"public void runScript(String script, String scriptUrl) throws Throwable {\n \n int idx = 0;\n int lineNumber = 0;\n boolean onExecuted = false;\n \n //If an exception is catched the remaining lines of this script are\n //ignored\n boolean ignoreCurrentScript = false;\n \n String syntaxError = null;\n \n boolean eol;\n do {\n try {\n // The end of the command is recognized with the following\n // sequence ;( *)\\n\n StringBuffer l = new StringBuffer();\n eol = false;\n String line = null;\n while(idx<script.length()) {\n char ch = script.charAt(idx);\n l.append(ch);\n if (ch == ';') {\n eol = true;\n if (idx < script.length() - 1) {\n // This may be the end of line\n while(idx<script.length()) {\n char nextCh = script.charAt(++idx);\n if (nextCh == '\\n') {\n break;\n } else if (nextCh == ' ' || nextCh == '\\r') {\n // Keep searching\n l.append(nextCh);\n } else {\n // This is not the end of line\n l.append(nextCh);\n eol = false;\n break;\n }\n }\n } else {\n // This is the last char\n ++idx;\n }\n } else if (ch == '#' && l.length() == 1) {\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Found a comment, consuming line\");\n }\n // This line is a comment, skip everything until an EOL\n // is found\n ++idx;\n for(;idx<script.length();++idx) {\n char nextChar = script.charAt(idx);\n if (nextChar == '\\n') {\n break;\n } else {\n l.append(nextChar);\n }\n }\n eol = true;\n } else if (ch == '\\n') {\n // We found a EOL without the ;\n // This maybe an empty line that we just ignore\n String currentLine = l.toString().trim();\n if (currentLine.length() == 0) {\n l = new StringBuffer();\n } else {\n // If otherwise this is an EOL in the middle of a\n // command, we just ignore it (EOL shall be represented\n // as \\n)\n l.deleteCharAt(l.length() - 1);\n }\n }\n if (eol) {\n // Remove trailing end of line (everything after the ;)\n while(l.length() > 0 && l.charAt(l.length() - 1) != ';') {\n l.deleteCharAt(l.length() - 1);\n }\n line = l.toString();\n break;\n }\n ++idx;\n }\n \n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Executing line: \" + line);\n }\n \n if (line == null) {\n return;\n }\n \n lineNumber++;\n \n syntaxError = null;\n \n line = line.trim();\n if (line.length() > 0 && !line.startsWith(\"#\")) {\n if (line.startsWith(ON_COMMAND + \" \")) {\n // This is a conditional statement. Check if it must be\n // executed\n boolean exec = false;\n try {\n exec = checkCandidateStatement(line, onExecuted);\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n exec = false;\n }\n if (exec) {\n onExecuted = true;\n // Get the real command\n int colPos = line.indexOf(\":\");\n if (colPos == -1) {\n String msg = \"Syntax error in script, missing ':' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n if (colPos + 1 >= line.length()) {\n String msg = \"Syntax error in script, missing command in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n line = line.substring(colPos + 1);\n line = line.trim();\n } else {\n // skip the rest\n if (Log.isLoggable(Log.INFO)) {\n Log.info(TAG_LOG, \"Skipping conditional statement\");\n }\n continue;\n }\n } else {\n // Reset the conditional statement status\n onExecuted = false;\n }\n \n int parPos = line.indexOf('(');\n if (parPos == -1) {\n syntaxError = \"Syntax error in script \"\n + scriptUrl\n + \"\\nmissing '(' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(syntaxError);\n \n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n // Force this script to be terminated\n idx = script.length();\n }\n \n String command = line.substring(0, parPos);\n command = command.trim();\n String pars;\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"line=\" + line);\n }\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"parPos = \" + parPos);\n }\n if (line.endsWith(\";\")) {\n pars = line.substring(parPos, line.length() - 1);\n } else {\n pars = line.substring(parPos);\n }\n \n //Increments the test counter to\n if (BasicCommandRunner.BEGIN_TEST_COMMAND.equals(command)) {\n chainedTestsCounter++;\n if (chainedTestsCounter == 1) {\n mainTestName = pars;\n }\n } else if (BasicCommandRunner.END_TEST_COMMAND.equals(command)) {\n chainedTestsCounter--;\n if (chainedTestsCounter == 0) {\n ignoreCurrentScript = false;\n }\n }\n \n if (!ignoreCurrentScript) {\n // Extract parameters and put them into a vector\n Vector args = new Vector();\n int i = 0;\n String arg;\n do {\n arg = getParameter(pars, i++);\n if (arg != null) {\n args.addElement(arg);\n }\n } while(arg != null);\n runCommand(command, args);\n }\n }\n } catch (IgnoreScriptException ise) {\n ignoreCurrentScript = true;\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n \n StringBuffer msg = new StringBuffer();\n msg.append(\"\\nTEST FAILED: \").append(mainTestName);\n msg.append(\"\\n\\tException: \").append(t);\n msg.append(syntaxError != null ? \"\\n\\t\" + syntaxError : \"\");\n msg.append(\"\\n\\t(\").append(scriptUrl).append(\": \")\n .append(lineNumber).append(\")\");\n \n Log.error(msg.toString());\n Log.error(TAG_LOG, \"Exception details\", t);\n \n //tell the scriptrunner to ignore all of the chained tests\n //commands\n ignoreCurrentScript = true;\n \n if(stopOnFailure) {\n throw new ClientTestException(\"TEST FAILED\");\n }\n }\n } while (true);\n }",
"public Object executeScript(String command);",
"String evaluate();",
"void executeScript(Readable script) throws IOException;",
"Hojas eval();",
"protected void doScript(Set<String> scripts, JspWriter out, HttpServletRequest request, HttpServletResponse response, String location) throws IOException {\n\t\tif( scripts.contains(location)){\n\t\t\treturn;\n\t\t}\n\t\tscripts.add(location);\n\t\tif( location.startsWith(\"/\")){\n\t\t\t// script file\n\t\t\tout.print(\"<script type=\\\"text/javascript\\\" charset=\\\"utf8\\\" src=\\\"\");\n\t\t\tif( location.startsWith(\"//\")){\n\t\t\t\t// remote script file\n\t\t\t\tout.print(location);\n\t\t\t}else {\n\t\t\t\t// local script file\n\t\t\t\t// no sessionid needed\n\t\t\t\tout.print(request.getContextPath()+location);\t\t\n\t\t\t}\n\t\t\tout.println(\"\\\"></script>\");\n\t\t}else{\n\t\t\t// in-line script\n\t\t\tout.print(\"<script type=\\\"text/javascript\\\" charset=\\\"utf8\\\" >\");\n\t\t\tout.print(location);\n\t\t\tout.println(\"</script>\");\n\t\t}\n\t}",
"default Value eval(String script, boolean interactive) throws Exception {\n return eval(script, \"<eval>\", interactive);\n }",
"public void loadJavaScript(String javascript, final ValueCallback<String> resultCallback) {\n if (TextUtils.isEmpty(javascript)) {\n return;\n }\n\n if(Build.VERSION.SDK_INT >= 19) { //Build.VERSION_CODES.KITKAT\n String newJS = clipJacaScriptUrlString(javascript);\n if (!newJS.startsWith(\"javascript:\")) {\n try{\n super.evaluateJavascript(newJS, resultCallback);\n }catch (Exception | Error e){\n super.loadUrl(javascript);\n e.printStackTrace();\n }\n } else {\n super.loadUrl(javascript);\n }\n } else {\n super.loadUrl(javascript);\n }\n }",
"public interface IWebEngine {\n\n /**\n * Executes the specified JavaScript Command\n *\n * @param command The command to execute\n * @return The object returned by the script (if any).\n */\n public Object executeScript(String command);\n\n /**\n * Gets a worked which will be notified when a web page has finished\n * loading.\n *\n * @return The worker\n */\n public Worker<Void> getLoadWorker();\n\n /**\n * Loads the specified URL\n *\n * @param url The URL to load in the engine.\n */\n public void load(String url);\n\n}",
"public native Object load( String url, OnJSONLoadCallback onLoad);",
"private void sendLoadScript(String script, boolean partial) {\n String request;\n String response;\n\n synchronized(this) {\n request = globalApi.openDoc(appName);\n System.out.println(\"OpenDoc request: \" + request);\n response = qlikSocket.sendMessage(request);\n System.out.println(\"OpenDoc response: \" + response);\n JsonResponse jsonResponse = new JsonResponse(response);\n int qHandle;\n if (jsonResponse.isError()) {\n System.out.println(jsonResponse.getError());\n } else {\n qHandle = jsonResponse.getqHandle();\n request = docApi.setScript(qHandle, script);\n System.out.println(String.format(\"SetScript request: Length(%d) %s\",\n request.length(), request.substring(1, min(request.length(), 256))));\n response = qlikSocket.sendMessage(request);\n System.out.println(\"SetScript response: \" + response);\n if (jsonResponse.isError()) {\n System.out.println(jsonResponse.getError());\n } else {\n request = docApi.doReload(qHandle, 0, partial, false);\n System.out.println(\"DoReload request: \" + request);\n response = qlikSocket.sendMessage(request);\n System.out.println(\"DoReload response: \" + response);\n request = docApi.doSave(qHandle);\n System.out.println(\"DoSave request: \" + request);\n response = qlikSocket.sendMessage(request);\n System.out.println(\"DoSave response: \" + response);\n }\n\n }\n }\n }",
"public abstract Source load(ModuleName name);",
"protected void runXmlScript(String script, String scriptUrl) throws Throwable {\n XmlPullParser parser = new KXmlParser();\n \n try {\n ByteArrayInputStream is = new ByteArrayInputStream(script.getBytes(\"UTF-8\"));\n parser.setInput(is, \"UTF-8\");\n \n // Begin parsing\n nextSkipSpaces(parser);\n // If the first tag is not the SyncML start tag, then this is an\n // invalid message\n require(parser, parser.START_TAG, null, \"Script\");\n nextSkipSpaces(parser);\n // Keep track of the nesting level depth\n nestingDepth++;\n \n String currentCommand = null;\n boolean condition = false;\n boolean evaluatedCondition = false;\n Vector args = null;\n \n boolean ignoreCurrentScript = false;\n boolean ignoreCurrentBranch = false;\n \n while (parser.getEventType() != parser.END_DOCUMENT) {\n \n // Each tag here is a command. All commands have the same\n // format:\n // <Command>\n // <Arg>arg1</Arg>\n // <Arg>arg2</Arg>\n // </Command>\n //\n // The only exception is for conditional statements\n // <Condition>\n // <If>condition</If>\n // <Then><command>...</command></Then>\n // <Else><command>...</command>/Else>\n // </Condition>\n \n if (parser.getEventType() == parser.START_TAG) {\n String tagName = parser.getName();\n \n if (\"Condition\".equals(tagName)) {\n condition = true;\n } else if (\"If\".equals(tagName)) {\n // We just read the \"<If>\" tag, now we read the rest of the condition\n // until the </If>\n nextSkipSpaces(parser);\n evaluatedCondition = evaluateCondition(parser);\n nextSkipSpaces(parser);\n require(parser, parser.END_TAG, null, \"If\");\n } else if (\"Then\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (!evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else if (\"Else\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else {\n if (currentCommand == null) {\n currentCommand = tagName;\n args = new Vector();\n Log.trace(TAG_LOG, \"Found command \" + currentCommand);\n } else {\n // This can only be an <arg> tag\n if (\"Arg\".equals(tagName)) {\n parser.next();\n \n // Concatenate all the text tags until the end\n // of the argument\n StringBuffer arg = new StringBuffer();\n while(parser.getEventType() == parser.TEXT) {\n arg.append(parser.getText());\n parser.next();\n }\n String a = arg.toString().trim();\n Log.trace(TAG_LOG, \"Found argument \" + a);\n a = processArg(a);\n args.addElement(a);\n require(parser, parser.END_TAG, null, \"Arg\");\n }\n }\n }\n } else if (parser.getEventType() == parser.END_TAG) {\n String tagName = parser.getName();\n if (\"Condition\".equals(tagName)) {\n condition = false;\n currentCommand = null;\n ignoreCurrentBranch = false;\n } else if (tagName.equals(currentCommand)) {\n try {\n Log.trace(TAG_LOG, \"Executing accumulated command: \" + currentCommand + \",\" + ignoreCurrentScript + \",\" + ignoreCurrentBranch);\n if ((!ignoreCurrentScript && !ignoreCurrentBranch) || \"EndTest\".equals(currentCommand)) {\n runCommand(currentCommand, args);\n }\n } catch (IgnoreScriptException ise) {\n // This script must be ignored\n ignoreCurrentScript = true;\n nestingDepth = 0;\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SKIPPED);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n } catch (Throwable t) {\n \n Log.error(TAG_LOG, \"Error running command\", t);\n \n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Error \" + t.toString() + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n \n if (stopOnFailure) {\n throw t;\n } else {\n ignoreCurrentScript = true;\n nestingDepth = 0;\n }\n }\n currentCommand = null;\n } else if (\"Script\".equals(tagName)) {\n // end script found\n \n \n // If we get here and the current script is not being\n // ignored, then the execution has been successful\n if (!ignoreCurrentScript) {\n if (testKeys.get(scriptUrl) == null) {\n // This test is not a utility test, save its\n // status\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SUCCESS);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n }\n }\n \n if (nestingDepth == 0 && ignoreCurrentScript) {\n // The script to be ignored is completed. Start\n // execution again\n ignoreCurrentScript = false;\n }\n }\n }\n nextSkipSpaces(parser);\n }\n } catch (Exception e) {\n // This will block the entire execution\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Syntax error in file \" + scriptUrl + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n Log.error(TAG_LOG, \"Error parsing command\", e);\n throw new ClientTestException(\"Script syntax error\");\n }\n }",
"public void loadJavaScript(String javascript) {\n if (TextUtils.isEmpty(javascript)) {\n return;\n }\n\n if (Build.VERSION.SDK_INT >= 19) { //Build.VERSION_CODES.KITKAT\n String newJS = clipJacaScriptUrlString(javascript);\n if (!newJS.startsWith(\"javascript:\")) {\n try{\n super.evaluateJavascript(newJS, null);\n }catch (Exception | Error e){\n super.loadUrl(javascript);\n e.printStackTrace();\n }\n } else {\n super.loadUrl(javascript);\n }\n } else {\n super.loadUrl(javascript);\n }\n }",
"public CompletableFuture<Object> eval(final String script, final String language, final Bindings boundVars, final LifeCycle lifeCycle) {\n final String lang = Optional.ofNullable(language).orElse(\"gremlin-groovy\");\n\n if (logger.isDebugEnabled()) {\n logger.debug(\"Preparing to evaluate script - {} - in thread [{}]\", script, Thread.currentThread().getName());\n }\n\n final Bindings bindings = new SimpleBindings();\n bindings.putAll(globalBindings);\n bindings.putAll(boundVars);\n\n // override the timeout if the lifecycle has a value assigned. if the script contains with(timeout)\n // options then allow that value to override what's provided on the lifecycle\n final Optional<Long> timeoutDefinedInScript = GremlinScriptChecker.parse(script).getTimeout();\n final long scriptEvalTimeOut = timeoutDefinedInScript.orElse(\n lifeCycle.getEvaluationTimeoutOverride().orElse(evaluationTimeout));\n\n final CompletableFuture<Object> evaluationFuture = new CompletableFuture<>();\n final FutureTask<Void> evalFuture = new FutureTask<>(() -> {\n try {\n lifeCycle.getBeforeEval().orElse(beforeEval).accept(bindings);\n\n logger.debug(\"Evaluating script - {} - in thread [{}]\", script, Thread.currentThread().getName());\n\n final Object o = gremlinScriptEngineManager.getEngineByName(lang).eval(script, bindings);\n\n // apply a transformation before sending back the result - useful when trying to force serialization\n // in the same thread that the eval took place given ThreadLocal nature of graphs as well as some\n // transactional constraints\n final Object result = lifeCycle.getTransformResult().isPresent() ?\n lifeCycle.getTransformResult().get().apply(o) : o;\n\n // a mechanism for taking the final result and doing something with it in the same thread, but\n // AFTER the eval and transform are done and that future completed. this provides a final means\n // for working with the result in the same thread as it was eval'd\n if (lifeCycle.getWithResult().isPresent()) lifeCycle.getWithResult().get().accept(result);\n\n lifeCycle.getAfterSuccess().orElse(afterSuccess).accept(bindings);\n\n // the evaluationFuture must be completed after all processing as an exception in lifecycle events\n // that must raise as an exception to the caller who has the returned evaluationFuture. in other words,\n // if it occurs before this point, then the handle() method won't be called again if there is an\n // exception that ends up below trying to completeExceptionally()\n evaluationFuture.complete(result);\n } catch (Throwable ex) {\n final Throwable root = null == ex.getCause() ? ex : ExceptionUtils.getRootCause(ex);\n\n // thread interruptions will typically come as the result of a timeout, so in those cases,\n // check for that situation and convert to TimeoutException\n if (root instanceof InterruptedException\n || root instanceof TraversalInterruptedException\n || root instanceof InterruptedIOException) {\n lifeCycle.getAfterTimeout().orElse(afterTimeout).accept(bindings, root);\n evaluationFuture.completeExceptionally(new TimeoutException(\n String.format(\"Evaluation exceeded the configured 'evaluationTimeout' threshold of %s ms or evaluation was otherwise cancelled directly for request [%s]: %s\", scriptEvalTimeOut, script, root.getMessage())));\n } else {\n lifeCycle.getAfterFailure().orElse(afterFailure).accept(bindings, root);\n evaluationFuture.completeExceptionally(root);\n }\n }\n\n return null;\n });\n\n final WeakReference<CompletableFuture<Object>> evaluationFutureRef = new WeakReference<>(evaluationFuture);\n final Future<?> executionFuture = executorService.submit(evalFuture);\n if (scriptEvalTimeOut > 0) {\n // Schedule a timeout in the thread pool for future execution\n final ScheduledFuture<?> sf = scheduledExecutorService.schedule(() -> {\n if (executionFuture.cancel(true)) {\n final CompletableFuture<Object> ef = evaluationFutureRef.get();\n if (ef != null) {\n ef.completeExceptionally(new TimeoutException(\n String.format(\"Evaluation exceeded the configured 'evaluationTimeout' threshold of %s ms or evaluation was otherwise cancelled directly for request [%s]\", scriptEvalTimeOut, script)));\n }\n }\n }, scriptEvalTimeOut, TimeUnit.MILLISECONDS);\n\n // Cancel the scheduled timeout if the eval future is complete or the script evaluation failed with exception\n evaluationFuture.handleAsync((v, t) -> {\n if (!sf.isDone()) {\n logger.debug(\"Killing scheduled timeout on script evaluation - {} - as the eval completed (possibly with exception).\", script);\n sf.cancel(true);\n }\n\n // no return is necessary - nothing downstream is concerned with what happens in here\n return null;\n }, scheduledExecutorService);\n }\n\n return evaluationFuture;\n }",
"boolean hasScript();",
"public void testScriptTags_AllLocalContent() throws Exception {\n final String content\n = \"<html>\"\n + \"<head><title>foo</title>\"\n + \"<script>One</script>\" // no language specifed - assume javascript\n + \"<script language='javascript'>Two</script>\"\n + \"<script type='text/javascript'>Three</script>\"\n + \"<script type='text/perl'>Four</script>\" // type is unsupported language\n + \"</head>\"\n + \"<body>\"\n + \"<p>hello world</p>\"\n + \"</body></html>\";\n final List collectedScripts = new ArrayList();\n loadPageAndCollectScripts(content, collectedScripts);\n\n // The last expected is the dummy stub that is needed to initialize the javascript engine\n final List expectedScripts = Arrays.asList( new String[]{\n \"One\", \"Two\", \"Three\", \"\" } );\n\n assertEquals( expectedScripts, collectedScripts );\n }",
"public static JavaScript fromResource(String resourceName) {\n InputStream inputStream;\n inputStream = ClassLoader.getSystemResourceAsStream(resourceName);\n \n String sourceCode;\n \n try {\n sourceCode = IOUtils.toString(inputStream);\n } catch (IOException e) {\n throw new RuntimeException(format(\"Unable to load JavaScript from resource with name '{0}'\", resourceName),\n e);\n }\n \n return js(sourceCode);\n }",
"@Override\n public ComputationSpec load(String url) throws Exception {\n String specEndpoint = url;\n String specHost = specEndpoint.split(\"//\")[1].split(\"/\")[0];\n\n if (specHost.endsWith(\".\")) {\n // Need to do a srv record resolution\n List<LookupResult> results = dnsResolver.dnsSrvLookup(specHost);\n\n if (!results.isEmpty()) {\n specHost = InetAddress.getByName(results.get(0).host()).getHostAddress() + \":\" + results.get(0).port();\n LOGGER.info(\"Setting spec host to: \" + specHost);\n } else {\n throw new RuntimeException(String.format(\"Dns Srv Resolution for spec host failed: %s\", specHost));\n }\n specEndpoint = specEndpoint.split(\"//\")[0] + \"//\" + specHost + \"/\" + specEndpoint.split(\"//\")[1]\n .replaceFirst(\".*\\\\./\", \"\");\n }\n HttpGet getRequest = new HttpGet(specEndpoint);\n HttpResponse response = httpClient.execute(getRequest);\n if (HttpStatus.SC_OK != response.getStatusLine().getStatusCode()) {\n throw new Exception(\"Received: \" + response.getStatusLine().getStatusCode() + \" from spec url: \" + url);\n }\n\n return mapper.readValue(EntityUtils.toByteArray(response.getEntity()), ComputationSpec.class);\n }",
"public interface Scripting {\n\n String NAME = \"cuba_Scripting\";\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param policies policies for script execution {@link ScriptExecutionPolicy}\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding, ScriptExecutionPolicy... policies);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param context map of parameters to pass to the expression, same as Binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Map<String, Object> context);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Binding binding);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param context map of parameters to pass to the script, same as Binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Map<String, Object> context);\n\n /**\n * Returns the dynamic classloader.\n * <p>Actually it is the GroovyClassLoader which parent is {@link com.haulmont.cuba.core.sys.javacl.JavaClassLoader}.\n * For explanation on class loading sequence see {@link #loadClass(String)}\n * </p>\n * @return dynamic classloader\n */\n ClassLoader getClassLoader();\n\n /**\n * Loads class by name using the following sequence:\n * <ul>\n * <li>Search for a Groovy source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a Java source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a class in classpath</li>\n * </ul>\n * It is possible to change sources in <em>conf</em> directory at run time, affecting the returning class,\n * with the following restrictions:\n * <ul>\n * <li>You can not change source from Groovy to Java</li>\n * <li>If you had Groovy source and than removed it, you'll still get the class compiled from those sources\n * and not from classpath</li>\n * </ul>\n * You can bypass these restrictions if you invoke {@link #clearCache()} method, e.g. through JMX interface\n * CachingFacadeMBean.\n * @param name fully qualified class name\n * @return class or null if not found\n */\n @Nullable\n Class<?> loadClass(String name);\n\n /**\n * Loads a class by name using the sequence described in {@link #loadClass(String)}.\n *\n * @param name fully qualified class name\n * @return class\n * @throws IllegalStateException if the class is not found\n */\n Class<?> loadClassNN(String name);\n\n /**\n * Remove compiled class from cache\n * @return true if class removed from cache\n */\n boolean removeClass(String name);\n\n /**\n * Clears compiled classes cache\n */\n void clearCache();\n\n}",
"public void handleScript(HtmlObjects.Script t)\n {\n }",
"@Test(groups = { \"tree\" })\n\t\tpublic void testLoadViaGetURL() throws Exception {\n\t\t\t\tstartupTest(\"treeLoadViaGetURL.html\",null);\n\n\t\t\t\t//Verify the url\n\t\t\t\tString url = getBrowserUrl();\n\t\t\t\tlog(\"URL##########\"+ url);\n\n\t\t\t\t// Verify if the title of the page is correct\n\t\t\t\tverifyTitle(\"Incorrect page title;\", TITLE_GETURL);\n\t\t\t\tcheckPageContent(TITLE_GETURL);\n\n\t\t\t\tcommonLoadTestForJson();\n\n\n }",
"@Override\n public void onLoad(String url) {\n \n }",
"private void getScript() {\n\t\tif ((scriptFile != null) && scriptFile.exists()) {\n\t\t\tlong lm = scriptFile.lastModified();\n\t\t\tif (lm > lastModified) {\n\t\t\t\tscript = new PixelScript(scriptFile);\n\t\t\t\tlastModified = lm;\n\t\t\t}\n\t\t}\n\t\telse script = null;\n\t}",
"public void runHello () {\n\t\tURLResource webpage=new URLResource(\"http://www.dukelearntoprogram.com/java/somefile.txt\");\n\t\tfor (String line : webpage.words()) {\n\t\t\tSystem.out.println(line);\n\t\t}\n\t}",
"public native Object load( String url, OnJSONLoadCallback onLoad, OnProgressCallback onProgress );",
"@Ignore\r\n\t@Test\r\n\tpublic void test_GetOK_JSFile() throws IOException {\r\n\t\tRawHttpResponse<?> response = executeRequest(\"GET\", \"/js/main.js\");\r\n\t\t// check the response code\r\n\t\tassertEquals(200, response.getStatusCode());\r\n\t\t// check content length\r\n\t\tOptional<String> contentLength = response.getHeaders().getFirst(\"Content-Length\");\r\n\t\tassertTrue(contentLength.isPresent());\r\n\t\tassertEquals(\"1328\", contentLength.get());\r\n\t\t// check content type\r\n\t\tOptional<String> contentType = response.getHeaders().getFirst(\"Content-Type\");\r\n\t\tassertTrue(contentType.isPresent());\r\n\t\tassertEquals(\"text/javascript\", contentType.get());\r\n\t}",
"private void doExecute() throws MojoExecutionException {\n URL buildUrl;\n try {\n buildUrl = buildDirectory.toURI().toURL();\n getLog().info(\"build directory \" + buildUrl.toString());\n } catch (MalformedURLException e1) {\n throw new MojoExecutionException(\"Cannot build URL for build directory\");\n }\n ClassLoader loader = makeClassLoader();\n Properties properties = new Properties(project.getProperties());\n properties.setProperty(\"lenskit.eval.dataDir\", dataDir);\n properties.setProperty(\"lenskit.eval.analysisDir\", analysisDir);\n dumpClassLoader(loader);\n EvalConfigEngine engine = new EvalConfigEngine(loader, properties);\n \n try {\n File f = new File(script);\n getLog().info(\"Loading evalution script from \" + f.getPath());\n engine.execute(f);\n } catch (CommandException e) {\n throw new MojoExecutionException(\"Invalid evaluation script\", e);\n } catch (IOException e) {\n throw new MojoExecutionException(\"IO Exception on script\", e);\n }\n }",
"public String evaluate(String expression);",
"@Test\r\n\tpublic void jsopathTest() {\r\n\t\tSystem.err.println(\"Execute: \" + expression);\r\n\t\tString value = (String) executeScript(\"return \" + expression);\r\n\t\tassertThat(value, is(\"Downloads\"));\r\n\t\tSystem.err.println(\"Result value: \" + value);\r\n\t}",
"abstract public interface Interpreter {\n\n /**\n * Evaluates a given JavaScript expression for a given userid.\n * \n * @param expression the expression to evaluate\n * @return the result of evaluating the expression\n */\n public String evaluate(String expression);\n}",
"private void setScript(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n script_ = value;\n }",
"@Override\r\n public void service(HttpServletRequest request, \r\n HttpServletResponse response) {\r\n Context cx = Context.enter();\r\n //cx.setOptimizationLevel(-1);\r\n cx.putThreadLocal(\"rhinoServer\",RhinoServlet.this);\r\n try {\r\n \r\n // retrieve JavaScript...\r\n JavaScript s = loader.loadScript(entryPoint);\r\n \r\n ScriptableObject threadScope = makeChildScope(\"RequestScope\", \r\n globalScope.getModuleScope(entryPoint));\r\n \r\n cx.putThreadLocal(\"globalScope\", globalScope);\r\n // Define thread-local variables\r\n threadScope.defineProperty(\"request\", request, PROTECTED);\r\n threadScope.defineProperty(\"response\", response, PROTECTED);\r\n \r\n // Evaluate the script in this scope\r\n s.evaluate(cx, threadScope);\r\n } catch (Throwable ex) {\r\n handleError(response,ex);\r\n } finally {\r\n Context.exit();\r\n }\r\n }",
"public ParsedPage parse(String src);",
"public void runScriptFile(String scriptUrl, boolean mainScript, Hashtable vars) throws Throwable {\n testResults = new Vector();\n testKeys = new Hashtable();\n \n if (vars != null) {\n definedVars = vars;\n } else {\n // Set predefined variables\n definedVars = new Hashtable();\n }\n \n // Add more variables (platform independent)\n if (devInfo.getDeviceRole() == DeviceInfo.DeviceRole.TABLET) {\n definedVars.put(\"devicetype\", \"table\");\n } else {\n definedVars.put(\"devicetype\", \"phone\");\n }\n \n long startTime = System.currentTimeMillis();\n try {\n runScriptFileI(scriptUrl, mainScript);\n } finally {\n long endTime = System.currentTimeMillis();\n dumpResults(startTime, endTime);\n }\n }",
"public HttpResponse doDownloadScript(StaplerRequest res, StaplerResponse rsp, @QueryParameter(\"name\") String name,\n \t\t\t@QueryParameter(\"catalog\") String catalogName) throws IOException {\n \t\tcheckPermission(Hudson.ADMINISTER);\n \n \t\tCatalogInfo catInfo = getConfiguration().getCatalogInfo(catalogName);\n \t\tCatalogManager catalogManager = new CatalogManager(catInfo);\n \t\tCatalog catalog = catalogManager.loadCatalog();\n \t\tCatalogEntry entry = catalog.getEntryByName(name);\n \t\tString source = catalogManager.downloadScript(name);\n \n \t\treturn doScriptAdd(res, rsp, name, entry.comment, source);\n \t}",
"public static Script parse(String scriptText) {\n Parse scriptBuilder = create(scriptText);\n scriptBuilder.throwIfError();\n return scriptBuilder.script;\n }",
"String wget(String url);",
"@Test\r\n public void testEval__call__1() throws ScriptException {\r\n Object value = engine.eval(\"java.lang.String()\");\r\n Assert.assertEquals(\"\", value);\r\n }",
"public static void load(String string, boolean start) {\r\n\t\ttry {\r\n\t\t\tHamster._re_init();\r\n\t\t\tinitPython();\r\n\t\t\tinterpreter.exec(string);\r\n\t\t} catch (Throwable e) {\r\n\t\t\tif (!de.hamster.debugger.model.DebuggerModel.isStop) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.toString(),\r\n\t\t\t\t\t\t\"Python-Exception\", JOptionPane.ERROR_MESSAGE, null);\r\n\t\t\t}\r\n\t\t\tde.hamster.debugger.model.DebuggerModel.isStop = false;\r\n\t\t}\r\n\t}",
"com.google.protobuf.ByteString getScript();",
"public SingleLineSkript(@NotNull SkriptLoader skriptLoader, @NotNull String input) {\n element = skriptLoader.tryParseElement(input, 1);\n }",
"private String getCreateRunScript(ActionURL url, boolean isOutput)\n {\n return DataRegion.getJavaScriptObjectReference(getDataRegionName()) +\n \".getSelected({success: \" + getSelectedScript(url, isOutput) + \"});\";\n }",
"@Test\n public void testParseUriSimple() throws Exception {\n final TestRunner runner = TestRunners.newTestRunner(new ExecuteScript());\n runner.setValidateExpressionUsage(false);\n runner.setProperty(SCRIPT_ENGINE, \"Groovy\");\n runner.setProperty(ScriptingComponentUtils.SCRIPT_FILE, \"src/test/resources/executescript/misc/parse_uri.groovy\");\n runner.setProperty(ScriptingComponentUtils.MODULES, \"src/test/resources/executescript\");\n runner.assertValid();\n\n final Map<String, String> attributes = new HashMap<>();\n attributes.put(\"input.url\", \"http://batchiq.com/foobar\");\n runner.enqueue(\"nothing\".getBytes(StandardCharsets.UTF_8), attributes);\n runner.run();\n\n runner.assertAllFlowFilesTransferred(\"success\", 1);\n final List<MockFlowFile> successFlowFiles = runner.getFlowFilesForRelationship(\"success\");\n MockFlowFile result = successFlowFiles.get(0);\n result.assertAttributeEquals(\"url.protocol\", \"http\");\n result.assertAttributeEquals(\"url.host\", \"batchiq.com\");\n result.assertAttributeEquals(\"url.path\", \"/foobar\");\n result.assertAttributeEquals(\"input.url\", \"http://batchiq.com/foobar\");\n }",
"boolean supportsScripts();",
"public void onLoadResource(WebView view, String url) {\n\n }",
"public abstract void runScript() throws Exception;",
"private String loadFromNetwork(String urlString) throws IOException {\n InputStream stream = null;\n String str =\"\";\n\n try {\n stream = downloadUrl(urlString);\n str = readIt(stream, 450000);\n } finally {\n if (stream != null) {\n stream.close();\n }\n }\n return str;\n }",
"@Test\r\n public void testCodeExamples() throws SecurityException, NoSuchMethodException, ScriptException\r\n {\n \t// http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/\r\n \t\r\n \t// Code Example 1: Create a ScriptEngine object using the engine name.\r\n \t//\r\n \tScriptEngineManager mgr = new ScriptEngineManager();\r\n \tScriptEngine jsEngine = mgr.getEngineByName(\"jav8\");\r\n \t\r\n \tjsEngine.put(\"print\", this.getClass().getMethod(\"print\", String.class));\r\n \tjsEngine.put(\"println\", this.getClass().getMethod(\"println\", String.class));\r\n \r\n \tjsEngine.eval(\"print('Hello, world!')\");\r\n \t\r\n \t// Code Example 2: You can retrieve a list of all engines installed to your Java platform.\r\n \t//\r\n \tList<ScriptEngineFactory> factories = mgr.getEngineFactories();\r\n \t\r\n \tassertFalse(factories.isEmpty());\r\n \t\r\n \t// Code Example 3: A ScriptEngineFactory object provides detailed information about the engine it provides.\r\n \t//\r\n \tfor (ScriptEngineFactory factory: factories) {\r\n \t System.out.println(\"ScriptEngineFactory Info\");\r\n \t \r\n \t String engName = factory.getEngineName();\r\n \t String engVersion = factory.getEngineVersion();\r\n \t String langName = factory.getLanguageName();\r\n \t String langVersion = factory.getLanguageVersion();\r\n \t System.out.printf(\"\\tScript Engine: %s (%s)\\n\", engName, engVersion);\r\n \t \r\n \t List<String> engNames = factory.getNames();\r\n \t for(String name: engNames) {\r\n \t System.out.printf(\"\\tEngine Alias: %s\\n\", name);\r\n \t }\r\n \t System.out.printf(\"\\tLanguage: %s (%s)\\n\", langName, langVersion);\r\n \t}\r\n \t \t\r\n \t// Code Example 6: The eval method can read script files.\r\n \t//\r\n \tInputStream is = this.getClass().getResourceAsStream(\"/scripts/F1.js\");\r\n \t/*\r\n \ttry {\r\n \t Reader reader = new InputStreamReader(is);\r\n \t engine.eval(reader);\r\n \t} catch (ScriptException ex) {\r\n \t ex.printStackTrace();\r\n \t}\r\n \t*/\r\n \t// Code Example 7: You can use the Invocable interface to call specific methods in a script.\r\n \t//\r\n \tjsEngine.eval(\"function sayHello() {\" +\r\n \t \" println('Hello, world!');\" +\r\n \t \"}\");\r\n \tInvocable invocableEngine = (Invocable) jsEngine;\r\n \tinvocableEngine.invokeFunction(\"sayHello\");\r\n \t\r\n \t// Code Example 8: Java programming language code adds names to a list.\r\n \t//\r\n \tList<String> namesList = new ArrayList<String>();\r\n \t\r\n \tnamesList.add(\"Jill\");\r\n \tnamesList.add(\"Bob\");\r\n \tnamesList.add(\"Laureen\");\r\n \tnamesList.add(\"Ed\");\r\n \t\r\n \t// Code Example 9: Script code can both access and modify native Java objects.\r\n \t//\r\n \tjsEngine.put(\"namesListKey\", namesList);\r\n \t \r\n \tSystem.out.println(\"Executing in script environment...\");\r\n \t\r\n \tjsEngine.eval(\"var x;\" +\r\n \t \"var names = namesListKey.toArray();\" +\r\n \t \"for(x in names) {\" +\r\n \t //\" println(names[x]);\" +\r\n \t \"}\" +\r\n \t \"namesListKey.add('Dana');\");\r\n \t\r\n \tSystem.out.println(\"Executing in Java environment...\");\r\n \t\r\n \tfor (String name: namesList) {\r\n \t System.out.println(name);\r\n \t} \r\n \t\r\n \t// Code Example 10: Applications can pass values to script using the Invocable interface.\r\n \t// \t \t\r\n \t jsEngine.eval(\"function printNames1(namesList) {\" +\r\n \t \" var x;\" +\r\n \t \" var names = namesList.toArray();\" +\r\n \t \" for(x in names) {\" +\r\n \t \" println(names[x]);\" +\r\n \t \" }\" +\r\n \t \"}\" +\r\n \r\n \t \"function addName(namesList, name) {\" +\r\n \t \" namesList.add(name);\" +\r\n \t \"}\");\r\n \t invocableEngine.invokeFunction(\"printNames1\", namesList);\r\n \t invocableEngine.invokeFunction(\"addName\", namesList, \"Dana\");\r\n }",
"Script createScript();",
"@Test\r\n public void testValidURLhtmlFile() {\r\n String[] str = {\"curl\", \"http://omarmateen.me/experience.html\"};\r\n\r\n curl.run(str);\r\n assertFalse(ErrorHandler.checkIfErrorOccurred());\r\n assertTrue(mockFileSystem.getCurrentNode().getFile(\"experiencehtml\") != null);\r\n }",
"private Map loader(URL url, Map global) throws IOException {\n SaxLoader saxLoader = new SaxLoader(url, global);\n return saxLoader.load();\n }",
"protected Object execScript(String call) {\r\n if (call==null||call.length()==0)\r\n return null;\r\n Desktop desktop = getDesktop();\r\n Object client = desktop.getClient();\r\n Doc doc = desktop.getDoc();\r\n \r\n int left = call.indexOf('(');\r\n String name = call.substring(0, left);\r\n String args = call.substring(left+1, call.length()-1);\r\n \r\n try {\r\n Object[] params;\r\n if (args.trim().length()==0)\r\n params = null;\r\n else\r\n params = Doc.parseParameters(doc, this, args);\r\n Method m = Doc.findMethod(client, name, params);\r\n return Doc.invokeMethod(m, client, params);\r\n } catch (OxyException e) {\r\n Desktop.warn(\"error invoking method \"+name+\" with args: \"+args, e);\r\n return null;\r\n }\r\n }",
"public Object eval(String expression) throws Exception;",
"public Address interpretUrl(String url);",
"public void compileScript() {\n // find and prepare by extension\n //\n log.info(\"Compiling script...\");\n Timer engineTimer = new Timer();\n \n engine = EngineHelper.findByFileExtension(scriptExtension, dependencyJarFiles != null && !dependencyJarFiles.isEmpty());\n \n if (engine == null) {\n throw new BlazeException(\"Unable to find script engine for file extension \" + scriptExtension + \". Maybe bad file extension or missing dependency?\");\n }\n\n log.debug(\"Using script engine {}\", engine.getClass().getCanonicalName());\n \n if (!engine.isInitialized()) {\n engine.init(context);\n }\n \n script = engine.compile(context);\n \n log.info(\"Compiled script in {} ms\", engineTimer.stop().millis());\n }",
"public Tab loadUrl(String url, Map<String, String> headers) {\n return load(url, headers);\n }",
"private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }",
"public org.mozilla.javascript.commonjs.module.ModuleScript getModuleScript(org.mozilla.javascript.Context r9, java.lang.String r10, java.net.URI r11, java.net.URI r12, org.mozilla.javascript.Scriptable r13) throws java.lang.Exception {\n /*\n r8 = this;\n r1 = r8.getLoadedModule(r10);\n r2 = getValidator(r1);\n if (r11 != 0) goto L_0x0019;\n L_0x000a:\n r0 = r8.moduleSourceProvider;\n r0 = r0.loadSource(r10, r13, r2);\n L_0x0010:\n r3 = org.mozilla.javascript.commonjs.module.provider.ModuleSourceProvider.NOT_MODIFIED;\n if (r0 != r3) goto L_0x0020;\n L_0x0014:\n r0 = r1.getModule();\n L_0x0018:\n return r0;\n L_0x0019:\n r0 = r8.moduleSourceProvider;\n r0 = r0.loadSource(r11, r12, r2);\n goto L_0x0010;\n L_0x0020:\n if (r0 != 0) goto L_0x0024;\n L_0x0022:\n r0 = 0;\n goto L_0x0018;\n L_0x0024:\n r3 = r0.getReader();\n r1 = r10.hashCode();\t Catch:{ all -> 0x007a }\n r4 = r8.loadLocks;\t Catch:{ all -> 0x007a }\n r5 = loadLockShift;\t Catch:{ all -> 0x007a }\n r1 = r1 >>> r5;\n r5 = loadLockMask;\t Catch:{ all -> 0x007a }\n r1 = r1 & r5;\n r4 = r4[r1];\t Catch:{ all -> 0x007a }\n monitor-enter(r4);\t Catch:{ all -> 0x007a }\n r1 = r8.getLoadedModule(r10);\t Catch:{ all -> 0x0077 }\n if (r1 == 0) goto L_0x0050;\n L_0x003d:\n r5 = getValidator(r1);\t Catch:{ all -> 0x0077 }\n r2 = equal(r2, r5);\t Catch:{ all -> 0x0077 }\n if (r2 != 0) goto L_0x0050;\n L_0x0047:\n r0 = r1.getModule();\t Catch:{ all -> 0x0077 }\n monitor-exit(r4);\t Catch:{ all -> 0x0077 }\n r3.close();\n goto L_0x0018;\n L_0x0050:\n r2 = r0.getUri();\t Catch:{ all -> 0x0077 }\n r1 = new org.mozilla.javascript.commonjs.module.ModuleScript;\t Catch:{ all -> 0x0077 }\n r5 = r2.toString();\t Catch:{ all -> 0x0077 }\n r6 = 1;\n r7 = r0.getSecurityDomain();\t Catch:{ all -> 0x0077 }\n r5 = r9.compileReader(r3, r5, r6, r7);\t Catch:{ all -> 0x0077 }\n r6 = r0.getBase();\t Catch:{ all -> 0x0077 }\n r1.<init>(r5, r2, r6);\t Catch:{ all -> 0x0077 }\n r0 = r0.getValidator();\t Catch:{ all -> 0x0077 }\n r8.putLoadedModule(r10, r1, r0);\t Catch:{ all -> 0x0077 }\n monitor-exit(r4);\t Catch:{ all -> 0x0077 }\n r3.close();\n r0 = r1;\n goto L_0x0018;\n L_0x0077:\n r0 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0077 }\n throw r0;\t Catch:{ all -> 0x007a }\n L_0x007a:\n r0 = move-exception;\n r3.close();\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.mozilla.javascript.commonjs.module.provider.CachingModuleScriptProviderBase.getModuleScript(org.mozilla.javascript.Context, java.lang.String, java.net.URI, java.net.URI, org.mozilla.javascript.Scriptable):org.mozilla.javascript.commonjs.module.ModuleScript\");\n }",
"static String checkJavaScriptFile(String path) throws IOException {\n\t\tProcess process = new ProcessBuilder(\"lib/jsl/jsl.exe\", \"-process\",\n\t\t\t\tpath).start();\n\n\t\t// get output from JSL\n\t\tString title = \"Checking JavaScriptFile: \" + path + \"\\n\";\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tprocess.getInputStream()));\n\n\t\tString lines = \"\";\n\t\tString line;\n\t\twhile ((line = input.readLine()) != null) {\n\t\t\tlines += line + \"\\n\";\n\t\t}\n\t\tinput.close();\n\n\t\treturn title + lines;\n\t}",
"public static Object getURLContentsStatic(URL url, byte[] outputBytes, String post,\r\n boolean asString) {\r\n Object ret = JSFile.getURLContents(url, outputBytes, post);\r\n // check for error\r\n try {\r\n return (!asString ? ret : ret instanceof String ? ret : ret instanceof SB ? ((SB) ret)\r\n .toString() : ret instanceof byte[] ? new String((byte[]) ret)\r\n : new String((byte[]) Rdr.getStreamAsBytes((BufferedInputStream) ret,\r\n null)));\r\n } catch (Exception e) {\r\n return \"\" + e;\r\n }\r\n }",
"private static String load(final String url) throws IOException {\n\t\tHttpURLConnection conn =\n\t\t\t(HttpURLConnection) new URL(url).openConnection();\n\n\t\tconn.setDoInput(true);\n\t\tconn.setDoOutput(false);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.connect();\n\n\t\tint respCode = conn.getResponseCode();\n\t\tif (respCode != HttpURLConnection.HTTP_OK) {\n\t\t\tthrow new IOException(conn.getResponseMessage());\n\t\t}\n\n\t\tString contentType =\n\t\t\tconn.getHeaderField(\"Content-Type\").toUpperCase(Locale.ENGLISH);\n\t\tString csName = DEFAULT_CHARSET;\n\t\tint csPos = contentType.lastIndexOf(\"CHARSET=\");\n\t\tif (csPos != -1) {\n\t\t\tcsName = contentType.substring(csPos + \"CHARSET=\".length()).trim();\n\t\t}\n\t\tCharset charset = Charset.forName(csName);\n\n\t\tInputStream is = conn.getInputStream();\n\t\tif (is == null) {\n\t\t\tthrow new IOException(\"No input stream\");\n\t\t}\n\t\tInputStreamReader isr = new InputStreamReader(is, charset);\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tint c;\n\t\t\twhile ((c = isr.read()) != -1) {\n\t\t\t\tsb.appendCodePoint(c);\n\t\t\t}\n\t\t} finally {\n\t\t\tisr.close();\n\t\t}\n\n\t\treturn sb.toString();\n\t}",
"protected void loadURL(String thisURL) {\n\t\tgetDriver().get(thisURL);\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (Exception e) {\n\t\t\t// nothing\n\t\t}\n\t}",
"void load(Request req);",
"public int load(URL url) throws\n\t\tIOException,\n\t\tUnsupportedAudioFileException,\n\t\tIllegalStateException,\n\t\tLineUnavailableException\n\t{\n\t\treturn makeChannel(AudioSystem.getAudioInputStream(\n\t\t\t\tnew BufferedInputStream(url.openStream())),\n\t\t\tAudioSystem.getAudioFileFormat(url).getFormat());\n\t}",
"public void executeLoad(){\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString pcOffset = mIR.substring(7, 9);\n\t\tBitString wantedVal = mMemory[mPC.getValue() + pcOffset.getValue2sComp()];\n\t\tmRegisters[destBS.getValue()] = wantedVal;\n\n\t\tsetConditionalCode(wantedVal);\n\t\t//now I just need to set the conditional codes.\n\t}",
"public static ArrayList<ScriptObject> loadScript(int act, int scene) {\n String path = PropertiesHelper.getString(\"apps.script.base.path\");\n String fileName = String.format(\"scene-%s-%s\", act, scene);\n return scriptExtractor(Objects.requireNonNull(FileReader.readFile(path, fileName)));\n }",
"public IPluginResource load( URI path ) throws LoaderException;",
"@Override\n\tpublic void upLoad(String url, String param, Callback callback) {\n\n\t}",
"protected static String getSource(String url) {\n String source = \"\";\n try {\n URL link = new URL(url);\n BufferedReader reader =\n new BufferedReader(new InputStreamReader(link.openStream(), \"UTF-8\"));\n String input;\n while ((input = reader.readLine()) != null) {\n if (input.trim().equals(\"\"))\n continue;\n source += (source.equals(\"\") ? \"\" : \"\\n\") + input;\n }\n reader.close();\n } catch (MalformedURLException e) {\n throw new RuntimeException(\"[Source:43] The URL provided does not exist or invalid.\");\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(\"[Source:45] The site farted, we can't even comprehend the \" +\n \"encoding of the \" +\n \"character.\");\n } catch (IOException e) {\n throw new RuntimeException(\"[Source:47] Something interrupted the connection or failed to \" +\n \"operate.\");\n }\n return source;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tFakeWebServer server = new FakeWebServer();\n\t\t\n\t\tString pageA = server.request(\"PageA\");\n\t\tSystem.out.println(pageA);\n\t\t\n\t\tString pageB = server.request(\"PageB\");\n\t\tSystem.out.println(pageB);\n\t\t\n\t\tString malicious = server.request(\"<script> Script will execute when it gets back to client </script>\");\n\t\tSystem.out.println(malicious);\n\t\t\n\t}",
"public String evaluate(final String jsExpression);",
"public static Analytic rubyEval(Script script) throws ScriptException {\n System.setProperty(\"org.jruby.embed.localcontext.scope\", \"singleton\");\n System.setProperty(\"org.jruby.embed.compat.version\", \"JRuby1.9\");\n // keep local variables around between calls to eval\n System.setProperty(\"org.jruby.embed.localvariable.behavior\", \"persistent\");\n // make sure object hashing is consistent across all JVM instances, PR #640\n System.setProperty(\"jruby.consistent.hashing\", \"true\");\n\n // use ruby custom avro data\n AvroMode.GENERIC.override(new RubyReaderWriterFactory());\n\n ScriptEngine engine = new ScriptEngineManager().getEngineByName(\"jruby\");\n Bindings bindings = new SimpleBindings();\n bindings.put(\"$SCRIPT\", script);\n return (Analytic) engine.eval(\n new InputStreamReader(new ByteArrayInputStream(script.bytes)),\n bindings);\n }",
"public static AsyncTask<String, String, String> execute(String url) {\n return new PelicanRequest().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, url);\n }",
"public static String eval(final String valueToEval, String strategy, Object controller)\n throws ScriptException {\n Bindings bindings = new SimpleBindings();\n bindings.put(\"controller\", controller);\n\n Object res = null;\n if (\"eval_reader\".equals(strategy)) {\n Reader reader = new StringReader(valueToEval);\n res = groovyEngine.eval(reader, bindings);\n } else if (\"compile\".equals(strategy)) {\n // we're doing it with groovy, but could have used another language like js\n CompiledScript script = ((Compilable) groovyEngine).compile(valueToEval);\n\n res = script.eval(bindings);\n } else if (\"error\".equals(strategy)) {\n groovyEngine.eval(new ErrorReader());\n } else { // eval_string\n res = groovyEngine.eval(valueToEval, bindings);\n }\n\n return (res != null) ? res.toString() : \"(null)\";\n }",
"public void doRunScript(StaplerRequest req, StaplerResponse rsp, @QueryParameter(\"name\") String scriptName) throws IOException, ServletException {\n \t\tcheckPermission(Hudson.ADMINISTER);\n \n \t\tScript script = getScript(scriptName, true);\n \t\treq.setAttribute(\"script\", script);\n \t\t// set default selection\n \t\treq.setAttribute(\"currentNode\", \"(master)\");\n \t\treq.getView(this, \"runscript.jelly\").forward(req, rsp);\n \t}",
"Result evaluate();"
] | [
"0.64809394",
"0.629709",
"0.5825851",
"0.5780588",
"0.5597615",
"0.5510051",
"0.55039114",
"0.5449836",
"0.5437699",
"0.542799",
"0.5382199",
"0.53620833",
"0.5343898",
"0.53349984",
"0.5284272",
"0.52570206",
"0.52513313",
"0.5216722",
"0.51965237",
"0.51961106",
"0.51516575",
"0.50744015",
"0.5059511",
"0.5051923",
"0.49957994",
"0.49882308",
"0.49682105",
"0.49606445",
"0.49521872",
"0.49256513",
"0.49174833",
"0.4902277",
"0.4885917",
"0.48535833",
"0.48534632",
"0.48422608",
"0.48345178",
"0.4830999",
"0.4822984",
"0.48087204",
"0.478658",
"0.47723088",
"0.47723007",
"0.47615018",
"0.47325024",
"0.4693582",
"0.46800804",
"0.4675065",
"0.46660468",
"0.4665979",
"0.46313602",
"0.4628831",
"0.46252382",
"0.46204895",
"0.4608295",
"0.46061784",
"0.45992753",
"0.45966408",
"0.4590282",
"0.45867106",
"0.4559153",
"0.45511493",
"0.4549622",
"0.45496106",
"0.4542667",
"0.45355406",
"0.45344266",
"0.45324418",
"0.45287496",
"0.45284075",
"0.45009127",
"0.44985712",
"0.4493129",
"0.44781172",
"0.44719192",
"0.44657007",
"0.44616535",
"0.44585696",
"0.4454288",
"0.4449944",
"0.44452998",
"0.4429932",
"0.4423845",
"0.44214147",
"0.44196627",
"0.44115",
"0.4401136",
"0.43879792",
"0.43771887",
"0.43760058",
"0.437002",
"0.4366402",
"0.43655384",
"0.4361065",
"0.43604362",
"0.43537354",
"0.4353104",
"0.4352558",
"0.43506175",
"0.43505353"
] | 0.8305783 | 0 |
Executes a script provided by a given reader | void eval(Reader reader) throws ScriptRunnerException, IOException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void executeScript(Readable script) throws IOException;",
"private void runScriptShell(Interpreter interpreter, String filePath) {\r\n\r\n\t\tint lineNumber = 1;\r\n\r\n\t\tFile file = new File(filePath);\r\n\r\n\t\tSet<String> errorMessages = new HashSet<String>();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tthis.statementScanner = new Scanner(file);\r\n\r\n\t\t\tthis.statementScanner.useDelimiter(\"(?<!\\\\\\\\);\");\r\n\r\n\t\t\twhile (this.statementScanner.hasNext()) {\r\n\r\n\t\t\t\tthis.input = this.statementScanner.next();\r\n\r\n\t\t\t\tthis.statement.parseStatement(this.input);\r\n\r\n\t\t\t\terrorMessages = statement.getErrorMessages();\r\n\r\n\t\t\t\tif (errorMessages.size() > 0) {\r\n\t\t\t\t\tSystem.out.println(\" Error on line number \" + lineNumber + \": \");\r\n\t\t\t\t\tfor (String errorMessage : errorMessages) {\r\n\r\n\t\t\t\t\t\tSystem.out.println(\" \" + errorMessage);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tinterpreter.processStatement(this.statement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlineNumber++;\r\n\t\t\t}\r\n\r\n\t\t\tstatementScanner.close();\r\n\t\t\t/*\r\n\t\t\t * For script input, the file is written to and saved after the script's\r\n\t\t\t * execution is complete.\r\n\t\t\t */\r\n\t\t\tinterpreter.getDisk().writeDataMapToDisk(interpreter.getMemory().getDataMap());\r\n\t\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\r\n\t\t\tSystem.out.println(\"Could not access the script file: \" + filePath + \"...no changes were made.\");\r\n\t\t}\r\n\r\n\t}",
"Value eval(String script, String name, String contentType, boolean interactive) throws Exception;",
"public Object executeScript(String command);",
"InputStream execute(List<String> args, InputStream inputStream, Environment environment)\n throws SyntaxErrorException, IOException;",
"public abstract void runScript() throws Exception;",
"public static void main(String[] args) throws Exception {\n Interpreter i = new Interpreter(readFile(\"yourFilePathGoesHERE\"));\n i.evalProgram();\n }",
"public void runScript(File script) throws DataAccessLayerException {\n byte[] bytes = null;\n try {\n bytes = FileUtil.file2bytes(script);\n } catch (FileNotFoundException e) {\n throw new DataAccessLayerException(\n \"Unable to open input stream to sql script: \" + script);\n } catch (IOException e) {\n throw new DataAccessLayerException(\n \"Unable to read script contents for script: \" + script);\n }\n runScript(new StringBuffer().append(new String(bytes)));\n }",
"@Override\n public String readFile(BufferedReader reader)\n {\n try\n {\n StringBuffer strLine = new StringBuffer();\n String line;\n\n while ((line = reader.readLine()) != null)\n {\n if (!line.startsWith(\"--\", 0))\n {\n strLine.append(line);\n\n // use ; as the command delimiter and execute the query on the database.\n if (line.endsWith(\";\"))\n {\n super.exeQuery(strLine.toString());\n strLine = new StringBuffer();\n }\n }\n }\n\n return strLine.toString();\n }\n catch (IOException ioex)\n {\n logger.error(\"Error reading contents from file.\");\n return null;\n }\n }",
"void loadScript(URL url) throws IOException, ScriptRunnerException;",
"@Override\r\n public void execute(SocketChannel channel) {\r\n File file;\r\n file = new File(fileName);\r\n if (!file.canRead()) {\r\n System.err.println(\"Cant read file \" + fileName + \".\\nScript execution failed.\");\r\n return;\r\n }\r\n try (Scanner fin = new Scanner(file)) {\r\n String str;\r\n Command command;\r\n while (fin.hasNextLine()) {\r\n str = fin.nextLine();\r\n command = parser.parse(str);\r\n if (command != null && !command.getClass().toString().contains(\"ExecuteScriptCommand\")) {\r\n command.execute(channel);\r\n } else if (command != null && command.getClass().toString().contains(\"ExecuteScriptCommand\")) {\r\n String executeFileName = ((ExecuteScriptCommand) command).getFileName();\r\n if (this.parser.getExecutedFiles().contains(executeFileName)) {\r\n System.err.println(\"recursive execute_script_command is unavaliable, \" + executeFileName + \" file was already called.\");\r\n } else {\r\n this.parser.getExecutedFiles().add(fileName);\r\n command.execute(channel);\r\n }\r\n } else {\r\n System.err.println(String.format(\"No such command: %s\", str));\r\n }\r\n\r\n }\r\n } catch (FileNotFoundException ex) {\r\n System.err.println(\"No such file \" + fileName + \".\\nScript execution failed.\");\r\n } catch (Exception ex) {\r\n System.err.println(ex.getMessage());\r\n System.err.println(\"Script failed\");\r\n }\r\n }",
"void run(String fin){\n\t\tScanner sc = null;\n\t\ttry{\n\t\t\tsc = new Scanner(new FileReader(fin));\n\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\texecuteLine(sc.nextLine());\n\t\t\t}\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.err.println(String.format(\"File %s not found\", fin));\n\t\t}\n\t\tfinally{\n\t\t\tif (sc != null){\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t}\n\t}",
"void execute(Executable executable);",
"public void execfile(String filename) {\n }",
"public void doRunScript(StaplerRequest req, StaplerResponse rsp, @QueryParameter(\"name\") String scriptName) throws IOException, ServletException {\n \t\tcheckPermission(Hudson.ADMINISTER);\n \n \t\tScript script = getScript(scriptName, true);\n \t\treq.setAttribute(\"script\", script);\n \t\t// set default selection\n \t\treq.setAttribute(\"currentNode\", \"(master)\");\n \t\treq.getView(this, \"runscript.jelly\").forward(req, rsp);\n \t}",
"private void runScript(String script) throws IOException, InterruptedException, RootToolsException, TimeoutException {\r\n\r\n// File tmpFolder = ctx.getDir(\"tmp\", Context.MODE_PRIVATE);\r\n//\r\n// File f = new File(tmpFolder, TEMP_SCRIPT);\r\n// f.setExecutable(true);\r\n// f.deleteOnExit();\r\n//\r\n// // Write the script to be executed\r\n// PrintWriter out = new PrintWriter(new FileOutputStream(f));\r\n// if (new File(\"/system/bin/sh\").exists()) {\r\n// out.write(\"#!/system/bin/sh\\n\");\r\n// }\r\n// out.write(script);\r\n// if (!script.endsWith(\"\\n\")) {\r\n// out.write(\"\\n\");\r\n// }\r\n// out.write(\"exit\\n\");\r\n// out.flush();\r\n// out.close();\r\n\r\n Log.d(this.getClass().getSimpleName(), \"Requesting file execution\");\r\n// Process exec = Runtime.getRuntime().exec(\"su -c \" + f.getAbsolutePath());\r\n// int res = exec.waitFor();\r\n// Toast.makeText(ctx, \"result: \" + res, Toast.LENGTH_LONG).show();\r\n \r\n// if (res != 0) {\r\n// ExceptionHandler.handle(this, R.string.error_script_loading, ctx);\r\n// }\r\n \r\n\r\n if (RootTools.isAccessGiven()) {\r\n List<String> output = RootTools.sendShell(script, SCRIPT_MAX_TIMEOUT);\r\n Log.d(\"\" + this, \"\" + output);\r\n }\r\n }",
"private void doExecute() throws MojoExecutionException {\n URL buildUrl;\n try {\n buildUrl = buildDirectory.toURI().toURL();\n getLog().info(\"build directory \" + buildUrl.toString());\n } catch (MalformedURLException e1) {\n throw new MojoExecutionException(\"Cannot build URL for build directory\");\n }\n ClassLoader loader = makeClassLoader();\n Properties properties = new Properties(project.getProperties());\n properties.setProperty(\"lenskit.eval.dataDir\", dataDir);\n properties.setProperty(\"lenskit.eval.analysisDir\", analysisDir);\n dumpClassLoader(loader);\n EvalConfigEngine engine = new EvalConfigEngine(loader, properties);\n \n try {\n File f = new File(script);\n getLog().info(\"Loading evalution script from \" + f.getPath());\n engine.execute(f);\n } catch (CommandException e) {\n throw new MojoExecutionException(\"Invalid evaluation script\", e);\n } catch (IOException e) {\n throw new MojoExecutionException(\"IO Exception on script\", e);\n }\n }",
"void perform(LineReader input, OutputStream output) throws IOException;",
"@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }",
"public void runFile(String filename) {\n }",
"public void runScript(String script, String scriptUrl) throws Throwable {\n \n int idx = 0;\n int lineNumber = 0;\n boolean onExecuted = false;\n \n //If an exception is catched the remaining lines of this script are\n //ignored\n boolean ignoreCurrentScript = false;\n \n String syntaxError = null;\n \n boolean eol;\n do {\n try {\n // The end of the command is recognized with the following\n // sequence ;( *)\\n\n StringBuffer l = new StringBuffer();\n eol = false;\n String line = null;\n while(idx<script.length()) {\n char ch = script.charAt(idx);\n l.append(ch);\n if (ch == ';') {\n eol = true;\n if (idx < script.length() - 1) {\n // This may be the end of line\n while(idx<script.length()) {\n char nextCh = script.charAt(++idx);\n if (nextCh == '\\n') {\n break;\n } else if (nextCh == ' ' || nextCh == '\\r') {\n // Keep searching\n l.append(nextCh);\n } else {\n // This is not the end of line\n l.append(nextCh);\n eol = false;\n break;\n }\n }\n } else {\n // This is the last char\n ++idx;\n }\n } else if (ch == '#' && l.length() == 1) {\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Found a comment, consuming line\");\n }\n // This line is a comment, skip everything until an EOL\n // is found\n ++idx;\n for(;idx<script.length();++idx) {\n char nextChar = script.charAt(idx);\n if (nextChar == '\\n') {\n break;\n } else {\n l.append(nextChar);\n }\n }\n eol = true;\n } else if (ch == '\\n') {\n // We found a EOL without the ;\n // This maybe an empty line that we just ignore\n String currentLine = l.toString().trim();\n if (currentLine.length() == 0) {\n l = new StringBuffer();\n } else {\n // If otherwise this is an EOL in the middle of a\n // command, we just ignore it (EOL shall be represented\n // as \\n)\n l.deleteCharAt(l.length() - 1);\n }\n }\n if (eol) {\n // Remove trailing end of line (everything after the ;)\n while(l.length() > 0 && l.charAt(l.length() - 1) != ';') {\n l.deleteCharAt(l.length() - 1);\n }\n line = l.toString();\n break;\n }\n ++idx;\n }\n \n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"Executing line: \" + line);\n }\n \n if (line == null) {\n return;\n }\n \n lineNumber++;\n \n syntaxError = null;\n \n line = line.trim();\n if (line.length() > 0 && !line.startsWith(\"#\")) {\n if (line.startsWith(ON_COMMAND + \" \")) {\n // This is a conditional statement. Check if it must be\n // executed\n boolean exec = false;\n try {\n exec = checkCandidateStatement(line, onExecuted);\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n exec = false;\n }\n if (exec) {\n onExecuted = true;\n // Get the real command\n int colPos = line.indexOf(\":\");\n if (colPos == -1) {\n String msg = \"Syntax error in script, missing ':' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n if (colPos + 1 >= line.length()) {\n String msg = \"Syntax error in script, missing command in: \"\n + line + \" at line \" + lineNumber;\n Log.error(TAG_LOG, msg);\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n //throw new ClientTestException(\"Script syntax error\");\n }\n line = line.substring(colPos + 1);\n line = line.trim();\n } else {\n // skip the rest\n if (Log.isLoggable(Log.INFO)) {\n Log.info(TAG_LOG, \"Skipping conditional statement\");\n }\n continue;\n }\n } else {\n // Reset the conditional statement status\n onExecuted = false;\n }\n \n int parPos = line.indexOf('(');\n if (parPos == -1) {\n syntaxError = \"Syntax error in script \"\n + scriptUrl\n + \"\\nmissing '(' in: \"\n + line + \" at line \" + lineNumber;\n Log.error(syntaxError);\n \n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n ignoreCurrentScript = true;\n // Force this script to be terminated\n idx = script.length();\n }\n \n String command = line.substring(0, parPos);\n command = command.trim();\n String pars;\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"line=\" + line);\n }\n if (Log.isLoggable(Log.TRACE)) {\n Log.trace(TAG_LOG, \"parPos = \" + parPos);\n }\n if (line.endsWith(\";\")) {\n pars = line.substring(parPos, line.length() - 1);\n } else {\n pars = line.substring(parPos);\n }\n \n //Increments the test counter to\n if (BasicCommandRunner.BEGIN_TEST_COMMAND.equals(command)) {\n chainedTestsCounter++;\n if (chainedTestsCounter == 1) {\n mainTestName = pars;\n }\n } else if (BasicCommandRunner.END_TEST_COMMAND.equals(command)) {\n chainedTestsCounter--;\n if (chainedTestsCounter == 0) {\n ignoreCurrentScript = false;\n }\n }\n \n if (!ignoreCurrentScript) {\n // Extract parameters and put them into a vector\n Vector args = new Vector();\n int i = 0;\n String arg;\n do {\n arg = getParameter(pars, i++);\n if (arg != null) {\n args.addElement(arg);\n }\n } while(arg != null);\n runCommand(command, args);\n }\n }\n } catch (IgnoreScriptException ise) {\n ignoreCurrentScript = true;\n } catch (Throwable t) {\n errorCode = CLIENT_TEST_EXCEPTION_STATUS;\n \n StringBuffer msg = new StringBuffer();\n msg.append(\"\\nTEST FAILED: \").append(mainTestName);\n msg.append(\"\\n\\tException: \").append(t);\n msg.append(syntaxError != null ? \"\\n\\t\" + syntaxError : \"\");\n msg.append(\"\\n\\t(\").append(scriptUrl).append(\": \")\n .append(lineNumber).append(\")\");\n \n Log.error(msg.toString());\n Log.error(TAG_LOG, \"Exception details\", t);\n \n //tell the scriptrunner to ignore all of the chained tests\n //commands\n ignoreCurrentScript = true;\n \n if(stopOnFailure) {\n throw new ClientTestException(\"TEST FAILED\");\n }\n }\n } while (true);\n }",
"Object eval(String script, int keyCount, String... params);",
"public abstract void runInput(String stringFile) throws IOException;",
"public LexerDracoScript(java.io.Reader in) {\n this.zzReader = in;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tchar[] buffer = \"\\\"use strict\\\";\\r\\nfunction sum(x, y){ return x + y }\".toCharArray();\n\t\tSource source = new Source(\"src\\\\test\\\\resources\\\\a.txt\", buffer);\n\t\t\n\t\tParseOption option = new ParseOption();\n\t\t\n\t\tParser parser = new Parser();\n\t\t\n\t\tparser.parse(source, option);\n\n\t}",
"public void unsafeEval(final Reader script) {\n this.octaveExec.evalRW(new ReaderWriteFunctor(script), \n\t\t\t getReadFunctor());\n }",
"protected void runXmlScript(String script, String scriptUrl) throws Throwable {\n XmlPullParser parser = new KXmlParser();\n \n try {\n ByteArrayInputStream is = new ByteArrayInputStream(script.getBytes(\"UTF-8\"));\n parser.setInput(is, \"UTF-8\");\n \n // Begin parsing\n nextSkipSpaces(parser);\n // If the first tag is not the SyncML start tag, then this is an\n // invalid message\n require(parser, parser.START_TAG, null, \"Script\");\n nextSkipSpaces(parser);\n // Keep track of the nesting level depth\n nestingDepth++;\n \n String currentCommand = null;\n boolean condition = false;\n boolean evaluatedCondition = false;\n Vector args = null;\n \n boolean ignoreCurrentScript = false;\n boolean ignoreCurrentBranch = false;\n \n while (parser.getEventType() != parser.END_DOCUMENT) {\n \n // Each tag here is a command. All commands have the same\n // format:\n // <Command>\n // <Arg>arg1</Arg>\n // <Arg>arg2</Arg>\n // </Command>\n //\n // The only exception is for conditional statements\n // <Condition>\n // <If>condition</If>\n // <Then><command>...</command></Then>\n // <Else><command>...</command>/Else>\n // </Condition>\n \n if (parser.getEventType() == parser.START_TAG) {\n String tagName = parser.getName();\n \n if (\"Condition\".equals(tagName)) {\n condition = true;\n } else if (\"If\".equals(tagName)) {\n // We just read the \"<If>\" tag, now we read the rest of the condition\n // until the </If>\n nextSkipSpaces(parser);\n evaluatedCondition = evaluateCondition(parser);\n nextSkipSpaces(parser);\n require(parser, parser.END_TAG, null, \"If\");\n } else if (\"Then\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (!evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else if (\"Else\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else {\n if (currentCommand == null) {\n currentCommand = tagName;\n args = new Vector();\n Log.trace(TAG_LOG, \"Found command \" + currentCommand);\n } else {\n // This can only be an <arg> tag\n if (\"Arg\".equals(tagName)) {\n parser.next();\n \n // Concatenate all the text tags until the end\n // of the argument\n StringBuffer arg = new StringBuffer();\n while(parser.getEventType() == parser.TEXT) {\n arg.append(parser.getText());\n parser.next();\n }\n String a = arg.toString().trim();\n Log.trace(TAG_LOG, \"Found argument \" + a);\n a = processArg(a);\n args.addElement(a);\n require(parser, parser.END_TAG, null, \"Arg\");\n }\n }\n }\n } else if (parser.getEventType() == parser.END_TAG) {\n String tagName = parser.getName();\n if (\"Condition\".equals(tagName)) {\n condition = false;\n currentCommand = null;\n ignoreCurrentBranch = false;\n } else if (tagName.equals(currentCommand)) {\n try {\n Log.trace(TAG_LOG, \"Executing accumulated command: \" + currentCommand + \",\" + ignoreCurrentScript + \",\" + ignoreCurrentBranch);\n if ((!ignoreCurrentScript && !ignoreCurrentBranch) || \"EndTest\".equals(currentCommand)) {\n runCommand(currentCommand, args);\n }\n } catch (IgnoreScriptException ise) {\n // This script must be ignored\n ignoreCurrentScript = true;\n nestingDepth = 0;\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SKIPPED);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n } catch (Throwable t) {\n \n Log.error(TAG_LOG, \"Error running command\", t);\n \n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Error \" + t.toString() + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n \n if (stopOnFailure) {\n throw t;\n } else {\n ignoreCurrentScript = true;\n nestingDepth = 0;\n }\n }\n currentCommand = null;\n } else if (\"Script\".equals(tagName)) {\n // end script found\n \n \n // If we get here and the current script is not being\n // ignored, then the execution has been successful\n if (!ignoreCurrentScript) {\n if (testKeys.get(scriptUrl) == null) {\n // This test is not a utility test, save its\n // status\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SUCCESS);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n }\n }\n \n if (nestingDepth == 0 && ignoreCurrentScript) {\n // The script to be ignored is completed. Start\n // execution again\n ignoreCurrentScript = false;\n }\n }\n }\n nextSkipSpaces(parser);\n }\n } catch (Exception e) {\n // This will block the entire execution\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Syntax error in file \" + scriptUrl + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n Log.error(TAG_LOG, \"Error parsing command\", e);\n throw new ClientTestException(\"Script syntax error\");\n }\n }",
"public void doReads(Reader reader) throws IOException;",
"@Override\n protected void execute(File file, int offset) throws IOException {\n }",
"public void spawnShell(Interpreter interpreter, String[] args) {\r\n\t\tif (args.length == 1 && args[0].endsWith(\".rut\")) {\r\n\r\n\t\t\tinterpreter.setSuppressOutputSignal(true);\r\n\t\t\tthis.runScriptShell(interpreter, args[0]);\r\n\r\n\t\t}\r\n\t\t\r\n\t\t/* Read from command line argument / stdin */\r\n\t\telse if (args.length > 0 && !args[0].equals(\"debug\")) {\r\n\r\n\t\t\tthis.runArgumentShell(interpreter, args);\r\n\r\n\t\t}\r\n\t\t\r\n\t\t/* Read from interactive shell with debugging output */\r\n\t\telse if (args.length == 1 && args[0].equals(\"debug\")) {\r\n\t\t\t\r\n\t\t\tthis.runInteractiveShell(interpreter, \"debug\");\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t/* Read from interactive shell */\r\n\t\telse {\r\n\r\n\t\t\tthis.runInteractiveShell(interpreter);\r\n\r\n\t\t}\r\n\r\n\t}",
"public ExecutableReader(InputStream is) throws Exception {\n\t\texStr = new ExecutableStream(is);\n\t\tread(exStr);\n\t}",
"protected void readAndProcessInFile() throws IOException {\r\n\r\n\t\tfinal String LINE_PROMPT = \"\\nPlease enter a line; a command must start with a \"\r\n\t\t\t\t+ Editor.COMMAND_START + \".\";\r\n\r\n\t\tString result = new String();\r\n\r\n\t\tfileWriter.println(LINE_PROMPT);\r\n\t\tString line = fileReader.readLine();\r\n\t\twhile (line != null) {\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tfileWriter.println(line);\r\n\t\t\t\tresult = editor.interpret(line);\r\n\r\n\t\t\t} // try\r\n\t\t\tcatch (RuntimeException e) {\r\n\r\n\t\t\t\tfileWriter.println(e);\r\n\r\n\t\t\t} // catch\r\n\t\t\tif (line.equals(Editor.DONE_COMMAND))\r\n\t\t\t\tfileWriter.println(result);\r\n\t\t\telse\r\n\t\t\t\tfileWriter.println(LINE_PROMPT);\r\n\t\t\tline = fileReader.readLine();\r\n\t\t} // while\r\n\t\tfileWriter.close();\r\n\r\n\t}",
"public interface Interpreter {\n StringBuilder process(File file);\n}",
"public ProgramParser(String[] args) throws InterpreterException {\n java.util.Scanner scanner;\n String text = \"\";\n try {\n scanner = new java.util.Scanner(new java.io.File(args[0]));\n text = scanner.useDelimiter(\"\\u005c\\u005cA\").next();\n scanner.close();\n ProgramParser.programCode = new java.io.StringReader(text);\n } catch (FileNotFoundException ex) {\n throw new InterpreterException(\"FileNotFoundException\", \"Check file path.\", ex.getMessage());\n }\n ProgramParser.stringInput = args[1];\n System.out.println(\"Program: \" + args[0] + \" - input: \" + stringInput);\n //System.out.println(\"code\\n\" + text + \"\\n---Done\");\n }",
"public static void main(String[] args) {\n\t\tString docBody = null;\n\t\tMap<String,String> parameters = new HashMap<String, String>();\n\t\tMap<String,String> persistentParameters = new HashMap<String, String>();\n\t\tList<RCCookie> cookies = new ArrayList<RequestContext.RCCookie>();\n\t\t\n\t\ttry {\n\t\t\tdocBody = new String(Files.readAllBytes(Paths.get(\"examples/zbrajanje.smscr\")), StandardCharsets.UTF_8);\n\t\t} catch (IOException e1) {\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tSmartScriptParser parser = null;\n\n\t\ttry {\n\t\t\tparser = new SmartScriptParser(docBody);\n\t\t} catch (SmartScriptParserException e) {\n\t\t\tSystem.out.println(\"Unable to parse document!\");\n\t\t\tSystem.exit(-1);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"If this line ever executes, you have failed this class!\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\tDocumentNode document = parser.getDocumentNode();\n\t\tparameters.put(\"a\", \"4\");\n\t\tparameters.put(\"b\", \"2\");\n\t\t\n\t\tnew SmartScriptEngine(document, new RequestContext(System.out, parameters, persistentParameters, cookies)).execute();\n\t}",
"public static void main(String[] args) throws FileNotFoundException {\n\n Scanner input;\n PrintStream output;\n\n input = determineInputSource(args);\n output = determineOutputSource(args);\n\n TurtleInterpreter turtleInterpreter = new TurtleInterpreter(input,\n output);\n\n turtleInterpreter.processCommands();\n }",
"public static void main(String[] args) {\n\t\tif (args.length != 1) {\n\t\t\tSystem.err.println(\n\t\t\t\t\"Please provide only one argument (document filepath).\"\n\t\t\t);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tString docBody = null;\n\t\ttry {\n\t\t\tdocBody = new String(\n\t\t\t\tFiles.readAllBytes(Paths.get(args[0]))\n\t\t\t);\n\t\t} catch (IOException e1) {\n\t\t\tSystem.err.println(\"Invalid document filepath.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tSmartScriptParser parser = null;\n\t\t\n\t\ttry {\n\t\t\tparser = new SmartScriptParser(docBody);\n\t\t} catch (SmartScriptParserException e) {\n\t\t\tSystem.out.println(\"Unable to parse document!\");\n\t\t\tSystem.exit(-1);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\"If this line ever executes, you have failed this class!\"\n\t\t\t);\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\tDocumentNode document = parser.getDocumentNode();\n\t\tString originalDocumentBody = createOriginalDocumentBody(document);\n\t\t\n\t\t// should write something like original content of docBody\n\t\tSystem.out.println(originalDocumentBody);\n\t}",
"FileLoader createJob(Reader reader);",
"public static void main(String[] args) {\n\t\tfileName = args[0];\n\t\t//set up file name for the data:\n\t\ttry {\n\t\t\treader = new Scanner(new File(args[1]));\n\t\t\t\n\t\t\t//create a new program, then parse, print, and execute:\n\t\t\tProgram p = new Program();\n\t\t\tp.parse();\n\t\t\tp.print();\n\t\t\tSystem.out.println(\"---PROGRAM OUTPUT---\");\n\t\t\tp.execute();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"ERROR reading data file \" + args[1]);\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\treader.close();\n\t\t}\n\t}",
"void loadChunk(Reader reader, ScriptContext scriptContext)\n\t\t\tthrows ScriptException {\n\t\tloadChunk(new ReaderInputStream(reader), scriptContext);\n\t}",
"private Result processScript() throws IOException, HsqlException {\n\n String token = tokenizer.getString();\n ScriptWriterText dsw = null;\n\n session.checkAdmin();\n\n try {\n if (tokenizer.wasValue()) {\n if (tokenizer.getType() != Types.VARCHAR) {\n throw Trace.error(Trace.INVALID_IDENTIFIER);\n }\n\n dsw = new ScriptWriterText(database, token, true, true, true);\n\n dsw.writeAll();\n\n return new Result(ResultConstants.UPDATECOUNT);\n } else {\n tokenizer.back();\n\n return DatabaseScript.getScript(database, false);\n }\n } finally {\n if (dsw != null) {\n dsw.close();\n }\n }\n }",
"R execute();",
"public Object execute( Object thiz, Object[] args ) throws Exception {\r\n FileConnectionWrapper fConnWrap = new FileConnectionWrapper( args[ 0 ].toString() );\r\n fConnWrap.openDataInputStream();\r\n\r\n if( args.length == 2 || ( args.length == 3 && ( (Boolean) args[ 2 ] ).booleanValue() ) ) { // Async read\r\n new Thread( new AsyncRead( this, fConnWrap, args[ 0 ].toString(), (ScriptableFunction) args[ 1 ] ) ).start();\r\n } else { // Sync read\r\n read( this, fConnWrap, args[ 0 ].toString(), (ScriptableFunction) args[ 1 ] );\r\n }\r\n return UNDEFINED;\r\n }",
"void readCommand(String command) throws IOException, ClassNotFoundException, InterruptedException;",
"public static void main(String[] args) {\n\t\tif (args.length != 1) {\n\t\t\tSystem.out.println(\"Broj argumenata naredbenog retka mora biti 1.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\tString filepath = args[0];\n\t\tString docBody = \"\";\n\t\t\n\t\ttry {\n\t\t\tdocBody = new String(Files.readAllBytes(Paths.get(filepath)), StandardCharsets.UTF_8);\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\tSmartScriptParser parser = null;\n\t\t\n\t\ttry {\n\t\t\tparser = new SmartScriptParser(docBody);\n\t\t} catch(SmartScriptParserException e) {\n\t\t\tSystem.out.println(\"Unable to parse document!\");\n\t\t\tSystem.exit(-1);\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"If this line ever executes, you have failed this class!\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\tDocumentNode document = parser.getDocumentNode();\n\t\tString originalDocumentBody = createOriginalDocumentBody(document);\n\t\tSystem.out.println(originalDocumentBody);\n\t\t\n\t\tSmartScriptParser parser2 = new SmartScriptParser(originalDocumentBody);\n\t\tDocumentNode document2 = parser2.getDocumentNode();\n\t\tString originalDocumentBodySecond = createOriginalDocumentBody(document2);\n\t\t\n\t\tif (originalDocumentBody.equals(originalDocumentBodySecond)) {\n\t\t\tSystem.out.println(\"Identični\");\n\t\t}\n\t}",
"public static void rewrite(ExecutableReader reader, File file) throws Exception {\n\t\tFileInputStream fis = new FileInputStream(file);\t\t\n\t\treader.exStr = new ExecutableStream(fis);\n\t\treader.read(reader.exStr);\n\t\tfis.close();\n\t}",
"private ExecutableReader() {}",
"public abstract String run(String args);",
"public void simulate() {\n\n\n\n //read file into stream, try-with-resources\n try (Stream<String> stream = Files.lines(Paths.get(ClassLoader.getSystemResource(fileName).toURI()))) {\n\n stream.forEach(c -> { logger.info(\"Processing raw command :\" + c );\n String[] robotCmdArgs = c.split(DELIM_REG_EX);\n processSingleCmd(robotCmdArgs);\n\n }\n );\n\n } catch (IOException e) {\n e.printStackTrace();\n logger.info(\"IOException processing commands :\" );\n }\n catch (URISyntaxException e) {\n e.printStackTrace();\n logger.info(\"URISyntaxException processing commands :\" );\n }\n }",
"private ExecuteCommand(@NotNull SkriptLoader skriptLoader,\n @NotNull SkriptRunEnvironment environment) {\n this.skriptLoader = skriptLoader;\n this.environment = environment;\n }",
"@SuppressWarnings(\"unchecked\")\n @CompileStatic\n public <T> T execute(String scriptName, Map<String, Object> data) throws NyException {\n QScript script = null;\n try {\n script = parse(scriptName, data);\n return (T) configurations.getExecutorRegistry().defaultExecutorFactory().create().execute(script);\n } catch (Exception ex) {\n if (ex instanceof NyException) {\n throw (NyException) ex;\n } else {\n throw new NyScriptExecutionException(\"Ny script execution error!\", ex);\n }\n } finally {\n if (script != null) {\n script.free();\n }\n }\n }",
"public void run() {\n if (!script.compile()) {\n Program.stop(\"ERROR: There was an error while compiling your script.\"\n + \"\\nPlease check your syntax!\", false);\n return;\n }\n commandCounter = script.input.split(\";\").length - 1;\n if (!writeMemory()) {\n Program.stop(\"ERROR: There was a fatal error while \"\n + \"writing the script into the memory!\", false);\n return;\n }\n try {\n startProcessor();\n } catch (NumberFormatException n) {\n Program.stop(\"ERROR: There was a runtime error while executing the script!\", false);\n }\n Program.stop(\"\", true);\n }",
"public void exec();",
"public void runScriptServerSide(String name, String code, INetworkManager manager, EntityPlayer player)\n {\n MinecraftServer minecraftServer = MinecraftServer.getServer();\n if (!minecraftServer.getConfigurationManager().isPlayerOpped(player.username))\n {\n System.out.printf(\"non op user is trying to run server side script %s with content:\\n%s\\n\", name, code);\n throw new WrongUsageException(\"commands.generic.permission\");\n }\n \n if (serverGlobals != null)\n {\n System.out.printf(\"running server side script %s with content:\\n%s\\n\", name, code);\n try {\n serverGlobals.loadString(code, name).call();\n } catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }\n }",
"public void doIt(File f) throws Exception\n {\n LuaParser parser=new LuaParser();\n Map<String,Object> data=parser.read(f);\n useData(data);\n }",
"@Override\n\tpublic void execute(String[] command) throws SLogoException {\n\t\tString filteredString = filterComments(command);\n\t\tcodeReader = new Scanner(filteredString);\n\t\twhile (codeReader.hasNext()) {\n\t\t\tCommand c = parseCommand(codeReader.next());\n\t\t\tc.run();\n\t\t}\n\n\t}",
"@Override\r\n\tpublic String execute(String script) {\n\t\treturn script+\"sb\";\r\n\t}",
"default Value eval(String script, boolean interactive) throws Exception {\n return eval(script, \"<eval>\", interactive);\n }",
"@Override\r\n public void syncExecute(String script)\r\n {\n\r\n }",
"@Test(timeout = 4000)\n public void test004() throws Throwable {\n Recover recover0 = new Recover();\n recover0.openFile(\"databene\", (String) null, true);\n ErrorHandler errorHandler0 = ErrorHandler.getDefault();\n DBExecutionResult dBExecutionResult0 = DBUtil.runScript(\"databene\", (String) null, '<', (Connection) null, false, errorHandler0);\n assertNotNull(dBExecutionResult0);\n }",
"public static void main(String[] args) {\r\n\t\t// Read and parse script, and output result\r\n\t\ttry {\r\n\t\t\tout = new PrintWriter(new BufferedWriter(new FileWriter(OUTPUTFILENAME)));\r\n\t\t\tfs = FileSystem.instance();\r\n\t\t\t// Tree display with header and footer decorators\r\n\t\t\t// Prints the tree structure to the output file when the resize command is called\r\n\t\t\tttd = new TextTreeHeader(out, new TextTreeFooter(out, new DirectoryTreeDisplay(out, fs)));\r\n\t\t\tparseScript(INPUTFILENAME);\r\n\t\t\r\n\t\t\tout.close();\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.err.println(\"Error: could not write to file\");\r\n\t\t}\r\n\t}",
"public static int execute(String[] args, Writer writer) {\n return new CommandLine(new Main(args, writer)).execute(args);\n }",
"public interface LuaScript {\n\n /**\n * Execute this script using the given Jedis connection\n * @param jedis the Jedis connection to use\n * @return the result object from the executed script\n * @see Jedis#eval(String)\n */\n Object exec(Jedis jedis);\n}",
"@Test\n public void runScript() throws IllegalArgumentException {\n WebDriverCommandProcessor proc = new WebDriverCommandProcessor(\"http://localhost/\", manager.get());\n CommandFactory factory = new CommandFactory(proc);\n factory.newCommand(1, \"runScript\", \"alert('test')\");\n }",
"public static void main(String[] args) throws IOException {\n\t\t\n\t\tString folder = \"/Users/haopeng/Dropbox/research/2nd/Usecase/Yanlei/\";\n\t\tString fileName = \"P0_2324.txt\";\n\t\t\n\t\tFileReader reader = new FileReader(folder + fileName, 20000000);\n\t\treader.parseFile();\n\t\t\n\t\t//reader.printValues(reader.getServerName(), \"ServerName\");\n\t\t//reader.printValues(reader.getCommand(), \"Command\");\n\t\t//reader.printValues(reader.getTimestamp(), \"Timestamp\"); \n\t\t//reader.printValues(reader.getPath(), \"Path\");\n\t\treader.printValues(reader.getMethod(), \"Method\");\n\t}",
"public static void parseScript(String inFile) {\r\n\t\tScanner in;\r\n\t\t\r\n\t\t// Create the resize visitor\r\n\t\tResizeVisitor rsv = new ResizeVisitor();\r\n\t\t// Set the text tree display (with decorators) as an observer to the resize visitor\r\n\t\trsv.attach(ttd);\r\n\t\t\r\n\t\t/*\r\n\t\t * Other visitor objects should also be created here instead of in the switch statement\r\n\t\t * I would have fixed this if I had more time\r\n\t\t * The program works the way it is now, but fixing this would have been better design\r\n\t\t */\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Create scanner to read the script file\r\n\t\t\tin = new Scanner(new File(inFile));\r\n\t\t\tFileComponentBuilder fb;\r\n\t\t\t\r\n\t\t\tString line;\r\n\t\t\tString[] command;\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tline = in.nextLine();\r\n\t\t\t\t\r\n\t\t\t\t// Print command to output file for clarity\r\n\t\t\t\tout.print('\\n' + fs.getCurrentDir().getName() + \"> \");\r\n\t\t\t\tout.println(line);\r\n\t\t\t\t\r\n\t\t\t\t// Read line from script and parse it\r\n\t\t\t\tcommand = line.split(\"\\\\s\");\r\n\t\t\t\t\r\n\t\t\t\t// All script commands must be accounted for in this switch statement\r\n\t\t\t\tswitch(command[0]) {\r\n\t\t\t\tcase \"mkdir\":\r\n\t\t\t\t\t// Uses builder pattern to create directory and proxy while hiding creation process\r\n\t\t\t\t\tfb = new DirectoryBuilder();\r\n\t\t\t\t\tfb.setParameters(fs, command);\r\n\t\t\t\t\tfs.getCurrentDir().add(fb.getFileComponent());\r\n\t\t\t\t\tout.println(\"Subdirectory \\\"\" + command[1] + \"\\\" created\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"create\":\r\n\t\t\t\t\t// Uses builder pattern to create file and proxy while hiding creation process\r\n\t\t\t\t\tfb = new FileBuilder();\r\n\t\t\t\t\tfb.setParameters(fs, command);\r\n\t\t\t\t\tfs.getCurrentDir().add(fb.getFileComponent());\r\n\t\t\t\t\tout.println(\"File \\\"\" + command[1] + \"\\\" created\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"cd\":\r\n\t\t\t\t\tif (command[1].contentEquals(\"..\")) {\r\n\t\t\t\t\t\t// cd ..\r\n\t\t\t\t\t\t// If at root (or in error situation where parent directory is null)\r\n\t\t\t\t\t\t// current directory will be set to the root\r\n\t\t\t\t\t\tfs.setDir(fs.getCurrentDir().getParent());\r\n\t\t\t\t\t\tif (fs.getCurrentDir() == null) {\r\n\t\t\t\t\t\t\tfs.setDir(fs.getRoot());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tout.println(\"Directory changed to \" + fs.getCurrentDir().getName());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// cd subdirectory\r\n\t\t\t\t\t\tFileComponent newDir = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\t\tif (newDir == null || newDir instanceof LeafFile) {\r\n\t\t\t\t\t\t\tout.println(command[1] + \" is not a valid directory\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tfs.setDir(newDir);\r\n\t\t\t\t\t\t\tout.println(\"Directory changed to \" + command[1]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"del\":\r\n\t\t\t\t\tFileComponent delFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\tif (delFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file or directory\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tdelFile.accept(new DeleteVisitor());\r\n\t\t\t\t\t\tout.println(command[1] + \" deleted\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"size\":\r\n\t\t\t\t\tFileComponent sizeFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\tif (sizeFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file or directory\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSizeVisitor sv = new SizeVisitor();\r\n\t\t\t\t\t\tsizeFile.accept(sv);\r\n\t\t\t\t\t\tout.println(sv.getTotalSize());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"ls\":\r\n\t\t\t\t\tFileComponent lsFile = fs.getCurrentDir();\r\n\t\t\t\t\tif (command.length > 1) {\r\n\t\t\t\t\t\tlsFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (lsFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file or directory\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tLSVisitor lv = new LSVisitor();\r\n\t\t\t\t\t\tlsFile.accept(lv);\r\n\t\t\t\t\t\tfor (int i = 0; i < lv.getOutput().size(); i++) {\r\n\t\t\t\t\t\t\tif (lv.getOutput().get(i).length > 1) {\r\n\t\t\t\t\t\t\t\tout.println(lv.getOutput().get(i)[0] + \" \" + lv.getOutput().get(i)[1]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tout.println(lv.getOutput().get(i)[0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"resize\":\r\n\t\t\t\t\tFileComponent ResizeFile = fs.getCurrentDir().getChild(command[1]);\r\n\t\t\t\t\tif (ResizeFile == null) {\r\n\t\t\t\t\t\tout.println(command[1] + \" is not a valid file\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\trsv.setNewSize(Integer.parseInt(command[2]));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tResizeFile.accept(rsv);\r\n\t\t\t\t\t\tif (rsv.resizeSuccessful()) {\r\n\t\t\t\t\t\t\tout.println(\"Size of \" + command[1] + \" set to \" + command[2]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tout.println(command[1] + \" is not a valid file\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"exit\":\r\n\t\t\t\t\tfs.getRoot().accept(new ExitVisitor());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault: out.println(command[0] + \" is not a valid command\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tin.close();\r\n\t\t\tSystem.out.println(\"Script read successfully\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.err.println(\"Error: could not read from script file\");\r\n\t\t}\r\n\t}",
"static public void main(String argv[]) {\n String archivo_a_parsear = \"/home/maldad/repos/automatas/semantico/EjemploA/src/ejemploa/test.txt\";\n try {\n parser p = new parser(new Lexer(new FileReader(archivo_a_parsear)));\n Object result = p.parse().value; \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }",
"abstract void exec();",
"public static void main(String[] args) throws FileNotFoundException {\n\n if (args.length < 1 || args.length > 2) {\n throw new IllegalArgumentException(\"incorrect number of arguments\");\n }\n\n if (args[0].equals(\"-script\")) {\n String pathOfScriptFile = Objects.requireNonNull(args[1]);\n IModel model = new ProcessingModel();\n Readable rd = new InputStreamReader(new FileInputStream(pathOfScriptFile));\n IProcessingController controller = new ProcessingController(model, rd,\n System.out);\n controller.startProcessing();\n return;\n }\n\n // } else {\n if (args[0].equals(\"-text\")) {\n InputStreamReader reader = new InputStreamReader(System.in);\n OutputStreamWriter writer = new OutputStreamWriter(System.out);\n IModel model = new SwingModel();\n IProcessingController controller = new ProcessingController(model, reader, writer);\n controller.startProcessing();\n return;\n }\n\n // } else\n if (args[0].equals(\"-interactive\")) {\n ISwingModel model = new SwingModel();\n IView swingView = new SwingView();\n IProcessingController swingController = new SwingController(model, swingView);\n swingController.startProcessing();\n return;\n } else {\n throw new IllegalArgumentException(\"invalid argument. Must be -text or -interactive\");\n }\n\n }",
"public void doEditScript(StaplerRequest req, StaplerResponse rsp, @QueryParameter(\"name\") String scriptName) throws IOException, ServletException {\n \t\tcheckPermission(Hudson.ADMINISTER);\n \n \t\tScript script = getScript(scriptName, true);\n \t\treq.setAttribute(\"script\", script);\n \t\treq.getView(this, \"edit.jelly\").forward(req, rsp);\n \t}",
"public void run() throws IOException;",
"protected Object execScript(String call) {\r\n if (call==null||call.length()==0)\r\n return null;\r\n Desktop desktop = getDesktop();\r\n Object client = desktop.getClient();\r\n Doc doc = desktop.getDoc();\r\n \r\n int left = call.indexOf('(');\r\n String name = call.substring(0, left);\r\n String args = call.substring(left+1, call.length()-1);\r\n \r\n try {\r\n Object[] params;\r\n if (args.trim().length()==0)\r\n params = null;\r\n else\r\n params = Doc.parseParameters(doc, this, args);\r\n Method m = Doc.findMethod(client, name, params);\r\n return Doc.invokeMethod(m, client, params);\r\n } catch (OxyException e) {\r\n Desktop.warn(\"error invoking method \"+name+\" with args: \"+args, e);\r\n return null;\r\n }\r\n }",
"protected abstract void execute(INPUT input);",
"public void run() throws IOException {\n String EXIT_COMMAND = \"7\";\n ui.printIntro();\n ui.printExeType();\n String exeCommand = ui.getStringInput();\n while (!exeCommand.equals(EXIT_COMMAND)) {\n Parser parser = new Parser(ui, tasks);\n parser.parseCommand(exeCommand); //to select the exeType and execute it\n ui.printExeType(); //user guide after execution of command\n exeCommand = ui.getStringInput(); //get the next command\n }\n ui.printExit();\n }",
"@Override\r\n public void asyncExecute(String script)\r\n {\n\r\n }",
"public void run(String[] args){\n if (args.length > 0)\n {\n try{\n InputStreamReader is = new InputStreamReader(getClass().getResourceAsStream(\"/\" + args[0]));\n BufferedReader txtReader = new BufferedReader(is);\n Scanner inputScanner = new Scanner(txtReader);\n System.out.println(String.format(\"Processing file %s\", args[0]));\n ToyRobot toyRobot = new ToyRobot();\n ToyRobotController controller = new ToyRobotController(toyRobot);\n while (inputScanner.hasNext()){\n String line = inputScanner.nextLine().toUpperCase();\n if (line.contains(Constants.COMMAND_PLACE) && Utilities.isOnTable(Utilities.getCoordinateFromInput(line))){\n controller.place(Utilities.getCoordinateFromInput(line), Utilities.getDirectionFromInput(line));\n System.out.println(String.format(\"Robot placement at %s,%s\", controller.getRobot().getCoordinates().getxCoordinate(), controller.getRobot().getCoordinates().getyCoordinate() ));;\n } else if (line.contains(Constants.COMMAND_MOVE)){\n controller.move();\n System.out.println(String.format(\"Robot moving at direction %s\", controller.getRobot().getDirection()));\n } else if ((line.contains(Constants.COMMAND_TURN_LEFT) || line.contains(Constants.COMMAND_TURN_RIGHT))){\n controller.turn(line);\n System.out.println(String.format(\"Robot changed direction to %s\", controller.getRobot().getDirection()));\n } else if (line.contains(Constants.COMMAND_REPORT)){\n controller.location();\n }\n }\n } catch (Exception e){\n System.out.println(\"No input found\");\n }\n }\n else\n {\n System.out.println(\"No input found\");\n }\n }",
"private static native void eval(String script)\n /*-{\n try {\n if (script == null) return;\n $wnd.eval(script);\n } catch (e) {\n }\n }-*/;",
"public ExecScriptCallback()\n {\n\tchooserTitle = DragonUI.textSource.getI18NText(TextKeys.SPTFILE,\n\t\t\t\t\t\t \"SCRIPT FILE TO RUN\");\n\t}",
"Script createScript();",
"public static void main(String[] args) {\r\n\r\n FileReadWrite frw = new FileReadWrite(\"ReadFromFile.txt\", \"OutputFile.txt\");\r\n try {\r\n frw.readAndWriteFile();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"protected abstract void parseExecResult(BufferedReader lines) throws IOException;",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n List<String> inputs = new InputsReader().read(scanner);\n\n List<Command> commands = new CommandsFactory().build(inputs);\n\n new CommandsProcessor().execute(commands);\n }",
"Execution executeRecipe(TestRecipe recipe);",
"public IRubyObject runInterpreterBody(Node scriptNode) {\n assert scriptNode != null : \"scriptNode is not null\";\n assert scriptNode instanceof RootNode : \"scriptNode is not a RootNode\";\n \n return runInterpreter(((RootNode) scriptNode).getBodyNode());\n }",
"public void exec(String s) {\n }",
"public static void main(String[] args) throws IOException{\n\t\trunProgram();\n\t}",
"public static void main(String... args) throws IOException, InterruptedException {\n new FileByFileTool().run(args);\n }",
"public static void main(String[] args)\r\n {\r\n\r\n if (args.length < 1) {\r\n System.out.println(\"\\n\\njava mylang file.txt\");//to give error if less than 1\r\n return;\r\n }\r\n\r\n String contents = readFile(args[0]);//read file is a methode not only this remember that arg[0] contains the path of the file because you write java mylang try.txt\r\n\r\n mylang mylob = new mylang();\r\n mylob.interpret(contents);\r\n\r\n }",
"public interface Script {\n\n /**\n * @return true if the game is over\n */\n boolean isFinished();\n\n /**\n * Perform according to the event.\n * @param event interpreter output event.\n * @return result of perform.\n */\n Answer perform(final String event);\n}",
"abstract protected void execute(String dir);",
"Program( String filename ) throws IOException, ParserException, EvaluationException\n\t\t{\n\t\t\tmParser = new Parser();\n\t\t\t\n\t\t\tFileReader r = new FileReader( filename );\n\t\t\t\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\n\t\t\tint ch = -1;\n\t\t\twhile( ( ch = r.read() ) >= 0 )\n\t\t\t{\n\t\t\t\tbuilder.append( (char) ch );\n\t\t\t}\n\t\t\tmProgram = builder.toString();\n\t\t\t\n\t\t\tmParser.parse( mProgram );\n\t\t}",
"public CompletableFuture<Object> eval(final String script) {\n return eval(script, null, new SimpleBindings());\n }",
"default Value eval(String script) throws Exception {\n return eval(script, false);\n }",
"public static void main(String[] args) throws IOException \n\t{\n\t\treadFile();\n\t}",
"@Override\n\tpublic int run(String[] arg0) throws Exception {\n\t\tif (arg0.length != 2) {\n System.err.println(\"Usage: recipe <in> <out>\");\n System.exit(2);\n }\n\t\t Job job = new Job();\n\t\t job.setJarByClass(Driver.class);\n\t job.setMapperClass(TokenizerMapper.class);\n\t // job.setCombinerClass(IntSumReducer.class);\n\t job.setReducerClass(IntSumReducer.class);\n\t job.setOutputKeyClass(Text.class);\n\t job.setOutputValueClass(IntWritable.class);\n\t FileInputFormat.addInputPath(job, new Path(arg0[0]));\n\t FileOutputFormat.setOutputPath(job, new Path(arg0[1]));\n\t // FileInputFormat.addInputPath(job, new Path(\"hdfs://127.0.0.1:9000/in\"));\n\t // FileOutputFormat.setOutputPath(job, new Path(\"hdfs://127.0.0.1:9000/out\"));\n\t System.exit(job.waitForCompletion(true) ? 0 : 1);\n\t boolean success = job.waitForCompletion(true);\n\t return success ? 0 : 1;\n\t}",
"public boolean execute(String[] args);",
"public abstract void exec(CommandSender sender, String[] args);",
"public static void main(String[] args) throws IOException, QizxException {\n int min = 0;\n int max = Integer.MAX_VALUE;\n //fichero para recoger cada script XQuery de consulta\n File scriptFile;\n //objeto file 'directorioGrupo' apuntando a la ruta del Library Group\n File directorioGrupo = new File(directorioGrupoRoot);\n // Conexión o apertura del gestor del grupo\n LibraryManager bdManager = Configuration.openLibraryGroup(directorioGrupo);\n //Conexión a la BD\n Library bd = bdManager.openLibrary(bdNombre);\n\n try {\n //Para cada script con consulta XQuery\n for (int i = 0; i < scriptNombre.length; ++i) {\n //recoge la ruta del fichero de script con consulta XQuery\n scriptFile = new File(directorioScriptsRoot + scriptNombre[i]);\n //mensaje indicando el script XQuery que se ejecutará\n System.out.println(\"Ejecutando '\" + scriptFile + \"'...\");\n\n //carga el contenido del script XQuery en una cadena\n String consultaXquery = cargaScript(scriptFile);\n //imprime la expresión de consulta XQuery\n System.out.println(\"---\\n\" + consultaXquery + \"\\n---\");\n\n //compila la consulta, almacenado resultado en expr\n Expression expr = compileExpression(bd, consultaXquery);\n //evalúa la consulta para mostrar resultados en el rango [min, max]\n evaluarExpression(expr, min, max);\n }\n } finally {\n //cierra conexión con BD\n cerrar(bd, bdManager);\n }\n }",
"public static void main (String[] args) {\n new ReaderWriter(\"a_example.txt\");\n }",
"private int executeCommands(BufferedReader reader)\n throws CommandException, CommandValidationException, IOException {\n String line = null;\n int rc = 0;\n\n /*\n * Any program options we start with are copied to the environment\n * to serve as defaults for commands we run, and then we give each\n * command an empty program options.\n */\n programOpts.toEnvironment(env);\n for (;;) {\n if (printPrompt) {\n System.out.print(\"asadmin> \");\n System.out.flush();\n }\n if ((line = reader.readLine()) == null) {\n if (printPrompt)\n System.out.println();\n break;\n }\n\n if (line.trim().startsWith(\"#\")) // ignore comment lines\n continue;\n\n String[] args = null;\n try {\n args = getArgs(line);\n } catch (ArgumentTokenizer.ArgumentException ex) {\n logger.printMessage(ex.getMessage());\n continue;\n }\n\n if (args.length == 0)\n continue;\n\n String command = args[0];\n if (command.length() == 0)\n continue;\n\n // handle built-in exit and quit commands\n // XXX - care about their arguments?\n if (command.equals(\"exit\") || command.equals(\"quit\"))\n break;\n\n CLICommand cmd = null;\n ProgramOptions po = null;\n try {\n /*\n * Every command gets its own copy of program options\n * so that any program options specified in its\n * command line options don't effect other commands.\n * But all commands share the same environment.\n */\n po = new ProgramOptions(env);\n // copy over AsadminMain info\n po.setProgramArguments(programOpts.getProgramArguments());\n po.setClassPath(programOpts.getClassPath());\n po.setClassName(programOpts.getClassName());\n // remote the old one and replace it\n habitat.remove(\n habitat.getInhabitantByType(ProgramOptions.class));\n habitat.addComponent(\"program-options\", po);\n cmd = CLICommand.getCommand(habitat, command);\n rc = cmd.execute(args);\n } catch (CommandValidationException cve) {\n logger.printError(cve.getMessage());\n logger.printError(cmd.getUsage());\n rc = ERROR;\n } catch (CommandException ce) {\n if (ce.getCause() instanceof InvalidCommandException) {\n // find closest match with local or remote commands\n logger.printError(ce.getMessage());\n try {\n CLIUtil.displayClosestMatch(command,\n CLIUtil.getAllCommands(habitat, po, env),\n strings.get(\"ClosestMatchedLocalAndRemoteCommands\"));\n } catch (InvalidCommandException e) {\n // not a big deal if we cannot help\n }\n } else if (ce.getCause() instanceof java.net.ConnectException) {\n // find closest match with local commands\n logger.printError(ce.getMessage());\n try {\n CLIUtil.displayClosestMatch(command,\n CLIUtil.getLocalCommands(habitat),\n strings.get(\"ClosestMatchedLocalCommands\"));\n } catch (InvalidCommandException e) {\n logger.printMessage(\n strings.get(\"InvalidRemoteCommand\", command));\n }\n } else\n logger.printError(ce.getMessage());\n rc = ERROR;\n } finally {\n // restore the original program options\n // XXX - is this necessary?\n habitat.remove(\n habitat.getInhabitantByType(ProgramOptions.class));\n habitat.addComponent(\"program-options\", programOpts);\n }\n\n // XXX - this duplicates code in AsadminMain, refactor it\n switch (rc) {\n case SUCCESS:\n if (!programOpts.isTerse())\n logger.printDetailMessage(\n strings.get(\"CommandSuccessful\", command));\n break;\n\n case ERROR:\n logger.printDetailMessage(\n strings.get(\"CommandUnSuccessful\", command));\n break;\n\n case INVALID_COMMAND_ERROR:\n logger.printDetailMessage(\n strings.get(\"CommandUnSuccessful\", command));\n break;\n\n case CONNECTION_ERROR:\n logger.printDetailMessage(\n strings.get(\"CommandUnSuccessful\", command));\n break;\n }\n CLIUtil.writeCommandToDebugLog(args, rc);\n }\n return rc;\n }"
] | [
"0.7587095",
"0.5991186",
"0.5984787",
"0.58935165",
"0.5846587",
"0.57996905",
"0.5713179",
"0.5674758",
"0.55047965",
"0.5439709",
"0.5421091",
"0.5399259",
"0.537619",
"0.5375673",
"0.53551257",
"0.531911",
"0.5310493",
"0.52910966",
"0.5272469",
"0.5265137",
"0.52601904",
"0.52587914",
"0.52465403",
"0.52247304",
"0.51942784",
"0.5173469",
"0.5170324",
"0.5165819",
"0.5148541",
"0.51449144",
"0.5128382",
"0.50991327",
"0.5088925",
"0.5086439",
"0.507996",
"0.5074529",
"0.5068225",
"0.505687",
"0.50437725",
"0.5029489",
"0.5022037",
"0.5020989",
"0.5019936",
"0.50198066",
"0.5019068",
"0.5014783",
"0.50134945",
"0.5001846",
"0.5000549",
"0.49983105",
"0.49735808",
"0.4958666",
"0.4943526",
"0.49420094",
"0.49369848",
"0.49368745",
"0.4926396",
"0.4919107",
"0.49177152",
"0.4915084",
"0.49131837",
"0.4890217",
"0.48900208",
"0.48818722",
"0.48815987",
"0.4875001",
"0.4836303",
"0.48265764",
"0.48121822",
"0.47976112",
"0.4790709",
"0.47883353",
"0.47848082",
"0.47828355",
"0.47704315",
"0.47656485",
"0.47649273",
"0.47629702",
"0.47628585",
"0.47616005",
"0.47587216",
"0.47472015",
"0.4741183",
"0.47333604",
"0.4732662",
"0.47287744",
"0.47264168",
"0.472534",
"0.47150907",
"0.47128698",
"0.4712231",
"0.47051087",
"0.46964845",
"0.4695342",
"0.46918264",
"0.46888605",
"0.46870017",
"0.4682918",
"0.46821597",
"0.46709904"
] | 0.7676738 | 0 |
Calls a toplevel method | <T> T callMethod(String name, Class<T> resultType, Object... args)
throws ScriptRunnerException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void callSubMenu() {\n new SubMenu().display();\n }",
"TopLevel createTopLevel();",
"public void callP(){\n super.walks(\"called parent method\");\n }",
"public void menu2Method() {\n }",
"public void menu3Method() {\n }",
"public void levelOneMethod() {\n\t\tSystem.out.println(\"level one method\");\n\t}",
"public static void foo() {\n\t\t\tSystem.out.println(\"Sub foo....\");\n\t\t}",
"public void open()\n{\n}",
"void method() {\n\t\tSystem.out.println(\"Method from Parent\");\n\t}",
"static String invokingMethod(ContributionDef def)\n {\n return MESSAGES.format(\"invoking-method\", def);\n }",
"public void Open() {\r\n\t click();\r\n\t }",
"public void aMethod(){\n\t\tSystem.out.println(\"this is the parent aMethod()\");\n\t}",
"private void sub() {\n\n\t}",
"public void sub() {\n\t\tSystem.out.println(\"I am from substraion method\");\n\t\t\n\t}",
"void gotoMain();",
"AstroArg start(AstroArg top);",
"public void menu4Method() {\n }",
"private void invokeLoaded() \n{\n printDebug(\"calling loaded\");\n Object[] args = new Object[0];\n Object ret = this.getWindow().call(\"loaded\", args);\n}",
"protected void mainSubDef()\n\t{\n\t\ttext(\"public static void main(String[] args) {\");\n\t\tsuper.mainSubDef();\n\t}",
"void Menu();",
"public void run() {\n\t\t\t\tviewer.collapseToLevel(root, 2); // TODO: does not, it always collapse to level 1\n//\t\t\t\tshowSelection(par, sel);\n//\t\t\t\tif (actionCollapsAll.isChecked()) {\n//\t\t\t\t\t\n//\t\t\t\t}\n\t\t\t}",
"public void start() {\n\t\tSystem.out.println(\"parent method\");\n\t}",
"public static void main(String[] args){\n\t\tOuter o = new Outer();\n\t\to.method();\n\t}",
"public static void main(String[] args) {\n\t\tMethodcall m=new Methodcall();\n\t\tParent1 p2=new Parent1();\n\t\tp2.Example();\n\t\t//m.Example();\n\n\t}",
"public void sub();",
"public void open(){\n }",
"public abstract void displayMenu();",
"public void setTopLevel(boolean topLevel) {\n }",
"public static void main(String[] args) {\n\t\tMethodoverrings obj1= new Methodoverrings();\r\n\t\tMethodoverrings obj2= new Methodoverrings();\r\n\t\tchild obj3= new child (); //child class\r\n\t\tobj1.show();\r\n\t\t//if the Methodoverrings referenceing to child object, show()\r\n\t\t// method is called this is during run time of Polymarphise\r\n\t\tobj2.show();\r\n\t}",
"boolean isTopLevel();",
"public void exec(OxProgram pgm) {\n SubCmd theSub = (SubCmd) _startCmd;\n pgm.setNextCommand(theSub._calledFrom.getLineNumber());\n }",
"public void run(){\n ArrayList<String> menuItems = new ArrayList<>();\n menuItems.add(\"Play the Game\");\n menuItems.add(\"Close the Program\");\n menuItems.add(\"Show the highest score\");\n String menu = CollectionTools.collectionPrinter('S', menuItems);\n runMenu(menu);\n }",
"void printMsg(){\n\tdisplay();\n\t//This would call Overridden method\n\tsuper.display();\n }",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"public static void main(String[] args) \n\t{\n\t\tMenu();// calls menu method\n\t}",
"public void callit();",
"public void pressMainMenu() {\n }",
"public static void method1(){\n System.out.println(\"This is from method 1.\");\n }",
"public void runProgram() {\n\t\tJTextPane code = ((MinLFile) tabbedPane.getSelectedComponent()).CodeArea;\n\t\tminc.consolearea.setText(\"\");\n\t\tinterpretorMainMethod(code.getText(), 0);\n\t\tdouble_variables.clear();\n\t\tstring_variables.clear();\n\t\tfunctions.clear();\n\t}",
"public void method() {\n\t\t\r\n\t\t\r\n\t\tnew Inter() {\t\t\t\t\t\t\t//实现Inter接口\r\n\t\t\tpublic void print() {\t\t\t\t//重写抽象方法\r\n\t\t\t\tSystem.out.println(\"print\");\r\n\t\t\t}\r\n\t\t}.print();\r\n\t\t\r\n\t\t\r\n\t}",
"public void doMyStartupStuff(){\r\n System.out.println(\"TrackCoach: inside method doMyStartupStuff\");\r\n }",
"public void callmetoo(){\r\n\tSystem.out.println(\"This is a concrete method\");\r\n\t}",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tOuterClass outer = new OuterClass();\n\t\touter.outerMethod();\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\tnew MethodInnerclass().outerclassmethod();\r\n\t}",
"public void run(){\n int selection = -1;\n super.myConsole.listOptions(menuOptions);\n selection = super.myConsole.getInputOption(menuOptions);\n branchMenu(selection);\n }",
"public void calling(){ // when the abstract method is implemented in other class 'public' keyword is used..\r\n System.out.println(\"I am calling...\");\r\n }",
"static void method1(){\n\t\tSystem.out.println(\"Method 1\");\n\t}",
"private void methodOne() {\n\t\tSystem.out.println(\"I am method one\");\n\t}",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"public static void main(String[] args) {\nSubClass obj = new SubClass();\r\n\t\t\r\n\t\tobj.display();\r\n\t}",
"@Override\n\tvoid method() {\n\t\tSystem.out.println(\"Method from Child\");\n\t}",
"void invokeAppLogic(IMenu fromMenu);",
"public void intialRun() {\n }",
"private void innerFunction(Button btn, Class cls){\n\t\tsolo.clickOnView(btn);\n\t\tsolo.sleep(500);\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump to children list.\", cls);\n\t\tsolo.hideSoftKeyboard();\n\t\tsolo.goBack();\n\t\tsolo.goBack();\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump back from children list.\", researcher.class);\n\t}",
"void clickAmFromMenu();",
"public void setTopLevel(boolean topLevel) {\n this.topLevel = topLevel;\n }",
"public void startMethod (Symbol methodName, java.lang.Object[] args) throws G2AccessException;",
"public void Main(){\n }",
"@Override\r\n\tpublic void method() {\n\t\tsuper.method();\r\n\t\tSystem.out.println(\"Iam in a subclass\");\r\n\t}",
"public void FirstMethod();",
"@FXML\n private void menu(){\n\n // Runs mid menu\n MidGameMenu.menuMethod();\n\n Main.gang.setMoving(false);\n Main.main.getMenuWindow().showAndWait();\n }",
"public void display(){\n System.out.println(\"B class Show method\");\n }",
"private static void populationsMain() {\n Printing.wraptitle( POPULATIONS );\n Printing.makeOptions( GOUP );\n\n msg( \"This portion of the project is not interactive. See Discussion.pdf for population predictions.\" );\n msg( \"You can evaluate the functions used in this portion through selection (4) on the main menu.\" );\n\n int option = requestOption( 0 );\n if ( option == 0 ) {\n main();\n }\n\n }",
"public static void main(String[] args){\n\t\tSystem.out.println(\"method\");\n\t\tParent parent = new Parent();\n\t\tparent.i=40;\n\t\tParent.Test();\n\t}",
"public static void main(String[] args) {\n\t\tThisoperator op = new Thisoperator();\n\t\top.localmethod();\n\t\t\n\n\t}",
"void call();",
"public void otherWin\n (String name);",
"public SearchFrame(){//The main search frame which calls other methods\n\t\t/*Calling the methods intitialiseGUI and buildGUI*/\n\t\tintitialiseGUI();\n\t\tbuildGUI();\n\t}",
"public void runGame()\r\n\t{\r\n\t\tmainFrame.runGame();\r\n\t}",
"void methodA() {\n\t\tSystem.out.println(\"Method A\");\n\t}",
"public void onMainClick(){\r\n\t\tmyView.advanceToMain();\r\n\t}",
"@Override\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\tSystem.out.println(\"ChildParentMethod\");\r\n\t}",
"public void run() {\n\t\t\t\tshowMessage(\"Notes for 'Class Components Tree' view\", \n\t\t\t\t\t\t\"This view shows the components tree of the class that is selected in Model Explorer.\");\n//\t\t\t\t\t\t\t\"\\n\\nNote that arrays are not expanded.\");\n\t\t\t}",
"void fun(){\n\t\tSystem.out.println(\"This is fun\");\n\t}",
"public void run() { //these are the methods that are present in the parent interface class, they need to have a body in the child interface class\n\t\tSystem.out.println(\"Lizard is running\");\n\t}",
"public static void main(String[] args) {\n\t\t\tnew Inner().display();\n\t\t}",
"@Override\n\tpublic String visitMainClass(MainClassContext ctx) {\n\t\ttable.enterScope();\n\t\tvisit(ctx.getChild(3));\n\t\ttable.exitScope();\n\t\treturn null;\n\t}",
"public void run()\n {\n getMenuChoice();\n }",
"public static void main(String[] args) {\n\t\tXYZ obj = new XYZ();\n\t\tobj.myMethod();\n\t\t//XYZ hyd=new DEF();\n\t\t//hyd.myMethod();\n\t//\thyd.childspecificMethod();\n //DEF oy=new DEF();\n\t\t//oy.myMethod();\n\t\tDEF def=new DEF();\n\t\tdef.childspecificMethod();\n\t\tdef.myMethod();\n\n\t}",
"public void execute() {\n _plugin.openNavigator();\n }",
"@Override\n\tpublic void call() {\n\t\t\n\t}",
"void printMsg(){\n\tdisplay();\n }",
"public void gotoHome(){ application.gotoHome(); }",
"public void inicio(){\n }",
"public static void main(String args[])\n\t{\n\t\tOuter outer = new Outer();\n\t\tOuter.Inner innerobj1 = (Inner) outer.method(outer);\n\t\tinnerobj1.print();\n\t}",
"public void show() {\n\tSystem.out.println(\"show-method\");\t\n\t}",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"public static void main(String[] args){\n\n main_menu();\n\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"-----Accessing Static Nested method from Diffrent Class---\");\n\t\t\n\t\tNested.Inner n=new Nested.Inner();\n\t\tn.m1(); \n\t\t//Inner.m1()\n\t\tNested n1=new Nested();\n\t\tn1.m2();\n\t\t\n\n\t}",
"public static void main(String[] args)\n\t{\n\t\tLocalinner li=new Localinner();\n\t\tli.display();\n\t}",
"static void DisplayMainMenu()\n {\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Menu\");\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Enter Selection\");\n \tSystem.out.println(\"1) Send Message\");\n \tSystem.out.println(\"2) Receive Message\");\n \tSystem.out.println(\"3) Run regression test\");\n }",
"@Test\n public void testscrollPNWMagazine(){\n TestLogger.log(getClass().getSimpleName() + \": \" + convertToString(new Object(){}.getClass().getEnclosingMethod().getName()));\n getPnwMagazine();\n System.out.println(\"scrollMenuList for PNW Magazine passed\");\n }",
"@Override\r\n public void run() {\n opsi_menu();\r\n\r\n }",
"public void triggerPopup();",
"void clickFmFromMenu();",
"public static void main(String[] args) {\n\t\tParent b=new Child();\n\t\tb.display();\n\t\tb.hi();\n\t}",
"void clickSomewhereElse();",
"public void open();",
"public void open();",
"public static void main(String[] args) {\n Menu();\n }"
] | [
"0.62237835",
"0.60885924",
"0.5926007",
"0.58736664",
"0.5858011",
"0.58480984",
"0.5827656",
"0.57643557",
"0.5738308",
"0.5735827",
"0.5719548",
"0.5706586",
"0.5689911",
"0.5653597",
"0.56317544",
"0.56246734",
"0.5622748",
"0.56195205",
"0.559567",
"0.55718863",
"0.55717504",
"0.5507968",
"0.55025786",
"0.5492542",
"0.5473077",
"0.54305756",
"0.54084575",
"0.5397517",
"0.537421",
"0.5372737",
"0.53511655",
"0.53502727",
"0.5349708",
"0.5345446",
"0.5337275",
"0.53340864",
"0.53300667",
"0.53176695",
"0.5281919",
"0.5268881",
"0.52682024",
"0.52534455",
"0.5233396",
"0.52259725",
"0.5224859",
"0.52126974",
"0.52122086",
"0.5201816",
"0.5190495",
"0.51903373",
"0.51820946",
"0.5179724",
"0.5179497",
"0.5168374",
"0.5166953",
"0.51651937",
"0.5159064",
"0.51558876",
"0.5150533",
"0.5149994",
"0.5147119",
"0.51287365",
"0.5114485",
"0.5104472",
"0.5101963",
"0.5090752",
"0.5089806",
"0.5087931",
"0.5078705",
"0.5076788",
"0.50756794",
"0.50756466",
"0.50743395",
"0.5072809",
"0.5071811",
"0.50700986",
"0.50693303",
"0.50677127",
"0.5067068",
"0.5066627",
"0.5058142",
"0.5047857",
"0.5047063",
"0.5044692",
"0.5043969",
"0.504099",
"0.5036142",
"0.5030335",
"0.50300777",
"0.50178295",
"0.50130504",
"0.5002129",
"0.50002164",
"0.4989573",
"0.49882424",
"0.49870878",
"0.4986758",
"0.49842215",
"0.4982375",
"0.4982375",
"0.49813244"
] | 0.0 | -1 |
Calls a toplevel method | void callMethod(String name, Object... args)
throws ScriptRunnerException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void callSubMenu() {\n new SubMenu().display();\n }",
"TopLevel createTopLevel();",
"public void callP(){\n super.walks(\"called parent method\");\n }",
"public void menu2Method() {\n }",
"public void menu3Method() {\n }",
"public void levelOneMethod() {\n\t\tSystem.out.println(\"level one method\");\n\t}",
"public static void foo() {\n\t\t\tSystem.out.println(\"Sub foo....\");\n\t\t}",
"public void open()\n{\n}",
"void method() {\n\t\tSystem.out.println(\"Method from Parent\");\n\t}",
"static String invokingMethod(ContributionDef def)\n {\n return MESSAGES.format(\"invoking-method\", def);\n }",
"public void Open() {\r\n\t click();\r\n\t }",
"public void aMethod(){\n\t\tSystem.out.println(\"this is the parent aMethod()\");\n\t}",
"private void sub() {\n\n\t}",
"public void sub() {\n\t\tSystem.out.println(\"I am from substraion method\");\n\t\t\n\t}",
"void gotoMain();",
"AstroArg start(AstroArg top);",
"public void menu4Method() {\n }",
"private void invokeLoaded() \n{\n printDebug(\"calling loaded\");\n Object[] args = new Object[0];\n Object ret = this.getWindow().call(\"loaded\", args);\n}",
"protected void mainSubDef()\n\t{\n\t\ttext(\"public static void main(String[] args) {\");\n\t\tsuper.mainSubDef();\n\t}",
"void Menu();",
"public void run() {\n\t\t\t\tviewer.collapseToLevel(root, 2); // TODO: does not, it always collapse to level 1\n//\t\t\t\tshowSelection(par, sel);\n//\t\t\t\tif (actionCollapsAll.isChecked()) {\n//\t\t\t\t\t\n//\t\t\t\t}\n\t\t\t}",
"public void start() {\n\t\tSystem.out.println(\"parent method\");\n\t}",
"public static void main(String[] args){\n\t\tOuter o = new Outer();\n\t\to.method();\n\t}",
"public static void main(String[] args) {\n\t\tMethodcall m=new Methodcall();\n\t\tParent1 p2=new Parent1();\n\t\tp2.Example();\n\t\t//m.Example();\n\n\t}",
"public void sub();",
"public void open(){\n }",
"public abstract void displayMenu();",
"public void setTopLevel(boolean topLevel) {\n }",
"public static void main(String[] args) {\n\t\tMethodoverrings obj1= new Methodoverrings();\r\n\t\tMethodoverrings obj2= new Methodoverrings();\r\n\t\tchild obj3= new child (); //child class\r\n\t\tobj1.show();\r\n\t\t//if the Methodoverrings referenceing to child object, show()\r\n\t\t// method is called this is during run time of Polymarphise\r\n\t\tobj2.show();\r\n\t}",
"boolean isTopLevel();",
"public void exec(OxProgram pgm) {\n SubCmd theSub = (SubCmd) _startCmd;\n pgm.setNextCommand(theSub._calledFrom.getLineNumber());\n }",
"public void run(){\n ArrayList<String> menuItems = new ArrayList<>();\n menuItems.add(\"Play the Game\");\n menuItems.add(\"Close the Program\");\n menuItems.add(\"Show the highest score\");\n String menu = CollectionTools.collectionPrinter('S', menuItems);\n runMenu(menu);\n }",
"void printMsg(){\n\tdisplay();\n\t//This would call Overridden method\n\tsuper.display();\n }",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"public static void main(String[] args) \n\t{\n\t\tMenu();// calls menu method\n\t}",
"public void callit();",
"public void pressMainMenu() {\n }",
"public static void method1(){\n System.out.println(\"This is from method 1.\");\n }",
"public void runProgram() {\n\t\tJTextPane code = ((MinLFile) tabbedPane.getSelectedComponent()).CodeArea;\n\t\tminc.consolearea.setText(\"\");\n\t\tinterpretorMainMethod(code.getText(), 0);\n\t\tdouble_variables.clear();\n\t\tstring_variables.clear();\n\t\tfunctions.clear();\n\t}",
"public void method() {\n\t\t\r\n\t\t\r\n\t\tnew Inter() {\t\t\t\t\t\t\t//实现Inter接口\r\n\t\t\tpublic void print() {\t\t\t\t//重写抽象方法\r\n\t\t\t\tSystem.out.println(\"print\");\r\n\t\t\t}\r\n\t\t}.print();\r\n\t\t\r\n\t\t\r\n\t}",
"public void doMyStartupStuff(){\r\n System.out.println(\"TrackCoach: inside method doMyStartupStuff\");\r\n }",
"public void callmetoo(){\r\n\tSystem.out.println(\"This is a concrete method\");\r\n\t}",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tOuterClass outer = new OuterClass();\n\t\touter.outerMethod();\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\tnew MethodInnerclass().outerclassmethod();\r\n\t}",
"public void run(){\n int selection = -1;\n super.myConsole.listOptions(menuOptions);\n selection = super.myConsole.getInputOption(menuOptions);\n branchMenu(selection);\n }",
"public void calling(){ // when the abstract method is implemented in other class 'public' keyword is used..\r\n System.out.println(\"I am calling...\");\r\n }",
"static void method1(){\n\t\tSystem.out.println(\"Method 1\");\n\t}",
"private void methodOne() {\n\t\tSystem.out.println(\"I am method one\");\n\t}",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"public static void main(String[] args) {\nSubClass obj = new SubClass();\r\n\t\t\r\n\t\tobj.display();\r\n\t}",
"@Override\n\tvoid method() {\n\t\tSystem.out.println(\"Method from Child\");\n\t}",
"void invokeAppLogic(IMenu fromMenu);",
"public void intialRun() {\n }",
"private void innerFunction(Button btn, Class cls){\n\t\tsolo.clickOnView(btn);\n\t\tsolo.sleep(500);\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump to children list.\", cls);\n\t\tsolo.hideSoftKeyboard();\n\t\tsolo.goBack();\n\t\tsolo.goBack();\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump back from children list.\", researcher.class);\n\t}",
"void clickAmFromMenu();",
"public void setTopLevel(boolean topLevel) {\n this.topLevel = topLevel;\n }",
"public void startMethod (Symbol methodName, java.lang.Object[] args) throws G2AccessException;",
"public void Main(){\n }",
"@Override\r\n\tpublic void method() {\n\t\tsuper.method();\r\n\t\tSystem.out.println(\"Iam in a subclass\");\r\n\t}",
"public void FirstMethod();",
"@FXML\n private void menu(){\n\n // Runs mid menu\n MidGameMenu.menuMethod();\n\n Main.gang.setMoving(false);\n Main.main.getMenuWindow().showAndWait();\n }",
"public void display(){\n System.out.println(\"B class Show method\");\n }",
"private static void populationsMain() {\n Printing.wraptitle( POPULATIONS );\n Printing.makeOptions( GOUP );\n\n msg( \"This portion of the project is not interactive. See Discussion.pdf for population predictions.\" );\n msg( \"You can evaluate the functions used in this portion through selection (4) on the main menu.\" );\n\n int option = requestOption( 0 );\n if ( option == 0 ) {\n main();\n }\n\n }",
"public static void main(String[] args){\n\t\tSystem.out.println(\"method\");\n\t\tParent parent = new Parent();\n\t\tparent.i=40;\n\t\tParent.Test();\n\t}",
"public static void main(String[] args) {\n\t\tThisoperator op = new Thisoperator();\n\t\top.localmethod();\n\t\t\n\n\t}",
"void call();",
"public void otherWin\n (String name);",
"public SearchFrame(){//The main search frame which calls other methods\n\t\t/*Calling the methods intitialiseGUI and buildGUI*/\n\t\tintitialiseGUI();\n\t\tbuildGUI();\n\t}",
"public void runGame()\r\n\t{\r\n\t\tmainFrame.runGame();\r\n\t}",
"void methodA() {\n\t\tSystem.out.println(\"Method A\");\n\t}",
"public void onMainClick(){\r\n\t\tmyView.advanceToMain();\r\n\t}",
"@Override\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\tSystem.out.println(\"ChildParentMethod\");\r\n\t}",
"public void run() {\n\t\t\t\tshowMessage(\"Notes for 'Class Components Tree' view\", \n\t\t\t\t\t\t\"This view shows the components tree of the class that is selected in Model Explorer.\");\n//\t\t\t\t\t\t\t\"\\n\\nNote that arrays are not expanded.\");\n\t\t\t}",
"void fun(){\n\t\tSystem.out.println(\"This is fun\");\n\t}",
"public void run() { //these are the methods that are present in the parent interface class, they need to have a body in the child interface class\n\t\tSystem.out.println(\"Lizard is running\");\n\t}",
"public static void main(String[] args) {\n\t\t\tnew Inner().display();\n\t\t}",
"@Override\n\tpublic String visitMainClass(MainClassContext ctx) {\n\t\ttable.enterScope();\n\t\tvisit(ctx.getChild(3));\n\t\ttable.exitScope();\n\t\treturn null;\n\t}",
"public void run()\n {\n getMenuChoice();\n }",
"public static void main(String[] args) {\n\t\tXYZ obj = new XYZ();\n\t\tobj.myMethod();\n\t\t//XYZ hyd=new DEF();\n\t\t//hyd.myMethod();\n\t//\thyd.childspecificMethod();\n //DEF oy=new DEF();\n\t\t//oy.myMethod();\n\t\tDEF def=new DEF();\n\t\tdef.childspecificMethod();\n\t\tdef.myMethod();\n\n\t}",
"public void execute() {\n _plugin.openNavigator();\n }",
"@Override\n\tpublic void call() {\n\t\t\n\t}",
"void printMsg(){\n\tdisplay();\n }",
"public void gotoHome(){ application.gotoHome(); }",
"public void inicio(){\n }",
"public static void main(String args[])\n\t{\n\t\tOuter outer = new Outer();\n\t\tOuter.Inner innerobj1 = (Inner) outer.method(outer);\n\t\tinnerobj1.print();\n\t}",
"public void show() {\n\tSystem.out.println(\"show-method\");\t\n\t}",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"public static void main(String[] args){\n\n main_menu();\n\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"-----Accessing Static Nested method from Diffrent Class---\");\n\t\t\n\t\tNested.Inner n=new Nested.Inner();\n\t\tn.m1(); \n\t\t//Inner.m1()\n\t\tNested n1=new Nested();\n\t\tn1.m2();\n\t\t\n\n\t}",
"public static void main(String[] args)\n\t{\n\t\tLocalinner li=new Localinner();\n\t\tli.display();\n\t}",
"static void DisplayMainMenu()\n {\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Menu\");\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Enter Selection\");\n \tSystem.out.println(\"1) Send Message\");\n \tSystem.out.println(\"2) Receive Message\");\n \tSystem.out.println(\"3) Run regression test\");\n }",
"@Test\n public void testscrollPNWMagazine(){\n TestLogger.log(getClass().getSimpleName() + \": \" + convertToString(new Object(){}.getClass().getEnclosingMethod().getName()));\n getPnwMagazine();\n System.out.println(\"scrollMenuList for PNW Magazine passed\");\n }",
"@Override\r\n public void run() {\n opsi_menu();\r\n\r\n }",
"public void triggerPopup();",
"void clickFmFromMenu();",
"public static void main(String[] args) {\n\t\tParent b=new Child();\n\t\tb.display();\n\t\tb.hi();\n\t}",
"void clickSomewhereElse();",
"public void open();",
"public void open();",
"public static void main(String[] args) {\n Menu();\n }"
] | [
"0.62237835",
"0.60885924",
"0.5926007",
"0.58736664",
"0.5858011",
"0.58480984",
"0.5827656",
"0.57643557",
"0.5738308",
"0.5735827",
"0.5719548",
"0.5706586",
"0.5689911",
"0.5653597",
"0.56317544",
"0.56246734",
"0.5622748",
"0.56195205",
"0.559567",
"0.55718863",
"0.55717504",
"0.5507968",
"0.55025786",
"0.5492542",
"0.5473077",
"0.54305756",
"0.54084575",
"0.5397517",
"0.537421",
"0.5372737",
"0.53511655",
"0.53502727",
"0.5349708",
"0.5345446",
"0.5337275",
"0.53340864",
"0.53300667",
"0.53176695",
"0.5281919",
"0.5268881",
"0.52682024",
"0.52534455",
"0.5233396",
"0.52259725",
"0.5224859",
"0.52126974",
"0.52122086",
"0.5201816",
"0.5190495",
"0.51903373",
"0.51820946",
"0.5179724",
"0.5179497",
"0.5168374",
"0.5166953",
"0.51651937",
"0.5159064",
"0.51558876",
"0.5150533",
"0.5149994",
"0.5147119",
"0.51287365",
"0.5114485",
"0.5104472",
"0.5101963",
"0.5090752",
"0.5089806",
"0.5087931",
"0.5078705",
"0.5076788",
"0.50756794",
"0.50756466",
"0.50743395",
"0.5072809",
"0.5071811",
"0.50700986",
"0.50693303",
"0.50677127",
"0.5067068",
"0.5066627",
"0.5058142",
"0.5047857",
"0.5047063",
"0.5044692",
"0.5043969",
"0.504099",
"0.5036142",
"0.5030335",
"0.50300777",
"0.50178295",
"0.50130504",
"0.5002129",
"0.50002164",
"0.4989573",
"0.49882424",
"0.49870878",
"0.4986758",
"0.49842215",
"0.4982375",
"0.4982375",
"0.49813244"
] | 0.0 | -1 |
Calls an object's method | <T> T callMethod(Object obj, String name, Class<T> resultType, Object... args)
throws ScriptRunnerException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void callMethod(Object obj, String name, Object... args)\n throws ScriptRunnerException;",
"public void call(Object object) {\n try {\n this.method.invoke(this.listener, object);\n } catch (IllegalAccessException | InvocationTargetException ex) {\n throw new InvalidListenerException(\"Unable to invoke method\", ex);\n } catch (Exception ex) {\n throw new InvalidListenerException(\"Unable to run listener method\", ex);\n }\n }",
"public ObjectType callMethod(String methodName, ObjectType... args) {\n\t\t// getting the member\n\t\tObjectType member = getProperty(methodName);\n\t\t//check if exists\n\t\tif (member.isUndefined())\n\t\t\t//call hosted one instead if not exist\n\t\t\treturn callHostedMethod(\"_\", methodName, args);\n\t\t\n\t\t//calling the function\n\t\treturn member.invoke(this, args);\n\t}",
"public Object invokeMethod(Object object, String methodName, Object arguments) {\n /*\n System\n .out\n .println(\n \"Invoker - Invoking method on object: \"\n + object\n + \" method: \"\n + methodName\n + \" arguments: \"\n + InvokerHelper.toString(arguments));\n \n */\n \n if (object == null) {\n throw new NullPointerException(\"Cannot invoke method: \" + methodName + \" on null object\");\n }\n \n if (object instanceof GroovyObject) {\n GroovyObject groovy = (GroovyObject) object;\n return groovy.invokeMethod(methodName, arguments);\n }\n else {\n if (object instanceof Class) {\n Class theClass = (Class) object;\n \n MetaClass metaClass = metaRegistry.getMetaClass(theClass);\n return metaClass.invokeStaticMethod(object, methodName, asArray(arguments));\n }\n else {\n Class theClass = object.getClass();\n \n MetaClass metaClass = metaRegistry.getMetaClass(theClass);\n return metaClass.invokeMethod(object, methodName, asArray(arguments));\n }\n }\n }",
"public void callMethod( String objectName, String methodName )\n throws MraldException\n {\n try\n {\n Class mraldObject = ( Class )Class.forName( objectName ).newInstance();\n Method method = mraldObject.getMethod( methodName );\n method.invoke( mraldObject );\n }\n catch ( NoSuchMethodException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( ClassNotFoundException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( IllegalAccessException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InstantiationException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InvocationTargetException e )\n {\n throw new MraldException(e, messageObject);\n }\n }",
"public void callMethod( String objectName )\n throws MraldException\n {\n AbstractStep mraldObject = ( AbstractStep )createObject( objectName );\n mraldObject.execute( messageObject );\n mraldObject = null;\n }",
"void call(Person obj);",
"protected abstract void action(Object obj);",
"public void callMoveFromObject() {\r\n try { \r\n if (internalObject instanceof BObject) { \r\n Class [] params = {};\r\n BMethod move = ((BObject) internalObject).getBClass().getDeclaredMethod(\"move\",params);\r\n if (move != null)\r\n move.invoke((BObject)internalObject, params);\r\n }\r\n } catch (Exception e) {\r\n // nothing\r\n //e.printStackTrace();\r\n }\r\n\r\n }",
"protected void invokeMethod(MetaMethod method) {\n Class callClass = method.getInterfaceClass();\n boolean useInterface = false;\n if (callClass == null) {\n callClass = method.getCallClass();\n }\n else {\n useInterface = true;\n }\n String type = BytecodeHelper.getClassInternalName(callClass.getName());\n String descriptor = BytecodeHelper.getMethodDescriptor(method.getReturnType(), method.getParameterTypes());\n\n // System.out.println(\"Method: \" + method);\n // System.out.println(\"Descriptor: \" + descriptor);\n\n if (method.isStatic()) {\n loadParameters(method, 3);\n cv.visitMethodInsn(INVOKESTATIC, type, method.getName(), descriptor);\n }\n else {\n cv.visitVarInsn(ALOAD, 2);\n helper.doCast(callClass);\n loadParameters(method, 3);\n cv.visitMethodInsn((useInterface) ? INVOKEINTERFACE : INVOKEVIRTUAL, type, method.getName(), descriptor);\n }\n\n helper.box(method.getReturnType());\n }",
"K invoke(Map<String, Method> methods, T object);",
"public Object invoke(Object obj, Object[] params) throws Exception {\r\n return this.method.invoke(obj, params);\r\n }",
"public abstract Object invoke(T target , Method method , Object[] args) throws Throwable;",
"public void callit();",
"public JsonNode callMethod(final JsiiObjectRef objRef, final String method, final ArrayNode args) {\n ObjectNode req = makeRequest(\"invoke\", objRef);\n req.put(\"method\", method);\n req.set(\"args\", args);\n\n JsonNode resp = this.runtime.requestResponse(req);\n return resp.get(\"result\");\n }",
"protected ObjectType callHostedMethod(String prefix, String methodName, ObjectType... args) {\n\t\ttry {\n\t\t\tMethod m = this.getClass().getMethod(prefix + methodName, objectsToClasses(args));\n\t\t\treturn (ObjectType)m.invoke(this,(Object[]) args);\n\t\t} catch (NoSuchMethodError e) {\n\t\t\tthrow new RuntimeException(String.format(\"Object has no method named %s\", methodName));\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"public static void method(Object obj){\n\t System.out.println(\"method with param type - Object\");\n\t }",
"public abstract void execute(SimInfo object);",
"void call();",
"public void objectTest() {\n }",
"public static Object invokeMethod(Method method, Object target) {\n return invokeMethod(method, target, new Object[0]);\n }",
"public abstract void call();",
"abstract protected Object invoke0 (Object obj, Object[] args);",
"private Object executeMethod(Object target, CallStatement callStatement)\n throws EngineException {\n try {\n CallStatement.CallStatementEntry entry = \n callStatement.getEntries().get(callStatement.getEntries().size() -1);\n Method[] methods = target.getClass().getMethods();\n for (Method method: methods) {\n if (methodsMatch(method,entry)) {\n return method.invoke(target, parameters.toArray(new Object[0]));\n }\n }\n } catch (EngineException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new EngineException(\"Failed to execute the method because : \" \n + ex.getMessage(),ex);\n }\n throw new java.lang.NoSuchMethodError(\n \"No method matching the requirments was found\");\n }",
"public void callMethod( String objectName, String methodName, Object[] parameters, Class[] parameterTypes )\n throws MraldException\n {\n try\n {\n Class mraldObject = ( Class )Class.forName( objectName ).newInstance();\n Method method = mraldObject.getMethod( methodName, parameterTypes );\n method.invoke( mraldObject, parameters );\n }\n catch ( ClassNotFoundException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( NoSuchMethodException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( IllegalAccessException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InstantiationException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InvocationTargetException e )\n {\n throw new MraldException(e, messageObject);\n }\n }",
"public static Object invoke(String methodName, Object o, Object... params) {\n\t\treturn invoke(getMethod(methodName, o.getClass()), o, params);\n\t}",
"@Override\n public void execute() throws EngineException {\n Object target = JavaReflectionUtil.getObject(this.target, \n callStatement.getEntries().subList(1,\n callStatement.getEntries().size() - 1));\n this.getParent().setResult(executeMethod(target, callStatement));\n pop();\n }",
"@Override\n\tpublic void call() {\n\t\t\n\t}",
"MethodName getMethod();",
"public void method(){}",
"public void callmetoo(){\r\n\tSystem.out.println(\"This is a concrete method\");\r\n\t}",
"void callMethod(String name, Object... args)\n throws ScriptRunnerException;",
"private void setValueObject(Object object, Object value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException{\n\t\tthis.methodSet.invoke(object, value);\n\t}",
"@Override\r\n \tpublic Object invoke(Object arg0, Method arg1, Object[] arg2)\r\n \t\t\tthrows Throwable {\n \t\tString urlfortheobject = baseUrl+methodToID(arg1);\r\n \t\t\r\n \t\t// Get the IRemoteRestCall object for this method...\r\n\t\tClientResource cr = new ClientResource(urlfortheobject);\r\n \t\tIRemoteRestCall resource = cr.wrap(IRemoteRestCall.class, arg1.getReturnType());\r\n \t\t\r\n \t\t// Call\r\n \t\tObject returnObject = resource.doCall(arg2);\r\n\t\tcr.release();\r\n \t\t\r\n \t\t// return\r\n \t\treturn returnObject;\r\n \t}",
"@Override\r\n\tpublic void callMethod(MethodDescriptor method, RpcController controller, Message request, Message responsePrototype, RpcCallback<Message> done) {\n\t\t\r\n\t}",
"public static Object invoke(Method paramMethod, Object paramObject, Object[] paramArrayOfObject) throws InvocationTargetException, IllegalAccessException {\n/* */ try {\n/* 276 */ return bounce.invoke(null, new Object[] { paramMethod, paramObject, paramArrayOfObject });\n/* 277 */ } catch (InvocationTargetException invocationTargetException) {\n/* 278 */ Throwable throwable = invocationTargetException.getCause();\n/* */ \n/* 280 */ if (throwable instanceof InvocationTargetException)\n/* 281 */ throw (InvocationTargetException)throwable; \n/* 282 */ if (throwable instanceof IllegalAccessException)\n/* 283 */ throw (IllegalAccessException)throwable; \n/* 284 */ if (throwable instanceof RuntimeException)\n/* 285 */ throw (RuntimeException)throwable; \n/* 286 */ if (throwable instanceof Error) {\n/* 287 */ throw (Error)throwable;\n/* */ }\n/* 289 */ throw new Error(\"Unexpected invocation error\", throwable);\n/* */ }\n/* 291 */ catch (IllegalAccessException illegalAccessException) {\n/* */ \n/* 293 */ throw new Error(\"Unexpected invocation error\", illegalAccessException);\n/* */ } \n/* */ }",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tmethodInvocation.invoke();\n\t\treturn method.invoke(bean, args);\n\t}",
"public Method getMethod();",
"@Override\n public Object invoke(Object proxy, Method method, Object[] args)\n throws Throwable {\n if (method.getDeclaringClass() == Object.class) {\n return method.invoke(this, args);\n }\n ServiceMethod<Object, Object> serviceMethod =\n (ServiceMethod<Object, Object>) loadServiceMethod(method);\n ServiceCall<Object> serviceCall = new ServiceCall<>(serviceMethod, args);\n return serviceMethod.adapt(serviceCall, args);\n }",
"Method getMethod();",
"Method getMethod();",
"public T CallFunctions(T obj) {\n for (Function<T,T> action : actions) {\n obj = action.apply(obj);\n }\n \n return obj;\n }",
"private void doSomething(Object object) {\n\n }",
"public abstract void mo1184a(Object obj);",
"public void simulateMethod(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar,\n ReferenceVariable params[]) {\n\n String subSignature = method.getSubSignature();\n\n if (subSignature.equals(\"java.lang.Object getObjectFieldValue(java.lang.Object,long)\")) {\n java_io_ObjectOutputStream_getObjectFieldValue(method, thisVar, returnVar, params);\n return;\n\n } else {\n defaultMethod(method, thisVar, returnVar, params);\n return;\n\n }\n }",
"public void perform(Object object) throws E {\n\t\tif(type().isInstance(object)) {\n\t\t\taccept((T) object);\n\t\t}\n\t}",
"public void method() {\n\t\t\r\n\t\t\r\n\t\tnew Inter() {\t\t\t\t\t\t\t//实现Inter接口\r\n\t\t\tpublic void print() {\t\t\t\t//重写抽象方法\r\n\t\t\t\tSystem.out.println(\"print\");\r\n\t\t\t}\r\n\t\t}.print();\r\n\t\t\r\n\t\t\r\n\t}",
"void updateMethod(Method method);",
"public void execute( I18n i18n, Object[] args ) throws Throwable\n {\n scriptObjectMirror.callMember( methodName, args );\n }",
"public Object call(Object[] args) {\r\n return invoke(args);\r\n }",
"@Override\r\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tbeforeMethod();\r\n\t\tObject result = method.invoke(target, args);\r\n\t\tafterMethod();\r\n\t\treturn result;\r\n\t}",
"public void executeTrigger(Object object);",
"public Object caseRMethod(RMethod object) {\n\t\treturn null;\n\t}",
"public Object invoke(String name, Object... args) throws Exception;",
"public void call(T arg);",
"Mono<Void> invokeMethod(String methodName, Object data);",
"public Object call(Context cx, Scriptable scope, Scriptable thisObj,\n Object[] args);",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"public void makeCall() {\n\n }",
"public abstract Object[] callMethod(IComputerAccess computer, ILuaContext context, int method,\n\t\t\t\tObject[] arguments) throws Exception;",
"<T> Mono<T> invokeMethod(String methodName, Object data, Class<T> clazz);",
"<T> Mono<T> invokeMethod(String methodName, Class<T> clazz);",
"@Override\n public Object invoke(Object o, Method method, Object[] objects) throws Throwable {\n\n String name = method.getName();\n\n try {\n Method proxyMethod = proxyObject.getClass().getMethod(method.getName(), method.getParameterTypes());\n return proxyMethod.invoke( proxyObject, objects );\n }\n catch (NoSuchMethodException e) {\n\n if ( proxyObject instanceof ProxyAccessor ) {\n ProxyAccessor access = (ProxyAccessor) proxyObject;\n\n if (( name.startsWith(\"get\") || name.startsWith(\"is\"))\n && objects == null) {\n return access._getValueByName(getField(name));\n }\n else if (name.startsWith(\"set\")\n && objects != null && objects.length==1) {\n access._setValueByName(getField(name), objects[0]);\n return null;\n }\n }\n\n throw e;\n }\n }",
"public static Object dispatch(Object object){\n RPCCommonReqDTO rpcCommonReqDTO = (RPCCommonReqDTO)object;\n String methodName = rpcCommonReqDTO.getMethodName();\n String classPath = rpcCommonReqDTO.getClassPath();\n Object[] args = rpcCommonReqDTO.getArgs();\n Class[] types = null;\n Object resObject = null;\n if(args != null && args.length > 0) {\n types = new Class[args.length];\n for (int i = 0; i < types.length; i++) {\n types[i] = args[i].getClass();\n }\n }\n //\n try {\n Class<?> aClass = Class.forName(classPath);\n Method method = aClass.getDeclaredMethod(methodName, types);\n resObject = method.invoke(aClass.newInstance(), args);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n return resObject;\n }",
"public void execute(VirtualView virtualView){\n //method in virtualView\n }",
"void mo67921a(Object obj);",
"public void updateByObject()\r\n\t{\n\t}",
"public Object invoke( Object[] args )\n {\n return invokeFromBytecode(args);\n }",
"static String invokingMethod(ContributionDef def)\n {\n return MESSAGES.format(\"invoking-method\", def);\n }",
"protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }",
"protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }",
"public java.lang.Object callMethod (Symbol methodName, java.lang.Object[] args, int timeOut)\n throws G2AccessException;",
"@Override\n\tpublic String onCall(String name, String user, String[] args) {\n\t\t// Does the object macro exist?\n\t\tObjectMacro macro = this.handlers.get(name);\n\t\tif (macro == null) {\n\t\t\treturn \"[ERR: Object Not Found]\";\n\t\t}\n\n\t\t// Call it!\n\t\treturn macro.call(this.parent, args);\n\t}",
"public Object call() throws Exception {\n return this.call();\n }",
"private void assertIsMethod(SymObject object) {\n assertIsOfKind(object, SymObject.KIND_METHOD,\n object.name + \" can't be resolved to a method\");\n }",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws UnknownHostException, IOException, ClassNotFoundException {\n\t\tSocket sock = new Socket(IP_adr, Port);\n\t\tCommunicationModule cm = new CommunicationModule();\n\n\t\tTranSegment seg = new TranSegment(Obj_Key, method.getName(), args);\n\n\t\tboolean s = cm.SendObj(sock, seg);\n\t\tif (s) {\n\t\t\t//Get the invoking result returned from server end\n\t\t\tObject result = cm.RecObj(sock);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}",
"public abstract B zzt(Object obj);",
"@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}",
"Mono<Void> invokeMethod(String methodName);",
"interface Interface{\n\tObject call(Object value);\n}",
"InvocationResult invoke(RemoteService service, MethodInvocation invocation);",
"public static Object invokeNoArgumentMethod(String methodName, Object objectToInvokeUpon) {\n try {\n Method method = objectToInvokeUpon.getClass().getMethod(methodName);\n method.setAccessible(true);\n return method.invoke(objectToInvokeUpon);\n } catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {\n throw new ReflectionInvocationException(e);\n }\n }",
"public Object perform(MethodActionEvent event)\n throws Throwable;",
"void m21809e(Object obj);",
"public abstract void update(Object obj) ;",
"public static Object invokeMethod(Method method, Object instance, Object... params) {\n return performReflectionAction(() -> method.invoke(instance, params));\n }",
"void m21805a(Object obj);",
"public void andThisIsAMethodName(){}",
"public void mo1774a(Object obj) {\n }",
"public void callP(){\n super.walks(\"called parent method\");\n }",
"public void a(Object obj) {\n }",
"private Object getValueObject(Object object) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException{\n\t\tObject value = this.methodGet.invoke(object, null);\n\t\treturn value;\n\t}",
"public static Object invokeMethod(Class clazz, Object instance, String methodName) throws ReflectionException {\n\t\treturn invokeMethod(clazz, instance, methodName, new Class[]{}, new Object[]{});\n\t}",
"void m21807c(Object obj);",
"@ReflectiveMethod(name = \"E\", types = {})\n public void E(){\n NMSWrapper.getInstance().exec(nmsObject);\n }",
"public void execute() {\n\t\ttry {\n\t\t\tMethod method = this.getClass().getMethod(parseMethod(), new Class[0]);\n\t\t\tmethod.invoke(this, new Object[0]);\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\tSystem.out.println(\"Unknown option: \" + command);\n\t\t} catch (IllegalAccessException | IllegalArgumentException e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Invalid usage of: \" + command + \", the following error \" + \"was given: \" + e.getMessage());\n\t\t} catch (InvocationTargetException e) {\n\t\t\tSystem.out.println(\"An error occurred while executing '\" + command + \"'. The \"\n\t\t\t\t\t+ \"following error was given: \" + e.getCause());\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic void outAMethodCallExpr(AMethodCallExpr node){\n\t\tString methodName = node.getId().getText();\n\t\tType targetType = nodeTypes.get(node.getTarget());\n\t\tboxIt(targetType); \n\t\tClassAttributes targetClass = topLevelSymbolTable.get(targetType.getTypeName());\n\t\tMethodAttributes methodAttributes = targetClass.getMethod(methodName);\n\t\tif (!(node.getTarget() instanceof ASuperExpr)){\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()) , Constants.INVOKEVIRTUAL));\n\t\t}\n\t\telse {\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()), Constants.INVOKESPECIAL)); \n\t\t}\n\t\tunboxIt(methodAttributes.getReturnType()); \n\t}",
"void m21806b(Object obj);",
"public static void call(Object... o) {\r\n\t\t// to prevent the compiler to prune the Object\r\n\t}"
] | [
"0.70463955",
"0.6864493",
"0.67937624",
"0.677593",
"0.66279405",
"0.65901047",
"0.65404207",
"0.63895357",
"0.63355356",
"0.6318475",
"0.62876534",
"0.6267213",
"0.6171806",
"0.6166013",
"0.60446346",
"0.60102135",
"0.5983129",
"0.598185",
"0.598046",
"0.5976146",
"0.59707713",
"0.59674835",
"0.59573996",
"0.5953349",
"0.59360653",
"0.59273356",
"0.5917139",
"0.5886944",
"0.5883032",
"0.5882269",
"0.5865445",
"0.5846606",
"0.5845971",
"0.58449817",
"0.58439153",
"0.5840344",
"0.5819191",
"0.5816153",
"0.5740494",
"0.57361275",
"0.57345176",
"0.57345176",
"0.57160103",
"0.57026154",
"0.5699897",
"0.56940585",
"0.5688379",
"0.5669297",
"0.56626105",
"0.5658115",
"0.56541014",
"0.5652525",
"0.5646855",
"0.56417286",
"0.56401646",
"0.5631913",
"0.56245226",
"0.5622454",
"0.5617923",
"0.56154406",
"0.5607841",
"0.56053996",
"0.559709",
"0.5586402",
"0.5578367",
"0.5576355",
"0.55741316",
"0.5573876",
"0.55727684",
"0.55603397",
"0.5555924",
"0.5555924",
"0.55524975",
"0.55498314",
"0.5534469",
"0.5533125",
"0.5532687",
"0.55292314",
"0.5513175",
"0.5507777",
"0.5499144",
"0.5493276",
"0.54888594",
"0.5482329",
"0.54817206",
"0.54809135",
"0.547625",
"0.54743296",
"0.5469962",
"0.5467567",
"0.54633963",
"0.54576206",
"0.5452769",
"0.54485583",
"0.54484355",
"0.5439564",
"0.5435397",
"0.543227",
"0.54301155",
"0.54253554"
] | 0.57882875 | 38 |
Calls an object's method | void callMethod(Object obj, String name, Object... args)
throws ScriptRunnerException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void call(Object object) {\n try {\n this.method.invoke(this.listener, object);\n } catch (IllegalAccessException | InvocationTargetException ex) {\n throw new InvalidListenerException(\"Unable to invoke method\", ex);\n } catch (Exception ex) {\n throw new InvalidListenerException(\"Unable to run listener method\", ex);\n }\n }",
"public ObjectType callMethod(String methodName, ObjectType... args) {\n\t\t// getting the member\n\t\tObjectType member = getProperty(methodName);\n\t\t//check if exists\n\t\tif (member.isUndefined())\n\t\t\t//call hosted one instead if not exist\n\t\t\treturn callHostedMethod(\"_\", methodName, args);\n\t\t\n\t\t//calling the function\n\t\treturn member.invoke(this, args);\n\t}",
"public Object invokeMethod(Object object, String methodName, Object arguments) {\n /*\n System\n .out\n .println(\n \"Invoker - Invoking method on object: \"\n + object\n + \" method: \"\n + methodName\n + \" arguments: \"\n + InvokerHelper.toString(arguments));\n \n */\n \n if (object == null) {\n throw new NullPointerException(\"Cannot invoke method: \" + methodName + \" on null object\");\n }\n \n if (object instanceof GroovyObject) {\n GroovyObject groovy = (GroovyObject) object;\n return groovy.invokeMethod(methodName, arguments);\n }\n else {\n if (object instanceof Class) {\n Class theClass = (Class) object;\n \n MetaClass metaClass = metaRegistry.getMetaClass(theClass);\n return metaClass.invokeStaticMethod(object, methodName, asArray(arguments));\n }\n else {\n Class theClass = object.getClass();\n \n MetaClass metaClass = metaRegistry.getMetaClass(theClass);\n return metaClass.invokeMethod(object, methodName, asArray(arguments));\n }\n }\n }",
"public void callMethod( String objectName, String methodName )\n throws MraldException\n {\n try\n {\n Class mraldObject = ( Class )Class.forName( objectName ).newInstance();\n Method method = mraldObject.getMethod( methodName );\n method.invoke( mraldObject );\n }\n catch ( NoSuchMethodException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( ClassNotFoundException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( IllegalAccessException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InstantiationException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InvocationTargetException e )\n {\n throw new MraldException(e, messageObject);\n }\n }",
"public void callMethod( String objectName )\n throws MraldException\n {\n AbstractStep mraldObject = ( AbstractStep )createObject( objectName );\n mraldObject.execute( messageObject );\n mraldObject = null;\n }",
"void call(Person obj);",
"protected abstract void action(Object obj);",
"public void callMoveFromObject() {\r\n try { \r\n if (internalObject instanceof BObject) { \r\n Class [] params = {};\r\n BMethod move = ((BObject) internalObject).getBClass().getDeclaredMethod(\"move\",params);\r\n if (move != null)\r\n move.invoke((BObject)internalObject, params);\r\n }\r\n } catch (Exception e) {\r\n // nothing\r\n //e.printStackTrace();\r\n }\r\n\r\n }",
"protected void invokeMethod(MetaMethod method) {\n Class callClass = method.getInterfaceClass();\n boolean useInterface = false;\n if (callClass == null) {\n callClass = method.getCallClass();\n }\n else {\n useInterface = true;\n }\n String type = BytecodeHelper.getClassInternalName(callClass.getName());\n String descriptor = BytecodeHelper.getMethodDescriptor(method.getReturnType(), method.getParameterTypes());\n\n // System.out.println(\"Method: \" + method);\n // System.out.println(\"Descriptor: \" + descriptor);\n\n if (method.isStatic()) {\n loadParameters(method, 3);\n cv.visitMethodInsn(INVOKESTATIC, type, method.getName(), descriptor);\n }\n else {\n cv.visitVarInsn(ALOAD, 2);\n helper.doCast(callClass);\n loadParameters(method, 3);\n cv.visitMethodInsn((useInterface) ? INVOKEINTERFACE : INVOKEVIRTUAL, type, method.getName(), descriptor);\n }\n\n helper.box(method.getReturnType());\n }",
"K invoke(Map<String, Method> methods, T object);",
"public Object invoke(Object obj, Object[] params) throws Exception {\r\n return this.method.invoke(obj, params);\r\n }",
"public abstract Object invoke(T target , Method method , Object[] args) throws Throwable;",
"public void callit();",
"public JsonNode callMethod(final JsiiObjectRef objRef, final String method, final ArrayNode args) {\n ObjectNode req = makeRequest(\"invoke\", objRef);\n req.put(\"method\", method);\n req.set(\"args\", args);\n\n JsonNode resp = this.runtime.requestResponse(req);\n return resp.get(\"result\");\n }",
"protected ObjectType callHostedMethod(String prefix, String methodName, ObjectType... args) {\n\t\ttry {\n\t\t\tMethod m = this.getClass().getMethod(prefix + methodName, objectsToClasses(args));\n\t\t\treturn (ObjectType)m.invoke(this,(Object[]) args);\n\t\t} catch (NoSuchMethodError e) {\n\t\t\tthrow new RuntimeException(String.format(\"Object has no method named %s\", methodName));\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"public static void method(Object obj){\n\t System.out.println(\"method with param type - Object\");\n\t }",
"public abstract void execute(SimInfo object);",
"void call();",
"public void objectTest() {\n }",
"public static Object invokeMethod(Method method, Object target) {\n return invokeMethod(method, target, new Object[0]);\n }",
"public abstract void call();",
"abstract protected Object invoke0 (Object obj, Object[] args);",
"private Object executeMethod(Object target, CallStatement callStatement)\n throws EngineException {\n try {\n CallStatement.CallStatementEntry entry = \n callStatement.getEntries().get(callStatement.getEntries().size() -1);\n Method[] methods = target.getClass().getMethods();\n for (Method method: methods) {\n if (methodsMatch(method,entry)) {\n return method.invoke(target, parameters.toArray(new Object[0]));\n }\n }\n } catch (EngineException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new EngineException(\"Failed to execute the method because : \" \n + ex.getMessage(),ex);\n }\n throw new java.lang.NoSuchMethodError(\n \"No method matching the requirments was found\");\n }",
"public void callMethod( String objectName, String methodName, Object[] parameters, Class[] parameterTypes )\n throws MraldException\n {\n try\n {\n Class mraldObject = ( Class )Class.forName( objectName ).newInstance();\n Method method = mraldObject.getMethod( methodName, parameterTypes );\n method.invoke( mraldObject, parameters );\n }\n catch ( ClassNotFoundException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( NoSuchMethodException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( IllegalAccessException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InstantiationException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InvocationTargetException e )\n {\n throw new MraldException(e, messageObject);\n }\n }",
"public static Object invoke(String methodName, Object o, Object... params) {\n\t\treturn invoke(getMethod(methodName, o.getClass()), o, params);\n\t}",
"@Override\n public void execute() throws EngineException {\n Object target = JavaReflectionUtil.getObject(this.target, \n callStatement.getEntries().subList(1,\n callStatement.getEntries().size() - 1));\n this.getParent().setResult(executeMethod(target, callStatement));\n pop();\n }",
"@Override\n\tpublic void call() {\n\t\t\n\t}",
"MethodName getMethod();",
"public void method(){}",
"public void callmetoo(){\r\n\tSystem.out.println(\"This is a concrete method\");\r\n\t}",
"void callMethod(String name, Object... args)\n throws ScriptRunnerException;",
"private void setValueObject(Object object, Object value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException{\n\t\tthis.methodSet.invoke(object, value);\n\t}",
"@Override\r\n \tpublic Object invoke(Object arg0, Method arg1, Object[] arg2)\r\n \t\t\tthrows Throwable {\n \t\tString urlfortheobject = baseUrl+methodToID(arg1);\r\n \t\t\r\n \t\t// Get the IRemoteRestCall object for this method...\r\n\t\tClientResource cr = new ClientResource(urlfortheobject);\r\n \t\tIRemoteRestCall resource = cr.wrap(IRemoteRestCall.class, arg1.getReturnType());\r\n \t\t\r\n \t\t// Call\r\n \t\tObject returnObject = resource.doCall(arg2);\r\n\t\tcr.release();\r\n \t\t\r\n \t\t// return\r\n \t\treturn returnObject;\r\n \t}",
"@Override\r\n\tpublic void callMethod(MethodDescriptor method, RpcController controller, Message request, Message responsePrototype, RpcCallback<Message> done) {\n\t\t\r\n\t}",
"public static Object invoke(Method paramMethod, Object paramObject, Object[] paramArrayOfObject) throws InvocationTargetException, IllegalAccessException {\n/* */ try {\n/* 276 */ return bounce.invoke(null, new Object[] { paramMethod, paramObject, paramArrayOfObject });\n/* 277 */ } catch (InvocationTargetException invocationTargetException) {\n/* 278 */ Throwable throwable = invocationTargetException.getCause();\n/* */ \n/* 280 */ if (throwable instanceof InvocationTargetException)\n/* 281 */ throw (InvocationTargetException)throwable; \n/* 282 */ if (throwable instanceof IllegalAccessException)\n/* 283 */ throw (IllegalAccessException)throwable; \n/* 284 */ if (throwable instanceof RuntimeException)\n/* 285 */ throw (RuntimeException)throwable; \n/* 286 */ if (throwable instanceof Error) {\n/* 287 */ throw (Error)throwable;\n/* */ }\n/* 289 */ throw new Error(\"Unexpected invocation error\", throwable);\n/* */ }\n/* 291 */ catch (IllegalAccessException illegalAccessException) {\n/* */ \n/* 293 */ throw new Error(\"Unexpected invocation error\", illegalAccessException);\n/* */ } \n/* */ }",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tmethodInvocation.invoke();\n\t\treturn method.invoke(bean, args);\n\t}",
"<T> T callMethod(Object obj, String name, Class<T> resultType, Object... args)\n throws ScriptRunnerException;",
"public Method getMethod();",
"@Override\n public Object invoke(Object proxy, Method method, Object[] args)\n throws Throwable {\n if (method.getDeclaringClass() == Object.class) {\n return method.invoke(this, args);\n }\n ServiceMethod<Object, Object> serviceMethod =\n (ServiceMethod<Object, Object>) loadServiceMethod(method);\n ServiceCall<Object> serviceCall = new ServiceCall<>(serviceMethod, args);\n return serviceMethod.adapt(serviceCall, args);\n }",
"Method getMethod();",
"Method getMethod();",
"public T CallFunctions(T obj) {\n for (Function<T,T> action : actions) {\n obj = action.apply(obj);\n }\n \n return obj;\n }",
"private void doSomething(Object object) {\n\n }",
"public abstract void mo1184a(Object obj);",
"public void simulateMethod(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar,\n ReferenceVariable params[]) {\n\n String subSignature = method.getSubSignature();\n\n if (subSignature.equals(\"java.lang.Object getObjectFieldValue(java.lang.Object,long)\")) {\n java_io_ObjectOutputStream_getObjectFieldValue(method, thisVar, returnVar, params);\n return;\n\n } else {\n defaultMethod(method, thisVar, returnVar, params);\n return;\n\n }\n }",
"public void perform(Object object) throws E {\n\t\tif(type().isInstance(object)) {\n\t\t\taccept((T) object);\n\t\t}\n\t}",
"public void method() {\n\t\t\r\n\t\t\r\n\t\tnew Inter() {\t\t\t\t\t\t\t//实现Inter接口\r\n\t\t\tpublic void print() {\t\t\t\t//重写抽象方法\r\n\t\t\t\tSystem.out.println(\"print\");\r\n\t\t\t}\r\n\t\t}.print();\r\n\t\t\r\n\t\t\r\n\t}",
"void updateMethod(Method method);",
"public void execute( I18n i18n, Object[] args ) throws Throwable\n {\n scriptObjectMirror.callMember( methodName, args );\n }",
"public Object call(Object[] args) {\r\n return invoke(args);\r\n }",
"@Override\r\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tbeforeMethod();\r\n\t\tObject result = method.invoke(target, args);\r\n\t\tafterMethod();\r\n\t\treturn result;\r\n\t}",
"public void executeTrigger(Object object);",
"public Object caseRMethod(RMethod object) {\n\t\treturn null;\n\t}",
"public Object invoke(String name, Object... args) throws Exception;",
"public void call(T arg);",
"Mono<Void> invokeMethod(String methodName, Object data);",
"public Object call(Context cx, Scriptable scope, Scriptable thisObj,\n Object[] args);",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"public void makeCall() {\n\n }",
"public abstract Object[] callMethod(IComputerAccess computer, ILuaContext context, int method,\n\t\t\t\tObject[] arguments) throws Exception;",
"<T> Mono<T> invokeMethod(String methodName, Object data, Class<T> clazz);",
"<T> Mono<T> invokeMethod(String methodName, Class<T> clazz);",
"@Override\n public Object invoke(Object o, Method method, Object[] objects) throws Throwable {\n\n String name = method.getName();\n\n try {\n Method proxyMethod = proxyObject.getClass().getMethod(method.getName(), method.getParameterTypes());\n return proxyMethod.invoke( proxyObject, objects );\n }\n catch (NoSuchMethodException e) {\n\n if ( proxyObject instanceof ProxyAccessor ) {\n ProxyAccessor access = (ProxyAccessor) proxyObject;\n\n if (( name.startsWith(\"get\") || name.startsWith(\"is\"))\n && objects == null) {\n return access._getValueByName(getField(name));\n }\n else if (name.startsWith(\"set\")\n && objects != null && objects.length==1) {\n access._setValueByName(getField(name), objects[0]);\n return null;\n }\n }\n\n throw e;\n }\n }",
"public static Object dispatch(Object object){\n RPCCommonReqDTO rpcCommonReqDTO = (RPCCommonReqDTO)object;\n String methodName = rpcCommonReqDTO.getMethodName();\n String classPath = rpcCommonReqDTO.getClassPath();\n Object[] args = rpcCommonReqDTO.getArgs();\n Class[] types = null;\n Object resObject = null;\n if(args != null && args.length > 0) {\n types = new Class[args.length];\n for (int i = 0; i < types.length; i++) {\n types[i] = args[i].getClass();\n }\n }\n //\n try {\n Class<?> aClass = Class.forName(classPath);\n Method method = aClass.getDeclaredMethod(methodName, types);\n resObject = method.invoke(aClass.newInstance(), args);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n return resObject;\n }",
"public void execute(VirtualView virtualView){\n //method in virtualView\n }",
"void mo67921a(Object obj);",
"public void updateByObject()\r\n\t{\n\t}",
"public Object invoke( Object[] args )\n {\n return invokeFromBytecode(args);\n }",
"static String invokingMethod(ContributionDef def)\n {\n return MESSAGES.format(\"invoking-method\", def);\n }",
"protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }",
"protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }",
"public java.lang.Object callMethod (Symbol methodName, java.lang.Object[] args, int timeOut)\n throws G2AccessException;",
"@Override\n\tpublic String onCall(String name, String user, String[] args) {\n\t\t// Does the object macro exist?\n\t\tObjectMacro macro = this.handlers.get(name);\n\t\tif (macro == null) {\n\t\t\treturn \"[ERR: Object Not Found]\";\n\t\t}\n\n\t\t// Call it!\n\t\treturn macro.call(this.parent, args);\n\t}",
"public Object call() throws Exception {\n return this.call();\n }",
"private void assertIsMethod(SymObject object) {\n assertIsOfKind(object, SymObject.KIND_METHOD,\n object.name + \" can't be resolved to a method\");\n }",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws UnknownHostException, IOException, ClassNotFoundException {\n\t\tSocket sock = new Socket(IP_adr, Port);\n\t\tCommunicationModule cm = new CommunicationModule();\n\n\t\tTranSegment seg = new TranSegment(Obj_Key, method.getName(), args);\n\n\t\tboolean s = cm.SendObj(sock, seg);\n\t\tif (s) {\n\t\t\t//Get the invoking result returned from server end\n\t\t\tObject result = cm.RecObj(sock);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}",
"public abstract B zzt(Object obj);",
"@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}",
"Mono<Void> invokeMethod(String methodName);",
"interface Interface{\n\tObject call(Object value);\n}",
"InvocationResult invoke(RemoteService service, MethodInvocation invocation);",
"public static Object invokeNoArgumentMethod(String methodName, Object objectToInvokeUpon) {\n try {\n Method method = objectToInvokeUpon.getClass().getMethod(methodName);\n method.setAccessible(true);\n return method.invoke(objectToInvokeUpon);\n } catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {\n throw new ReflectionInvocationException(e);\n }\n }",
"public Object perform(MethodActionEvent event)\n throws Throwable;",
"void m21809e(Object obj);",
"public abstract void update(Object obj) ;",
"public static Object invokeMethod(Method method, Object instance, Object... params) {\n return performReflectionAction(() -> method.invoke(instance, params));\n }",
"void m21805a(Object obj);",
"public void andThisIsAMethodName(){}",
"public void mo1774a(Object obj) {\n }",
"public void callP(){\n super.walks(\"called parent method\");\n }",
"public void a(Object obj) {\n }",
"private Object getValueObject(Object object) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException{\n\t\tObject value = this.methodGet.invoke(object, null);\n\t\treturn value;\n\t}",
"public static Object invokeMethod(Class clazz, Object instance, String methodName) throws ReflectionException {\n\t\treturn invokeMethod(clazz, instance, methodName, new Class[]{}, new Object[]{});\n\t}",
"void m21807c(Object obj);",
"@ReflectiveMethod(name = \"E\", types = {})\n public void E(){\n NMSWrapper.getInstance().exec(nmsObject);\n }",
"public void execute() {\n\t\ttry {\n\t\t\tMethod method = this.getClass().getMethod(parseMethod(), new Class[0]);\n\t\t\tmethod.invoke(this, new Object[0]);\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\tSystem.out.println(\"Unknown option: \" + command);\n\t\t} catch (IllegalAccessException | IllegalArgumentException e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Invalid usage of: \" + command + \", the following error \" + \"was given: \" + e.getMessage());\n\t\t} catch (InvocationTargetException e) {\n\t\t\tSystem.out.println(\"An error occurred while executing '\" + command + \"'. The \"\n\t\t\t\t\t+ \"following error was given: \" + e.getCause());\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic void outAMethodCallExpr(AMethodCallExpr node){\n\t\tString methodName = node.getId().getText();\n\t\tType targetType = nodeTypes.get(node.getTarget());\n\t\tboxIt(targetType); \n\t\tClassAttributes targetClass = topLevelSymbolTable.get(targetType.getTypeName());\n\t\tMethodAttributes methodAttributes = targetClass.getMethod(methodName);\n\t\tif (!(node.getTarget() instanceof ASuperExpr)){\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()) , Constants.INVOKEVIRTUAL));\n\t\t}\n\t\telse {\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()), Constants.INVOKESPECIAL)); \n\t\t}\n\t\tunboxIt(methodAttributes.getReturnType()); \n\t}",
"void m21806b(Object obj);",
"public static void call(Object... o) {\r\n\t\t// to prevent the compiler to prune the Object\r\n\t}"
] | [
"0.6864493",
"0.67937624",
"0.677593",
"0.66279405",
"0.65901047",
"0.65404207",
"0.63895357",
"0.63355356",
"0.6318475",
"0.62876534",
"0.6267213",
"0.6171806",
"0.6166013",
"0.60446346",
"0.60102135",
"0.5983129",
"0.598185",
"0.598046",
"0.5976146",
"0.59707713",
"0.59674835",
"0.59573996",
"0.5953349",
"0.59360653",
"0.59273356",
"0.5917139",
"0.5886944",
"0.5883032",
"0.5882269",
"0.5865445",
"0.5846606",
"0.5845971",
"0.58449817",
"0.58439153",
"0.5840344",
"0.5819191",
"0.5816153",
"0.57882875",
"0.5740494",
"0.57361275",
"0.57345176",
"0.57345176",
"0.57160103",
"0.57026154",
"0.5699897",
"0.56940585",
"0.5688379",
"0.5669297",
"0.56626105",
"0.5658115",
"0.56541014",
"0.5652525",
"0.5646855",
"0.56417286",
"0.56401646",
"0.5631913",
"0.56245226",
"0.5622454",
"0.5617923",
"0.56154406",
"0.5607841",
"0.56053996",
"0.559709",
"0.5586402",
"0.5578367",
"0.5576355",
"0.55741316",
"0.5573876",
"0.55727684",
"0.55603397",
"0.5555924",
"0.5555924",
"0.55524975",
"0.55498314",
"0.5534469",
"0.5533125",
"0.5532687",
"0.55292314",
"0.5513175",
"0.5507777",
"0.5499144",
"0.5493276",
"0.54888594",
"0.5482329",
"0.54817206",
"0.54809135",
"0.547625",
"0.54743296",
"0.5469962",
"0.5467567",
"0.54633963",
"0.54576206",
"0.5452769",
"0.54485583",
"0.54484355",
"0.5439564",
"0.5435397",
"0.543227",
"0.54301155",
"0.54253554"
] | 0.70463955 | 0 |
Tries to convert the given object to the given type | <T> T convert(Object o, Class<T> type); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object elConvertType(Object value);",
"@Override\n\tpublic Object convert(Class<?> desiredType, Object in) throws Exception {\n\t\treturn null;\n\t}",
"protected <T> T convert(Object value, Class<T> type) {\r\n return typeConversionManager.convert(value, type);\r\n }",
"@SuppressWarnings(\"unchecked\")\n public <T> T convert(Object value, Class<T> type) {\n T convert = null;\n Object toConvert = value;\n if (toConvert != null) {\n Class<?> fromType = toConvert.getClass();\n // first we check to see if we even need to do the conversion\n if ( ConstructorUtils.classAssignable(fromType, type) ) {\n // this is already equivalent so no reason to convert\n convert = (T) value;\n } else {\n // needs to be converted\n try {\n convert = convertWithConverter(toConvert, type);\n } catch (RuntimeException e) {\n throw new UnsupportedOperationException(\"Could not convert object (\"+toConvert+\") from type (\"+fromType+\") to type (\"+type+\"): \" + e.getMessage(), e);\n }\n }\n } else {\n // object is null but type requested may be primitive\n if ( ConstructorUtils.isClassPrimitive(type) ) {\n // for primitives we return the default value\n if (ConstructorUtils.getPrimitiveDefaults().containsKey(type)) {\n convert = (T) ConstructorUtils.getPrimitiveDefaults().get(type);\n }\n }\n }\n return convert;\n }",
"protected static DataType getDataTypeFromObject(Object obj)\n {\n if(obj instanceof Integer)\n {\n return Integer;\n }\n else if(obj instanceof Long)\n {\n return Long;\n }\n else if(obj instanceof Boolean)\n {\n return Boolean;\n }\n else if (obj instanceof Double)\n {\n return Double;\n }\n\n return String;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T cast(Object object) {\n\n\t\treturn (T) object;\n\t}",
"private <T> T convert(String json, Type resultObject) {\n\t\tGson gson = new GsonBuilder().create();\n\t\treturn gson.fromJson(json, resultObject);\n\t}",
"public V cast(Object object) {\n return valueClass.cast(object);\n }",
"public static Object ensureType(Object o, int nType, PofContext ctx)\n {\n Class clz = getClass(nType, ctx);\n if (clz == null)\n {\n throw new IllegalArgumentException(\n \"Unknown or ambiguous type: \" + nType);\n }\n if (!clz.isAssignableFrom(o.getClass()))\n {\n throw new ClassCastException(o.getClass().getName() +\n \" is not assignable to \"\n + clz.getName());\n }\n return o;\n }",
"private static OpenTypeConverter makeParameterizedConverter(ParameterizedType objType)\n throws OpenDataException {\n\n final Type rawType = objType.getRawType();\n\n if (rawType instanceof Class) {\n Class c = (Class<?>) rawType;\n if (c == List.class || c == Set.class || c == SortedSet.class) {\n Type[] actuals = objType.getActualTypeArguments();\n assert (actuals.length == 1);\n if (c == SortedSet.class) {\n mustBeComparable(c, actuals[0]);\n }\n return makeArrayOrCollectionConverter(objType, actuals[0]);\n } else {\n boolean sortedMap = (c == SortedMap.class);\n if (c == Map.class || sortedMap) {\n Type[] actuals = objType.getActualTypeArguments();\n assert (actuals.length == 2);\n if (sortedMap) {\n mustBeComparable(c, actuals[0]);\n }\n return makeTabularConverter(objType, sortedMap, actuals[0], actuals[1]);\n }\n }\n }\n throw new OpenDataException(\"Cannot convert type: \" + objType);\n }",
"protected <T> T convertForEntity(Object value, Class<T> type) {\r\n return typeConversionManager.convert(value, type);\r\n }",
"@SuppressWarnings(\"unchecked\")\n public static <T> T ensureParamInstanceOf(String objectName, Object object, Class<T> type) {\n if(type.isAssignableFrom(object.getClass())) {\n return (T) object;\n } else {\n throw LOG.unsupportedParameterType(objectName, object, type);\n }\n }",
"public Object convertToType(ELContext context, Object obj, Class<?> targetType) {\n/* 522 */ context.setPropertyResolved(false);\n/* */ \n/* 524 */ Object value = null;\n/* 525 */ for (int i = 0; i < this.size; i++) {\n/* 526 */ value = this.elResolvers[i].convertToType(context, obj, targetType);\n/* 527 */ if (context.isPropertyResolved()) {\n/* 528 */ return value;\n/* */ }\n/* */ } \n/* 531 */ return null;\n/* */ }",
"public static Number toNumber(Object obj, Class<?> type) {\n if (obj == null) {\n return null;\n }\n // Integer, Long and BigDecimal are prior\n if (type == Integer.class) {\n return toInteger(obj);\n } else if (type == Long.class) {\n return toLong(obj);\n } else if (type == BigDecimal.class) {\n return toBigDecimal(obj);\n } else if (type == Double.class) {\n return toDouble(obj);\n } else if (type == Float.class) {\n return toFloat(obj);\n } else if (type == Short.class) {\n return toShort(obj);\n } else if (type == Byte.class) {\n return toByte(obj);\n } else if (type == BigInteger.class) {\n return toBigInteger(obj);\n }\n return null; // could not convert\n }",
"public Object cast(Object aFromObject, Class<?> toClass) {\n\t\ttry {\n\t\t\tClass<?> targetClz = Class.forName(toClass.getName());\n\t\t\tObject result = targetClz.newInstance();\n\t\t\tBeanUtils.copyProperties(result, aFromObject);\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\tlogger.warn(\"error casting \" + aFromObject.getClass().getName() + \" : \" + e);\n\t\t\treturn null;\n\t\t}\n\t}",
"public static <T> T convert(Object object, Class<T> cls) {\n\t\treturn fullMapper.convertValue(object, cls);\n\t}",
"private static Object convertType(Class type, String parameter)\n throws ResourceException {\n try {\n String typeName = type.getName();\n\n if (typeName.equals(\"java.lang.String\") ||\n typeName.equals(\"java.lang.Object\")) {\n return parameter;\n }\n\n if (typeName.equals(\"int\") || typeName.equals(\"java.lang.Integer\")) {\n return new Integer(parameter);\n }\n\n if (typeName.equals(\"short\") || typeName.equals(\"java.lang.Short\")) {\n return new Short(parameter);\n }\n\n if (typeName.equals(\"byte\") || typeName.equals(\"java.lang.Byte\")) {\n return new Byte(parameter);\n }\n\n if (typeName.equals(\"long\") || typeName.equals(\"java.lang.Long\")) {\n return new Long(parameter);\n }\n\n if (typeName.equals(\"float\") || typeName.equals(\"java.lang.Float\")) {\n return new Float(parameter);\n }\n\n if (typeName.equals(\"double\") ||\n typeName.equals(\"java.lang.Double\")) {\n return new Double(parameter);\n }\n\n if (typeName.equals(\"java.math.BigDecimal\")) {\n return new java.math.BigDecimal(parameter);\n }\n\n if (typeName.equals(\"java.math.BigInteger\")) {\n return new java.math.BigInteger(parameter);\n }\n\n if (typeName.equals(\"boolean\") ||\n typeName.equals(\"java.lang.Boolean\")) {\n return new Boolean(parameter);\n }\n\n return parameter;\n } catch (NumberFormatException nfe) {\n _logger.log(Level.SEVERE, \"jdbc.exc_nfe\", parameter);\n\n String msg = sm.getString(\"me.invalid_param\", parameter);\n throw new ResourceException(msg);\n }\n }",
"@SuppressWarnings(\"boxing\")\r\n private static Object toType(String propertyName, String value, Class<?> type) throws HorizonDBException {\r\n\r\n try {\r\n\r\n if (int.class.equals(type)) {\r\n\r\n return Integer.parseInt(value);\r\n }\r\n\r\n if (long.class.equals(type)) {\r\n\r\n return Long.parseLong(value);\r\n }\r\n\r\n if (Path.class.equals(type)) {\r\n\r\n return FileSystems.getDefault().getPath(value);\r\n }\r\n\r\n } catch (NumberFormatException e) {\r\n\r\n throw new HorizonDBException(ErrorCodes.INVALID_CONFIGURATION, \"The value: '\" + value\r\n + \"' associated to the property: \" + propertyName + \" is not a valid \" + type + \".\");\r\n }\r\n\r\n throw new IllegalStateException(\"Convertion to the type: \" + type + \" is not supported.\");\r\n }",
"public static Object convert(Object value, Class<?> clazz){\n if(clazz.equals(String.class))\n return String.valueOf(value);\n if(clazz.equals(Boolean.class) || \"Boolean\".equals(clazz.getName()))\n return Boolean.valueOf(String.valueOf(value));\n if(clazz.equals(Integer.class) || \"int\".equals(clazz.getName()))\n return NumberUtils.toInt(String.valueOf(value),0);\n if(clazz.equals(Long.class) || \"long\".equals(clazz.getName()))\n return NumberUtils.toLong(String.valueOf(value),0);\n if(clazz.equals(Double.class) || \"double\".equals(clazz.getName()))\n return NumberUtils.toDouble(String.valueOf(value),0);\n if(clazz.equals(Float.class) || \"float\".equals(clazz.getName()))\n return NumberUtils.toFloat(String.valueOf(value),0);\n if(clazz.equals(BigInteger.class))\n return NumberUtils.toInt(String.valueOf(value),0);\n if(clazz.equals(Date.class)) return new java.util.Date(((Date) value).getTime());\n return value;\n }",
"Object convertDBValueToJavaValue(Object value, Class<?> javaType);",
"public T caseType(Type object) {\n\t\treturn null;\n\t}",
"public boolean canConvert(Object o) {\n // Initializes an instance of T\n Class<T> type = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n return type.isInstance(o);\n\n }",
"Object convert(Object source, TypeToken<?> targetTypeToken);",
"public T caseType(Type object) {\r\n\t\treturn null;\r\n\t}",
"@Test\n public void testConvertPokemon() {\n Object result = converter.convert(null, pokemon, Long.class, Pokemon.class);\n\n assertEquals(result.getClass(), Long.class, \"Converted object is not of a Long class.\");\n assertSame(result, pokemon.getId(), \"Converted object is not the one expected.\");\n }",
"protected abstract Object toObject(InputStream inputStream, Type targetType) throws BeanConversionException;",
"public Object toJava(final Object object) {\n if ((object == null) || (_convertTo == null)) {\n return object;\n }\n return _convertTo.convert(object);\n }",
"@SuppressWarnings(\"unchecked\")\n public static <T> T adapt(Object object, Class<T> type) {\n if (type.isInstance(object)) {\n return (T) object;\n } else if (object instanceof IAdaptable) {\n return (T) ((IAdaptable) object).getAdapter(type);\n }\n return (T) Platform.getAdapterManager().getAdapter(object, type);\n }",
"Object getConvertedValue() throws ConversionException;",
"@Test\n public void testConvertTrainer() {\n Object result = converter.convert(null, trainer, Long.class, Trainer.class);\n\n assertEquals(result.getClass(), Long.class, \"Converted object is not of a Long class.\");\n assertSame(result, trainer.getId(), \"Converted object is not the one expected.\");\n }",
"public <T> T getObjectValue(Object object, Class<T> valueType) {\n\t\tlong time = System.currentTimeMillis();\n\t\ttry {\n\t\t\tif (object == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn mapper.convertValue(object, valueType);\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"Error getting object from the given json: \", ex);\n\t\t} finally {\n\t\t\tlogger.debug(\"Got object from JSON in \" + (System.currentTimeMillis() - time) + \" ms.\");\n\t\t}\n\t\treturn null;\n\t}",
"@Nullable\n protected Object convertValueForType(MappingContext context, Object value) {\n Class<?> rawClass = context.getTypeInformation().getSafeToWriteClass();\n if (rawClass == null) {\n throw new ConfigMeMapperException(context, \"Cannot determine required type\");\n }\n\n // Step 1: check if a value transformer can perform a simple conversion\n Object result = leafValueHandler.convert(context.getTypeInformation(), value);\n if (result != null) {\n return result;\n }\n\n // Step 2: check if we have a special type like List that is handled separately\n result = handleSpecialTypes(context, value);\n if (result != null) {\n return result;\n }\n\n // Step 3: last possibility - assume it's a bean and try to map values to its structure\n return createBean(context, value);\n }",
"Object convertJavaValueToDBValue(Object value, Class<?> javaType);",
"public interface TypeConverter {\n\n /**\n * Converts the value to the specified type\n * \n * @param type the requested type\n * @param value the value to be converted\n * @return the converted value\n * @throws {@link NoTypeConversionAvailableException} if conversion not possible\n */\n <T> T convertTo(Class<T> type, Object value);\n\n /**\n * Converts the value to the specified type in the context of an exchange\n * <p/>\n * Used when conversion requires extra information from the current\n * exchange (such as encoding).\n *\n * @param type the requested type\n * @param exchange the current exchange\n * @param value the value to be converted\n * @return the converted value\n * @throws {@link NoTypeConversionAvailableException} if conversion not possible\n */\n <T> T convertTo(Class<T> type, Exchange exchange, Object value);\n}",
"public Object convert(Class aType, Object aValue)\n throws ConversionException\n {\n // Deal with a null value\n if (aValue == null) {\n if (useDefault) {\n return (defaultValue);\n }\n throw new ConversionException(\"No value specified\");\n }\n \n // Deal with the no-conversion-needed case\n if (sModel.getClass() == aValue.getClass()) {\n return (aValue);\n }\n \n // Parse the input value as a String into elements\n // and convert to the appropriate type\n try {\n final List list = parseElements(aValue.toString());\n final String[] results = new String[list.size()];\n \n for (int i = 0; i < results.length; i++) {\n results[i] = (String) list.get(i);\n }\n return (results);\n }\n catch (Exception e) {\n if (useDefault) {\n return (defaultValue);\n }\n throw new ConversionException(aValue.toString(), e);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n private Object convertToDataTransferObject(Object data, Class<?> dtoType) {\n if (Map.class.isAssignableFrom(data.getClass())) {\n return ObjectUtils.convertMapToObject((Map<String, ?>) data, dtoType);\n }\n throw new ParamInvalidException(\"Cannot parse '\" + data.getClass().getName() + \"' to '\" + dtoType.getName() + \"'\");\n }",
"protected abstract Object convertNonNull(Object o);",
"@SuppressWarnings(\"unchecked\")\n static <T> T reserialize(T object) {\n checkNotNull(object);\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n try {\n ObjectOutputStream out = new ObjectOutputStream(bytes);\n out.writeObject(object);\n ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));\n return (T) in.readObject();\n } catch (IOException | ClassNotFoundException e) {\n throw new RuntimeException(e);\n }\n }",
"protected abstract Object toObject(ByteBuffer content, Type targetType) throws BeanConversionException;",
"private static Object parseStringToObject(String text, Class ObjectType) {\n if (ObjectType == Integer.class) return Integer.parseInt(text);\n else if (ObjectType == Float.class) return Float.parseFloat(text);\n else if (ObjectType == Double.class) return Double.parseDouble(text);\n return null;\n }",
"public T caseDatatype(Datatype object)\n {\n return null;\n }",
"@SuppressWarnings(\"rawtypes\")\n public Object convert(Class type, String value) throws ConversionException {\n return value;\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic static ObjectType box(Class inst_class, ObjectType obj) {\n\t\tif (inst_class.equals(obj.getClass()))\n\t\t\treturn obj;\n\t\tif (inst_class.equals(StringType.class)) {\n\t\t\treturn obj.toStringType();\n\t\t} else\n\t\t\treturn obj;\n\t}",
"@Test\n public void testConvertPokemonId() {\n Object result = converter.convert(null, pokemon.getId(), Pokemon.class, Long.class);\n\n assertEquals(result.getClass(), Pokemon.class, \"Converted object is not of a Pokemon class.\");\n assertSame(result, pokemon, \"Converted object is not the one expected.\");\n }",
"public static Date toPointDate(Object obj, Class<?> type) {\n if (obj == null) {\n return null;\n }\n if (java.sql.Date.class.isAssignableFrom(type)) {\n return toSqlDate(obj);\n } else if (java.sql.Timestamp.class.isAssignableFrom(type)) {\n return toTimestamp(obj);\n } else if (java.sql.Time.class.isAssignableFrom(type)) {\n return toTime(obj);\n } else if (Date.class.isAssignableFrom(type)) {\n return toDate(obj);\n }\n return null; // could not convert\n }",
"public T casePrimType(PrimType object) {\n\t\treturn null;\n\t}",
"public <T> T cast();",
"@Test\n public void testConvertStadium() {\n Object result = converter.convert(null, stadium, Long.class, Stadium.class);\n\n assertEquals(result.getClass(), Long.class, \"Converted object is not of a Long class.\");\n assertSame(result, stadium.getId(), \"Converted object is not the one expected.\");\n }",
"@Test\n public void testConvertTrainerId() {\n Object result = converter.convert(null, trainer.getId(), Trainer.class, Long.class);\n\n assertEquals(result.getClass(), Trainer.class, \"Converted object is not of a Trainer class.\");\n assertSame(result, trainer, \"Converted object is not the one expected.\");\n }",
"@Test\n public void testConvertBadge() {\n Object result = converter.convert(null, badge,Long.class, Badge.class);\n\n assertEquals(result.getClass(), Long.class, \"Converted object is not of a Long class.\");\n assertSame(result, badge.getId(), \"Converted object is not the one expected.\");\n }",
"private void checkType(V value) {\n valueClass.cast(value);\n }",
"<T> T mo19025a(Object obj, Class<T> cls);",
"public T caseECUType(ECUType object) {\r\n\t\treturn null;\r\n\t}",
"Object decodeObject(Object value);",
"public static HiveObjectConversion getConversion(\n ObjectInspector inspector, LogicalType dataType, HiveShim hiveShim) {\n if (inspector instanceof PrimitiveObjectInspector) {\n HiveObjectConversion conversion;\n if (inspector instanceof BooleanObjectInspector\n || inspector instanceof StringObjectInspector\n || inspector instanceof ByteObjectInspector\n || inspector instanceof ShortObjectInspector\n || inspector instanceof IntObjectInspector\n || inspector instanceof LongObjectInspector\n || inspector instanceof FloatObjectInspector\n || inspector instanceof DoubleObjectInspector\n || inspector instanceof BinaryObjectInspector\n || inspector instanceof VoidObjectInspector) {\n conversion = IdentityConversion.INSTANCE;\n } else if (inspector instanceof DateObjectInspector) {\n conversion = hiveShim::toHiveDate;\n } else if (inspector instanceof TimestampObjectInspector) {\n conversion = hiveShim::toHiveTimestamp;\n } else if (inspector instanceof HiveCharObjectInspector) {\n conversion =\n o ->\n o == null\n ? null\n : new HiveChar(\n (String) o, ((CharType) dataType).getLength());\n } else if (inspector instanceof HiveVarcharObjectInspector) {\n conversion =\n o ->\n o == null\n ? null\n : new HiveVarchar(\n (String) o, ((VarCharType) dataType).getLength());\n } else if (inspector instanceof HiveDecimalObjectInspector) {\n conversion = o -> o == null ? null : HiveDecimal.create((BigDecimal) o);\n } else if (inspector instanceof HiveIntervalYearMonthObjectInspector) {\n conversion =\n o -> {\n if (o == null) {\n return null;\n } else {\n Period period = (Period) o;\n return new HiveIntervalYearMonth(\n period.getYears(), period.getMonths());\n }\n };\n } else if (inspector instanceof HiveIntervalDayTimeObjectInspector) {\n conversion =\n o -> {\n if (o == null) {\n return null;\n } else {\n Duration duration = (Duration) o;\n return new HiveIntervalDayTime(\n duration.getSeconds(), duration.getNano());\n }\n };\n } else {\n throw new FlinkHiveUDFException(\n \"Unsupported primitive object inspector \" + inspector.getClass().getName());\n }\n // if the object inspector prefers Writable objects, we should add an extra conversion\n // for that\n // currently this happens for constant arguments for UDFs\n if (((PrimitiveObjectInspector) inspector).preferWritable()) {\n conversion = new WritableHiveObjectConversion(conversion, hiveShim);\n }\n return conversion;\n }\n\n if (inspector instanceof ListObjectInspector) {\n HiveObjectConversion eleConvert =\n getConversion(\n ((ListObjectInspector) inspector).getListElementObjectInspector(),\n ((ArrayType) dataType).getElementType(),\n hiveShim);\n return o -> {\n if (o == null) {\n return null;\n }\n Object[] array = (Object[]) o;\n List<Object> result = new ArrayList<>();\n\n for (Object ele : array) {\n result.add(eleConvert.toHiveObject(ele));\n }\n return result;\n };\n }\n\n if (inspector instanceof MapObjectInspector) {\n MapObjectInspector mapInspector = (MapObjectInspector) inspector;\n MapType kvType = (MapType) dataType;\n\n HiveObjectConversion keyConversion =\n getConversion(\n mapInspector.getMapKeyObjectInspector(), kvType.getKeyType(), hiveShim);\n HiveObjectConversion valueConversion =\n getConversion(\n mapInspector.getMapValueObjectInspector(),\n kvType.getValueType(),\n hiveShim);\n\n return o -> {\n if (o == null) {\n return null;\n }\n Map<Object, Object> map = (Map) o;\n Map<Object, Object> result = CollectionUtil.newHashMapWithExpectedSize(map.size());\n\n for (Map.Entry<Object, Object> entry : map.entrySet()) {\n result.put(\n keyConversion.toHiveObject(entry.getKey()),\n valueConversion.toHiveObject(entry.getValue()));\n }\n return result;\n };\n }\n\n if (inspector instanceof StructObjectInspector) {\n StructObjectInspector structInspector = (StructObjectInspector) inspector;\n\n List<? extends StructField> structFields = structInspector.getAllStructFieldRefs();\n\n List<RowType.RowField> rowFields = ((RowType) dataType).getFields();\n\n HiveObjectConversion[] conversions = new HiveObjectConversion[structFields.size()];\n for (int i = 0; i < structFields.size(); i++) {\n conversions[i] =\n getConversion(\n structFields.get(i).getFieldObjectInspector(),\n rowFields.get(i).getType(),\n hiveShim);\n }\n\n return o -> {\n if (o == null) {\n return null;\n }\n Row row = (Row) o;\n List<Object> result = new ArrayList<>(row.getArity());\n for (int i = 0; i < row.getArity(); i++) {\n result.add(conversions[i].toHiveObject(row.getField(i)));\n }\n return result;\n };\n }\n\n throw new FlinkHiveUDFException(\n String.format(\n \"Flink doesn't support convert object conversion for %s yet\", inspector));\n }",
"public Object caseDataType(DataType object) {\r\n\t\treturn null;\r\n\t}",
"public Object convertToObject(ByteBuffer content, Type targetType) throws BeanConversionException {\n if (content == null || targetType == null) {\n throw new BeanConversionException(\"Content or target type cannot be null\");\n }\n return toObject(content, targetType);\n }",
"public <T> T toObject(Class<T> c) {\n if (JsonSerializable.class.isAssignableFrom(c) || String.class.isAssignableFrom(c)\n || Number.class.isAssignableFrom(c) || Boolean.class.isAssignableFrom(c)) {\n throw new IllegalArgumentException(\"c can only be a POJO class or JSONObject\");\n }\n if (JSONObject.class.isAssignableFrom(c)) {\n // JSONObject\n if (JSONObject.class != c) {\n throw new IllegalArgumentException(\"We support JSONObject but not its sub-classes.\");\n }\n return c.cast(this.propertyBag);\n } else {\n // POJO\n JsonSerializable.checkForValidPOJO(c);\n try {\n return this.getMapper().readValue(this.toJson(), c);\n } catch (IOException e) {\n throw new IllegalStateException(\"Failed to get POJO.\", e);\n }\n }\n }",
"private <T> T formatObject(String objectName, JSONObject object, Class objectClass){\n Gson gson = new Gson();\n String stringObject = object.getJSONObject(objectName).toString();\n T formattedObject = (T) gson.fromJson(stringObject,objectClass);\n return formattedObject;\n }",
"public static Long toLong(Object o,byte type) throws ExecException {\n try {\n switch (type) {\n case BOOLEAN:\n if (((Boolean)o) == true) {\n return Long.valueOf(1);\n } else {\n return Long.valueOf(0);\n }\n\n case BYTE:\n return Long.valueOf(((Byte)o).longValue());\n\n case INTEGER:\n return Long.valueOf(((Integer)o).longValue());\n\n case LONG:\n return (Long)o;\n\n case FLOAT:\n return Long.valueOf(((Float)o).longValue());\n\n case DOUBLE:\n return Long.valueOf(((Double)o).longValue());\n\n case BYTEARRAY:\n return Long.valueOf(((DataByteArray)o).toString());\n\n case CHARARRAY:\n return Long.valueOf((String)o);\n\n case BIGINTEGER:\n return Long.valueOf(((BigInteger)o).longValue());\n\n case BIGDECIMAL:\n return Long.valueOf(((BigDecimal)o).longValue());\n\n case NULL:\n return null;\n\n case DATETIME:\n return Long.valueOf(((DateTime)o).getMillis());\n case MAP:\n case INTERNALMAP:\n case TUPLE:\n case BAG:\n case UNKNOWN:\n default:\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to a Long\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n } catch (ClassCastException cce) {\n throw cce;\n } catch (ExecException ee) {\n throw ee;\n } catch (NumberFormatException nfe) {\n int errCode = 1074;\n String msg = \"Problem with formatting. Could not convert \" + o + \" to Long.\";\n throw new ExecException(msg, errCode, PigException.INPUT, nfe);\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Long.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n\n }",
"public T caseTypeInterface(TypeInterface object)\n {\n return null;\n }",
"<T> T parseToObject(Object json, Class<T> classObject);",
"public Item convertToItem(Object value, XQItemType type) throws XQException;",
"public interface TypeConvertor {\n Object convert (Class from, Class to, Object obj);\n String getCodeGenString ();\n}",
"@SuppressWarnings(\"unchecked\")\n\tprotected T checkType(Object entity) {\n\t\tif (getGenericClass().isInstance(entity)) {\n\t\t\treturn (T)entity;\n\t\t}\n\t\treturn null;\n\t}",
"public Object convert(Class type, Object value) {\n\n if (shouldReturnNullValue(value)) {\n return _nullValueToReturn;\n }\n\n // If the value passed in is an instance of a Collection, then create an array from\n // it and return it. \n if (value instanceof Collection) {\n return ApiFunctions.toStringArray((Collection)value);\n }\n\n else {\n return _converter.convert(type, value);\n } \n }",
"public T caseDataType(DataType object) {\n\t\treturn null;\n\t}",
"public T caseDataType(DataType object) {\n\t\treturn null;\n\t}",
"public T caseCoreType(CoreType object) {\r\n\t\treturn null;\r\n\t}",
"public void setType(String objectType)\n\t{\n\t\tthis.type = objectType;\n\t}",
"@SuppressWarnings(\"all\")\n static Object aiValue(final Object input, final Class<?> type) {\n return aiValue(input, type, Value::aiType, (sourceType, targetType) -> aiExecute(sourceType, targetType, input,\n (source) -> {\n /*\n * If String, check whether it's date\n */\n if (String.class != type && Ut.isDate(source.toString())) {\n /*\n * String to\n */\n return V.vDate().to(source, sourceType);\n } else {\n return input.toString();\n }\n }));\n }",
"public Object toSQL(final Object object) {\n if ((object == null) || (_convertFrom == null)) {\n return object;\n }\n return _convertFrom.convert(object);\n }",
"public static <T> T convertObjectFromBody(Message message,\n\t\t\tClass<T> valueType) {\n\t\ttry {\n\t\t\tString messageBody = ((TextMessage) message).getText();\n\t\t\treturn convertJsonStringToObject(messageBody, valueType);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\"Error converting message\", e);\n\t\t}\n\t}",
"public Object resolveObject(Object obj) throws IOException;",
"public T caseNetworkType(NetworkType object) {\r\n\t\treturn null;\r\n\t}",
"private static Object convert(final String identifier, final Class<?> type, Object value) throws ParseException {\n if (type == Date.class) {\n return toDate(value, identifier);\n }\n if (type == PeriodDuration.class && value instanceof String) {\n try {\n return new PeriodDurationType((String) value);\n } catch (IllegalArgumentException ex) {\n // TODO: \"log and continue\" is not appropriate here, since the user can not know that his data is lost.\n LOGGER.log(Level.WARNING, \"Bad period duration value: {0} (property: {1})\",\n new Object[] {value, identifier});\n return null;\n }\n }\n if (InternationalString.class.isAssignableFrom(type) && value instanceof String) {\n return new SimpleInternationalString(value.toString());\n }\n if (Charset.class.isAssignableFrom(type) && value instanceof String) {\n return Charset.forName(value.toString());\n }\n if (Locale.class.isAssignableFrom(type) && value instanceof String) {\n String text = value.toString();\n text = text.substring(text.indexOf('.') + 1).trim();\n return Locales.parse(text);\n }\n if (!CharSequence.class.isAssignableFrom(type) && (value instanceof CharSequence)) {\n String text = value.toString();\n if (text.startsWith(\"nilReason:\")) {\n try {\n value = NilReason.valueOf(text.substring(\"nilReason:\".length())).createNilObject(type);\n } catch (URISyntaxException | IllegalArgumentException e) {\n throw new ParseException(\"Illegal value: \\\"\" + text + \"\\\".(property:\" + identifier + \")\", e);\n }\n } else {\n final boolean isCodeList = CodeList.class.isAssignableFrom(type);\n if (isCodeList || type == Locale.class || type == Charset.class || type.isEnum()) {\n text = text.substring(text.indexOf('.') + 1).trim();\n if (isCodeList) {\n value = Types.forCodeName(type.asSubclass(CodeList.class), text, false);\n } else {\n value = text;\n }\n }\n }\n }\n return value;\n }",
"@Override\n\t\t\tprotected Type convert(String text) {\n\t\t\t\tType t = null;\n\t\t\t\ttry {\n\t\t\t\t\t// return null if the types do not match the\n\t\t\t\t\t// original\n\t\t\t\t\tt = Type.getType(text);\n\t\t\t\t\tif (t == null || !match(t, original)) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {}\n\t\t\t\treturn t;\n\t\t\t}",
"public abstract Object deserialize(Object object);",
"T convert(String value);",
"@Test\n public void testConvertStadiumId() {\n Object result = converter.convert(null, stadium.getId(), Stadium.class, Long.class);\n\n assertEquals(result.getClass(), Stadium.class, \"Converted object is not of a Stadium class.\");\n assertSame(result, stadium, \"Converted object is not the one expected.\");\n }",
"protected void typeMismatch(Object obj) {\n\t\ttypeMismatch(obj.toString());\n\t}",
"private void assertIsType(SymObject object) {\n assertIsOfKind(object, SymObject.KIND_TYPE,\n object.name + \" can't be resolved to a type\");\n }",
"public interface Convert<T> {\n\n T convert(String response, Type type);\n\n T convert(String response, Class clazz);\n}",
"public void setPropertyWithAutoTypeCast(Object obj, Object value) {\n if(value==null) {\n setProperty(obj, value);\n return;\n }\n Class<?> propType = getPropertyType();\n if(propType.isAssignableFrom(value.getClass())) {\n setProperty(obj, value);\n return;\n }\n if(value instanceof Long && propType.equals(Integer.class)) {\n setProperty(obj, Integer.valueOf(value.toString()));\n return;\n }\n if(value instanceof Double || value instanceof Float || value instanceof BigDecimal) {\n if(propType.isAssignableFrom(Double.class)) {\n setProperty(obj, Double.valueOf(value.toString()));\n return;\n } else if(propType.isAssignableFrom(Float.class)) {\n setProperty(obj, Float.valueOf(value.toString()));\n return;\n } else if(propType.isAssignableFrom(BigDecimal.class)) {\n setProperty(obj, BigDecimal.valueOf(Double.valueOf(value.toString())));\n return;\n } else {\n throw new RuntimeException(\"Illegal field value type to set \" + name);\n }\n }\n if(value instanceof java.util.Date) {\n if(propType.isAssignableFrom(java.sql.Timestamp.class)) {\n setProperty(obj, new java.sql.Timestamp(((java.util.Date) value).getTime()));\n return;\n } else if(propType.isAssignableFrom(java.sql.Date.class)) {\n setProperty(obj, new java.sql.Date(((java.util.Date) value).getTime()));\n return;\n } else {\n throw new RuntimeException(\"Illegal field value type to set \" + name);\n }\n }\n throw new RuntimeException(\"Illegal field value type to set \" + name);\n }",
"public static DateTime toDateTime(Object o, byte type) throws ExecException {\n try {\n switch (type) {\n case NULL:\n return null;\n case BYTEARRAY:\n return new DateTime(((DataByteArray) o).toString());\n case CHARARRAY:\n // the string can contain just date part or date part plus time part\n return ToDate.extractDateTime((String) o);\n case INTEGER:\n return new DateTime(((Integer) o).longValue());\n case LONG:\n return new DateTime(((Long) o).longValue());\n case FLOAT:\n return new DateTime(((Float) o).longValue());\n case DOUBLE:\n return new DateTime(((Double) o).longValue());\n case BIGINTEGER:\n return new DateTime(((BigInteger) o).longValue());\n case BIGDECIMAL:\n return new DateTime(((BigDecimal) o).longValue());\n case DATETIME:\n return (DateTime) o;\n\n case BOOLEAN:\n case BYTE:\n case MAP:\n case INTERNALMAP:\n case TUPLE:\n case BAG:\n case UNKNOWN:\n default:\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) + \" to a DateTime\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n } catch (ClassCastException cce) {\n throw cce;\n } catch (ExecException ee) {\n throw ee;\n } catch (NumberFormatException nfe) {\n int errCode = 1074;\n String msg = \"Problem with formatting. Could not convert \" + o + \" to DateTime.\";\n throw new ExecException(msg, errCode, PigException.INPUT, nfe);\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to DateTime.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n }",
"public static Integer toInteger(Object o,byte type) throws ExecException {\n try {\n switch (type) {\n case BOOLEAN:\n if (((Boolean)o) == true) {\n return Integer.valueOf(1);\n } else {\n return Integer.valueOf(0);\n }\n\n case BYTE:\n return Integer.valueOf(((Byte)o).intValue());\n\n case INTEGER:\n return (Integer)o;\n\n case LONG:\n return Integer.valueOf(((Long)o).intValue());\n\n case FLOAT:\n return Integer.valueOf(((Float)o).intValue());\n\n case DOUBLE:\n return Integer.valueOf(((Double)o).intValue());\n\n case BYTEARRAY:\n return Integer.valueOf(((DataByteArray)o).toString());\n\n case CHARARRAY:\n return Integer.valueOf((String)o);\n\n case BIGINTEGER:\n return Integer.valueOf(((BigInteger)o).intValue());\n\n case BIGDECIMAL:\n return Integer.valueOf(((BigDecimal)o).intValue());\n\n case NULL:\n return null;\n\n case DATETIME:\n return Integer.valueOf(Long.valueOf(((DateTime)o).getMillis()).intValue());\n\n case MAP:\n case INTERNALMAP:\n case TUPLE:\n case BAG:\n case UNKNOWN:\n default:\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to an Integer\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n } catch (ClassCastException cce) {\n throw cce;\n } catch (ExecException ee) {\n throw ee;\n } catch (NumberFormatException nfe) {\n int errCode = 1074;\n String msg = \"Problem with formatting. Could not convert \" + o + \" to Integer.\";\n throw new ExecException(msg, errCode, PigException.INPUT, nfe);\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Integer.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n }",
"@Test\n public void testConvertBadgeId() {\n Object result = converter.convert(null, badge.getId(), Badge.class, Long.class);\n\n assertEquals(result.getClass(), Badge.class, \"Converted object is not of a Badge class.\");\n assertSame(result, badge, \"Converted object is not the one expected.\");\n }",
"protected abstract boolean canConvert(Class<?> parameterType, Class<?> originalArgumentType);",
"TO fromObject(CONTEXT context, final FROM obj);",
"@Override\n @SuppressWarnings(\"unchecked\")\n public T toBeanType(Object value) {\n return (T) value;\n }",
"public T caseOutputType(OutputType object) {\n\t\treturn null;\n\t}",
"public Object caste(Object item, CastTo ct){\n Object result = new Object();\n switch(ct){\n case date:result = DateParser.parse((String)item, OutFormat.date);\n break;\n case datetime:result = DateParser.parse((String)item, OutFormat.datetime);\n break;\n case datetime2:result = DateParser.parse((String)item, OutFormat.datetime2);\n break;\n case smalldatetime:result = DateParser.parse((String)item, OutFormat.smalldatetime);\n break;\n case time:result = DateParser.parse((String)item, OutFormat.time);\n break;\n case CHAR:result = CharCatster(item);\n //return result.toString();\n break;\n case UNSIGNED:result = UnSigndCatster(item);\n break;\n case SIGNED:result = SigndCatster(item);\n break;\n case BINARY:result = BinaryCaster(item);\n break;\n }\n return result;\n }",
"public T caseCoveragesType(CoveragesType object) {\n\t\treturn null;\n\t}",
"public T caseAxisType(AxisType object) {\n\t\treturn null;\n\t}",
"public T caseTypedElement(TypedElement object) {\r\n\t\treturn null;\r\n\t}",
"private static void checkConvertibility(JValue val, JType typ){\r\n\t\tJType argTyp = val.getType();\n\t\tif (argTyp == null) {\n\t\t\tif (!(typ == AnyType.getInstance() || typ.isObject())) {\n\t\t\t\tthrow new TypeIncompatibleException(JObjectType.getInstance(), typ);\n\t\t\t}\n\t\t} else {\n\t\t\tConvertibility conv = argTyp.getConvertibilityTo(typ);\n\t\t\tif(conv == Convertibility.UNCONVERTIBLE){\n\t\t\t\tthrow new TypeIncompatibleException(argTyp, typ);\n\t\t\t} else if (conv == Convertibility.UNSAFE && argTyp == AnyType.getInstance()){\n\t\t\t\tUntypedValue uv = (UntypedValue) val;\n\t\t\t\tcheckConvertibility(uv.getActual(), typ);\n\t\t\t}\n\t\t}\r\n\t}",
"public static byte findType(Object o) {\n if (o == null) {\n return NULL;\n }\n\n // Try to put the most common first\n if (o instanceof DataByteArray) {\n return BYTEARRAY;\n } else if (o instanceof String) {\n return CHARARRAY;\n } else if (o instanceof Tuple) {\n return TUPLE;\n } else if (o instanceof DataBag) {\n return BAG;\n } else if (o instanceof Integer) {\n return INTEGER;\n } else if (o instanceof Long) {\n return LONG;\n } else if (o instanceof InternalMap) {\n return INTERNALMAP;\n } else if (o instanceof Map) {\n return MAP;\n } else if (o instanceof Float) {\n return FLOAT;\n } else if (o instanceof Double) {\n return DOUBLE;\n } else if (o instanceof Boolean) {\n return BOOLEAN;\n } else if (o instanceof DateTime) {\n return DATETIME;\n } else if (o instanceof Byte) {\n return BYTE;\n } else if (o instanceof BigInteger) {\n return BIGINTEGER;\n } else if (o instanceof BigDecimal) {\n return BIGDECIMAL;\n } else if (o instanceof WritableComparable) {\n return GENERIC_WRITABLECOMPARABLE;\n } else {return ERROR;}\n }",
"public Object convert(Object from, Class to) {\n \t\tif (from instanceof Function) {\n \t\t\tif (to == Callable.class)\n \t\t\t\treturn new RhinoCallable(engine, (Function) from);\n \t\t} else if (from instanceof Scriptable || from instanceof String) { // Let through string as well, for ArgumentReader\n \t\t\tif (Map.class.isAssignableFrom(to)) {\n \t\t\t\treturn toMap((Scriptable) from);\n \t\t\t} else {\n \t\t\t\t/* try constructing from this prototype first\n \t\t\t\ttry {\n \t\t\t\t\tScriptable scope = engine.getScope();\n \t\t\t\t\tExtendedJavaClass cls = ExtendedJavaClass.getClassWrapper(scope, to);\n \t\t\t\t\treturn cls.construct(Context.getCurrentContext(), scope, new Object[] { from });\n \t\t\t\t} catch(Throwable e) {\n \t\t\t\t\tint i = 0;\n \t\t\t\t}\n \t\t\t\t*/\n \t\t\t\tArgumentReader reader = null;\n \t\t\t\tif (ArgumentReader.canConvert(to) && (reader = getArgumentReader(from)) != null) {\n \t\t\t\t return ArgumentReader.convert(reader, unwrap(from), to);\n \t\t\t\t} else if (from instanceof NativeObject && getZeroArgumentConstructor(to) != null) {\n \t\t\t\t\t// Try constructing an object of class type, through\n \t\t\t\t\t// the JS ExtendedJavaClass constructor that takes \n \t\t\t\t\t// a last optional argument: A NativeObject of which\n \t\t\t\t\t// the fields define the fields to be set in the native type.\n \t\t\t\t\tScriptable scope = ((RhinoEngine) this.engine).getScope();\n \t\t\t\t\tExtendedJavaClass cls =\n \t\t\t\t\t\t\tExtendedJavaClass.getClassWrapper(scope, to);\n \t\t\t\t\tif (cls != null) {\n \t\t\t\t\t\tObject obj = cls.construct(Context.getCurrentContext(),\n \t\t\t\t\t\t\t\tscope, new Object[] { from });\n \t\t\t\t\t\tif (obj instanceof Wrapper)\n \t\t\t\t\t\t\tobj = ((Wrapper) obj).unwrap();\n \t\t\t\t\t\treturn obj;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t} else if (from == Undefined.instance) {\n \t\t\t// Convert undefined ot false if destination is boolean\n \t\t\tif (to == Boolean.TYPE)\n \t\t\t\treturn Boolean.FALSE;\n \t\t} else if (from instanceof Boolean) {\n \t\t\t// Convert false to null / undefined for non primitive destination classes.\n\t\t\tif (!((Boolean) from).booleanValue() && !to.isPrimitive())\n \t\t\t\treturn Undefined.instance;\n \t\t}\n \t\treturn null;\n \t}",
"public static <T> T convertJsonStringToObject(String json,\n\t\t\tClass<T> valueType) {\n\t\ttry {\n\t\t\treturn mapper.readValue(json, valueType);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\"Error converting Json String [\" + json\n\t\t\t\t\t+ \"] to [\" + valueType.getCanonicalName() + \"]\", e);\n\t\t}\n\t}",
"@objid (\"261a4d72-4079-4832-9c3d-48b507d6b152\")\n @Override\n public Object convertToObject(String value, ModelElement object) {\n if (getType().getBaseType() == null) {\n return value;\n }\n \n IDynamicPropertyResolver resolver = getDynamicPropertyResolver();\n if (resolver != null) {\n return resolver.convertToObject(this, value, object);\n } else {\n throw new UnsupportedOperationException(\"No DynamicBehavior found for the \" + this.toString() + \" property.\");\n }\n }"
] | [
"0.692478",
"0.6791293",
"0.6790466",
"0.6752179",
"0.64683574",
"0.6457058",
"0.6357756",
"0.6336382",
"0.62653494",
"0.6253285",
"0.6226054",
"0.6154973",
"0.61539865",
"0.6148315",
"0.61250114",
"0.6072433",
"0.6015756",
"0.59568167",
"0.59477395",
"0.5941795",
"0.5940139",
"0.59277284",
"0.5898956",
"0.58590543",
"0.5846515",
"0.5842945",
"0.58105314",
"0.5808843",
"0.5806793",
"0.57623374",
"0.5756947",
"0.57556",
"0.5744519",
"0.57395536",
"0.5728787",
"0.5721452",
"0.5710606",
"0.5672517",
"0.56503564",
"0.5632403",
"0.5623744",
"0.5610269",
"0.5591994",
"0.5589831",
"0.5584612",
"0.55761945",
"0.5558386",
"0.55519146",
"0.55442303",
"0.5504046",
"0.55019766",
"0.5496779",
"0.54796827",
"0.5476335",
"0.54706615",
"0.5468496",
"0.5468338",
"0.54653543",
"0.5456652",
"0.544873",
"0.54454195",
"0.5422903",
"0.5415792",
"0.54129755",
"0.541091",
"0.5407269",
"0.5403931",
"0.5403931",
"0.5397603",
"0.5386938",
"0.53706986",
"0.5363943",
"0.53634423",
"0.5356517",
"0.5355642",
"0.5350972",
"0.53504384",
"0.5344252",
"0.5341443",
"0.53404975",
"0.5337456",
"0.53363276",
"0.5327644",
"0.5327076",
"0.53198594",
"0.5312148",
"0.5294762",
"0.52943635",
"0.52867216",
"0.528521",
"0.52825814",
"0.5282433",
"0.5261281",
"0.5254979",
"0.5251102",
"0.5248487",
"0.5243421",
"0.52297574",
"0.5220823",
"0.52035177"
] | 0.7872464 | 0 |
Release an object and free up its resources | void release(Object o); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void release()\n {\n \n release_0(nativeObj);\n \n return;\n }",
"public void release() {\n }",
"@Override\n public void release() {\n }",
"public void release();",
"public void release();",
"@Override\r\n\tpublic void release()\r\n\t{\n\t}",
"public void release() {\n }",
"@Override\n public void release() {\n }",
"public void release() {\n\t\t\n\t}",
"@Override\n\tpublic void release() {\n\t}",
"public void release() {\n nRelease(mNativeInstance);\n mNativeInstance = 0;\n }",
"@Override\n\tpublic void release() {\n\t\t\n\t}",
"public static void release() {\n\t}",
"public void release() {\r\n return;\r\n }",
"@Override\n\tpublic void release() {\n\n\t}",
"@Override\n\tpublic void release() {\n\n\t}",
"@Override\n public void release() {\n \n }",
"public final void release() { \n native_release();\n }",
"void _release();",
"protected void release()\n {\n }",
"public void release()\r\n\t{\r\n\t\tsuper.release();\r\n\t\t_href = null;\r\n\t\t_box = null;\r\n\t\t_bracket = null;\r\n\t\t_bracketFont = null;\r\n\r\n\t}",
"public void release()\n\t{\n\t\t// System.out.println(usedBy.getName() + \": Releasing \" + toString());\n\t\tthis.usedBy = null;\n\t}",
"@Override\r\n\tpublic void release() {\n\r\n\t}",
"public void release() {\r\n pageEL = null;\r\n params = null;\r\n super.release();\r\n }",
"void release();",
"void release();",
"public abstract void release();",
"public abstract void release();",
"public abstract void release();",
"public void release() {\n\n mTextureRender = null;\n mSurfaceTexture = null;\n }",
"public void release() {\n super.release();\n _gboss = null;\n }",
"public void releaseResources();",
"public void release() {\r\n super.release();\r\n this.page = null;\r\n }",
"void release(PooledObject<T> t);",
"public void _release() {\n throw new NO_IMPLEMENT(reason);\n }",
"public void releaseObject(Object object) {\n\n log.debug(\"Pool \" + this + \" object released: \" + object);\n\n Object pooled = null;\n try {\n factory.returnObject(object);//do this first\n pooled = factory.translateObject(object);\n } catch (Exception e) {\n return; // We can't release it if the factory can't recognize it\n }\n if (pooled == null) // We can't release it if the factory can't recognize it\n return;\n boolean removed = false;\n synchronized (objects) {\n ObjectRecord rec = (ObjectRecord) objects.get(pooled);\n if (rec == null) // Factory understands it, but we don't\n throw new IllegalArgumentException(\"Object \" + object + \" is not in pool \" + poolName + \"!\");\n if (!rec.isInUse()) return; // Must have been released by GC?\n if (object instanceof PooledObject)\n ((PooledObject) object).removePoolEventListener(this);\n removed = deadObjects.remove(object);\n rec.setInUse(false);\n if (removed) {\n log.debug(\"Object was dead: \" + object);\n objects.remove(pooled);\n rec.close();\n } // end of if ()\n\n }//end of synch on objects\n if (removed) {\n try {\n factory.deleteObject(pooled);\n } catch (Exception e) {\n log.error(\"Pool \" + this + \" factory (\" + factory.getClass().getName() + \" delete error: \", e);\n }\n fillToMin();\n /*FIXME --MINSIZE\n if(objects.size() < minSize)\n createNewObject(null);\n */\n }\n\n if (removed)\n log.debug(\"Pool \" + this + \" destroyed object \" + object + \".\");\n else\n log.debug(\"Pool \" + this + \" returned object \" + object + \" to the pool.\");\n\n permits.release();\n /*\n if(blocking)\n {\n synchronized(this)\n {\n notify();\n }\n }\n */\n }",
"public void release() {\n if (this.compositeDisposable != null) {\n this.compositeDisposable.clear();\n }\n }",
"@Override\n\tpublic void release() {\n\t\tsuper.release();\n\t\t\n\t\tthis.privilegeCode = null;\n\t\tthis.controlId = null;\n\t\tthis.controlType = null;\n\t\tthis.desc = null;\n\t}",
"@Override\n public void release() {\n super.release();\n init();\n }",
"@Override\n public void release() {\n\n super.release();\n collection = null;\n labelName = null;\n labelProperty = null;\n name = null;\n property = null;\n style = null;\n styleClass = null;\n\n }",
"public void release() throws IOException;",
"public void release() {\n\t\tsuper.release();\r\n\t\tinnerContent = null;\r\n\t\tlabelHead = null;\r\n\t\tscroll = null;\r\n\t}",
"@Override\n protected void doRelease() {\n if (mNativePtr != 0) {\n nativeRelease(mNativePtr);\n mNativePtr = 0;\n }\n }",
"public void release()\n \t{\n \t\tif( iterator == null )\n \t\t{\n \t\t\tindex = new SpatialIndex();\n \t\t\tedgeAllocator = 0;\n \t\t\tmergeOps = null;\n \t\t\t\n \t\t\tSystem.gc();\n \t\t}\n \t}",
"final void release() {\n mem.release();\n }",
"void releaseInstance();",
"public void release() throws JenaProviderException {\t\t\n\t}",
"@Override\n\tpublic void release() {\n\t\tif (!bullet.isRecycled()) {\n\t\t\tbullet.recycle();\n\t\t}\n\t}",
"@Override\n\t public void onRelease() {\n\n\t }",
"public final void release() {\n explicitlyLocked = false;\n byteBase.unlock();\n }",
"public void release() {\n super.release();\n this.name = null;\n this.originalName = null;\n this.originalNesting = null;\n this.originalNestingName = null;\n }",
"@Override\n public void release() {\n output = null;\n super.release();\n }",
"public static native void release();",
"public void release() { \r\n\t remoteControlClient = null;\r\n\t }",
"@Override\n @Deprecated\n public void release() {\n close();\n }",
"public void free() {\n byteBase.free();\n byteBase = null;\n }",
"public void release() {\n\t\t\treset();\n\t\t\tmCurrentMediaPlayer.release();\n\t\t}",
"protected void releaseReferences() {\r\n\r\n\t}",
"@Override\n public void dispose(){\n if(handle <= 0) return;\n free(handle);\n handle = 0;\n }",
"public void release(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\tmediaplayer.release();\r\n \t}",
"int release();",
"public void finalize() {\n acquire.release();\n }",
"public void finalize() {\n acquire.release();\n }",
"public void release(){\n\t\tthis.motor.forward();\n\t}",
"public void dispose()\n {\n while( m_count > 0 )\n {\n int i = m_count - 1;\n try\n {\n m_factory.decommission( m_pool[ i ] );\n }\n catch( Exception e )\n {\n // To be backwards compatible, we have to support the logger having not been set.\n if( ( getLogger() != null ) && ( getLogger().isDebugEnabled() ) )\n {\n getLogger().debug( \"Error decommissioning object\", e );\n }\n }\n m_pool[ i ] = null;\n m_count--;\n }\n }",
"public void release() {\r\n if (BuildConfig.DEBUG) {\r\n HiLog.debug(LABEL, \"release()\", new Object[0]);\r\n }\r\n if (!this.mNativeSurfaceHandle.equals(BigInteger.ZERO)) {\r\n this.mAgpContext.getEngine().destroySwapchain();\r\n Core.destroyAndroidSurface(this.mAgpContext.getDevice(), this.mNativeSurfaceHandle);\r\n this.mNativeSurfaceHandle = BigInteger.ZERO;\r\n }\r\n this.mAgpContext = null;\r\n }",
"private void release() {\n\t\tinitialized = false;\n\t\tpause();\n\t\tsetOnCompletionListener(null);\n\t\tgetMp().release();\n\t\tmp = null;\n\t}",
"public void free();",
"public final void release() throws Exception {\n mbs.unregisterMBean(name);\n MBeanServerFactory.releaseMBeanServer(mbs);\n }",
"public void release()\r\n throws IOException\r\n {\r\n // nothing needs to be done\r\n }",
"public void release() {\n HiLog.info(LOG_LABEL, \"release.\", new Object[0]);\n this.mCallMapById.clear();\n this.mRemote = null;\n disconnect();\n destroyHandler();\n this.mContext = null;\n this.mPendingCallAudioState = null;\n this.mCurrentCallAudioState = null;\n this.mPendingCanAddCall = null;\n this.mPreAddedCall = null;\n this.mPendingDisconnectPreAddedCall = null;\n this.mIsConnected = false;\n this.mIsBound = false;\n this.mIsInCallServiceBinded = false;\n this.mIsPreConnected = false;\n Listener listener = this.mListener;\n if (listener != null) {\n listener.onReleased(this);\n this.mListener = null;\n }\n }",
"public void release() {\n\t\tif (state == State.RECORDING) {\n\t\t\tstopRecord();\n\t\t}\n\t\tif (audioRecorder != null) {\n\t\t\taudioRecorder.release();\n\t\t}\n\t\tstate = State.INITIALIZING;\n\t\tsRecorderManager = null;\n\t\taudioRecorder = null;\n\t}",
"private void release() {\n noxItemCatalog.release();\n noxItemCatalog.deleteObserver(catalogObserver);\n }",
"@Override\n protected final void deallocate() {\n ByteBuf wrapped = unwrap();\n recyclerHandle.recycle(this);\n wrapped.release();\n }",
"public void dispose( );",
"void dispose() {}",
"public void freeInstance()\n {\n }",
"public void freeInstance()\n {\n }",
"public boolean release()\r\n/* 935: */ {\r\n/* 936:940 */ this.leak.record();\r\n/* 937:941 */ return super.release();\r\n/* 938: */ }",
"@Override\n\tpublic void dispose() {\n\t\tdestroy();\n\t}",
"public void release()\n {\n _pixxConfiguration=null;\n }",
"public void releaseInstance() {\n\t\tif (isFree() || isBusy()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"instance is already free or is busy\");\n\t\t}\n\n\t\tsetFree(true);\n\t\tsetBusy(false);\n\t}",
"public void release() {\n changeToUninitialized();\n mHasDisplay = false;\n mPlayer.release();\n }",
"public void dispose() ;",
"public void dispose();",
"public void dispose();",
"public void dispose();",
"public void dispose();",
"public void dispose();",
"public void dispose();",
"public void dispose();",
"public void dispose();",
"public void dispose();",
"public void dispose();",
"public void dispose();",
"public void dispose();",
"public static void playerRelease() {\n\t\tPlayer.release();\n\t}",
"public void release() {\n assertExecuted();\n method.releaseConnection();\n }",
"void dispose();",
"void dispose();"
] | [
"0.7986639",
"0.7733156",
"0.77263963",
"0.7722886",
"0.7722886",
"0.7627528",
"0.7626588",
"0.7626553",
"0.75557727",
"0.7532373",
"0.7525683",
"0.75179935",
"0.75013036",
"0.74916077",
"0.7477637",
"0.7477637",
"0.74602",
"0.74584097",
"0.74366474",
"0.74152803",
"0.7413003",
"0.7366448",
"0.73517454",
"0.726747",
"0.72655135",
"0.72655135",
"0.72627866",
"0.72627866",
"0.72627866",
"0.72514725",
"0.72470504",
"0.7190359",
"0.7148211",
"0.7143656",
"0.71172833",
"0.709111",
"0.7081263",
"0.70621026",
"0.7056777",
"0.7048713",
"0.70415074",
"0.70414114",
"0.70181125",
"0.7006482",
"0.7006075",
"0.70005083",
"0.69924986",
"0.69749194",
"0.6969264",
"0.6924716",
"0.69052225",
"0.6867843",
"0.6856719",
"0.6810855",
"0.6809376",
"0.6791511",
"0.6784247",
"0.67809814",
"0.6767476",
"0.6753174",
"0.67385143",
"0.67361933",
"0.67361933",
"0.6733828",
"0.67239815",
"0.67176276",
"0.6709333",
"0.67073065",
"0.6704045",
"0.6697768",
"0.6697567",
"0.665591",
"0.66486645",
"0.66458005",
"0.66424894",
"0.66131115",
"0.66092944",
"0.66092944",
"0.65908545",
"0.65764445",
"0.6575048",
"0.6562692",
"0.65398294",
"0.6518954",
"0.6478987",
"0.6478987",
"0.6478987",
"0.6478987",
"0.6478987",
"0.6478987",
"0.6478987",
"0.6478987",
"0.6478987",
"0.6478987",
"0.6478987",
"0.6478987",
"0.6457598",
"0.64409214",
"0.64320844",
"0.64320844"
] | 0.8032013 | 0 |
For debugging weatehr APIs | public static void main(String... args) {
E.fetch();
System.out.printf("Today is %s.\nThe %s wind is %d mph.\nThe temperature is %d\u00B0F.\nThe sun rises at %.2f and sets at %.2f.\n",
E.sky, E.windDir, E.windSpeed, E.temp, E.sunriseHour, E.sunsetHour);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void debug() {\n\n }",
"private void debugAuthentcation() {\n\n\t\t/*\n\t\t * XPagesUtil.showErrorMessage(\"bluemix util: serviceName: \" +\n\t\t * serviceName + \", baseUrl: \" + baseUrl + \" username: \" + username +\n\t\t * \" password: \" + password);\n\t\t * XPagesUtil.showErrorMessage(\"bluemix util: service name: \" +\n\t\t * serviceName + \", hardcodedBaseUrl: \" + hardcodedBaseUrl +\n\t\t * \" hardcodedUsername: \" + hardcodedUsername + \" hardcodedPassword: \" +\n\t\t * hardcodedPassword);\n\t\t */\n\t}",
"public static void debugInfo() { throw Extensions.todo(); }",
"@GetMapping(\"/debu\")\n public String debug() {\n log.debug(\"log: debug\");\n return \"debug\";\n }",
"private static void debug()\r\n\t{\r\n\t\tSystem.out.println(\"Keywords:\");\r\n\t\tfor(String word : keywords)\r\n\t\t{\r\n\t\t\tSystem.out.println(word);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"-----------------\");\r\n\t\tSystem.out.println();\r\n\t\tSharedLink.debugLinks();\r\n\t\t\r\n\t\tSystem.out.println(\"-----------------\");\r\n\t\tSystem.out.println();\r\n\t\tSharedPage.debugPages();\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t}",
"@Test\n public void testLevelDebug() throws Exception {\n List<String> lines = new ArrayList<>();\n lines.add(\"email = foo.bar@gmail.com\");\n lines.add(\"password = foobar\");\n lines.add(\"logs.debug = true\");\n File configFile = new File(testFolder.getRoot(), \"mpg.properties.test\");\n FileUtils.writeLines(configFile, lines);\n\n Config.build(configFile.getPath());\n\n final String content = \"{ \\\"msg\\\": \\\"foobar\\\"}\";\n final String path = \"/api/test\";\n stubFor(get(path).willReturn(aResponse().withHeader(\"Content-Type\", \"application/json\").withBody(content)));\n AbstractClient client = new AbstractClient(null) {\n };\n String url = \"http://localhost:\" + server.port();\n client.setUrl(url);\n client.get(path, String.class);\n\n Assert.assertFalse(getLogOut(), getLogOut().isEmpty());\n Assert.assertTrue(getLogOut(), getLogOut().contains(\"Call URL time elaps ms:\"));\n }",
"@Override\r\n\t\t\tpublic void debug(String arg) {\n\t\t\t\t\r\n\t\t\t}",
"public void debug() {\n\n\t\t// Establecemos el estado\n\t\tsetEstado(Estado.DEBUG);\n\n\t\t// Obtenemos la proxima tarea\n\t\ttarea = planificador.obtenerProximaTarea();\n\t}",
"LabyDebugger getLabyDebugger();",
"@Test\n public void printResponse(){\n when().get(\"http:://34.223.219.142:1212/ords/hr/countries\")\n .body().prettyPrint();\n\n }",
"void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }",
"static void debug() {\n ProcessRunnerImpl.setGlobalDebug(true);\n }",
"public static RemoteObject _process_globals() throws Exception{\nrequests3._device = RemoteObject.createNew (\"anywheresoftware.b4a.phone.Phone\");\n //BA.debugLineNum = 13;BA.debugLine=\"Private TileSource As String\";\nrequests3._tilesource = RemoteObject.createImmutable(\"\");\n //BA.debugLineNum = 14;BA.debugLine=\"Private ZoomLevel As Int\";\nrequests3._zoomlevel = RemoteObject.createImmutable(0);\n //BA.debugLineNum = 15;BA.debugLine=\"Private Markers As List\";\nrequests3._markers = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\n //BA.debugLineNum = 16;BA.debugLine=\"Private MapFirstTime As Boolean\";\nrequests3._mapfirsttime = RemoteObject.createImmutable(false);\n //BA.debugLineNum = 18;BA.debugLine=\"Private MyPositionLat, MyPositionLon As String\";\nrequests3._mypositionlat = RemoteObject.createImmutable(\"\");\nrequests3._mypositionlon = RemoteObject.createImmutable(\"\");\n //BA.debugLineNum = 19;BA.debugLine=\"Private CurrentTabPage As Int = 0\";\nrequests3._currenttabpage = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 20;BA.debugLine=\"Private InfoDataWindows As Boolean = False\";\nrequests3._infodatawindows = requests3.mostCurrent.__c.getField(true,\"False\");\n //BA.debugLineNum = 21;BA.debugLine=\"End Sub\";\nreturn RemoteObject.createImmutable(\"\");\n}",
"@Test\n public void enableDebuggerTest() {\n String customerId = null;\n // Void response = api.enableDebugger(customerId);\n\n // TODO: test validations\n }",
"private void debug(String str) {\n }",
"protected void doDebug(HttpServletRequest httpServletRequest)\n\t{\n log.debug(\"context: \" + httpServletRequest.getContextPath());\n log.debug(\"path info: \" + httpServletRequest.getPathInfo());\n log.debug(\"translated: \" + httpServletRequest.getPathTranslated());\n log.debug(\"scheme: \" + httpServletRequest.getScheme());\n log.debug(\"server name: \" + httpServletRequest.getServerName());\n log.debug(\"server port: \" + httpServletRequest.getServerPort());\n log.debug(\"uri: \" + httpServletRequest.getRequestURI());\n log.debug(\"url: \" + httpServletRequest.getRequestURL().toString());\n log.debug(\"query string: \" + httpServletRequest.getQueryString());\n\t\tEnumeration headerNames = httpServletRequest.getHeaderNames();\n\t\tString headerName;\n log.debug(\"---------- headers ----------\");\n\t\twhile (headerNames.hasMoreElements())\n\t\t{\n\t\t\theaderName = (String)headerNames.nextElement();\n log.debug(\" \" + headerName + \": \" + httpServletRequest.getHeader(headerName));\n\t\t}\n\t\tEnumeration parameterNames = httpServletRequest.getParameterNames();\n\t\tString parameterName;\n log.debug(\"---------- parameters ---------\");\n\t\twhile (parameterNames.hasMoreElements())\n\t\t{\n\t\t\tparameterName = (String)parameterNames.nextElement();\n log.debug(\" \" + parameterName + \": \" + httpServletRequest.getParameter(parameterName));\n\t\t}\n log.debug(\"------------------------------\");\n\t}",
"private void debug(String post) {\n if (GameLauncher.isDebugging()) {\n System.out.println(post);\n }\n }",
"public void debugPrint() {\n\t\tsuper.debugPrint();\n\t\tSystem.out.println(\"requestID: \" + requestID);\n\t\tSystem.out.println(\"jzn: \" + jzn);\n\t\tif (jzn != null) {\n\t\t\tfor (int i = 0; i < jzn.length; i++) {\n\t\t\t\tSystem.out.println(i + \": \" + (jzn[i] != null ? jzn[i].length() : 0));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"jzt: \" + jzt);\t\t\n\t}",
"IWDViewController wdGetAPI();",
"private WAPIHelper() { }",
"void debug (String msg) throws RootException;",
"public void debug()\r\n {\n \t\treload();\r\n }",
"public HtShowDetailedLog() {\n\t}",
"public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}",
"private static void print(Object msg){\n if (WAMClient.Debug){\n System.out.println(msg);\n }\n\n }",
"@Test(priority = 1)\r\n\tpublic void setup() {\n\t\tResponse res = get(\"http://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22\");\r\n\t\tint rescode = res.getStatusCode();\r\n\t\tSystem.out.println(\"Api response code \" + rescode);\r\n\t}",
"private static void printDebug(String s)\n {\n }",
"@Test\n\t \n\t public void getApi() {\n\t\t \n\t\t Response getIt=get(\"https://reqres.in/api/users?page=2\");\n\t\t getIt.prettyPrint();\n\t\t System.out.println(getIt.getStatusCode());\n\t\t System.out.println(getIt.getTime());\n\t\t \n\t\t //to validate\n\t\t int validGstatus=getIt.getStatusCode();\n\t\t Assert.assertEquals(validGstatus,200);\n\t\t \n\t }",
"public static void enableDebugging(){\n DEBUG = true;\n }",
"public static void main(String[] args){ \r\n\t\t /* PropertyConfigurator.configure(\"application.properties\");\r\n\t\t log.debug(\"Hello this is a debug message\"); \r\n\t log.info(\"Hello this is an info message\"); \r\n\t System.out.println(\"Hi..Cool\");\r\n\t URLTest u=new URLTest();\r\n\t u.sendGET();*/\r\n\t\t\r\n\t\t System.out.println(\"Hi..IMI\");\r\n\t }",
"@Override\n\tpublic void debug(Object message) {\n\n\t}",
"private void toLog(HttpUtils.HttpResult httpResult) {\n Log.d(DEBUG_REQUEST, \"request url: \" + url);\n Log.d(DEBUG_REQUEST, \"request envelope: \" + envelope);\n Log.d(DEBUG_REQUEST, \"request type: \" + requestType);\n if (httpResult != null) {\n Log.d(DEBUG_REQUEST, \"response code: \" + httpResult.getCode());\n Log.d(DEBUG_REQUEST, \"response envelope: \" + httpResult.getEnvelope());\n } else {\n Log.d(DEBUG_REQUEST, \"response null\");\n }\n }",
"public boolean isDebug();",
"void debug(String a, String b) {\n\t\t}",
"public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }",
"public abstract void debug(RobocodeFileOutputStream output);",
"boolean isDebug();",
"boolean isDebug();",
"@Override\n\tpublic void debug(Message msg) {\n\n\t}",
"public static RemoteObject _globals() throws Exception{\nrequests3.mostCurrent._icon = RemoteObject.createNew (\"anywheresoftware.b4a.objects.drawable.BitmapDrawable\");\n //BA.debugLineNum = 25;BA.debugLine=\"Private xui As XUI\";\nrequests3.mostCurrent._xui = RemoteObject.createNew (\"anywheresoftware.b4a.objects.B4XViewWrapper.XUI\");\n //BA.debugLineNum = 27;BA.debugLine=\"Private TileSourceSpinner As Spinner\";\nrequests3.mostCurrent._tilesourcespinner = RemoteObject.createNew (\"anywheresoftware.b4a.objects.SpinnerWrapper\");\n //BA.debugLineNum = 29;BA.debugLine=\"Private IsFiltered As Boolean = False\";\nrequests3._isfiltered = requests3.mostCurrent.__c.getField(true,\"False\");\n //BA.debugLineNum = 30;BA.debugLine=\"Private FilterStartDate As String\";\nrequests3.mostCurrent._filterstartdate = RemoteObject.createImmutable(\"\");\n //BA.debugLineNum = 31;BA.debugLine=\"Private FilterEndDate As String\";\nrequests3.mostCurrent._filterenddate = RemoteObject.createImmutable(\"\");\n //BA.debugLineNum = 32;BA.debugLine=\"Private FilterTasks As Int = 0\";\nrequests3._filtertasks = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 33;BA.debugLine=\"Private FilterEntity As Int = 0\";\nrequests3._filterentity = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 34;BA.debugLine=\"Private FilterRoute As Int = 0\";\nrequests3._filterroute = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 35;BA.debugLine=\"Private FilterStates As Int = 0\";\nrequests3._filterstates = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 36;BA.debugLine=\"Private FilterTypeRequests As Int = 0\";\nrequests3._filtertyperequests = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 37;BA.debugLine=\"Private Bloco30 As Int = 0\";\nrequests3._bloco30 = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 39;BA.debugLine=\"Private ListTypeRequests As List\";\nrequests3.mostCurrent._listtyperequests = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\n //BA.debugLineNum = 40;BA.debugLine=\"Private ListStates As List\";\nrequests3.mostCurrent._liststates = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\n //BA.debugLineNum = 41;BA.debugLine=\"Private ListEntities As List\";\nrequests3.mostCurrent._listentities = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\n //BA.debugLineNum = 42;BA.debugLine=\"Private ListTasks As List\";\nrequests3.mostCurrent._listtasks = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\n //BA.debugLineNum = 43;BA.debugLine=\"Private ListRoutes As List\";\nrequests3.mostCurrent._listroutes = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\n //BA.debugLineNum = 45;BA.debugLine=\"Private ButtonUserUnavailable As Button\";\nrequests3.mostCurrent._buttonuserunavailable = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 46;BA.debugLine=\"Private mapUserPosition As Button\";\nrequests3.mostCurrent._mapuserposition = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 47;BA.debugLine=\"Private ColorTabPanel As Panel\";\nrequests3.mostCurrent._colortabpanel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 49;BA.debugLine=\"Private ButtonActionTransport As Button\";\nrequests3.mostCurrent._buttonactiontransport = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 50;BA.debugLine=\"Private ButtonAppAlert As Button\";\nrequests3.mostCurrent._buttonappalert = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 51;BA.debugLine=\"Private ButtonAppNetwork As Button\";\nrequests3.mostCurrent._buttonappnetwork = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 52;BA.debugLine=\"Private LabelAppInfo As Label\";\nrequests3.mostCurrent._labelappinfo = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 53;BA.debugLine=\"Private LabelCopyright As Label\";\nrequests3.mostCurrent._labelcopyright = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 54;BA.debugLine=\"Private LabelDateTime As Label\";\nrequests3.mostCurrent._labeldatetime = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 55;BA.debugLine=\"Private LabelVersion As Label\";\nrequests3.mostCurrent._labelversion = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 56;BA.debugLine=\"Private listsBasePanel As Panel\";\nrequests3.mostCurrent._listsbasepanel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 57;BA.debugLine=\"Private listsBottomLine As Panel\";\nrequests3.mostCurrent._listsbottomline = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 58;BA.debugLine=\"Private listsBottomPanel As Panel\";\nrequests3.mostCurrent._listsbottompanel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 59;BA.debugLine=\"Private listsButtonClose As Button\";\nrequests3.mostCurrent._listsbuttonclose = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 60;BA.debugLine=\"Private listsButtonFilter As Button\";\nrequests3.mostCurrent._listsbuttonfilter = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 61;BA.debugLine=\"Private listsLabelInfo As Label\";\nrequests3.mostCurrent._listslabelinfo = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 62;BA.debugLine=\"Private listsTabPanel As TabStrip\";\nrequests3.mostCurrent._liststabpanel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.TabStripViewPager\");\n //BA.debugLineNum = 63;BA.debugLine=\"Private listsTopBar As Panel\";\nrequests3.mostCurrent._liststopbar = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 64;BA.debugLine=\"Private mainLabelOptLists As Label\";\nrequests3.mostCurrent._mainlabeloptlists = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 65;BA.debugLine=\"Private mainLogo As ImageView\";\nrequests3.mostCurrent._mainlogo = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ImageViewWrapper\");\n //BA.debugLineNum = 66;BA.debugLine=\"Private mainTopLine As Panel\";\nrequests3.mostCurrent._maintopline = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 68;BA.debugLine=\"Private IsFiltered As Boolean = False\";\nrequests3._isfiltered = requests3.mostCurrent.__c.getField(true,\"False\");\n //BA.debugLineNum = 69;BA.debugLine=\"Private iDialogReqTypeObject, iDialogReqZone, iDi\";\nrequests3._idialogreqtypeobject = RemoteObject.createImmutable(0);\nrequests3._idialogreqzone = RemoteObject.createImmutable(0);\nrequests3._idialogreqstatus = RemoteObject.createImmutable(0);\nrequests3._idialogreqregion = RemoteObject.createImmutable(0);\nrequests3._idialogreqlocal = RemoteObject.createImmutable(0);\nrequests3._idialogreqwithrequests = RemoteObject.createImmutable(0);\n //BA.debugLineNum = 70;BA.debugLine=\"Private sDialogReqName, sDialogReqAddress, Search\";\nrequests3.mostCurrent._sdialogreqname = RemoteObject.createImmutable(\"\");\nrequests3.mostCurrent._sdialogreqaddress = RemoteObject.createImmutable(\"\");\nrequests3.mostCurrent._searchfilter = RemoteObject.createImmutable(\"\");\n //BA.debugLineNum = 71;BA.debugLine=\"Private RegionsList, TypeObjectsList, LocalsList,\";\nrequests3.mostCurrent._regionslist = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\nrequests3.mostCurrent._typeobjectslist = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\nrequests3.mostCurrent._localslist = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\nrequests3.mostCurrent._reqrequests = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\nrequests3.mostCurrent._reqrequestsnottoday = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\n //BA.debugLineNum = 72;BA.debugLine=\"Private ItemsCounter As Int = 0\";\nrequests3._itemscounter = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 74;BA.debugLine=\"Private listRequestsButtonMap As Button\";\nrequests3.mostCurrent._listrequestsbuttonmap = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 75;BA.debugLine=\"Private mapBaseList As Panel\";\nrequests3.mostCurrent._mapbaselist = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 76;BA.debugLine=\"Private mapBasePanel As Panel\";\nrequests3.mostCurrent._mapbasepanel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 78;BA.debugLine=\"Private mapZoomDown As Button\";\nrequests3.mostCurrent._mapzoomdown = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 79;BA.debugLine=\"Private mapZoomUp As Button\";\nrequests3.mostCurrent._mapzoomup = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 80;BA.debugLine=\"Private listRequests As CustomListView 'ExpandedL\";\nrequests3.mostCurrent._listrequests = RemoteObject.createNew (\"b4a.example3.customlistview\");\n //BA.debugLineNum = 81;BA.debugLine=\"Private listsRequestsMap As CustomListView\";\nrequests3.mostCurrent._listsrequestsmap = RemoteObject.createNew (\"b4a.example3.customlistview\");\n //BA.debugLineNum = 83;BA.debugLine=\"Private pnlGroupTitle As Panel\";\nrequests3.mostCurrent._pnlgrouptitle = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 84;BA.debugLine=\"Private pnlGroupData As Panel\";\nrequests3.mostCurrent._pnlgroupdata = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 86;BA.debugLine=\"Private ListItemTodayRequests As Label\";\nrequests3.mostCurrent._listitemtodayrequests = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 87;BA.debugLine=\"Private ListItemReference As Label\";\nrequests3.mostCurrent._listitemreference = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 88;BA.debugLine=\"Private ListItemDatetime As Label\";\nrequests3.mostCurrent._listitemdatetime = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 89;BA.debugLine=\"Private ListItemContact As Label\";\nrequests3.mostCurrent._listitemcontact = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 90;BA.debugLine=\"Private ListItemFullName As Label\";\nrequests3.mostCurrent._listitemfullname = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 91;BA.debugLine=\"Private ListItemStatus As Label\";\nrequests3.mostCurrent._listitemstatus = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 92;BA.debugLine=\"Private listButMap As Button\";\nrequests3.mostCurrent._listbutmap = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 94;BA.debugLine=\"Private ListItemObject As Label\";\nrequests3.mostCurrent._listitemobject = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 95;BA.debugLine=\"Private ListItemObjectTask As Label\";\nrequests3.mostCurrent._listitemobjecttask = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 96;BA.debugLine=\"Private ListItemObjectExecution As Label\";\nrequests3.mostCurrent._listitemobjectexecution = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 97;BA.debugLine=\"Private listButObjectAction As Button\";\nrequests3.mostCurrent._listbutobjectaction = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 98;BA.debugLine=\"Private ListItemObjectStatus As Label\";\nrequests3.mostCurrent._listitemobjectstatus = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 99;BA.debugLine=\"Private ListItemObjectStatusIcon As Label\";\nrequests3.mostCurrent._listitemobjectstatusicon = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 101;BA.debugLine=\"Private CurrentGroupItem As Int = 0\";\nrequests3._currentgroupitem = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 102;BA.debugLine=\"Private pnlGroupCurrenIndex As Int\";\nrequests3._pnlgroupcurrenindex = RemoteObject.createImmutable(0);\n //BA.debugLineNum = 103;BA.debugLine=\"Private ClickLabel As Label\";\nrequests3.mostCurrent._clicklabel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 105;BA.debugLine=\"Private ShowListPedidosMap As Boolean = False\";\nrequests3._showlistpedidosmap = requests3.mostCurrent.__c.getField(true,\"False\");\n //BA.debugLineNum = 106;BA.debugLine=\"Private EditSearch As EditText\";\nrequests3.mostCurrent._editsearch = RemoteObject.createNew (\"anywheresoftware.b4a.objects.EditTextWrapper\");\n //BA.debugLineNum = 107;BA.debugLine=\"Private butSearch As Button\";\nrequests3.mostCurrent._butsearch = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 109;BA.debugLine=\"Dim CurrentIndexPanel As Int = -1\";\nrequests3._currentindexpanel = BA.numberCast(int.class, -(double) (0 + 1));\n //BA.debugLineNum = 110;BA.debugLine=\"Dim CurrentIDPanel As Int = 0\";\nrequests3._currentidpanel = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 112;BA.debugLine=\"Private LabelButtonTitleAction As Label\";\nrequests3.mostCurrent._labelbuttontitleaction = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 113;BA.debugLine=\"Private LabelReferenciasDescritivos As Label\";\nrequests3.mostCurrent._labelreferenciasdescritivos = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 114;BA.debugLine=\"Private LabelStatus As Label\";\nrequests3.mostCurrent._labelstatus = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 115;BA.debugLine=\"Private RequestsOptionsPopMenu As MenuOnAnyView\";\nrequests3.mostCurrent._requestsoptionspopmenu = RemoteObject.createNew (\"com.jakes.menuonviews.menuonanyview\");\n //BA.debugLineNum = 117;BA.debugLine=\"Private CurrentLineItem As Int = 0\";\nrequests3._currentlineitem = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 118;BA.debugLine=\"Private TotalLineItems As Int = 0\";\nrequests3._totallineitems = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 119;BA.debugLine=\"Private ListItemObjectNumber As Label\";\nrequests3.mostCurrent._listitemobjectnumber = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 120;BA.debugLine=\"Private listButMore As Button\";\nrequests3.mostCurrent._listbutmore = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 121;BA.debugLine=\"Private ListItemObjectDateTime As Label\";\nrequests3.mostCurrent._listitemobjectdatetime = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 122;BA.debugLine=\"Private ListItemObjectReference As Label\";\nrequests3.mostCurrent._listitemobjectreference = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 123;BA.debugLine=\"Private pnlGroupDataSub As Panel\";\nrequests3.mostCurrent._pnlgroupdatasub = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 124;BA.debugLine=\"Private pnlGroupDataList As ExpandedListView 'Cus\";\nrequests3.mostCurrent._pnlgroupdatalist = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.expandedlistview\");\n //BA.debugLineNum = 127;BA.debugLine=\"Private CurrentPage As Int\";\nrequests3._currentpage = RemoteObject.createImmutable(0);\n //BA.debugLineNum = 128;BA.debugLine=\"Private Pages As List '= Array(True, False, True,\";\nrequests3.mostCurrent._pages = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\n //BA.debugLineNum = 130;BA.debugLine=\"Private listRequestsItem As CustomListView\";\nrequests3.mostCurrent._listrequestsitem = RemoteObject.createNew (\"b4a.example3.customlistview\");\n //BA.debugLineNum = 131;BA.debugLine=\"Private CLAButtonOptions As Button\";\nrequests3.mostCurrent._clabuttonoptions = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 132;BA.debugLine=\"Private CLAItem_G1 As Label\";\nrequests3.mostCurrent._claitem_g1 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 133;BA.debugLine=\"Private CLAItemButton_1 As B4XStateButton\";\nrequests3.mostCurrent._claitembutton_1 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 134;BA.debugLine=\"Private CLAItemButton_2 As B4XStateButton\";\nrequests3.mostCurrent._claitembutton_2 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 135;BA.debugLine=\"Private CLAItem_G2 As Label\";\nrequests3.mostCurrent._claitem_g2 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 136;BA.debugLine=\"Private CLAItem_G3 As Label\";\nrequests3.mostCurrent._claitem_g3 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 137;BA.debugLine=\"Private CLAItem_G4 As Label\";\nrequests3.mostCurrent._claitem_g4 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 138;BA.debugLine=\"Private CLAItem_G5 As Label\";\nrequests3.mostCurrent._claitem_g5 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 139;BA.debugLine=\"Private CLAItem_G6 As Label\";\nrequests3.mostCurrent._claitem_g6 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 140;BA.debugLine=\"Private CLAItem_G7 As Label\";\nrequests3.mostCurrent._claitem_g7 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 141;BA.debugLine=\"Private ListItemType As Label\";\nrequests3.mostCurrent._listitemtype = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 143;BA.debugLine=\"Private ListItem_Notes As Label\";\nrequests3.mostCurrent._listitem_notes = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 144;BA.debugLine=\"Private ListItem_Status As Label\";\nrequests3.mostCurrent._listitem_status = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 145;BA.debugLine=\"Private ListItem_Datetime As Label\";\nrequests3.mostCurrent._listitem_datetime = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 146;BA.debugLine=\"Private ListItem_Entity As Label\";\nrequests3.mostCurrent._listitem_entity = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 147;BA.debugLine=\"Private ListItem_Cloud As Label\";\nrequests3.mostCurrent._listitem_cloud = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 148;BA.debugLine=\"Private listButCompare As Button\";\nrequests3.mostCurrent._listbutcompare = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 149;BA.debugLine=\"Private ListItem_TypeRequest As Label\";\nrequests3.mostCurrent._listitem_typerequest = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 150;BA.debugLine=\"Private listRequestsItemSecond As CustomListView\";\nrequests3.mostCurrent._listrequestsitemsecond = RemoteObject.createNew (\"b4a.example3.customlistview\");\n //BA.debugLineNum = 151;BA.debugLine=\"Private CLAItemButtonBR_SVR2 As B4XStateButton\";\nrequests3.mostCurrent._claitembuttonbr_svr2 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 152;BA.debugLine=\"Private CLAItemButtonBR_SVR2_A As Button\";\nrequests3.mostCurrent._claitembuttonbr_svr2_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 153;BA.debugLine=\"Private CLA_BR_KSVRF2 As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_ksvrf2 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 154;BA.debugLine=\"Private CLA_BR_KSVRF2_A As Button\";\nrequests3.mostCurrent._cla_br_ksvrf2_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 155;BA.debugLine=\"Private CLA_BR_KSVRI2 As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_ksvri2 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 156;BA.debugLine=\"Private CLA_BR_KSVRI2_A As Button\";\nrequests3.mostCurrent._cla_br_ksvri2_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 157;BA.debugLine=\"Private CLA_BR_KSVRI1_A As Button\";\nrequests3.mostCurrent._cla_br_ksvri1_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 158;BA.debugLine=\"Private CLA_BR_KSVRI1 As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_ksvri1 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 159;BA.debugLine=\"Private CLA_BR_KSVRF1 As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_ksvrf1 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 160;BA.debugLine=\"Private CLA_BR_KSVRF1_A As Button\";\nrequests3.mostCurrent._cla_br_ksvrf1_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 161;BA.debugLine=\"Private CLAItemButtonBR_SVR1 As B4XStateButton\";\nrequests3.mostCurrent._claitembuttonbr_svr1 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 162;BA.debugLine=\"Private CLAItemButtonBR_SVR1_A As Button\";\nrequests3.mostCurrent._claitembuttonbr_svr1_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 163;BA.debugLine=\"Private CLAItemButtonBR_INIT_A As Button\";\nrequests3.mostCurrent._claitembuttonbr_init_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 164;BA.debugLine=\"Private CLAItemButtonBR_INIT As B4XStateButton\";\nrequests3.mostCurrent._claitembuttonbr_init = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 165;BA.debugLine=\"Private CLA_BR_OBS As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_obs = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 166;BA.debugLine=\"Private CLA_BR_OBS_A As Button\";\nrequests3.mostCurrent._cla_br_obs_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 167;BA.debugLine=\"Private CLA_BR_KMI_A As Button\";\nrequests3.mostCurrent._cla_br_kmi_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 168;BA.debugLine=\"Private CLA_BR_KMI As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_kmi = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 169;BA.debugLine=\"Private CLA_BR_CAR As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_car = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 170;BA.debugLine=\"Private CLA_BR_CAR_A As Button\";\nrequests3.mostCurrent._cla_br_car_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 171;BA.debugLine=\"Private CLA_BR_KMF_A As Button\";\nrequests3.mostCurrent._cla_br_kmf_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 172;BA.debugLine=\"Private CLA_BR_KMF As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_kmf = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 173;BA.debugLine=\"Private CLA_BR_E1 As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_e1 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 174;BA.debugLine=\"Private CLA_BR_S1 As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_s1 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 175;BA.debugLine=\"Private CLA_BR_E2 As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_e2 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 176;BA.debugLine=\"Private CLA_BR_S2 As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_s2 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 177;BA.debugLine=\"Private CLA_BR_E3 As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_e3 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 178;BA.debugLine=\"Private CLA_BR_S3 As FloatLabeledEditText\";\nrequests3.mostCurrent._cla_br_s3 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 179;BA.debugLine=\"Private CLAItemButtonBR As B4XStateButton\";\nrequests3.mostCurrent._claitembuttonbr = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 180;BA.debugLine=\"Private CLAItemButtonBR_A As Button\";\nrequests3.mostCurrent._claitembuttonbr_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 181;BA.debugLine=\"Private CLAItemButtonX_A As Button\";\nrequests3.mostCurrent._claitembuttonx_a = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 182;BA.debugLine=\"Private B4XStateButton1 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton1 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 183;BA.debugLine=\"Private B4XStateButton2 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton2 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 184;BA.debugLine=\"Private B4XStateButton3 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton3 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 185;BA.debugLine=\"Private B4XStateButton4 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton4 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 186;BA.debugLine=\"Private B4XStateButton5 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton5 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 187;BA.debugLine=\"Private B4XStateButton6 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton6 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 188;BA.debugLine=\"Private B4XStateButton7 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton7 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 189;BA.debugLine=\"Private B4XStateButton14 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton14 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 190;BA.debugLine=\"Private B4XStateButton13 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton13 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 191;BA.debugLine=\"Private B4XStateButton21 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton21 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 192;BA.debugLine=\"Private B4XStateButton20 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton20 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 193;BA.debugLine=\"Private B4XStateButton19 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton19 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 194;BA.debugLine=\"Private B4XStateButton12 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton12 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 195;BA.debugLine=\"Private B4XStateButton11 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton11 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 196;BA.debugLine=\"Private B4XStateButton18 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton18 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 197;BA.debugLine=\"Private B4XStateButton17 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton17 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 198;BA.debugLine=\"Private B4XStateButton10 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton10 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 199;BA.debugLine=\"Private B4XStateButton9 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton9 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 200;BA.debugLine=\"Private B4XStateButton16 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton16 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 201;BA.debugLine=\"Private B4XStateButton15 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton15 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 202;BA.debugLine=\"Private B4XStateButton8 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton8 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 203;BA.debugLine=\"Private B4XStateButton22 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton22 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 204;BA.debugLine=\"Private B4XStateButton23 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton23 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 205;BA.debugLine=\"Private B4XStateButton24 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton24 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 206;BA.debugLine=\"Private B4XStateButton25 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton25 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 207;BA.debugLine=\"Private B4XStateButton26 As B4XStateButton\";\nrequests3.mostCurrent._b4xstatebutton26 = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.b4xstatebutton\");\n //BA.debugLineNum = 209;BA.debugLine=\"Private VIEW_requests_listview As String = \\\"reque\";\nrequests3.mostCurrent._view_requests_listview = BA.ObjectToString(\"requests_listview\");\n //BA.debugLineNum = 210;BA.debugLine=\"Private VIEW_requests_listviewrequest As String =\";\nrequests3.mostCurrent._view_requests_listviewrequest = BA.ObjectToString(\"requests_listviewrequest\");\n //BA.debugLineNum = 211;BA.debugLine=\"Private VIEW_requests_listviewrequest2 As String\";\nrequests3.mostCurrent._view_requests_listviewrequest2 = BA.ObjectToString(\"requests_listviewrequest2\");\n //BA.debugLineNum = 212;BA.debugLine=\"Private VIEW_requests_mapview As String = \\\"reques\";\nrequests3.mostCurrent._view_requests_mapview = BA.ObjectToString(\"requests_mapview_google\");\n //BA.debugLineNum = 213;BA.debugLine=\"Private ButtonActionPause As Button\";\nrequests3.mostCurrent._buttonactionpause = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 214;BA.debugLine=\"Private CurrentFilter As String = \\\"\\\"\";\nrequests3.mostCurrent._currentfilter = BA.ObjectToString(\"\");\n //BA.debugLineNum = 215;BA.debugLine=\"Private mainActiveUser As Label\";\nrequests3.mostCurrent._mainactiveuser = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 216;BA.debugLine=\"Private gmap As GoogleMap\";\nrequests3.mostCurrent._gmap = RemoteObject.createNew (\"anywheresoftware.b4a.objects.MapFragmentWrapper.GoogleMapWrapper\");\n //BA.debugLineNum = 217;BA.debugLine=\"Private mapData As MapFragment\";\nrequests3.mostCurrent._mapdata = RemoteObject.createNew (\"anywheresoftware.b4a.objects.MapFragmentWrapper\");\n //BA.debugLineNum = 218;BA.debugLine=\"Private mapMarker As Marker\";\nrequests3.mostCurrent._mapmarker = RemoteObject.createNew (\"anywheresoftware.b4a.objects.MapFragmentWrapper.MarkerWrapper\");\n //BA.debugLineNum = 219;BA.debugLine=\"Private listsButtonPull As Button\";\nrequests3.mostCurrent._listsbuttonpull = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 220;BA.debugLine=\"Private listButNote As Button\";\nrequests3.mostCurrent._listbutnote = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 221;BA.debugLine=\"Private butQuickAction As Button\";\nrequests3.mostCurrent._butquickaction = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 222;BA.debugLine=\"Private ListItem_Favorite As Label\";\nrequests3.mostCurrent._listitem_favorite = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 223;BA.debugLine=\"Private listsButtonFavorites As Button\";\nrequests3.mostCurrent._listsbuttonfavorites = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 224;BA.debugLine=\"Private ListItem_Desc02 As Label\";\nrequests3.mostCurrent._listitem_desc02 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 225;BA.debugLine=\"Private ListItem_Desc01 As Label\";\nrequests3.mostCurrent._listitem_desc01 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 226;BA.debugLine=\"Private ListaPrincipalClickItem As Int = -1\";\nrequests3._listaprincipalclickitem = BA.numberCast(int.class, -(double) (0 + 1));\n //BA.debugLineNum = 227;BA.debugLine=\"Private ListViewDevice3Panel As Panel\";\nrequests3.mostCurrent._listviewdevice3panel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 228;BA.debugLine=\"Private ListViewRequestDevice3Panel As Panel\";\nrequests3.mostCurrent._listviewrequestdevice3panel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 229;BA.debugLine=\"Private ListViewRequest2Device3Panel As Panel\";\nrequests3.mostCurrent._listviewrequest2device3panel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 230;BA.debugLine=\"Private ListItemClickIndex As Label\";\nrequests3.mostCurrent._listitemclickindex = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 231;BA.debugLine=\"Private ListItem_Desc00 As Label\";\nrequests3.mostCurrent._listitem_desc00 = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 232;BA.debugLine=\"Private SubItemImage As ImageView\";\nrequests3.mostCurrent._subitemimage = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ImageViewWrapper\");\n //BA.debugLineNum = 233;BA.debugLine=\"Private LockPanel As Panel\";\nrequests3.mostCurrent._lockpanel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.PanelWrapper\");\n //BA.debugLineNum = 235;BA.debugLine=\"Private GRANDACTIVE_INSTANCE As String = \\\"PT20180\";\nrequests3.mostCurrent._grandactive_instance = BA.ObjectToString(\"PT20180913-2105-006\");\n //BA.debugLineNum = 236;BA.debugLine=\"Private LockPanelInfo As Label\";\nrequests3.mostCurrent._lockpanelinfo = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 238;BA.debugLine=\"Private current_limit As Int = 0\";\nrequests3._current_limit = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 239;BA.debugLine=\"Private current_offset As Int = 100\";\nrequests3._current_offset = BA.numberCast(int.class, 100);\n //BA.debugLineNum = 240;BA.debugLine=\"Private next_current_limit As Int = 0\";\nrequests3._next_current_limit = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 241;BA.debugLine=\"Private next_offset As Int = 100\";\nrequests3._next_offset = BA.numberCast(int.class, 100);\n //BA.debugLineNum = 242;BA.debugLine=\"Private CurrentTotalItems As Int = 0\";\nrequests3._currenttotalitems = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 244;BA.debugLine=\"Private SelectedTagcode As String = \\\"\\\"\";\nrequests3.mostCurrent._selectedtagcode = BA.ObjectToString(\"\");\n //BA.debugLineNum = 245;BA.debugLine=\"Private SelectedRequestData As RequestData\";\nrequests3.mostCurrent._selectedrequestdata = RemoteObject.createNew (\"xevolution.vrcg.devdemov2400.types._requestdata\");\n //BA.debugLineNum = 246;BA.debugLine=\"Private ListItemNumber As Label\";\nrequests3.mostCurrent._listitemnumber = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 248;BA.debugLine=\"Private data_Intervencao As FloatLabeledEditText\";\nrequests3.mostCurrent._data_intervencao = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 249;BA.debugLine=\"Private hora_intervencao As FloatLabeledEditText\";\nrequests3.mostCurrent._hora_intervencao = RemoteObject.createNew (\"anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper\");\n //BA.debugLineNum = 250;BA.debugLine=\"Private TaskList2Dup As CustomListView\";\nrequests3.mostCurrent._tasklist2dup = RemoteObject.createNew (\"b4a.example3.customlistview\");\n //BA.debugLineNum = 251;BA.debugLine=\"Private BotaoDataDup As Button\";\nrequests3.mostCurrent._botaodatadup = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 252;BA.debugLine=\"Private BotaoHoraDup As Button\";\nrequests3.mostCurrent._botaohoradup = RemoteObject.createNew (\"anywheresoftware.b4a.objects.ButtonWrapper\");\n //BA.debugLineNum = 253;BA.debugLine=\"Private dupItemCheck As CheckBox\";\nrequests3.mostCurrent._dupitemcheck = RemoteObject.createNew (\"anywheresoftware.b4a.objects.CompoundButtonWrapper.CheckBoxWrapper\");\n //BA.debugLineNum = 254;BA.debugLine=\"Private dupItemLabel As Label\";\nrequests3.mostCurrent._dupitemlabel = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 256;BA.debugLine=\"Private ListITemTechnical As Label\";\nrequests3.mostCurrent._listitemtechnical = RemoteObject.createNew (\"anywheresoftware.b4a.objects.LabelWrapper\");\n //BA.debugLineNum = 257;BA.debugLine=\"Private GlobalScanReturn As Boolean\";\nrequests3._globalscanreturn = RemoteObject.createImmutable(false);\n //BA.debugLineNum = 258;BA.debugLine=\"End Sub\";\nreturn RemoteObject.createImmutable(\"\");\n}",
"public static void main(String[]args) throws IOException {\n searchHistoryList();\n// queryGroup();\n// testgson();\n// queryLevelCode();\n// queryCode(\"queryAlertLevels\");\n// queryCode(\"queryAlertCategories\");\n// queryCode(\"queryAlertTypes\");\n// queryCode(\"queryAlertCode\");\n// sendPostNotify(\"http://10.138.16.192:8080/api/queryAlertingList\",\"{pageinfo:{currentPage:1,pageSize:10}}\");\n }",
"public void enableDebug() {\n this.debug = true;\n }",
"public boolean isDebugEnabled();",
"private ApiInfo apiDetails() {\n\t\tApiInfo apiInfo= new ApiInfoBuilder()\n\t\t\t\t.title(\"AuthorizationMicroservice Documentation\")\n\t\t\t\t.description(\"Gets the login details and checks the login details if yes it will generate a JWT token which we can use to validate the user.\")\n\t\t\t\t.termsOfServiceUrl(\"Help\")\n\t\t\t\t.license(\"Audit Management System 1.0\")\n\t\t\t\t.contact(new Contact(\"Souraj Mukhopadhyay\",\"cognizant.com\",\"907390@cognizant.com\"))\n\t\t\t\t.version(\"1.0\")\t\t\n\t\t\t\t.build();\n\t\tlog.debug(\"API Info{}:\", apiInfo);\n\t\treturn apiInfo;\n\t}",
"public String toDebugString();",
"public static void normalDebug(){\n enableVerbos = false;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Debugging engine (idekey = \" + getSessionId() + \", port =\" + DLTKDebugPlugin.getDefault().getDbgpService().getPort() + \")\"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t}",
"public static void showLogApi(String strMessage) {\n System.out.println(\"--API-MESSAGE--\" + strMessage);\n }",
"public void debug(String msg);",
"void debug (String channel, String msg, RootException ex) throws RootException;",
"public java.lang.String toDebugString () { throw new RuntimeException(); }",
"@Test\n\tpublic void test() {\n\t\tLoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n\t\t// print logback's internal status\n\t\tStatusPrinter.print(lc);\n\t\t\n\t\tLOG.trace(\"this is a trace message\");\n\n\t\tLOG.debug(\"this is a debug message\");\n\n\t\tLOG.info(\"this is an info message\");\n\n\t\tLOG.warn(\"this is a warn message\");\n\n\t\tLOG.error(\"this is an error message\");\n\n\t}",
"public static void printInfo(){\n }",
"public boolean supportsDebugArgument();",
"public static void main(String[] args) {\n\t\t\n\t\t RestAssured.baseURI = \"https://rahulshettyacademy.com\";\n\t\t String response = given().queryParam(\"key\", \"qaclick123\")\n\t .header(\"Content-Type\",\"application/json\")\n\t\t.body(PayLoad.addPlace())\n\t\t.when().post(\"maps/api/place/add/json\")\n\t\t.then().assertThat().statusCode(200)\n\t\t.body(\"scope\",equalTo(\"APP\")).header(\"server\",\"Apache/2.4.18 (Ubuntu)\")\n\t\t.extract().response().asString();\n\t\tSystem.out.println(response);\n\t \n\t //For parsing JSON we have JsonPath(class)\n\t\tJsonPath json = new JsonPath(response);\n\t\tString placeId = json.getString(\"place_id\");\n\t System.out.println(placeId);\n\t \n \n \n\t}",
"@Override\n\tpublic void debug(String message, Object... params) {\n\n\t}",
"public void debug(String comment);",
"public static void main(String[] args) throws Exception {\n ApiContext apiContext = getEabyApiContext(\"AgAAAA**AQAAAA**aAAAAA**9s4PWw**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wFk4agDpSEqQSdj6x9nY+seQ**aZsEAA**AAMAAA**MSF1Tm3MVNQq2rnbC3a21bXvzg+nQavFn3J4FChoAuTo9AvTXUcaQ849dlh3hcHLK8ZBxYYMWNWCLVkXxclV+N/wx3Nm3yQZROQRR4/MMt7ApwF1KimaEPvsZ4AFeGt7PxC4u3KQmzK74rN7cYOdnzd5ZcS7YkTM9aBIqG9tQJCUziGi3Fg1zqEusWtk2tPphhI9MRrsbEuUpsPyXLvJvvjNvVcNxO05glF6RvJQQPO3hJEEuaRg7CSX1ga1Zhqa+Hu3h5ePsO7Oxhwm5i57oW2wy5KGyv9IxW3BFOASFae8LuAvVhTMBjjRI9qnOD/RbjRTxzALQlUmy0Hk584Y+NgteX+YRfCvfK5iImjgxg8CUPhtLtHgK4tteyiNvLT8Rj2zfUj0F+QQgyUQZdwPKyHcxDQTlDRLvQdpl7mBQbv0i/wN2j8QNWbV0FDjVsKu1ijbSDggmzewYgNOC/e7h2TIkqxUL9h5TIUpNfAjDyvJ8ZfOBSO692iWy0sO1/ejWw+1sfGDYN34lyNVE/yirhreTkpbFErFLa9M67KIwlCd3yWD7cJn3OIqR6NormoAQQ92li7KtLWS+d85sUwWg8rUMhgzSzfPHxQZDbJx+aPrjry0FpgbeHZOARcCmWj4MGXUsSi30Xg1PR4WEDCPiqaEyPPwrDwE4n+Lb/S7tRIwGy48xPfykxn5Pp8fr4Jqfx+RyfyMhp0D53k1mgcmZhoLfDL1tlcD6kUz/IIYvV0Cgz0kIK9iLXBnd69MXX49\");\n ApiCall call = new ApiCall(apiContext);\n getOrders(call);\n }",
"@Override\n\tpublic void debug(Object message, Throwable t) {\n\n\t}",
"private void dbgTrace(String trace) {\n GenUtils.logCat(tag, trace);\n GenUtils.logMessageToFile(\"SessionV2.log\", trace);\n }",
"@Override\n\tpublic void debug(MessageSupplier msgSupplier) {\n\n\t}",
"private stendhal() {\n\t}",
"void getInfo() {\n \tSystem.out.println(\"There doesn't seem to be anything here.\");\n }",
"@Override\n\tpublic void debug(Marker marker, MessageSupplier msgSupplier) {\n\n\t}",
"protected ServerConnectionDebugger() {\n\n }",
"@Test\n public void disableDebuggerTest() {\n String customerId = null;\n // Void response = api.disableDebugger(customerId);\n\n // TODO: test validations\n }",
"public static void main(String []args) {\n\t\tlog.trace(\"111---\");\n\t\tlog.debug(\"2222\");\n\t\tlog.info(\"333\");\n\t\tlog.warn(\"444\");\n\t\tlog.error(\"555\");\n\t}",
"@Test(priority=2)\r\n\tpublic void logResponseBody()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then()\r\n\t\t.log().body();\t\t\r\n\t}",
"@RequestMapping(value = \"/endpoint_managerd\", method = RequestMethod.GET, produces = \"application/json; charset=utf-8\")\r\n public String endpointManagerDebug(HttpServletRequest request, ModelMap model) throws ServletException, IOException {\r\n UserAuthorities ua = userAuthoritiesProvider.getInstance();\r\n if (ua.userIsAdmin() || ua.userIsSuperUser()) {\r\n return(renderPage(request, model, \"endpoint_manager\", null, null, null, true));\r\n } else {\r\n throw new SuperUserOnlyException(\"You are not authorised to manage WMS endpoints for this server\");\r\n }\r\n }",
"void logSystemDetails() throws CometApiException {\n sendSynchronously(restApiClient::logSystemDetails, SystemUtils.readSystemDetails());\n }",
"public void mo55254a() {\n }",
"boolean isDebugEnabled();",
"void debug (String msg, RootException ex) throws RootException;",
"private void debug(String s) {\r\n\t\tif (debug)\r\n\t\t\tSystem.out.println(s);\r\n\t}",
"protected abstract void debug(String msg);",
"protected static void dumpConfig() {\n try {\n logger.info( Configuration.CN_WKBOTANICA_API_CONTEXT_PATH + getContextPath());\n logger.info( Configuration.CN_DNS + \" \" + Configuration.CN_DNS_ADD_LOCALS + shouldAddLocalDns());\n logger.info( Configuration.CN_HTTP + \" \" + Configuration.CN_HTTP_PORT + getHttpPort());\n logger.info( Configuration.CN_FLICKR_API_KEY + \" \" + getFlickrApiKey());\n logger.info( Configuration.CN_FLICKR_USER_ID + \" \" + getFlickrUserId());\n logger.info( Configuration.CN_FLICKR_PHOTOSET_ID + \" \" + getFickrPhotosetId());\n }\n catch (Exception e) {\n logger.info(\"GRAVE:\" + e.getMessage());\n }\n }",
"@Override\n public void debug(\n Object obj\n )\n {\n mLogger.fine( obj.toString() );\n }",
"@Override\n\tpublic void debug(Marker marker, String message, Object... params) {\n\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tGson gson = new GsonBuilder().serializeNulls().create();\r\n\t\t\r\n\t\tHttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor() ;\r\n\t\tloggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\r\n\t\t\r\n\t\tOkHttpClient okhttp = new OkHttpClient.Builder()\r\n\t\t\t\t.addInterceptor(loggingInterceptor)\r\n\t\t\t\t.build();\r\n\t\t\r\n\t\tRetrofit retrofit = new Retrofit.Builder()\r\n\t\t\t\t.baseUrl(\"https://jsonplaceholder.typicode.com/\")\r\n\t\t\t\t.addConverterFactory(GsonConverterFactory.create(gson))\r\n\t\t\t\t.client(okhttp)\r\n\t\t\t\t.build();\r\n\t\t\r\n\t\tLogAPI logAPI = retrofit.create(LogAPI.class);\r\n\t\t\r\n\t\tCall<LogDataModel> call = logAPI.getLog();\r\n\t\tcall.enqueue(new Callback<LogDataModel>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(Call<LogDataModel> call, Throwable t) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onResponse(Call<LogDataModel> call, Response<LogDataModel> response) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tif(response.code() !=200) {\r\n\t\t\t\t\tSystem.out.println(\"Error in Connection\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString value= \"\";\r\n\t\t\t\tvalue+=\"ID: \" + response.body().getId();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Data: \\n \" + value);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t}",
"public void printCommands(){\n LocalApi.print_commands();\n }",
"void k2h_set_debug_level_error();",
"@Override\n\tpublic void outputDebugInfo(Writer writer) {\n\t\t\n\t}",
"public void trace(Object message)\n/* */ {\n/* 95 */ debug(message);\n/* */ }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void debug(String message, Throwable t) {\n\n\t}",
"void debug(String msg)\n{\n if (yydebug)\n System.out.println(msg);\n}",
"void debug(String msg)\n{\n if (yydebug)\n System.out.println(msg);\n}",
"public void clientInfo() {\n uiService.underDevelopment();\n }",
"public void printClientList() {\n uiService.underDevelopment();\n }",
"void k2h_set_debug_level_message();",
"public abstract int trace();",
"private static void printDetail() {\n System.out.println(\"Welcome to LockedMe.com\");\n System.out.println(\"Version: 1.0\");\n System.out.println(\"Developer: Sherman Xu\");\n System.out.println(\"sherman.xu@lockers.com\");\n }",
"public static void hvitetest1w(){\r\n\t}",
"@Override\n\tpublic void debug(Message msg, Throwable t) {\n\n\t}",
"@Override\n\tpublic void debug(Marker marker, Message msg) {\n\n\t}"
] | [
"0.6583322",
"0.62803096",
"0.616311",
"0.6114453",
"0.5921423",
"0.58721805",
"0.5868611",
"0.586091",
"0.5857873",
"0.58223957",
"0.5752955",
"0.5749575",
"0.5722335",
"0.57068443",
"0.5674763",
"0.56420004",
"0.56213737",
"0.56119525",
"0.55944115",
"0.55839765",
"0.553266",
"0.55128187",
"0.5509454",
"0.5505799",
"0.55012614",
"0.5500748",
"0.549418",
"0.5482328",
"0.547222",
"0.54486144",
"0.54454094",
"0.54386854",
"0.5430004",
"0.5421141",
"0.54052335",
"0.540415",
"0.53990936",
"0.53990936",
"0.5397031",
"0.53946555",
"0.53790766",
"0.537571",
"0.537234",
"0.53674823",
"0.5351713",
"0.53459066",
"0.5337188",
"0.53314036",
"0.53243315",
"0.5318029",
"0.5314031",
"0.53115",
"0.53104687",
"0.5308692",
"0.5307761",
"0.5303181",
"0.52877146",
"0.5274844",
"0.5271539",
"0.52665937",
"0.5258606",
"0.52512705",
"0.5237236",
"0.5234643",
"0.52269876",
"0.52266324",
"0.5222105",
"0.52173495",
"0.52149475",
"0.5214916",
"0.52147186",
"0.5207801",
"0.52033836",
"0.5202643",
"0.5199582",
"0.51984775",
"0.5192194",
"0.51920825",
"0.5186056",
"0.51801664",
"0.51786727",
"0.51770425",
"0.51765627",
"0.5173004",
"0.5173004",
"0.5173004",
"0.5173004",
"0.5173004",
"0.5173004",
"0.5173004",
"0.5167848",
"0.5166695",
"0.5166695",
"0.5166018",
"0.51588047",
"0.51587564",
"0.5157942",
"0.51501054",
"0.5148391",
"0.5144804",
"0.5141214"
] | 0.0 | -1 |
Public interface everyone uses | public static boolean isSunrise() { return Math.abs(Util.nowHour() - sunriseHour) < 0.1; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static interface Service {}",
"void use();",
"public void myPublicMethod() {\n\t\t\n\t}",
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"public abstract String use();",
"private MApi() {}",
"@Override\n public void pub() {\n // can only be public\n }",
"public interface Common {\n}",
"public interface Exposable\n{\n}",
"public void use()\n\t{\n\t}",
"public interface IEstado {\n\n /**\n * Modifica el estado del objeto publicacion\n *\n * @return String\n */\n String ejecutarAccion();\n}",
"public interface Comunicator {\n \n\n}",
"public interface UserAgent {\n\n// csci4311.chat.CLIUserAgent, which\n// implements\n// the\n// csci4311.chat.UserAgent\n// interface,\n\n// The csci4311.chat.CLIUserAgent class must only implement user interaction, and no\n// protocol details.\n\n //No protocol details\n// public void startReadWriteOperation();\n\n public void packetReceiver(Socket socket);\n public void packetSender(Socket socket,String clientName);\n\n}",
"public interface LearningSpaceServices {\n\n\n}",
"public interface SingleAccessPoint {\t\n\t\n\t/**\n\t * This method returns some kind of message to the client, which could be anything\n\t * and needs to be implemented for the concrete accesspoint\n\t */\n\tpublic void returnMessage(String message);\n\t\n\t/**\n\t * \n\t * @param message Message to display\n\t * @return AuthenticationToken that needs to be compatible with backend.\n\t */\n\tpublic AuthenticationToken getAuthentication(String message);\n\t\n\n\t\t\n\t\n\t\n}",
"@Override\n\tpublic boolean isPublic() {\n\t\treturn false;\n\t}",
"public interface Client {\n\n}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public interface Allele {\n}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private PluginAPI() {\r\n\t\tsuper();\r\n\t}",
"interface myClient {\n}",
"public InterfaceAbout() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"private interface Behaviour{\n\t\t/*\n\t\t * This method is public so we can only implement this interface from inside the Animal class\n\t\t */\n\t\tvoid alive();\n\t}",
"public interface AbstractC03680oI {\n}",
"public interface IPresenterHienThiSanPhamTheoDanhMuc {\n void LayDanhSachSP_theoMaLoai(int masp,boolean kiemtra);\n}",
"public interface ClientInterface {\r\n\r\n\t/**\r\n\t * Start.\r\n\t */\r\n\tpublic abstract void start();\r\n}",
"private static interface Base {\n\n public void foo();\n }",
"public interface MineService {\n}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void sal() {\n\t\tSystem.out.println(\"This is implemnts from HomePackage Interface.\");\n\t\t\n\t}",
"public interface IUserInfoScm {\n\n}",
"public interface Greeter {\n\t\n\tvoid sayHello();\n}",
"public interface XModule extends ru.awk.spb.xonec.XOneC.XModule\r\n{\r\n}",
"public interface BaseDataInterface {\r\n}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"public interface Pasticcere {\r\n //No attributes\r\n public void accendiForno();\r\n}",
"public interface C22486a {\n void bGQ();\n\n void cMy();\n }",
"public interface AbstractC0386gl {\n}",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public interface IWechatService {\n CodeRe sumbit(String image1, String image2, String image3, String billno, String openid, String appid, String nick, String tAppid);\n\n WechatPublicServer getWechatPublic(String id);\n\n WechatUserInfo getUser(String openid);\n\n CodeRe<UserConfig> getUserConfig(Serializable id);\n}",
"public void checkPublic() {\n }",
"private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}",
"protected Doodler() {\n\t}",
"private Aliyun() {\n\t\tsuper();\n\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"public interface Server {\n\n /**\n * start server\n */\n public void start();\n}",
"Shared shared();",
"public interface C24717ak {\n}",
"public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public interface IPerson{\n public void notifyUser(String msg);\n public void writeData(int gid);\n}",
"public interface IDeneme {\n \n void dene();\n}",
"public interface IView {\n\n\n\n\n\n}",
"public interface ISocketEchoServer extends ISocketServer\r\n{\r\n\r\n}",
"public interface ICore {\n\n /**\n * Send a request by unicast to the hostname.\n *\n * @param hostname IP address of the hostname.\n * @param message Message to send to the hostname.\n */\n void sendUnicast(InetAddress hostname, String message);\n\n /**\n * Send a request by multicast.\n *\n * @param message Message to send.\n */\n void sendMulticast(String message);\n\n /**\n * Stop the core.\n */\n void stop();\n}",
"private Public() {\n super(\"public\", null);\n }",
"public interface Plugin {\n void doUsefil();\n}",
"public interface AccessControlled {\r\n\r\n}",
"public interface Manager {\n\n}",
"public interface Service {\n\n}",
"public interface Service {\n\n}",
"public abstract Object mo1771a();",
"public interface Hello {\n\n String hello();\n}",
"@Override\n public void perish() {\n \n }",
"public interface Pepperoni {\n}",
"public interface Mypersent {\n void getData();\n}",
"public interface ViewBinhLuan {\n void DangBinhLuanThanhCong();\n void DangBinhLuanThatBai();\n}",
"public void smell() {\n\t\t\n\t}",
"public interface Developer {\n void doStuff();\n}",
"public interface WeighInService {\n}",
"public interface DUS {\n}",
"public interface eit {\n}",
"public interface IpLocator {\r\n\r\n\t/**\r\n\t * Other than the getters & setters, this is the only method visible to the\r\n\t * outside world\r\n\t * \r\n\t * @param ip\r\n\t * The ip address to be located\r\n\t * @return IPLocator instance\r\n\t * @throws IOException\r\n\t * in case of any error/exception\r\n\t */\r\n\tpublic IpLocation locate(String ip) throws IOException;\r\n\r\n}",
"public interface ZoomAPI {\n}",
"public interface Pracujacy {\r\n void pracuj();\r\n}",
"public interface IFaci {\n}",
"public interface PythonWolfInterface {\n public void initialize(WolfPlayer myself);\n public Move move();\n public void isEating();\n public void isAttacked(); \n}",
"public interface IPlatform \n{\n /**\n * Main function of the interface. Returns the boolean representing if the given actor\n * can stand on it.\n * \n * @param a The entity to query\n */\n boolean canSupportEntity(Entity a);\n \n boolean bottomIsCollidable();\n}",
"public interface i {\n}",
"abstract int pregnancy();",
"public interface C22379d {\n}",
"public interface ITire {\n\n /**\n * 轮胎\n */\n void tire();\n}",
"public interface IDeviceInfo\r\n{\r\n public DeviceInfo GetDeviceInfo();\r\n}",
"public interface AbstractC1953c50 {\n}",
"public interface PlayerWDS {\n\n /**\n * 根据球队缩写列表和当前赛季年份 爬取球员基本数据.html表\n *\n * @param abbr 球队缩写\n * @param year 当前赛季年份\n * @return List<StringBuffer> 爬取球员基本数据.html表\n */\n public StringBuffer getPlayerInfo(String abbr,int year);\n\n /**\n * 根据路径 爬取球员职业生涯的数据\n *\n * @param path 球员数据路径\n * @return StringBuffer 爬取球员职业生涯的数据\n */\n public StringBuffer getPlayerImg(String path);\n}",
"public interface YuMePlayerInterface\n{\n\n public abstract void YuMePlayer_AddEventToCalendar(String s)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_DeInit()\n throws YuMePlayerException;\n\n public abstract YuMePlayerInfo YuMePlayer_GetPlayerInfo()\n throws YuMePlayerException;\n\n public abstract int YuMePlayer_GetProgressiveDownloadTimeoutSec()\n throws YuMePlayerException;\n\n public abstract List YuMePlayer_GetSupportedFileFormats()\n throws YuMePlayerException;\n\n public abstract List YuMePlayer_GetSupportedMimeTypes()\n throws YuMePlayerException;\n\n public abstract String YuMePlayer_GetVersion()\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_HandleBroadcastEvent(String s)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_HideImage(int i)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_Init(int i, boolean flag, boolean flag1, YuMeSDKPlayerInterface yumesdkplayerinterface)\n throws YuMePlayerException;\n\n public abstract boolean YuMePlayer_IsCalendarOperationsSupported()\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_ModifyParams(int i, boolean flag, boolean flag1)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_OpenClickURL(String s, String s1, YuMeClickType yumeclicktype, String s2)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_PauseAd()\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_ReplayAdVideo()\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_ResumeAd()\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_SetAdInfo(YuMeAdInfo yumeadinfo, boolean flag, boolean flag1)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_SetControlBarVisibility(boolean flag, boolean flag1, boolean flag2)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_SetOverlaysVisibility(boolean flag)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_SetParentView(FrameLayout framelayout)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_ShowCountdown(int i, YuMeAssetType yumeassettype)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_ShowImage(int i)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_ShowLinkedAd(int i, YuMeAdInfo yumeadinfo, boolean flag)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_ShowTransitionEffect(YuMeTransitionEffect yumetransitioneffect)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_StartPlay(boolean flag)\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_StopPlay()\n throws YuMePlayerException;\n\n public abstract void YuMePlayer_TearDownAssets()\n throws YuMePlayerException;\n}",
"public interface IBaseModle {\n\n\n}",
"public interface BaseView {\n\n /**\n * 返回请求信息\n * @param value\n */\n void showReqResult(String value);\n\n}",
"public contrustor(){\r\n\t}",
"public interface Native {\n\n}",
"public Implementor(){}",
"public API() {}",
"public interface BungeeCloudAPI extends CloudAPI {\n}",
"public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }",
"public interface Service {\n // Service-specific methods go here\n }",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}"
] | [
"0.6602064",
"0.65930504",
"0.64975727",
"0.64027464",
"0.63788086",
"0.6360551",
"0.6348275",
"0.6300177",
"0.62882245",
"0.6263057",
"0.6253704",
"0.62445337",
"0.62097335",
"0.62056774",
"0.6198346",
"0.61759317",
"0.61687255",
"0.6163327",
"0.6157854",
"0.61477923",
"0.6110992",
"0.6099755",
"0.60858667",
"0.6078423",
"0.6076035",
"0.6073105",
"0.6065987",
"0.6062016",
"0.6061544",
"0.60575193",
"0.6045535",
"0.6045434",
"0.6042531",
"0.60335547",
"0.6028784",
"0.6025061",
"0.60207504",
"0.601947",
"0.60192275",
"0.6018849",
"0.6012285",
"0.6007216",
"0.60071254",
"0.60037684",
"0.59992963",
"0.5969536",
"0.5967158",
"0.59633774",
"0.5960556",
"0.5953386",
"0.5951701",
"0.5951332",
"0.59478474",
"0.59394175",
"0.59394175",
"0.5932266",
"0.59318465",
"0.5929589",
"0.5924914",
"0.5915485",
"0.590887",
"0.5903756",
"0.5900071",
"0.5899445",
"0.58990115",
"0.58990115",
"0.58988655",
"0.58920044",
"0.5885582",
"0.5882284",
"0.5880352",
"0.5877775",
"0.587701",
"0.58710843",
"0.5867007",
"0.5866853",
"0.5865629",
"0.5864382",
"0.5864239",
"0.5864",
"0.586292",
"0.58576745",
"0.5855077",
"0.5855005",
"0.5853052",
"0.58523065",
"0.58494335",
"0.5848395",
"0.5845827",
"0.5838859",
"0.58385324",
"0.58349514",
"0.5834056",
"0.5830389",
"0.58292824",
"0.58288354",
"0.5825828",
"0.5825043",
"0.5821558",
"0.5817805",
"0.5817771"
] | 0.0 | -1 |
The ugly business of parsing web requests | private static boolean fetchYahooWeather() {
try {
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(true);
SAXParser parser = spf.newSAXParser();
String yql_format = String.format("select %%s from %%s where woeid in (select woeid from geo.places(1) where text=\"%s, %s\")", CITY, ST);
/* Fetch Wind Data (temp, windDir, and windSpeed) */
String yql_wind = String.format(yql_format, "wind", "weather.forecast");
String url_wind = String.format("https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f", URLEncoder.encode(yql_wind, "UTF-8"));
DefaultHandler wind_handler = new DefaultHandler() {
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
//System.out.printf("uri=%s\nlocalName=%s\nqName=%s\nattributes=%s\n\n", uri, localName, qName, attributes);
if (!qName.equals("yweather:wind")) return;
temp = Integer.parseInt(attributes.getValue("chill"));
int dir = Integer.parseInt(attributes.getValue("direction")); // number from 0-359 indicating direction
// I began writing an if tree, then remembered I was lazy.
String[] dir_words = new String[] {
"east", "northeast", "north", "northwest", "west", "southwest", "south", "southeast"
};
windDir = dir_words[dir/45];
windSpeed = Integer.parseInt(attributes.getValue("speed")); // speed in mph
}
};
parser.parse(url_wind, wind_handler);
/* Fetch Atronomy Data (sunriseHour and sunsetHour) */
String yql_astro = String.format(yql_format, "astronomy", "weather.forecast");
String url_astro = String.format("https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f", URLEncoder.encode(yql_astro, "UTF-8"));
DefaultHandler astro_handler = new DefaultHandler() {
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
//System.out.printf("uri=%s\nlocalName=%s\nqName=%s\nattributes=%s\n\n", uri, localName, qName, attributes);
if (!qName.equals("yweather:astronomy")) return;
sunriseHour = Util.parseTime(attributes.getValue("sunrise"));
sunsetHour = Util.parseTime(attributes.getValue("sunset"));
}
};
parser.parse(url_astro, astro_handler);
/* Fetch Description Data (sky) */
String yql_sky = String.format(yql_format, "item.condition.text", "weather.forecast");
String url_sky = String.format("https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f", URLEncoder.encode(yql_sky, "UTF-8"));
DefaultHandler sky_handler = new DefaultHandler() {
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
//System.out.printf("uri=%s\nlocalName=%s\nqName=%s\nattributes=%s\n\n", uri, localName, qName, attributes);
if (!qName.equals("yweather:condition")) return;
sky = attributes.getValue("text").toLowerCase();
}
};
parser.parse(url_sky, sky_handler);
return E.sky != null;
} catch (java.net.UnknownHostException uhe) {
if (Data.DEBUG) System.err.println("You are offline!");
return false;
} catch (Exception e) {
e.printStackTrace();
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }",
"public void parseResponse();",
"@Override\n\tprotected int checkParseRequest(StringBuilder request) {\n\t\tif (request != null && request.length() > 3 && request.charAt(3) == '=') { // simplerpc?jzn=604107&jzp=1&jzc=1&jzz=WLL100...\n\t\t\t// parse XSS query\n\t\t\tint length = request.length();\n\t\t\t\n\t\t\tint jzzStarted = -1;\n\t\t\tint jzzStopped = -1;\n\t\t\t\n\t\t\tint jznStarted = -1;\n\t\t\tint jznStopped = -1;\n\t\t\t\n\t\t\tint jzpStarted = -1;\n\t\t\tint jzpStopped = -1;\n\t\t\t\n\t\t\tint jzcStarted = -1;\n\t\t\tint jzcStopped = -1;\n\t\t\t\n\t\t\tint unknownStarted = -1;\n\t\t\tint unknownStopped = -1;\n\n\t\t\tchar c3 = request.charAt(0);\n\t\t\tchar c2 = request.charAt(1);\n\t\t\tchar c1 = request.charAt(2);\n\t\t\tfor (int i = 3; i < length; i++) {\n\t\t\t\tchar c0 = request.charAt(i);\n\t\t\t\tif (jznStarted != -1) {\n\t\t\t\t\tif (jznStopped == -1) {\n\t\t\t\t\t\tif (c0 == '&') { // got jzn=...\n\t\t\t\t\t\t\tjznStopped = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (jzpStarted != -1) {\n\t\t\t\t\tif (jzpStopped == -1) {\n\t\t\t\t\t\tif (c0 == '&') { // got jzp=...\n\t\t\t\t\t\t\tjzpStopped = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (jzcStarted != -1) {\n\t\t\t\t\tif (jzcStopped == -1) {\n\t\t\t\t\t\tif (c0 == '&') { // got jzc=...\n\t\t\t\t\t\t\tjzcStopped = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (jzzStarted != -1) {\n\t\t\t\t\tif (jzzStopped == -1) {\n\t\t\t\t\t\tif (c0 == '&') { // got jzz=\n\t\t\t\t\t\t\tjzzStopped = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (unknownStarted != -1) {\n\t\t\t\t\tif (unknownStopped == -1) {\n\t\t\t\t\t\tif (c0 == '&') { // gotcha\n\t\t\t\t\t\t\tunknownStopped = i;\n\t\t\t\t\t\t\tunknownStarted = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (c0 == '=' && c2 == 'z' && c3 == 'j') { // jz?=\n\t\t\t\t\tif (c1 == 'n') {\n\t\t\t\t\t\tjznStarted = i + 1;\n\t\t\t\t\t\tjznStopped = -1;\n\t\t\t\t\t} else if (c1 == 'p') {\n\t\t\t\t\t\tjzpStarted = i + 1;\n\t\t\t\t\t\tjzpStopped = -1;\n\t\t\t\t\t} else if (c1 == 'c') {\n\t\t\t\t\t\tjzcStarted = i + 1;\n\t\t\t\t\t\tjzcStopped = -1;\n\t\t\t\t\t} else if (c1 == 'z') {\n\t\t\t\t\t\tjzzStarted = i + 1;\n\t\t\t\t\t\tjzzStopped = -1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tunknownStarted = i + 1;\n\t\t\t\t\t\tunknownStopped = -1;\n\t\t\t\t\t}\n\t\t\t\t\tc2 = 0;\n\t\t\t\t\tc1 = 0;\n\t\t\t\t\tc0 = 0;\n\t\t\t\t} else if (c0 == '=') {\n\t\t\t\t\tunknownStarted = i + 1;\n\t\t\t\t\tunknownStopped = -1;\n\t\t\t\t\tc2 = 0;\n\t\t\t\t\tc1 = 0;\n\t\t\t\t\tc0 = 0;\n\t\t\t\t}\n\t\t\t\tc3 = c2;\n\t\t\t\tc2 = c1;\n\t\t\t\tc1 = c0;\n\t\t\t}\n\t\t\t\n\t\t\tString jzzRequest = null;\n\t\t\tif (jzzStarted != -1) {\n\t\t\t\tif (jzzStopped == -1) {\n\t\t\t\t\tjzzStopped = length;\n\t\t\t\t}\n\t\t\t\tjzzRequest = request.substring(jzzStarted, jzzStopped);\n\t\t\t}\n\n\t\t\t// jzz without jzn is considered as XHR requests!\n\t\t\tif (jzzRequest == null || jzzRequest.trim().length() == 0) {\n\t\t\t\t//response = generateXSSErrorResponse();\n\t\t\t\trequestData = request.toString();\n\t\t\t\treturn -1; // error\n\t\t\t}\n\t\t\t\n\t\t\tif (jznStarted != -1) {\n\t\t\t\tif (jznStopped == -1) {\n\t\t\t\t\tjznStopped = length;\n\t\t\t\t}\n\t\t\t\trequestID = request.substring(jznStarted, jznStopped);\n\t\t\t}\n\t\t\tif (requestID != null && requestID.length() != 0) {\n\t\t\t\t// when jzn is defined, it's considered as a script request!\n\t\t\t\t\n\t\t\t\t// make sure that servlet support cross site script request\n\t\t\t\t// always support cross site script requests\n\t\t\t\tif (!PipeConfig.supportXSS) {\n\t\t\t\t\tresponse = new HttpQuickResponse(\"text/javascript\", \"net.sf.j2s.ajax.SimpleRPCRequest\" +\n\t\t\t\t\t\t\t\".xssNotify(\\\"\" + requestID + \"\\\", \\\"unsupported\\\");\");\n\t\t\t\t\treturn -1; // error\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// check script request counts\n\t\t\t\tString count = null;\n\t\t\t\tif (jzpStarted != -1) {\n\t\t\t\t\tif (jzpStopped == -1) {\n\t\t\t\t\t\tjzpStopped = length;\n\t\t\t\t\t}\n\t\t\t\t\tcount = request.substring(jzpStarted, jzpStopped);\n\t\t\t\t}\n\t\t\t\tint partsCount = 1;\n\t\t\t\tif (count != null) {\n\t\t\t\t\tboolean formatError = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpartsCount = Integer.parseInt(count);\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tformatError = true; \n\t\t\t\t\t}\n\t\t\t\t\tif (formatError || partsCount <= 0) {\n\t\t\t\t\t\tresponse = generateXSSErrorResponse();\n\t\t\t\t\t\treturn -1; // error\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (partsCount != 1) {\n\t\t\t\t\t// check whether servlet can deal the requests\n\t\t\t\t\tif (partsCount > PipeConfig.maxXSSParts) {\n\t\t\t\t\t\tresponse = new HttpQuickResponse(\"text/javascript\", \"net.sf.j2s.ajax.SimpleRPCRequest\" +\n\t\t\t\t\t\t\t\t\".xssNotify(\\\"\" + requestID + \"\\\", \\\"exceedrequestlimit\\\");\");\n\t\t\t\t\t\treturn -1; // error\n\t\t\t\t\t}\n\t\t\t\t\t// check curent request index\n\t\t\t\t\tString current = null;\n\t\t\t\t\tif (jzcStarted != -1) {\n\t\t\t\t\t\tif (jzcStopped == -1) {\n\t\t\t\t\t\t\tjzcStopped = length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrent = request.substring(jzcStarted, jzcStopped);\n\t\t\t\t\t}\n\t\t\t\t\tint curPart = 1;\n\t\t\t\t\tif (current != null) {\n\t\t\t\t\t\tboolean formatError = false;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcurPart = Integer.parseInt(current);\n\t\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t\tformatError = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (formatError || curPart > partsCount) {\n\t\t\t\t\t\t\tresponse = generateXSSErrorResponse();\n\t\t\t\t\t\t\treturn -1; // error\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlong now = System.currentTimeMillis();\n\t\t\t\t\tfor (Iterator<SimpleHttpRequest> itr = allSessions.values().iterator(); itr.hasNext();) {\n\t\t\t\t\t\tSimpleHttpRequest r = (SimpleHttpRequest) itr.next();\n\t\t\t\t\t\tif (now - r.jzt > PipeConfig.maxXSSLatency) {\n\t\t\t\t\t\t\titr.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] parts = null;\n\t\t\t\t\t\n\t\t\t\t\tSimpleHttpRequest sessionRequest = null;\n\t\t\t\t\t// store request in session before the request is completed\n\t\t\t\t\tif (session == null) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tStringBuilder builder = new StringBuilder(32);\n\t\t\t\t\t\t\tfor (int i = 0; i < 32; i++) {\n\t\t\t\t\t\t\t\tint r = (int) Math.round((float) Math.random() * 61.1); // 0..61, total 62 numbers\n\t\t\t\t\t\t\t\tif (r < 10) {\n\t\t\t\t\t\t\t\t\tbuilder.append((char) (r + '0'));\n\t\t\t\t\t\t\t\t} else if (r < 10 + 26) {\n\t\t\t\t\t\t\t\t\tbuilder.append((char) ((r - 10) + 'a'));\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbuilder.append((char) ((r - 10 - 26) + 'A'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsession = builder.toString();\n\t\t\t\t\t\t} while (allSessions.get(session) != null);\n\t\t\t\t\t\tsessionRequest = new SimpleHttpRequest();\n\t\t\t\t\t\tallSessions.put(session, sessionRequest);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsessionRequest = allSessions.get(session);\n\t\t\t\t\t\tif (sessionRequest == null) {\n\t\t\t\t\t\t\tsessionRequest = new SimpleHttpRequest();\n\t\t\t\t\t\t\tallSessions.put(session, sessionRequest);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (sessionRequest.jzn == null) {\n\t\t\t\t\t\tsessionRequest.jzt = now;\n\t\t\t\t\t\tparts = new String[partsCount];\n\t\t\t\t\t\tsessionRequest.jzn = parts;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparts = sessionRequest.jzn;\n\t\t\t\t\t\tif (partsCount != parts.length) {\n\t\t\t\t\t\t\tresponse = generateXSSErrorResponse();\n\t\t\t\t\t\t\treturn -1; // error\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tparts[curPart - 1] = jzzRequest;\n\t\t\t\t\tfor (int i = 0; i < parts.length; i++) {\n\t\t\t\t\t\tif (parts[i] == null) {\n\t\t\t\t\t\t\t// not completed yet! just response and wait next request.\n\t\t\t\t\t\t\tresponse = new HttpQuickResponse(\"text/javascript\", \"net.sf.j2s.ajax.SimpleRPCRequest\" +\n\t\t\t\t\t\t\t\t\t\".xssNotify(\\\"\" + requestID + \"\\\", \\\"continue\\\"\" +\n\t\t\t\t\t\t\t\t\t((curPart == 1) ? \", \\\"\" + session + \"\\\");\" : \");\"));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (response != null) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\n\t\t\t\t\tallSessions.remove(session);\n\t\t\t\t\t\n\t\t\t\t\tStringBuilder builder = new StringBuilder(16192);\n\t\t\t\t\tfor (int i = 0; i < parts.length; i++) {\n\t\t\t\t\t\tbuilder.append(parts[i]);\n\t\t\t\t\t\tparts[i] = null;\n\t\t\t\t\t}\n\t\t\t\t\trequest.delete(0, request.length()).append(builder.toString());\n\t\t\t\t} else {\n\t\t\t\t\trequest.delete(0, request.length()).append(jzzRequest);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\trequest.delete(0, request.length()).append(jzzRequest); // no request id, normal request\n\t\t\t}\n\t\t} // end of XSS script query parsing\n\t\treturn 0;\n\t}",
"String getRequest(String url);",
"String getRequest();",
"@Test\n public void getRequest2() {\n str = METHOD_GET + \"/wiki/page.html \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": ru.wikipedia.org\" + ENDL +\n USER_AGENT + \": Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n CONNECTION_CLOSE;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/wiki/page.html\");\n assertEquals(request.getHeader(HOST_HEADER), \"ru.wikipedia.org\");\n assertEquals(request.getHeader(USER_AGENT),\n \"Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(CONNECTION), CLOSE_STR);\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }",
"public static Request parseRequest(BufferedReader input) throws IOException, IllegalStateException, SocketException\n {\n Request request = new Request();\n String line;\n Matcher matcher;\n\n // Parsing request method & uri\n if ((line = input.readLine()) == null) throw new SocketException(\"Client disconnected\");\n\n matcher = regexMethod.matcher(line);\n if (matcher.find()) {\n request.method = RtspMethod.valueOf(matcher.group(1));\n request.uri = matcher.group(2);\n LogHelper.e(TAG, \"Line: \" + line);\n LogHelper.e(TAG, \"Parsing request method & uri: \" + request.method + \" --> \" + request.uri);\n\n // Parsing headers of the request\n while ((line = input.readLine()) != null && line.length() > 3) {\n matcher = regexHeader.matcher(line);\n if (matcher.find()) {\n request.headers.put(matcher.group(1).toLowerCase(Locale.US), matcher.group(2));\n LogHelper.e(TAG, \"Parsing headers of the request: \" + line + \" | \" +\n matcher.group(1).toLowerCase(Locale.US) + \" --> \" + matcher.group(2));\n }\n }\n if (line == null) throw new SocketException(\"Client disconnected\");\n\n // It's not an error, it's just easier to follow what's happening in logcat with the request in red\n LogHelper.e(TAG, request.method + \" \" + request.uri);\n }\n\n return request;\n }",
"private boolean processRequest(Connection conn)\n {\n String line = null;\n URL url;\n String path;\n\n /*\n * Read the request line.\n */\n try {\n line = DataInputStreamUtil.readLineIntr(conn.getInputStream());\n }\n catch(InterruptedException e) {\n logError(\"Cannot read request line: connection timeout\");\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST, \"connection timeout\");\n return false;\n }\n catch(IOException e) {\n logError(\"Cannot read request line: I/O error\"\n + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.SRVCE_NOT_AVAILABLE,\n \"I/O error\" + getExceptionMessage(e));\n return false;\n }\n\n /*\n * Parse the request line, and read the request headers.\n */\n try {\n _req.read(line);\n }\n catch(MalformedURLException e) {\n logError(\"Malformed URI in HTTP request\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Invalid URI in HTTP request\"\n + getExceptionMessage(e));\n return false;\n }\n catch(MalformedHTTPReqException e) {\n logError(\"Malformed HTTP request\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Invalid HTTP request\" + getExceptionMessage(e));\n return false;\n }\n catch(InterruptedException e) {\n logError(\"Cannot read request: connection timeout\");\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST, \"connection timeout\");\n return false;\n }\n catch(IOException e) {\n logError(\"Cannot read request: I/O error\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.SRVCE_NOT_AVAILABLE,\n \"I/O error\" + getExceptionMessage(e));\n return false;\n }\n\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"Request: '\" + _req.getReqLine() + \"'\");\n }\n\n /*\n * Process the request based on the request-URI type. The asterisk\n * option (RFC2068, sec. 5.1.2) is not supported.\n */\n if ( (path = _req.getPath()) != null) {\n return redirectClient(path);\n }\n else {\n if ( (url = _req.getURL()) != null) {\n // The redirector is being accessed as a proxy.\n\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Cannot retrieve URL \" + url\n + \"\\n<P>\\n\"\n + \"Invalid URL: unexpected access protocol \"\n + \"(e.g., `http://')\\n\");\n }\n else {\n logError(\"unsupported request-URI: \" + _req.getReqLine());\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"unsupported request-URI\");\n }\n return false;\n }\n }",
"private String processGetRequestHeader(String rq){\n String ret = \"\";\n int i = 4;\n if(rq.length() < i){\n return null;\n }\n while(rq.charAt(i) != ' '){\n ret += rq.charAt(i);\n i++;\n }\n return ret;\n }",
"Object getAll(WebRequest webRequest, HttpServletResponse response, Model model) throws Exception;",
"MovilizerRequest getRequestFromString(String requestString);",
"@Test\n public void getRequest3() {\n str = METHOD_GET + \"/someservlet.jsp?param1=foo¶m2=bar \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": foo.com\" + ENDL +\n USER_AGENT + \": Google Chrome/5.0 (X11; U; Linux i686; ru; rv:1.9b5) \" +\n \"Gecko/2008050509 Google Chrome/3.0b5\" + ENDL +\n ACCEPT + \": text/jsp\" + ENDL +\n CONNECTION_CLOSE;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getRequestText(), str);\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/someservlet.jsp\");\n assertEquals(request.getHeader(HOST_HEADER), \"foo.com\");\n assertEquals(request.getHeader(USER_AGENT),\n \"Google Chrome/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Google Chrome/3.0b5\");\n assertEquals(request.getHeader(ACCEPT), \"text/jsp\");\n assertEquals(request.getHeader(CONNECTION), \"close\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n\n assertEquals(request.getParameter(\"param1\"), \"foo\");\n assertEquals(request.getParameter(\"param2\"), \"bar\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n assertEquals(request.getHost(), HOST);\n assertEquals(request.getIpAddress(), IP_ADDRESS);\n }",
"private WebRequest() {\n initFields();\n }",
"public void request() {\n /*\n r11 = this;\n r0 = 0\n r11.mResponse = r0\n java.lang.String r1 = r11.mUrlString\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n r3 = 0\n r5 = r0\n r4 = 0\n L_0x000d:\n r6 = 1\n java.lang.String r7 = \"DistanceConfigFetcher\"\n if (r4 == 0) goto L_0x002a\n r1 = 2\n java.lang.Object[] r1 = new java.lang.Object[r1]\n java.lang.String r8 = r11.mUrlString\n r1[r3] = r8\n java.lang.String r8 = \"Location\"\n java.lang.String r9 = r5.getHeaderField(r8)\n r1[r6] = r9\n java.lang.String r9 = \"Following redirect from %s to %s\"\n org.altbeacon.beacon.logging.LogManager.d(r7, r9, r1)\n java.lang.String r1 = r5.getHeaderField(r8)\n L_0x002a:\n int r4 = r4 + 1\n r8 = -1\n r11.mResponseCode = r8\n java.net.URL r8 = new java.net.URL // Catch:{ Exception -> 0x0035 }\n r8.<init>(r1) // Catch:{ Exception -> 0x0035 }\n goto L_0x0044\n L_0x0035:\n r8 = move-exception\n java.lang.Object[] r9 = new java.lang.Object[r6]\n java.lang.String r10 = r11.mUrlString\n r9[r3] = r10\n java.lang.String r10 = \"Can't construct URL from: %s\"\n org.altbeacon.beacon.logging.LogManager.e(r7, r10, r9)\n r11.mException = r8\n r8 = r0\n L_0x0044:\n if (r8 != 0) goto L_0x004e\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r8 = \"URL is null. Cannot make request\"\n org.altbeacon.beacon.logging.LogManager.d(r7, r8, r6)\n goto L_0x00a0\n L_0x004e:\n java.net.URLConnection r8 = r8.openConnection() // Catch:{ SecurityException -> 0x0093, FileNotFoundException -> 0x0086, IOException -> 0x0079 }\n java.net.HttpURLConnection r8 = (java.net.HttpURLConnection) r8 // Catch:{ SecurityException -> 0x0093, FileNotFoundException -> 0x0086, IOException -> 0x0079 }\n java.lang.String r5 = \"User-Agent\"\n java.lang.String r9 = r11.mUserAgentString // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n r8.addRequestProperty(r5, r9) // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n int r5 = r8.getResponseCode() // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n r11.mResponseCode = r5 // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n java.lang.String r5 = \"response code is %s\"\n java.lang.Object[] r6 = new java.lang.Object[r6] // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n int r9 = r8.getResponseCode() // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9) // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n r6[r3] = r9 // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n org.altbeacon.beacon.logging.LogManager.d(r7, r5, r6) // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n goto L_0x009f\n L_0x0073:\n r5 = move-exception\n goto L_0x007c\n L_0x0075:\n r5 = move-exception\n goto L_0x0089\n L_0x0077:\n r5 = move-exception\n goto L_0x0096\n L_0x0079:\n r6 = move-exception\n r8 = r5\n r5 = r6\n L_0x007c:\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r9 = \"Can't reach server\"\n org.altbeacon.beacon.logging.LogManager.w(r5, r7, r9, r6)\n r11.mException = r5\n goto L_0x009f\n L_0x0086:\n r6 = move-exception\n r8 = r5\n r5 = r6\n L_0x0089:\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r9 = \"No data exists at \\\"+urlString\"\n org.altbeacon.beacon.logging.LogManager.w(r5, r7, r9, r6)\n r11.mException = r5\n goto L_0x009f\n L_0x0093:\n r6 = move-exception\n r8 = r5\n r5 = r6\n L_0x0096:\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r9 = \"Can't reach sever. Have you added android.permission.INTERNET to your manifest?\"\n org.altbeacon.beacon.logging.LogManager.w(r5, r7, r9, r6)\n r11.mException = r5\n L_0x009f:\n r5 = r8\n L_0x00a0:\n r6 = 10\n if (r4 >= r6) goto L_0x00b2\n int r6 = r11.mResponseCode\n r8 = 302(0x12e, float:4.23E-43)\n if (r6 == r8) goto L_0x000d\n r8 = 301(0x12d, float:4.22E-43)\n if (r6 == r8) goto L_0x000d\n r8 = 303(0x12f, float:4.25E-43)\n if (r6 == r8) goto L_0x000d\n L_0x00b2:\n java.lang.Exception r0 = r11.mException\n if (r0 != 0) goto L_0x00e2\n java.io.BufferedReader r0 = new java.io.BufferedReader // Catch:{ Exception -> 0x00d8 }\n java.io.InputStreamReader r1 = new java.io.InputStreamReader // Catch:{ Exception -> 0x00d8 }\n java.io.InputStream r4 = r5.getInputStream() // Catch:{ Exception -> 0x00d8 }\n r1.<init>(r4) // Catch:{ Exception -> 0x00d8 }\n r0.<init>(r1) // Catch:{ Exception -> 0x00d8 }\n L_0x00c4:\n java.lang.String r1 = r0.readLine() // Catch:{ Exception -> 0x00d8 }\n if (r1 == 0) goto L_0x00ce\n r2.append(r1) // Catch:{ Exception -> 0x00d8 }\n goto L_0x00c4\n L_0x00ce:\n r0.close() // Catch:{ Exception -> 0x00d8 }\n java.lang.String r0 = r2.toString() // Catch:{ Exception -> 0x00d8 }\n r11.mResponse = r0 // Catch:{ Exception -> 0x00d8 }\n goto L_0x00e2\n L_0x00d8:\n r0 = move-exception\n r11.mException = r0\n java.lang.Object[] r1 = new java.lang.Object[r3]\n java.lang.String r2 = \"error reading beacon data\"\n org.altbeacon.beacon.logging.LogManager.w(r0, r7, r2, r1)\n L_0x00e2:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.altbeacon.beacon.distance.DistanceConfigFetcher.request():void\");\n }",
"@Test\n public void getRequest4() {\n str = METHOD_GET + \"http://foo.com/someservlet.jsp?param1=foo \" + HTTP_VERSION + ENDL +\n ACCEPT + \": text/jsp\" + ENDL +\n CONNECTION_CLOSE;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"foo.com/someservlet.jsp\");\n assertEquals(request.getDomainName(), \"foo.com\");\n assertEquals(request.getHeader(ACCEPT), \"text/jsp\");\n assertEquals(request.getHeader(CONNECTION), CLOSE_STR);\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n\n assertEquals(request.getParameter(\"param1\"), \"foo\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }",
"void getRequests();",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }",
"Map<String, String> parseHttpSchedulerRequest(String httpRequest) {\n String[] requestArguments = httpRequest.split(\"&\");\n Map<String, String> argsMap = new HashMap<>();\n\n if (requestArguments.length != 2 && requestArguments.length != 1 ) {\n System.err.println(\"Invalid HTTP request: \" + httpRequest);\n return null; \n }\n else if (requestArguments.length == 2) {\n int counter = 0;\n for ( String arg : requestArguments ) {\n String[] keyValuePair = arg.split(\"=\");\n if (counter == 0) {\n if ( keyValuePair[0].equals(\"job-id\") ) {\n assert keyValuePair[1].matches(\"[0-9]+\");\n argsMap.put( keyValuePair[0], keyValuePair[1]);\n }\n else {\n System.err.println(\"Invalid argument - expecting job-id\");\n }\n }\n else if (counter == 1) {\n if ( keyValuePair[0].equals(\"task-command\") ) {\n argsMap.put( keyValuePair[0], keyValuePair[1]);\n }\n else {\n System.err.println(\"Invalid argument - expecting task-command\");\n }\n }\n counter++;\n }\n }\n else if (requestArguments.length == 1) {\n String[] keyValuePair = requestArguments[0].split(\"=\");\n if ( keyValuePair[0].equals(\"probe\") ) \n argsMap.put( keyValuePair[0], keyValuePair[1]);\n else \n System.err.println(\"Invalid argument - expecting probe request\");\n }\n return argsMap;\n }",
"@Override\n protected final void parseRequest(final HttpServletRequest request, HttpServletResponse response) {\n\n parsePath(request);\n\n LOGGER.warning(\"[REST]: \" + request.getMethod() + \"|\" + apiName + \"/\" + resourceName + \"|\" + request.getHeader(\"Current-Page\"));\n\n // Fixes BS-400. This is ugly.\n I18n.getInstance();\n\n api = APIs.get(apiName, resourceName);\n api.setCaller(this);\n\n super.parseRequest(request, response);\n\n }",
"private void processRequest() throws Exception {\n InputStream is = socket.getInputStream();\n DataOutputStream os = new DataOutputStream(socket.getOutputStream());\n\n // Set up input stream filters.\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\n \n // Get the request line of the HTTP request message.\n String requestLine = br.readLine();\n\n // Display the request line.\n System.out.println();\n System.out.println(requestLine);\n \n // Get and display the header lines.\n String headerLine = null;\n while ((headerLine = br.readLine()).length() != 0) {\n System.out.println(headerLine);\n }\n \n // Close streams and socket.\n os.close();\n br.close();\n socket.close();\n }",
"private String parsingURL(String requestURL) {\n\t\tint pos = 0;\n\t\tif (requestURL.startsWith(\"http://\")) {\n\t\t\tpos = \"http://\".length();\n\t\t}\n\t\telse {\n\t\t\tpos = \"https://\".length();\n\t\t}\n\t\t\n\t\tint pos2 = requestURL.indexOf(\":\", pos);\n\t\tif (pos2 < 0) {\n\t\t\tpos2 = requestURL.length();\n\t\t}\n\t\t\n\t\tint pos3 = requestURL.indexOf(\"/\", pos);\n\t\tif (pos3 < 0) {\n\t\t\tpos3 = requestURL.length();\n\t\t}\n\t\t\n\t\tpos2 = Math.min(pos2, pos3);\n\t\t\n\t\tString host = requestURL.substring(pos, pos2);\n\t\t/**\n\t\t * parsing request url\n\t\t */\n\t\treturn host;\n\t}",
"java.lang.String getResponse();",
"Call mo35727a(Request request);",
"@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }",
"private void getMall(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}",
"private String parsePostRequest(StringTokenizer parse) {\n\t\tString fileRequested = parse.nextToken();\r\n\r\n\t\treturn null;\r\n\t}",
"private void decodeHeader(BufferedReader in, Map<String, String> pre,\n\t\t\t\tMap<String, String> parms, Map<String, String> headers) throws ResponseException {\n\t\t\ttry {\n\t\t\t\t// Read the request line\n\t\t\t\tString inLine = in.readLine();\n\t\t\t\tif (inLine == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tStringTokenizer st = new StringTokenizer(inLine);\n\t\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\t\tthrow new ResponseException(Response.Status.BAD_REQUEST,\n\t\t\t\t\t\t\t\"BAD REQUEST: Syntax error. Usage: GET /example/file.html\");\n\t\t\t\t}\n\n\t\t\t\tpre.put(\"method\", st.nextToken());\n\n\t\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\t\tthrow new ResponseException(Response.Status.BAD_REQUEST,\n\t\t\t\t\t\t\t\"BAD REQUEST: Missing URI. Usage: GET /example/file.html\");\n\t\t\t\t}\n\n\t\t\t\tString uri = st.nextToken();\n\n\t\t\t\t// Decode parameters from the URI\n\t\t\t\tint qmi = uri.indexOf('?');\n\t\t\t\tif (qmi >= 0) {\n\t\t\t\t\tdecodeParms(uri.substring(qmi + 1), parms);\n\t\t\t\t\turi = decodePercent(uri.substring(0, qmi));\n\t\t\t\t} else {\n\t\t\t\t\turi = decodePercent(uri);\n\t\t\t\t}\n\n\t\t\t\t// If there's another token, its protocol version,\n\t\t\t\t// followed by HTTP headers.\n\t\t\t\t// NOTE: this now forces header names lower case since they are\n\t\t\t\t// case insensitive and vary by client.\n\t\t\t\tif (st.hasMoreTokens()) {\n\t\t\t\t\tprotocolVersion = st.nextToken();\n\t\t\t\t} else {\n\t\t\t\t\tprotocolVersion = \"HTTP/1.1\";\n\t\t\t\t\tNanoHTTPDSingleFile.LOG.log(Level.FINE,\n\t\t\t\t\t\t\t\"no protocol version specified, strange. Assuming HTTP/1.1.\");\n\t\t\t\t}\n\t\t\t\tString line = in.readLine();\n\t\t\t\twhile (line != null && !line.trim().isEmpty()) {\n\t\t\t\t\tint p = line.indexOf(':');\n\t\t\t\t\tif (p >= 0) {\n\t\t\t\t\t\theaders.put(line.substring(0, p).trim().toLowerCase(Locale.US), line\n\t\t\t\t\t\t\t\t.substring(p + 1).trim());\n\t\t\t\t\t}\n\t\t\t\t\tline = in.readLine();\n\t\t\t\t}\n\n\t\t\t\tpre.put(\"uri\", uri);\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tthrow new ResponseException(Response.Status.INTERNAL_ERROR,\n\t\t\t\t\t\t\"SERVER INTERNAL ERROR: IOException: \" + ioe.getMessage(), ioe);\n\t\t\t}\n\t\t}",
"private void processRequest(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\n\r\n\t}",
"private void parseProtocol(String protocol) {\n try (Scanner sc = new Scanner(protocol)) {\n //parse first line\n this.method = Method.valueOf(sc.next());\n this.url = sc.next();\n String httpVersion = sc.next();\n this.version = Double.parseDouble(httpVersion.substring(5));\n\n while (sc.hasNext(\".+:\")) {\n String header = sc.next();\n header = header.substring(0, header.indexOf(':'));\n String value = sc.next() + sc.nextLine();\n this.headings.put(header, value);\n }\n }\n\n }",
"public void parseHeader()\n {\n\n Hashtable table = new Hashtable();\n String[] lines = Utilities.splitString(header, \"\\r\\n\"); //Break everything into lines\n String[] line1 = Utilities.splitString(header, \" \"); //Break the 1st header line Ex: GET / HTTP/1.1\n method = line1[0].trim();\n file = line1[1].trim();\n Utilities.debugLine(\"WebServer.parseHeader(): \" + lines[0], DEBUG);\n\n //For the remainder of the headers, parse the requestFields.\n for (int i = 1; i < lines.length - 1; i++)\n {\n String[] tempLine = Utilities.splitStringOnce(lines[i], \":\");\n table.put(tempLine[0].trim(), tempLine[1].trim());\n }\n headerFields = table;\n }",
"public static HashMap<String, String> generateRequest (String request){\n LOGGER.info(\"Request generator got line => \" + request);\n /**\n * we split on spaces as that is the http convention\n */\n String[] brokenDownRequest = request.split(\" \");\n\n /**\n * creating anf then filling up the request hashmap\n */\n HashMap<String, String> parsedRequest = new HashMap<>();\n parsedRequest.put(\"Type\", brokenDownRequest[0]);\n parsedRequest.put(\"Path\", brokenDownRequest[1]);\n parsedRequest.put(\"HttpVersion\", brokenDownRequest[2]);\n\n /**\n * returning the request hashmap\n */\n return parsedRequest;\n }",
"public void parsePost()\n {\n Hashtable table = new Hashtable();\n try\n {\n\n String[] pairs = Utilities.splitString(content, \"&\");\n for (int i = 0; i < pairs.length; i++)\n {\n String[] pair = Utilities.splitString(pairs[i], \"=\");\n table.put(pair[0], pair[1]);\n }\n Variables.updateTableWithTable(table);\n Variables.save();\n }\n catch (Exception e)\n {\n Utilities.debugLine(\"WebServer.parsePost(): ERROR\" + content, DEBUG);\n }\n Utilities.debugLine(\"WebServer.parsePost(): Variables were \" + content, DEBUG);\n Utilities.debugLine(\"WebServer.parsePost(): HASHTABLE = \" + table.toString(), DEBUG);\n\n }",
"static Map<String, List<String>> parseParams(Request request, Map<String, List<Upload>> uploads) throws IOException {\n\t\tMap<String, String> headerParams = parseHeaderParams(request.headers().get(HeaderName.CONTENT_TYPE));\n\t\tList<String> urlencodedList = new ArrayList<>();\n\t\turlencodedList.add(request.query());\n\t\tif (headerParams.containsKey(ContentType.FORM)) {\n\t\t\turlencodedList.add(new String(request.body().readAllBytes()));\n\t\t}\n\n\t\t// parse query string and urlencoded form\n\t\tMap<String, List<String>> params = new HashMap<>();\n\t\tfor (String urlencoded : urlencodedList) {\n\t\t\tif (urlencoded == null || urlencoded.isEmpty()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (String part : urlencoded.split(\"&\")) {\n\t\t\t\ttry {\n\t\t\t\t\tString[] pair = part.split(\"=\", 2);\n\t\t\t\t\tList<String> values = params.computeIfAbsent(URLDecoder.decode(pair[0], StandardCharsets.UTF_8), k -> new ArrayList<>());\n\t\t\t\t\tif (pair.length == 1) {\n\t\t\t\t\t\tvalues.add(\"\");\n\t\t\t\t\t} else if (pair.length == 2) {\n\t\t\t\t\t\tvalues.add(URLDecoder.decode(pair[1], StandardCharsets.UTF_8));\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new WebException(StatusCode.BAD_REQUEST, \"invalid param: \" + part, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// parse multipart form\n\t\tif (headerParams.containsKey(ContentType.MULTIPART)) {\n\t\t\tbyte[] boundary = (\"\\r\\n\" + \"--\" + headerParams.get(\"boundary\") + \"\\r\\n\").getBytes(); // CRLF--boundaryCRLF\n\t\t\tint length = (int) (request.length() - (boundary.length + 2)); // without last boundary: CRLF--boundary--CRLF\n\t\t\tbyte[] body = request.body().readNBytes(length);\n\t\t\tif (body.length != length) {\n\t\t\t\tthrow new IOException(\"unexpected end of stream\");\n\t\t\t}\n\t\t\trequest.body().transferTo(OutputStream.nullOutputStream()); // discard last boundary\n\t\t\tint offset = boundary.length - 2; // first boundary: --boundaryCRLF\n\t\t\twhile (offset < body.length) {\n\t\t\t\tint nextOffset = findBoundary(body, boundary, offset);\n\t\t\t\ttry (var in = new ByteArrayInputStream(Arrays.copyOfRange(body, offset, nextOffset))) {\n\t\t\t\t\tHeaders headers = readHeaders(in);\n\t\t\t\t\tbyte[] data = in.readAllBytes();\n\t\t\t\t\tMap<String, String> map = parseHeaderParams(headers.get(HeaderName.CONTENT_DISPOSITION));\n\t\t\t\t\tString name = map.get(\"name\");\n\t\t\t\t\tString originalName = map.get(\"filename\");\n\t\t\t\t\tif (originalName == null) { // text\n\t\t\t\t\t\tparams.computeIfAbsent(name, k -> new ArrayList<>()).add(new String(data));\n\t\t\t\t\t} else { // upload\n\t\t\t\t\t\tUpload upload = new Upload(name, originalName, headers.get(HeaderName.CONTENT_TYPE), data);\n\t\t\t\t\t\tuploads.computeIfAbsent(name, k -> new ArrayList<>()).add(upload);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toffset = nextOffset + boundary.length;\n\t\t\t}\n\t\t}\n\t\treturn params;\n\t}",
"static RequestLine readRequestLine(InputStream in) throws IOException {\n\t\tString line = readLine(in, true);\n\t\tString[] parts = line.split(\" \");\n\t\tif (parts.length != 3) {\n\t\t\tthrow new WebException(StatusCode.BAD_REQUEST, \"invalid request line: \" + line);\n\t\t}\n\t\tString method = parts[0];\n\t\tString target = parts[1];\n\t\tString path = target;\n\t\tString query = null;\n\t\tint index = target.indexOf('?');\n\t\tif (index != -1) {\n\t\t\tpath = target.substring(0, index);\n\t\t\tquery = target.substring(index + 1);\n\t\t}\n\t\treturn new RequestLine(method, target, path, query);\n\t}",
"public void Parse() \n\tthrows BadRequestException, LengthRequestException {\n\n\t// Reading the first word of the request\n\tStringBuilder command = new StringBuilder();\n\tint c = 0;\n\ttry {\n\t while((c = userInput.read()) != -1) {\n\t\tif ((char)c == ' ')\n\t\t break;\n\t\tcommand.append((char)c);\n\t }\n\t} catch (IOException e) {\n\t System.err.println(\"[\"+new Date()+\"] ERROR : Error while reading the input stream of the client socket :\" + e.getMessage());\n\t}\t\n\n\t// Read the file key\n\tStringBuilder key = new StringBuilder();\n\ttry {\n\t while((c = userInput.read()) != -1) {\n\t\tif ((char)c == ' ')\n\t\t break;\n\t\tkey.append((char)c);\n\t }\n\t} catch (IOException e) {\n\t System.err.println(\"[\"+new Date()+\"] ERROR : Error while reading the input stream of the client socket :\" + e.getMessage());\n\t}\n\n\t// Bad key\n\tif(key.toString().length() != 32){\n\t throw new BadRequestException(\"Wrong key length\");\n\t}\n\tthis.key = key.toString();\n\n\t// Search the file in the files in shared\n\tIterator<CookieFile> it = files.iterator();\n\twhile (it.hasNext()) { \n\t CookieFile f = it.next();\n\n\t if (f.getKey().equals(this.key)) {\n\t\tf.toString();\n\t\tthis.file = f;\n\t\tbreak;\n\t }\n\t}\n\n\t// check the first \"[\"\n\ttry {\n\t c = userInput.read();\n\t if( (char)c != '[')\n\t\tthrow new BadRequestException(\"Parser unable to understand this request\");\n\t} catch (IOException e) {\n\t System.err.println(\"[\"+new Date()+\"] ERROR : Error while reading the input stream of the client socket :\" + e.getMessage());\n\t}\n\n\t// get the pieces\n\twhile(true) {\n\t int index;\n\t String data;\n\t try {\n\t\t// get the index\n\t\tStringBuilder sbIndex = new StringBuilder();\n\t\tint ck;\n\t\twhile((ck = userInput.read()) != -1) {\n\t\t if ((char)ck == ':')\n\t\t\tbreak;\n\t\t sbIndex.append((char)ck);\n\t\t}\n\t\tindex = Integer.parseInt(sbIndex.toString(), 10);\n\n\t\t// get the pieces\n\t\tif (index != file.getNbPieces()) {\n\t\t char dataBuffer[] = new char[2732/*pieceLength*/];\n\t\t userInput.read(dataBuffer, 0, 2732/*pieceLength*/);\n\n\t\t data = new String(dataBuffer);\n\t\t Piece p = new Piece(index, data);\n\t\t pieces.add(p);\n\t\t if ((ck = userInput.read()) != -1){\n\t\t\tif((char)ck == ']'){\n\t\t\t return;\n\t\t\t}\n\t\t\telse if ((char)ck != ' '){\n\t\t\t throw new BadRequestException(\"Parser unable to understand this request\");\n\t\t\t}\n\t\t }\n\t\t}\n\t\t// The last piece\n\t\telse { \n\n\t\t StringBuilder lastPiece = new StringBuilder();\n\t\t while((ck = userInput.read()) != -1) {\n\t\t\tif ((char)ck == ']')\n\t\t\t break;\n\t\t\tlastPiece.append((char)ck);\n\t\t }\n\n\t\t data = lastPiece.toString();\n\t\t Piece p = new Piece(index, data);\n\t\t pieces.add(p);\n\t\t return;\n\t\t}\n\t } catch (IOException e) {\n\t\tSystem.err.println(\"read:\"+ e.getMessage());\n\t }\n\t}\n }",
"private void http_handler(BufferedReader input, DataOutputStream output) {\n int method = 0; //1 get, 2 head, 0 not supported\n String http = new String(); //a bunch of strings to hold\n String path = new String(); //the various things, what http v, what path,\n String file = new String(); //what file\n String user_agent = new String(); //what user_agent\n try {\n //This is the two types of request we can handle\n //GET /index.html HTTP/1.0\n //HEAD /index.html HTTP/1.0\n String tmp = input.readLine(); //read from the stream\n String tmp2 = new String(tmp);\n String line = input.readLine();\n String header = \"\";\n while (line != null && !line.equals(\"\")) {\n header += line;\n line = input.readLine();\n }\n if(header.contains(\"Content-Length\")){\n int offset = header.indexOf(\"Content-Length: \") + \"Content-Length: \".length();\n int cLength = Integer.parseInt(header.substring(offset, header.length()));\n char[] buffer = new char[cLength];\n input.read(buffer);\n value = new String(buffer);\n }\n tmp.toUpperCase(); //convert it to uppercase\n\n if (tmp.startsWith(\"GET\")) { //compare it is it GET\n method = 1;\n } //if we set it to method 1\n if (tmp.startsWith(\"OPTIONS\")) { //same here is it OPTIONS\n method = 2;\n } //set method to 2\n if (tmp.startsWith(\"POST\")) { //same here is it POST\n method = 3;\n } //set method to 3\n\n if (method == 0) { // not supported\n try {\n output.writeBytes(construct_http_header(501, 0));\n output.close();\n return;\n } catch (Exception e3) { //if some error happened catch it\n s(\"error:\" + e3.getMessage());\n } //and display error\n }\n //}\n\n //tmp contains \"GET /index.html HTTP/1.0 .......\"\n //find first space\n //find next space\n //copy whats between minus slash, then you get \"index.html\"\n //it's a bit of dirty code, but bear with me...\n\n int start = 0;\n int end = 0;\n for (int a = 0; a < tmp2.length(); a++) {\n if (tmp2.charAt(a) == ' ' && start != 0) {\n end = a;\n break;\n }\n if (tmp2.charAt(a) == ' ' && start == 0) {\n start = a;\n }\n }\n path = tmp2.substring(start + 1, end); //fill in the path\n } catch (Exception e) {\n s(\"error\" + e.getMessage());\n } //catch any exception\n\n try {\n //send response header\n output.writeBytes(construct_http_header(200, 5));\n\n if (method == 1) { //1 is GET 2 is head and skips the body\n //Response with data from kinect (persoon aanwezig, positie, ...)\n //output.writeBytes(response);\n }\n if (method == 2) {\n String msg = \"\";\n //Description of the sensor sent back (OPTIONS)\n if (path.equals(\"/\")) {\n msg = \"<link rel=\\\"description\\\" type=\\\"text/n3\\\" href=\\\"/service\\\">\\n<link rel=\\\"goal\\\" type=\\\"text/n3\\\" href=\\\"/serviceGoal\\\">\";\n }\n if (path.equals(\"/service\")) {\n msg = \"@prefix sensor: <http://example.org/sensor/>.\\n\";\n msg += \"@prefix ex: <http://example.org/example/>. \\n\";\n msg += \"@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. \\n\";\n msg += \"@prefix environment: <http://example.org/environment/>. \\n\";\n msg += \"@prefix http: <http://www.w3.org/2011/http#>. \\n\";\n msg += \"@prefix tmpl: <http://purl.org/restdesc/http-template#>. \\n\";\n msg += \"{ \\n\";\n msg += \"?sensor a sensor:Kinect. \\n\";\n msg += \"} \\n\";\n msg += \"=> \\n\";\n msg += \"{ \\n\";\n msg += \"_:request http:methodName \\\"POST\\\"; \\n\";\n msg += \"tmpl:requestURI (?sensor \\\"/lightValue\\\"); \\n\";\n msg += \"http:body ?environmentLight;\\n\";\n msg += \"http:resp [ http:body ?lightingValue]. \\n\";\n msg += \"?environmentLight a environment:lightingCondition.\\n\";\n msg += \"?sensor sensor:lightingCondition ?lightingValue. \\n\";\n msg += \"?lightingValue a xsd:String. \\n\";\n msg += \"}. \\n\";\n msg += \"<http://\" + ip + \"/#sensor> a sensor:Kinect.\\n\";\n }\n if (path.equals(\"/serviceGoal\")) {\n msg = \"@prefix sensor: <http://example.org/sensor/>. \\n\";\n msg += \"@prefix environment: <http://example.org/environment/>. \\n\";\n msg += \"{ \\n\";\n msg += \"<http://\" + ip + \"/#sensor> sensor:lightingCondition ?value. \\n\";\n msg += \"} \\n\";\n msg += \"=> \\n\";\n msg += \"{ \\n\";\n msg += \"<http://\" + ip + \"/#sensor> sensor:lightingCondition ?value. \\n\";\n msg += \"}. \\n\";\n }\n output.writeBytes(msg);\n }\n if (method == 3) {\n //Add something to sensor (LightSensor data)\n if (path.equals(\"/lightValue\")) {\n //get Light Value, send to kinect\n String lightValue = value.substring(value.indexOf(\"=\") + 1, value.length()).trim();\n EnvironmentVars.getInstance().setLightValue(lightValue);\n output.writeBytes(\"OK\");\n }\n if (path.equals(\"/personPresent\")) {\n EnvironmentVars.getInstance().setPersonPresent(true);\n output.writeBytes(\"OK\");\n }\n }\n output.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"java.util.List<TransmissionProtocol.Request> \n getRequestList();",
"static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n String response = null;\n if (hasInput) {\n response = scanner.next();\n }\n scanner.close();\n return response;\n } finally {\n urlConnection.disconnect();\n }\n }",
"public HashSet<URL> parseEmailBody() throws MalformedEWBRequest {\r\n\r\n\t\tMatcher urlMatcher = urlPattern.matcher(body);\r\n\r\n\t\tpageRequests = new HashSet<URL>();\r\n\t\tpageArguments = new HashMap<URL, ArgStruct>();\r\n\r\n\t\ttry {\r\n\t\t\twhile (urlMatcher.find()) {\r\n\t\t\t\tURL url = new URL(urlMatcher.group(URL_PAT_URL_GROUP));\r\n\t\t\t\tpageRequests.add(url);\r\n\t\t\t\tif (urlMatcher.group(URL_PAT_FORM_TYPE_GROUP) != null) {\r\n\t\t\t\t\tString formMethod = urlMatcher\r\n\t\t\t\t\t\t\t.group(URL_PAT_FORM_TYPE_GROUP);\r\n\t\t\t\t\tLinkedHashMap<String, String> urlMap = new LinkedHashMap<String, String>();\r\n\t\t\t\t\tMatcher argMatcher = argPattern.matcher(urlMatcher\r\n\t\t\t\t\t\t\t.group(URL_PAT_FORM_VALS_GROUP));\r\n\t\t\t\t\twhile (argMatcher.find()) {\r\n\t\t\t\t\t\turlMap.put(argMatcher.group(ARG_PAT_FORM_ID_GROUP),\r\n\t\t\t\t\t\t\t\targMatcher.group(ARG_PAT_FORM_VAL_GROUP));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpageArguments.put(url, new ArgStruct(formMethod, urlMap));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (MalformedURLException mfURL) {\r\n\t\t\tthrow new MalformedEWBRequest();\r\n\t\t}\r\n\r\n\t\tif (pageRequests.size() == 0) {\r\n\t\t\tSystem.out.println(\"WARNING: No URLs found in request.\");\r\n\t\t\tthrow new MalformedEWBRequest();\r\n\t\t}\r\n\r\n\t\treturn pageRequests;\r\n\t}",
"private boolean parseRequestLine() {\n\n // the request line has the format:\n // METHOD URI HTTP/1.1 CRLF\n\n // search the buffer for CRLF to see if you can process the line, otherwise return false\n // to stop the parser from trying the next phase\n\n\n // parse the line and set the fields on this.request\n\n // don't forget to consume the line from the parser\n\n return true;\n }",
"protected void parse(byte[] data) {\n version = data[0];\n flags = new byte[3];\n flags[0] = data[1];\n flags[1] = data[2];\n flags[2] = data[3];\n\n url = new String(data, 4, data.length - 4);\n }",
"private void extractData() {\n String[] info = request.split(\";\");\n actionCode = info[0];\n\n // if the code is 102, 103... then it has data attached\n List listOfCodes = Arrays.asList(\"102\", \"103\", \"104\", \"202\", \"203\");\n\n // extract data attached with the action code\n if (listOfCodes.contains(actionCode)) {\n data = info[1];\n }\n }",
"public void readRequest()\n {\n t1.start();\n StringBuffer sb = new StringBuffer(BUFFER_SIZE);\n char c;\n int sequentialBreaks = 0;\n while (true)\n {\n try\n {\n if (in.available() > 0)\n {\n c = (char) in.read();\n\n //keep track of the number of \\r or \\n s read in a row.\n if (c != '\\n' && c != '\\r')\n sequentialBreaks = 0;\n else\n sequentialBreaks++;\n\n //If there is an error, or we read the \\r\\n\\r\\n EOF, break the read loop.\n //We don't want to read too far.\n if (c == -1 || sequentialBreaks == 4)\n break;\n else\n sb.append(c);\n }\n }\n catch (Exception e)\n {\n sendError();\n }\n }\n header += sb.toString().trim();\n Utilities.debugLine(\"WebServer.readRequest(): Header was \\n\" + header, DEBUG);\n\n Utilities.debugLine(\"WebServer read bytes completed in \" + t1.get(), running);\n lastTime = t1.get();\n\n parseHeader();\n\n Utilities.debugLine(\"WebServer parse header completed in \" + (t1.get() - lastTime), running);\n lastTime = t1.get();\n\n readContent();\n\n Utilities.debugLine(\"WebServer parseHeader completed in \" + (t1.get() - lastTime), running);\n lastTime = t1.get();\n\n process();\n\n Utilities.debugLine(\"WebServer processing and reply completed in \" + (t1.get() - lastTime), running);\n }",
"static Request parseRequest(InputStream in) throws IOException {\n\t\tRequestLine request = readRequestLine(in);\n\t\tHeaders headers = readHeaders(in);\n\t\tlong length = -1;\n\t\tInputStream body;\n\t\tif (HeaderValue.CHUNKED.equals(headers.get(HeaderName.TRANSFER_ENCODING))) {\n\t\t\tbody = new ChunkedInputStream(in);\n\t\t} else {\n\t\t\tString header = headers.get(HeaderName.CONTENT_LENGTH);\n\t\t\tlength = header == null ? 0 : Long.parseLong(header);\n\t\t\tbody = new LimitedInputStream(in, length);\n\t\t}\n\t\treturn new Request(request.method(), request.target(), request.path(), request.query(), headers, length, body);\n\t}",
"public abstract Response read(Request request, Response response);",
"public Object handleRequest(P request) throws Exception;",
"String getResponse();",
"private JSONObject parseRequest(String request, DataOutputStream clientStream) {\n\t\ttry {\n\t\t\t//restitiuisco il JSONObject\n\t\t\treturn Gossip_parser.getJsonObject(request);\n\t\t} catch (ParseException e) {\n\t\t\t//se la richiesta non è un JSONObject rispondo con messaggio di errore\n\t\t\te.printStackTrace();\n\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.UNKNOWN_REQUEST), clientStream);\n\t\t}\n\t\treturn null;\n\t}",
"private Map<String, String> processPostRequest(String content) {\n Map<String, String> store = new HashMap<String, String>();\n\n // Split the post data by &\n for (String entry : content.split(\"&\")) {\n // Split it by =\n String[] data = entry.split(\"=\");\n\n // Check that there is sufficient data in the data array\n if (data.length != 2) {\n continue;\n }\n\n // decode the data\n String key = URLUtils.decode(data[0]);\n String value = URLUtils.decode(data[1]);\n\n // Add it to the store\n store.put(key, value);\n }\n\n return store;\n }",
"public RequestLine parseRequestLine(CharArrayBuffer buffer, ParserCursor cursor) throws ParseException {\n/* 280 */ Args.notNull(buffer, \"Char array buffer\");\n/* 281 */ Args.notNull(cursor, \"Parser cursor\");\n/* 282 */ int indexFrom = cursor.getPos();\n/* 283 */ int indexTo = cursor.getUpperBound();\n/* */ \n/* */ try {\n/* 286 */ skipWhitespace(buffer, cursor);\n/* 287 */ int i = cursor.getPos();\n/* */ \n/* 289 */ int blank = buffer.indexOf(32, i, indexTo);\n/* 290 */ if (blank < 0) {\n/* 291 */ throw new ParseException(\"Invalid request line: \" + buffer.substring(indexFrom, indexTo));\n/* */ }\n/* */ \n/* 294 */ String method = buffer.substringTrimmed(i, blank);\n/* 295 */ cursor.updatePos(blank);\n/* */ \n/* 297 */ skipWhitespace(buffer, cursor);\n/* 298 */ i = cursor.getPos();\n/* */ \n/* 300 */ blank = buffer.indexOf(32, i, indexTo);\n/* 301 */ if (blank < 0) {\n/* 302 */ throw new ParseException(\"Invalid request line: \" + buffer.substring(indexFrom, indexTo));\n/* */ }\n/* */ \n/* 305 */ String uri = buffer.substringTrimmed(i, blank);\n/* 306 */ cursor.updatePos(blank);\n/* */ \n/* 308 */ ProtocolVersion ver = parseProtocolVersion(buffer, cursor);\n/* */ \n/* 310 */ skipWhitespace(buffer, cursor);\n/* 311 */ if (!cursor.atEnd()) {\n/* 312 */ throw new ParseException(\"Invalid request line: \" + buffer.substring(indexFrom, indexTo));\n/* */ }\n/* */ \n/* */ \n/* 316 */ return createRequestLine(method, uri, ver);\n/* 317 */ } catch (IndexOutOfBoundsException e) {\n/* 318 */ throw new ParseException(\"Invalid request line: \" + buffer.substring(indexFrom, indexTo));\n/* */ } \n/* */ }",
"private int[] createGETrequest(String Request_URI) {\n String requestLine = Utils.textToHexString(\"GET\") + \"20\" + Utils.textToHexString(Request_URI)\n + \"20\" + Utils.textToHexString(\"HTTP/1.1\") + \"0d0a\";\n return Utils.stringToHexArr(requestLine);\n }",
"public void handleRequest(ExtractionRequest request);",
"private static String getHTTPResponse(URL url){\n\t\t\n\t\tStringBuilder response = new StringBuilder();\n\t\t\n\t\ttry{\n\t\t\tURLConnection connection = url.openConnection();\n\t\t\tBufferedReader res = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t\tString responseLine;\n\t\t\t\n\t\t\twhile((responseLine = res.readLine()) != null)\n\t\t\t\tresponse.append(responseLine);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t\treturn response.toString();\n\t}",
"WebClientServiceRequest serviceRequest();",
"public void run()\n {\n try\n { \n // here we process input from the Browser\n BufferedReader br = new BufferedReader(new InputStreamReader(this.is));\n \n String cmd_line = null;\n \n String request_type = null;\n String request_path = null;\n String path_token = null;\n Hashtable<String, String> headers = new Hashtable<String, String>();\n Hashtable<String, String> formContent = new Hashtable<String, String>();\n Hashtable<String, String> urlGetParameters = new Hashtable<String, String>();\n Hashtable<String, String> cookies = new Hashtable<String, String>();\n String raw_form_data = \"\";\n String get_params = \"\";\n \n try\n {\n // Recieve GET/POST line and process\n cmd_line = br.readLine();\n this.myServer.logln(this.clientHostname, \"-> \" + cmd_line);\n StringTokenizer request = new StringTokenizer(cmd_line);\n \n while (request.hasMoreTokens())\n {\n String currentToken = request.nextToken();\n if (\"GET\".equals(currentToken) && request.hasMoreTokens())\n {\n path_token = URLDecoder.decode(request.nextToken(),\"UTF-8\");\n request_type = \"GET\";\n }\n if (\"POST\".equals(currentToken) && request.hasMoreTokens())\n {\n path_token = URLDecoder.decode(request.nextToken(),\"UTF-8\");\n request_type = \"POST\";\n }\n }\n \n // handle get parameters\n int qidx = path_token.indexOf(\"?\");\n if (qidx > -1)\n {\n request_path = path_token.substring(0,qidx);\n get_params = path_token.substring(qidx+1);\n StringTokenizer get_data = new StringTokenizer(get_params, \"&\");\n while (get_data.hasMoreTokens())\n {\n String currentToken = get_data.nextToken();\n if (currentToken.indexOf(\"=\") > -1 && !currentToken.endsWith(\"=\"))\n {\n StringTokenizer get_entry = new StringTokenizer(currentToken, \"=\");\n String g_key = get_entry.nextToken();\n String g_value = get_entry.nextToken();\n urlGetParameters.put(g_key, g_value);\n \n this.myServer.logln(this.clientHostname, \"-> (GETPARAMETER) {\" + g_key + \"} \" + g_value);\n }\n }\n } else {\n request_path = path_token;\n }\n \n while (!\"\".equals(cmd_line))\n {\n cmd_line = br.readLine();\n //this.myServer.logln(this.clientHostname, \"-> \" + cmd_line);\n if (!\"\".equals(cmd_line))\n {\n StringTokenizer header_parts = new StringTokenizer(cmd_line, \":\");\n // lets store the request headers just incase \n String h_key = header_parts.nextToken();\n String h_value = header_parts.nextToken().trim();;\n headers.put(h_key, h_value);\n this.myServer.logln(this.clientHostname, \"-> (HEADER) {\" + h_key + \"} \" + h_value);\n }\n }\n \n // Is there a cookie?\n String cookie = headers.get(\"Cookie\");\n if (cookie != null)\n {\n StringTokenizer cookie_data = new StringTokenizer(cookie, \";\");\n while (cookie_data.hasMoreTokens())\n {\n StringTokenizer this_cookie = new StringTokenizer(cookie_data.nextToken().trim(), \"=\");\n String c_key = this_cookie.nextToken();\n String c_value = this_cookie.nextToken();\n if (!cookies.containsKey(c_key))\n {\n cookies.put(c_key, c_value);\n this.myServer.logln(this.clientHostname, \"-> (COOKIE) {\" + c_key + \"} \" + c_value);\n } else {\n cookies.put(c_key, c_value);\n this.myServer.logln(this.clientHostname, \"<> (COOKIE) {\" + c_key + \"} *OVERWRITE* \" + c_value);\n }\n }\n this.myServer.logln(this.clientHostname, \"-> (END OF COOKIES)\");\n }\n \n // what do we if there was a post!\n if (request_type.equals(\"POST\"))\n {\n int content_length = Integer.valueOf(headers.get(\"Content-Length\")).intValue();\n this.myServer.logln(this.clientHostname, \"*** POST DATA\");\n int bytein = -2;\n int byteCount = 0;\n StringBuffer form_raw = new StringBuffer(\"\");\n while (bytein != -1 && byteCount < content_length)\n {\n bytein = br.read();\n byteCount++;\n if (bytein > -1) form_raw.append((char) bytein);\n }\n raw_form_data = form_raw.toString();\n if (this.myServer.isShowData())\n {\n this.myServer.getDebugStream().println(\"--------------Inbound Data-------------\");\n this.myServer.getDebugStream().println(raw_form_data); \n this.myServer.getDebugStream().println(\"---------------------------------------\");\n }\n \n }\n \n // what do we do if it was a form post?\n if (\"application/x-www-form-urlencoded\".equals(headers.get(\"Content-Type\")))\n {\n this.myServer.logln(this.clientHostname, \"*** application/x-www-form-urlencoded\");\n StringTokenizer form_data = new StringTokenizer(raw_form_data, \"&\");\n while (form_data.hasMoreTokens())\n {\n String currentToken = form_data.nextToken();\n if (currentToken.indexOf(\"=\") > -1)\n {\n StringTokenizer form_entry = new StringTokenizer(currentToken, \"=\");\n String f_key = form_entry.nextToken();\n String f_value = URLDecoder.decode(form_entry.nextToken(),\"UTF-8\");\n formContent.put(f_key, f_value);\n this.myServer.logln(this.clientHostname, \"-> (FORMDATA) {\" + f_key + \"} \" + f_value);\n }\n }\n }\n } catch (Exception rex) {\n this.myServer.logln(\"Placebo\", \"Exception: \" + rex.toString() + \" / \" + rex.getMessage());\n }\n \n if (request_type != null)\n {\n HttpRequest req_obj = new HttpRequest(request_path, request_type, headers, cookies, formContent, raw_form_data, urlGetParameters, get_params, this.connection, this.myServer);\n this.myServer.routeRequest(req_obj);\n }\n } catch (Exception x) {}\n }",
"public void processRequest(PSRequest request)\n {\n Document doc = request.getInputDocument();\n Element root = null;\n if ( (doc == null) ||\n ((root = doc.getDocumentElement()) == null) )\n {\n Object[] args = { ms_RequestCategory, ms_RequestType, ms_RequestDTD };\n createErrorResponse(\n request, new PSIllegalArgumentException(\n IPSCatalogErrors.REQ_DOC_MISSING, args));\n return;\n }\n\n // verify this is the appropriate request type\n if (!ms_RequestDTD.equals(root.getTagName()))\n {\n Object[] args = { ms_RequestDTD, root.getTagName() };\n createErrorResponse(\n request, new PSIllegalArgumentException(\n IPSCatalogErrors.REQ_DOC_INVALID_TYPE, args));\n return;\n }\n\n Document retDoc = PSXmlDocumentBuilder.createXmlDocument();\n root = PSXmlDocumentBuilder.createRoot(retDoc, (ms_RequestDTD + \"Results\"));\n \n /* some day, convert this to use JDK 1.2 package info instead of\n * hardcoded classes\n */\n com.percussion.security.IPSSecurityProviderMetaData meta;\n\n int providerType = PSSecurityProvider.SP_TYPE_BETABLE;\n if ( PSSecurityProvider.isSupportedType( providerType ))\n {\n meta = new com.percussion.security.PSBackEndTableProviderMetaData();\n addProviderDefinition(\n doc, root, meta.getName(), providerType, meta.getFullName(),\n meta.getDescription(), meta.getConnectionProperties());\n }\n\n providerType = PSSecurityProvider.SP_TYPE_DIRCONN;\n if ( PSSecurityProvider.isSupportedType( providerType ))\n {\n meta = new com.percussion.security.PSDirectoryConnProviderMetaData();\n addProviderDefinition(\n doc, root, meta.getName(), providerType, meta.getFullName(),\n meta.getDescription(), meta.getConnectionProperties());\n }\n\n providerType = PSSecurityProvider.SP_TYPE_WEB_SERVER;\n if ( PSSecurityProvider.isSupportedType( providerType ))\n {\n meta = new com.percussion.security.PSWebServerProviderMetaData();\n addProviderDefinition(\n doc, root, meta.getName(), providerType, meta.getFullName(),\n meta.getDescription(), meta.getConnectionProperties());\n }\n\n providerType = PSSecurityProvider.SP_TYPE_RXINTERNAL;\n if(PSSecurityProvider.isSupportedType( providerType ))\n {\n meta = new com.percussion.security.PSWebServerProviderMetaData();\n addProviderDefinition(\n doc, root, PSSecurityProvider.XML_FLAG_SP_INTERNAL, providerType,\n ms_provFullName, ms_rxInternalDesc, null);\n } \n\n // and send the result to the caller\n sendXmlData(request, retDoc);\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n String url = request.getParameter(\"url\");\n URL u = new URL(url);\n URLConnection urlConnection = u.openConnection();\n BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); //send request\n String inputLine;\n StringBuffer html = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n html.append(inputLine);\n }\n in.close();\n out.print(html.toString());\n }catch(Exception e) {\n e.printStackTrace();\n out.print(e);\n }\n }",
"protected String getRequestData(HttpServletRequest request) {\n\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\ttry {\n\t\t\tBufferedReader reader = request.getReader();\n\t\t\tString currentLine = \"\";\n\t\t\twhile ((currentLine = reader.readLine()) != null) {\n\n\t\t\t\tstringBuilder.append(currentLine);\n\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn stringBuilder.toString();\n\n\t}",
"void handleRequest();",
"private static void responseHandler(StringBuilder sb)\n\t{\n\t\tString s = sb.toString();\t\t\n\t\tString[] lines = s.split(\"\\n\");\t\t\n\t\tString firstLine = \"\";\n\t\t\n\t\t// Only search through the first five lines. If it isn't \n\t\t// in the first five lines it probably isn't there.\n\t\tfor(int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif(lines[i].contains(\"HTTP/1\"))\n\t\t\t{\n\t\t\t\tfirstLine = lines[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Error and quit if it is still empty.\n\t\tif(firstLine.equals(\"\"))\n\t\t{\n\t\t\terrorQuit(\"Whoops something went wrong.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(firstLine.contains(\"200\"))\n\t\t\t{\n\t\t\t\tSystem.out.print(s);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(firstLine);\n\t\t\t}\n\t\t}\n\t}",
"private HttpURLConnection getURLobject (String uri, String xmlMsg, URL url) throws Exception\n {\n URLConnection urlcon = url.openConnection();\n HttpURLConnection conn = (HttpURLConnection) urlcon;\n // ******** Filling of Default Request Header Properties ************\n conn.setUseCaches( false );\n HttpURLConnection.setFollowRedirects( false );\n if (xmlMsg != null && xmlMsg.length() > 0)\n conn.setRequestMethod(\"POST\");\n conn.setDoInput (true);\n conn.setDoOutput(true);\n\n // String encoding = null;\n\n conn.setRequestProperty( \"Accept\", \"text/xml\");\n conn.setRequestProperty( \"Content-type\", \"xml/txt\");\n conn.setRequestProperty( \"Accept-Charset\", \"iso-8859-1,*,utf-8\");\n conn.setRequestProperty( \"User-Agent\", \"CIDS Client/4.0\");\n conn.setRequestProperty( \"Pragma\", \"no-cache\");\n String xmlStr = \"XMLHttpRequest\";\n String contentTypeStr = \"application/x-www-form-urlencoded\";\n conn.setRequestProperty(\"X-Requested-With\", xmlStr);\n conn.setRequestProperty(\"Content-Type\", contentTypeStr);\n if (verbose) {\n // TODO: just get the data from conn \n System.out.println(\"Header request lines\");\n System.out.println(\" key [Accept]\");\n System.out.println(\" value [text/xml]\");\n System.out.println(\" key [Content-type]\");\n System.out.println(\" value [xml/txt]\");\n System.out.println(\" key [Accept-Charset]\");\n System.out.println(\" value [iso-8859-1,*,utf-8]\");\n System.out.println(\" key [User-Agent]\");\n System.out.println(\" value [CIDS Client/4.0]\");\n System.out.println(\" key [Pragma]\");\n System.out.println(\" value [no-cache]\");\n System.out.println(\" key[X-Requested-With]\");\n System.out.println(\" value[\"+xmlStr+\"]\");\n System.out.println(\" key[Content-Type]\");\n System.out.println(\" value[\"+contentTypeStr+\"]\");\n }\n\n return conn;\n }",
"protected void parseURL(URL paramURL, String paramString, int paramInt1, int paramInt2) {\n/* 126 */ String str1 = paramURL.getProtocol();\n/* 127 */ String str2 = paramURL.getAuthority();\n/* 128 */ String str3 = paramURL.getUserInfo();\n/* 129 */ String str4 = paramURL.getHost();\n/* 130 */ int i = paramURL.getPort();\n/* 131 */ String str5 = paramURL.getPath();\n/* 132 */ String str6 = paramURL.getQuery();\n/* */ \n/* */ \n/* 135 */ String str7 = paramURL.getRef();\n/* */ \n/* 137 */ boolean bool1 = false;\n/* 138 */ boolean bool2 = false;\n/* */ \n/* */ \n/* */ \n/* 142 */ if (paramInt1 < paramInt2) {\n/* 143 */ int k = paramString.indexOf('?');\n/* 144 */ bool2 = (k == paramInt1) ? true : false;\n/* 145 */ if (k != -1 && k < paramInt2) {\n/* 146 */ str6 = paramString.substring(k + 1, paramInt2);\n/* 147 */ if (paramInt2 > k)\n/* 148 */ paramInt2 = k; \n/* 149 */ paramString = paramString.substring(0, k);\n/* */ } \n/* */ } \n/* */ \n/* 153 */ int j = 0;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 159 */ boolean bool3 = (paramInt1 <= paramInt2 - 4 && paramString.charAt(paramInt1) == '/' && paramString.charAt(paramInt1 + 1) == '/' && paramString.charAt(paramInt1 + 2) == '/' && paramString.charAt(paramInt1 + 3) == '/') ? true : false;\n/* 160 */ if (!bool3 && paramInt1 <= paramInt2 - 2 && paramString.charAt(paramInt1) == '/' && paramString\n/* 161 */ .charAt(paramInt1 + 1) == '/') {\n/* 162 */ paramInt1 += 2;\n/* 163 */ j = paramString.indexOf('/', paramInt1);\n/* 164 */ if (j < 0 || j > paramInt2) {\n/* 165 */ j = paramString.indexOf('?', paramInt1);\n/* 166 */ if (j < 0 || j > paramInt2) {\n/* 167 */ j = paramInt2;\n/* */ }\n/* */ } \n/* 170 */ str4 = str2 = paramString.substring(paramInt1, j);\n/* */ \n/* 172 */ int k = str2.indexOf('@');\n/* 173 */ if (k != -1) {\n/* 174 */ if (k != str2.lastIndexOf('@')) {\n/* */ \n/* 176 */ str3 = null;\n/* 177 */ str4 = null;\n/* */ } else {\n/* 179 */ str3 = str2.substring(0, k);\n/* 180 */ str4 = str2.substring(k + 1);\n/* */ } \n/* */ } else {\n/* 183 */ str3 = null;\n/* */ } \n/* 185 */ if (str4 != null) {\n/* */ \n/* */ \n/* 188 */ if (str4.length() > 0 && str4.charAt(0) == '[') {\n/* 189 */ if ((k = str4.indexOf(']')) > 2) {\n/* */ \n/* 191 */ String str = str4;\n/* 192 */ str4 = str.substring(0, k + 1);\n/* */ \n/* 194 */ if (!IPAddressUtil.isIPv6LiteralAddress(str4.substring(1, k))) {\n/* 195 */ throw new IllegalArgumentException(\"Invalid host: \" + str4);\n/* */ }\n/* */ \n/* */ \n/* 199 */ i = -1;\n/* 200 */ if (str.length() > k + 1) {\n/* 201 */ if (str.charAt(k + 1) == ':') {\n/* 202 */ k++;\n/* */ \n/* 204 */ if (str.length() > k + 1) {\n/* 205 */ i = Integer.parseInt(str.substring(k + 1));\n/* */ }\n/* */ } else {\n/* 208 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ }\n/* */ } else {\n/* */ \n/* 213 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ } else {\n/* */ \n/* 217 */ k = str4.indexOf(':');\n/* 218 */ i = -1;\n/* 219 */ if (k >= 0) {\n/* */ \n/* 221 */ if (str4.length() > k + 1) {\n/* 222 */ i = Integer.parseInt(str4.substring(k + 1));\n/* */ }\n/* 224 */ str4 = str4.substring(0, k);\n/* */ } \n/* */ } \n/* */ } else {\n/* 228 */ str4 = \"\";\n/* */ } \n/* 230 */ if (i < -1) {\n/* 231 */ throw new IllegalArgumentException(\"Invalid port number :\" + i);\n/* */ }\n/* 233 */ paramInt1 = j;\n/* */ \n/* */ \n/* 236 */ if (str2 != null && str2.length() > 0) {\n/* 237 */ str5 = \"\";\n/* */ }\n/* */ } \n/* 240 */ if (str4 == null) {\n/* 241 */ str4 = \"\";\n/* */ }\n/* */ \n/* */ \n/* 245 */ if (paramInt1 < paramInt2) {\n/* 246 */ if (paramString.charAt(paramInt1) == '/') {\n/* 247 */ str5 = paramString.substring(paramInt1, paramInt2);\n/* 248 */ } else if (str5 != null && str5.length() > 0) {\n/* 249 */ bool1 = true;\n/* 250 */ int k = str5.lastIndexOf('/');\n/* 251 */ String str = \"\";\n/* 252 */ if (k == -1 && str2 != null) {\n/* 253 */ str = \"/\";\n/* */ }\n/* 255 */ str5 = str5.substring(0, k + 1) + str + paramString.substring(paramInt1, paramInt2);\n/* */ } else {\n/* */ \n/* 258 */ String str = (str2 != null) ? \"/\" : \"\";\n/* 259 */ str5 = str + paramString.substring(paramInt1, paramInt2);\n/* */ } \n/* 261 */ } else if (bool2 && str5 != null) {\n/* 262 */ int k = str5.lastIndexOf('/');\n/* 263 */ if (k < 0)\n/* 264 */ k = 0; \n/* 265 */ str5 = str5.substring(0, k) + \"/\";\n/* */ } \n/* 267 */ if (str5 == null) {\n/* 268 */ str5 = \"\";\n/* */ }\n/* 270 */ if (bool1) {\n/* */ \n/* 272 */ while ((j = str5.indexOf(\"/./\")) >= 0) {\n/* 273 */ str5 = str5.substring(0, j) + str5.substring(j + 2);\n/* */ }\n/* */ \n/* 276 */ j = 0;\n/* 277 */ while ((j = str5.indexOf(\"/../\", j)) >= 0) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 284 */ if (j > 0 && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0 && str5\n/* 285 */ .indexOf(\"/../\", paramInt2) != 0) {\n/* 286 */ str5 = str5.substring(0, paramInt2) + str5.substring(j + 3);\n/* 287 */ j = 0; continue;\n/* */ } \n/* 289 */ j += 3;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 294 */ j = str5.indexOf(\"/..\");\n/* 295 */ while (str5.endsWith(\"/..\") && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0) {\n/* 296 */ str5 = str5.substring(0, paramInt2 + 1);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 302 */ if (str5.startsWith(\"./\") && str5.length() > 2) {\n/* 303 */ str5 = str5.substring(2);\n/* */ }\n/* */ \n/* 306 */ if (str5.endsWith(\"/.\")) {\n/* 307 */ str5 = str5.substring(0, str5.length() - 1);\n/* */ }\n/* */ } \n/* 310 */ setURL(paramURL, str1, str4, i, str2, str3, str5, str6, str7);\n/* */ }",
"private static String parseResponse(HttpResponse response) throws Exception {\r\n \t\tString result = null;\r\n \t\tBufferedReader reader = null;\r\n \t\ttry {\r\n \t\t\tHeader contentEncoding = response\r\n \t\t\t\t\t.getFirstHeader(\"Content-Encoding\");\r\n \t\t\tif (contentEncoding != null\r\n \t\t\t\t\t&& contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(\r\n \t\t\t\t\t\tnew GZIPInputStream(response.getEntity().getContent())));\r\n \t\t\t} else {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(response\r\n \t\t\t\t\t\t.getEntity().getContent()));\r\n \t\t\t}\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tString line = null;\r\n \r\n \t\t\twhile ((line = reader.readLine()) != null) {\r\n \t\t\t\tsb.append(line + \"\\n\");\r\n \t\t\t}\r\n \t\t\tresult = sb.toString();\r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\treader.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn result;\r\n \t}",
"private String getURL(String feedUrl) {\n\tStringBuilder sb = null;\n\ttry {\n for(int i = 3; i>0; i--) {\n\t sb = new StringBuilder();\n URL url = new URL(feedUrl);\n//User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\n//Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n//Accept-Language: en-us,en;q=0.5\n//Accept-Encoding: gzip,deflate\n//Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\n//Keep-Alive: 115\n//Connection: keep-alive\n//\tHttpsURLConnection uc = (HttpsURLConnection) url.openConnection();\n\tHttpURLConnection uc = (HttpURLConnection) url.openConnection();\n\tuc.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\");\n//Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n\tuc.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n\tuc.setRequestProperty(\"Accept-Language\", \"en-us,en;q=0.5\");\n\tuc.setRequestProperty(\"Accept-Encoding\", \"gzip,deflate\");\n\tuc.setRequestProperty(\"Accept-Charset\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\");\n\tuc.setRequestProperty(\"Keep-Alive\", \"115\");\n\tuc.setRequestProperty(\"Connection\", \"keep-alive\");\n//Keep-Alive: 115\n//Connection: keep-alive\n//\tif (userName != null && password != null) {\n//\t\tuc.setRequestProperty(\"Authorization\", \"Basic \" + encodedAuthenticationString);\n//\t}\n\t// ori setting??\n//\tuc.setReadTimeout(TIME_OUT);\n//\tuc.setFollowRedirects(true);\n//\tuc.setInstanceFollowRedirects(true);\n//\tuc.setAllowUserInteraction(true);\n\tuc.setDoOutput(true);\n\tuc.setDoInput(true);\n\tuc.setUseCaches(false);\n\tuc.setRequestMethod(\"POST\");\n\tuc.setRequestProperty(\"Content-Type\", \"text/xml\");\n\t\n\tBufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));//uc.getInputStream()\n\tString inputLine;\n//\t'aa7c.com')\" onmouseout=\"menuLayers.hide()\">Available</a>\n\tboolean refreshAgain = false;\n\twhile ((inputLine = in.readLine()) != null) {\n//\t\tSystem.out.println(inputLine);\n\t\tsb.append(inputLine);\n\t\tif( inputLine.contains(\"Refresh\") ) {\n\t\t\trefreshAgain = true;\n\t\t\tSystem.out.println(\"Refresh\");\n\t\t}\n\t}\n\tin.close();\n\tuc.disconnect();\t\t\n//\tRefresh\n\tif( refreshAgain ) {\n\t Thread.sleep(1000);\n\t}\n\telse break;\n }\n }catch(Exception ee){}\nreturn sb.toString();\n}",
"public void processRequest(String request) {\r\n // Request for closing connection\r\n if (request.equals(\"CLOSE\")) {\r\n isOpen = false;\r\n\r\n // Request for getting all of the text on the Server's text areas\r\n } else if (request.equals(\"GET ALL TEXT\")) {\r\n String [] array = FileIOFunctions.getAllTexts();\r\n\r\n sendMessage(\"GET ALL TEXT\");\r\n sendMessage(array[0]);\r\n sendMessage(array[1]);\r\n } else {}\r\n }",
"protected static HashMap<String, String> multipartRequestToHashMap(Request req)\r\n {\n HashMap<String, String> params = new HashMap<>();\r\n try {\r\n for (Part part : req.raw().getParts()) {\r\n InputStream input = part.getInputStream();\r\n Scanner s = new Scanner(input, \"ISO-8859-1\").useDelimiter(\"\\\\A\");\r\n if (s.hasNext()) {\r\n params.put(part.getName(), s.next());\r\n }\r\n input.close();\r\n }\r\n }\r\n catch (Exception e) {return params;}\r\n return params;\r\n }",
"private WebResponse() {\n initFields();\n }",
"public String getRequestInXML() throws Exception;",
"public static Request parse(javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n Request object = new Request();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"Request\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (Request) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"CardNo\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"CardNo\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"CardNo\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setCardNo(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"PatientName\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"PatientName\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"PatientName\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setPatientName(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Sex\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Sex\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Sex\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setSex(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Birthday\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Birthday\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Birthday\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setBirthday(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Age\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Age\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Age\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setAge(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"IDCardNo\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"IDCardNo\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"IDCardNo\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setIDCardNo(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"SecrityNo\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"SecrityNo\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"SecrityNo\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setSecrityNo(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"CardSerNo\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"CardSerNo\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"CardSerNo\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setCardSerNo(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Blh\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Blh\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Blh\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setBlh(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Amt\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Amt\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Amt\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setAmt(org.apache.axis2.databinding.utils.ConverterUtil.convertToDecimal(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n // 1 - A start element we are not expecting indicates an invalid parameter was passed\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"CardMoney\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"CardMoney\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"CardMoney\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setCardMoney(org.apache.axis2.databinding.utils.ConverterUtil.convertToDecimal(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n // 1 - A start element we are not expecting indicates an invalid parameter was passed\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Address\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Address\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Address\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setAddress(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Tel\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Tel\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Tel\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setTel(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"UserId\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"UserId\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"UserId\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setUserId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"ActDate\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"ActDate\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"ActDate\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setActDate(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"ActTime\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"ActTime\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"ActTime\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setActTime(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Notes\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Notes\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Notes\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setNotes(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Vid\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Vid\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Vid\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setVid(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Password\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Password\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Password\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setPassword(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Delb\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Delb\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Delb\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setDelb(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"BGKSMC\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"BGKSMC\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"BGKSMC\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setBGKSMC(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"zjhm\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"zjhm\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"zjhm\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setZjhm(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"zjlx\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"zjlx\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"zjlx\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setZjlx(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Dm\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Dm\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Dm\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setDm(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"PatSum\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"PatSum\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"PatSum\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setPatSum(org.apache.axis2.databinding.utils.ConverterUtil.convertToDecimal(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n // 1 - A start element we are not expecting indicates an invalid parameter was passed\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"OperTime\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"OperTime\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"OperTime\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setOperTime(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"StartDay\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"StartDay\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"StartDay\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setStartDay(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"EndDay\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"EndDay\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"EndDay\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setEndDay(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"BankNo\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"BankNo\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"BankNo\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setBankNo(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Bankaccount\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Bankaccount\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Bankaccount\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setBankaccount(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Tranlist\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Tranlist\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Tranlist\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setTranlist(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Transocode\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Transocode\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Transocode\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setTransocode(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"dylb\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"dylb\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"dylb\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setDylb(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"zxdhm\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"zxdhm\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"zxdhm\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setZxdhm(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"xmlx\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"xmlx\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"xmlx\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setXmlx(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"dyf\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"dyf\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"dyf\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setDyf(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"dysj\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"dysj\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"dysj\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setDysj(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Mu_ddh\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Mu_ddh\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Mu_ddh\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setMu_ddh(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Mu_zhh\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Mu_zhh\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Mu_zhh\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setMu_zhh(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"Mu_ddly\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"Mu_ddly\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"Mu_ddly\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setMu_ddly(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"DYPT\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"DYPT\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"DYPT\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setDYPT(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"operator_lx\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"operator_lx\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"operator_lx\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setOperator_lx(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"sfqm\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"sfqm\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"sfqm\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setSfqm(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"ks\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"ks\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"ks\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setKs(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"bed\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"bed\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"bed\" + \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setBed(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }",
"private static String getResponseContent(RequestURL request)\n\t\t\tthrows GPlaceServiceException {\n\t\tStringBuilder response = new StringBuilder();\n\t\tHttpURLConnection conn = null;\n\n\t\ttry {\n\t\t\tURL url = new URL(request.toString());\n\t\t\tconn = (HttpURLConnection) url.openConnection();\n\t\t\tInputStreamReader in = new InputStreamReader(conn.getInputStream());\n\t\t\tint read;\n\t\t\tchar[] buff = new char[1024];\n\t\t\twhile ((read = in.read(buff)) != -1) {\n\t\t\t\tresponse.append(buff, 0, read);\n\t\t\t}\n\t\t\treturn response.toString();\n\t\t} catch (MalformedURLException e) {\n\t\t\tthrow new GPlaceServiceException(\n\t\t\t\t\t\"Could not request PlacesAPI because the URL is malformed\",\n\t\t\t\t\te);\n\t\t} catch (IOException e) {\n\t\t\tthrow new GPlaceServiceException(\n\t\t\t\t\t\"Could not request PlacesAPI because there happened an error during data transmission\");\n\t\t} finally {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.disconnect();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public T parseResponse(Request<T> request, NetworkResponse response) throws Exception {\n if(!SomePreferences.confirmLogin()){\n SomePreferences.clearAuthentication();\n throw new SessionError(\"Not Logged In\");\n }\n Document document = parseDocument(response);\n if(document.body().hasClass(\"database_error\")){\n throw new SomeError(\"SA Database Unavailable, try again later.\");\n }\n if(document.getElementsByClass(\"notregistered\").size() > 0){\n //Not logged in.\n SomePreferences.clearAuthentication();\n throw new SessionError(\"Not Logged In\");\n }\n Element stdErr = document.getElementsByClass(\"standarderror\").first();\n if(stdErr != null){\n //Generic SA error messages\n throw new SomeError(stdErr.getElementsByClass(\"standard\").first().getElementsByClass(\"inner\").first().ownText());\n }\n return parseHtmlResponse(request, response, document);\n }",
"public okhttp3.Request followUpRequest() {\n /*\n r5 = this;\n r1 = 0;\n r0 = r5.userResponse;\n if (r0 != 0) goto L_0x000b;\n L_0x0005:\n r0 = new java.lang.IllegalStateException;\n r0.<init>();\n throw r0;\n L_0x000b:\n r0 = r5.streamAllocation;\n r0 = r0.connection();\n if (r0 == 0) goto L_0x0027;\n L_0x0013:\n r0 = r0.route();\n L_0x0017:\n r2 = r5.userResponse;\n r2 = r2.code();\n r3 = r5.userRequest;\n r3 = r3.method();\n switch(r2) {\n case 300: goto L_0x0063;\n case 301: goto L_0x0063;\n case 302: goto L_0x0063;\n case 303: goto L_0x0063;\n case 307: goto L_0x0053;\n case 308: goto L_0x0053;\n case 401: goto L_0x0046;\n case 407: goto L_0x0029;\n case 408: goto L_0x00dc;\n default: goto L_0x0026;\n };\n L_0x0026:\n return r1;\n L_0x0027:\n r0 = r1;\n goto L_0x0017;\n L_0x0029:\n if (r0 == 0) goto L_0x003f;\n L_0x002b:\n r1 = r0.proxy();\n L_0x002f:\n r1 = r1.type();\n r2 = java.net.Proxy.Type.HTTP;\n if (r1 == r2) goto L_0x0046;\n L_0x0037:\n r0 = new java.net.ProtocolException;\n r1 = \"Received HTTP_PROXY_AUTH (407) code while not using proxy\";\n r0.<init>(r1);\n throw r0;\n L_0x003f:\n r1 = r5.client;\n r1 = r1.proxy();\n goto L_0x002f;\n L_0x0046:\n r1 = r5.client;\n r1 = r1.authenticator();\n r2 = r5.userResponse;\n r1 = r1.authenticate(r0, r2);\n goto L_0x0026;\n L_0x0053:\n r0 = \"GET\";\n r0 = r3.equals(r0);\n if (r0 != 0) goto L_0x0063;\n L_0x005b:\n r0 = \"HEAD\";\n r0 = r3.equals(r0);\n if (r0 == 0) goto L_0x0026;\n L_0x0063:\n r0 = r5.client;\n r0 = r0.followRedirects();\n if (r0 == 0) goto L_0x0026;\n L_0x006b:\n r0 = r5.userResponse;\n r2 = \"Location\";\n r0 = r0.header(r2);\n if (r0 == 0) goto L_0x0026;\n L_0x0075:\n r2 = r5.userRequest;\n r2 = r2.url();\n r0 = r2.resolve(r0);\n if (r0 == 0) goto L_0x0026;\n L_0x0081:\n r2 = r0.scheme();\n r4 = r5.userRequest;\n r4 = r4.url();\n r4 = r4.scheme();\n r2 = r2.equals(r4);\n if (r2 != 0) goto L_0x009d;\n L_0x0095:\n r2 = r5.client;\n r2 = r2.followSslRedirects();\n if (r2 == 0) goto L_0x0026;\n L_0x009d:\n r2 = r5.userRequest;\n r2 = r2.newBuilder();\n r4 = okhttp3.internal.http.HttpMethod.permitsRequestBody(r3);\n if (r4 == 0) goto L_0x00c3;\n L_0x00a9:\n r4 = okhttp3.internal.http.HttpMethod.redirectsToGet(r3);\n if (r4 == 0) goto L_0x00d8;\n L_0x00af:\n r3 = \"GET\";\n r2.method(r3, r1);\n L_0x00b4:\n r1 = \"Transfer-Encoding\";\n r2.removeHeader(r1);\n r1 = \"Content-Length\";\n r2.removeHeader(r1);\n r1 = \"Content-Type\";\n r2.removeHeader(r1);\n L_0x00c3:\n r1 = r5.sameConnection(r0);\n if (r1 != 0) goto L_0x00ce;\n L_0x00c9:\n r1 = \"Authorization\";\n r2.removeHeader(r1);\n L_0x00ce:\n r0 = r2.url(r0);\n r1 = r0.build();\n goto L_0x0026;\n L_0x00d8:\n r2.method(r3, r1);\n goto L_0x00b4;\n L_0x00dc:\n r0 = r5.requestBodyOut;\n if (r0 == 0) goto L_0x00e6;\n L_0x00e0:\n r0 = r5.requestBodyOut;\n r0 = r0 instanceof okhttp3.internal.http.RetryableSink;\n if (r0 == 0) goto L_0x00f1;\n L_0x00e6:\n r0 = 1;\n L_0x00e7:\n r2 = r5.callerWritesRequestBody;\n if (r2 == 0) goto L_0x00ed;\n L_0x00eb:\n if (r0 == 0) goto L_0x0026;\n L_0x00ed:\n r1 = r5.userRequest;\n goto L_0x0026;\n L_0x00f1:\n r0 = 0;\n goto L_0x00e7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.http.HttpEngine.followUpRequest():okhttp3.Request\");\n }",
"@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }",
"protected com.android.volley.Response<T> parseNetworkResponse(com.android.volley.NetworkResponse r7) {\n /*\n r6 = this;\n r5 = 1;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"StatusCode=\";\n r0 = r0.append(r1);\n r1 = r7.statusCode;\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = \"infoss\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"code==\";\n r1 = r1.append(r2);\n r2 = r7.statusCode;\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r2 = \"\";\n r0 = r7.statusCode;\n r1 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n if (r0 != r1) goto L_0x013e;\n L_0x003b:\n r0 = org.greenrobot.eventbus.c.a();\n r1 = 3;\n r3 = 0;\n r1 = com.jd.fridge.bean.Event.newEvent(r1, r3);\n r0.c(r1);\n r1 = new java.lang.String;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r7.data;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = r7.headers;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = com.android.volley.toolbox.HttpHeaderParser.parseCharset(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r1.<init>(r0, r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n if (r0 == 0) goto L_0x005e;\n L_0x0059:\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.a(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x005e:\n r0 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = \"jsonStr===\";\n r0 = r0.append(r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.k.a(r0);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"jsonStr==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"gson==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r4 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r3.fromJson(r1, r4);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.fromJson(r1, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders(r7);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = com.android.volley.Response.success(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x00bc:\n return r0;\n L_0x00bd:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=1111111=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n L_0x00e6:\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n r0 = com.android.volley.Response.error(r0);\n goto L_0x00bc;\n L_0x00f0:\n r0 = move-exception;\n r1 = r2;\n L_0x00f2:\n r2 = r6.c;\n if (r2 == 0) goto L_0x00fb;\n L_0x00f6:\n r2 = r6.c;\n r2.a(r1);\n L_0x00fb:\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"JsonSyntaxException=222=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x0114:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=333=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x013e:\n r0 = \"infos\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"response fail: \";\n r1 = r1.append(r2);\n r2 = r7.data;\n r2 = r2.toString();\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"result=\";\n r0 = r0.append(r1);\n r1 = r7.data;\n r1 = r1.toString();\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = r6.f;\n r0.a(r5);\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n com.android.volley.Response.error(r0);\n goto L_0x00e6;\n L_0x0187:\n r0 = move-exception;\n goto L_0x00f2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.jd.fridge.util.a.d.parseNetworkResponse(com.android.volley.NetworkResponse):com.android.volley.Response<T>\");\n }",
"@Override\r\n\tpublic String parseResponses(String unfriendlyString) {\n\t\treturn null;\r\n\t}",
"public void processHTTP(Socket clientSocket, OutputStream out, BufferedReader in) throws InterruptedException, OneThreadLeftException{\n\t\ttry{\n\t\t\t// Create out and in objects to write and read to/from socket\n\t\t\tout = clientSocket.getOutputStream();\n\t\t\tin = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n\n\t\t\tString[] inputLine = new String[32]; // According to Wikipedia, there are 31 defined HTTP request lines\n\t\t\tString relPath, absPath;\n\t\t\tint i = 1;\n\t\t\tString[] toCheckLine = new String[10];\n\t\t\tDate toCompareMod = new Date();\n\t\t\tDate toCompareUnmod = new Date();\n\t\t\ttoCompareMod = null;\n\t\t\ttoCompareUnmod = null;\n\t\t\tboolean noHostHeader = true;\n\t\t\tint contentLen = 0;\n\n\t\t\t// If there is an input from the socket, then process it:\n\t\t\tif(!(inputLine[0] = in.readLine()).equals(null)) { \n\t\t\t\twhile(!(inputLine[i] = in.readLine()).equals(\"\")){\n\t\t\t\t\tSystem.out.println(inputLine[i]);\n\t\t\t\t\ttoCheckLine = inputLine[i].split(\" \");\n\t\t\t\t\tif((toCheckLine[0]).equals(\"If-Modified-Since:\")){\n\t\t\t\t\t\ttoCompareMod = processIfModifiedSince(toCheckLine);\n\t\t\t\t\t}\n\t\t\t\t\telse if((toCheckLine[0]).equals(\"If-Unmodified-Since:\")){\n\t\t\t\t\t\ttoCompareUnmod = processIfModifiedSince(toCheckLine);\n\t\t\t\t\t}\n\n\t\t\t\t\t// to handle Host: requirement for version 1.1\n\t\t\t\t\tif((toCheckLine[0]).equals(\"Host:\")){\n\t\t\t\t\t\tnoHostHeader = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// To get content-length for cleaner processing of POST request\n\t\t\t\t\tif((toCheckLine[0]).equals(\"Content-Length:\")){\n\t\t\t\t\t\tcontentLen = Integer.parseInt(toCheckLine[1].trim());\n\t\t\t\t\t}\n\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\t// Parse input line\n\t\t\t\tString[] splits = (inputLine[0]).split(\" \",3);\n\t\t\t\tThreadPool.registerURI(Thread.currentThread().getId(), splits[1]);\n\t\t\t\tString parentPath = splits[1]; \n\t\t\t\trelPath = splits[1].replaceAll(\"/\", \",\"); \n\t\t\t\tString[] relDirs = relPath.split(\",\",10);\n\t\t\t\tString fileName = relDirs[relDirs.length-1];\n\t\t\t\tabsPath = mRootDir+\"/\";\n\n\t\t\t\t// Check if the client has requested for a servlet to be run\n\t\t\t\tString requestType = splits[0];\n\n\t\t\t\t// In case of POST request\n\t\t\t\tString postBody = \"\";\n\t\t\t\t\n\t\t\t\tif(requestType.equals(\"POST\")){\n\t\t\t\t\tchar[] tempBuf = new char[contentLen];\n\t\t\t\t\tin.read(tempBuf,0,contentLen);\n\t\t\t\t\tpostBody = new String(tempBuf);\n\t\t\t\t\t//System.out.println(\"Postbody before: \"+postBody);\n\t\t\t\t\t//postBody = URLDecoder.decode(postBody, \"utf-8\");\n\t\t\t\t\t//System.out.println(\"Postbody after: \"+postBody);\n\n\t\t\t\t}\n\n\t\t\t\tif(requestType.equals(\"GET\") || requestType.equals(\"HEAD\") || requestType.equals(\"POST\")){\n\t\t\t\t\tString[] wrapperArgs = {mPathToXml, requestType, parentPath};\n\t\t\t\t\ttry{\n\t\t\t\t\t\tif(TestHarness.servletWrapper(wrapperArgs, inputLine, out, postBody, absPath) != 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check that request conforms to HTTP GET/HEAD request format before further processing\n\t\t\t\tif(splits[0].equals(\"GET\") || splits[0].equals(\"HEAD\")){\n\n\n\t\t\t\t\t/*\n\t\t\t\t\t// If HTTP/1.1, we want to check for Host header\n\t\t\t\t\t// This block verifies that, if it is version 1.1 then Host header must be there\n\t\t\t\t\tString[] version = splits[2].split(\"/\");\n\t\t\t\t\tif(version[1].trim().equals(\"1.1\")){\n\t\t\t\t\t\tif(noHostHeader == true){\n\t\t\t\t\t\t\tString source = \"<html><body><h2>No Host: header received</h2>HTTP 1.1 requests must include the Host: header.</body></html>\";\n\t\t\t\t\t\t\tout.write(\"HTTP/1.1 400 Bad Request\\r\\n\".getBytes(\"UTF-8\"));\n\t\t\t\t\t\t\tout.write(\"Content-Type: text/html\\r\\n\".getBytes(\"UTF-8\"));\n\t\t\t\t\t\t\tout.write((\"Content-Length: \"+source.length()+\"\\r\\n\").getBytes(\"UTF-8\"));\n\t\t\t\t\t\t\tout.write((\"Connection: close\\r\\n\\r\\n\").getBytes(\"UTF-8\"));\n\t\t\t\t\t\t\tout.write(source.getBytes(\"UTF-8\"));\n\t\t\t\t\t\t\tout.close();\n\t\t\t\t\t\t\tin.close();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t */\n\n\n\t\t\t\t\t// Check if the request is a GET request\n\t\t\t\t\tif(splits[0].equals(\"GET\")){\n\t\t\t\t\t\tprocessGET(absPath, relDirs, parentPath, splits, out, in, toCompareMod, toCompareUnmod);\n\t\t\t\t\t}\n\t\t\t\t\t// If not, check if the request is a HEAD request\n\t\t\t\t\telse if(splits[0].equals(\"HEAD\")){\n\t\t\t\t\t\tprocessHEAD(absPath, out, in, toCompareUnmod);\n\t\t\t\t\t}\n\t\t\t\t\t// If not GET or HEAD, the method is not implemented in this server\n\t\t\t\t\telse{\n\t\t\t\t\t\tout.write(\"HTTP/1.1 501 Not Implemented\\r\\n\\r\\n\".getBytes(\"UTF-8\"));\n\t\t\t\t\t\tout.write((\"Connection: close\\r\\n\\r\\n\").getBytes(\"UTF-8\"));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Clean up\n\t\t\t\t\tin.close();\n\t\t\t\t\tout.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.out.println(\"Thread ID: \"+ Thread.currentThread().getId());\n\t\t\tSystem.out.println(\"caught at buf in block, message: \"+e.getMessage());\n\t\t\treturn;\n\t\t}\n\t\tcatch(AllThreadsTerminatedException AllTe){\n\t\t\ttry{\n\t\t\t\tout.close();\n\t\t\t\tin.close();\n\t\t\t}\n\t\t\tcatch(IOException IOE){\n\n\t\t\t}\n\t\t\tthrow new OneThreadLeftException();\n\t\t}\n\n\t}",
"private synchronized void processHttpRequest\n\t\t(HttpRequest request,\n\t\t HttpResponse response)\n\t\tthrows IOException\n\t\t{\n\t\tlong now = System.currentTimeMillis();\n\n\t\t// Reject an invalid HTTP request.\n\t\tif (! request.isValid())\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_400_BAD_REQUEST);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"400 Bad Request\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Reject all methods except GET.\n\t\telse if (! request.getMethod().equals (HttpRequest.GET_METHOD))\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_501_NOT_IMPLEMENTED);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"501 Not Implemented\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Print the status document.\n\t\telse if (request.getUri().equals (\"/\") ||\n\t\t\t\t\trequest.getUri().equals (\"/?\"))\n\t\t\t{\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tprintStatusHtmlBody (out, now);\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Print the debug document.\n\t\telse if (request.getUri().equals (\"/debug\"))\n\t\t\t{\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintDebugHtmlStart (out, now);\n\t\t\tprintDebugHtmlBody (out);\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Reject all other URIs.\n\t\telse\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_404_NOT_FOUND);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"404 Not Found\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Send the response.\n\t\tresponse.close();\n\t\t}",
"GetResponse() {\n\t}",
"private void parseData() {\n\t\t\r\n\t}",
"private boolean readWebpage()\n {\n String lines = SimpleRequest.readContent(requestUrl);\n if (lines == null) return false;\n\n //\n // updateStreamStatistics ('rtl','sd', 'zeus');\n // updateStreamStatistics ('dmax','sd', 'elmo');\n //\n\n String pm = \"updateStreamStatistics[^']*'\";\n\n String sender = Simple.getMatch(pm + \"([^']*)'\", lines);\n String sdtype = Simple.getMatch(pm + \"[^']*','([^']*)'\", lines);\n String server = Simple.getMatch(pm + \"[^']*','[^']*', '([^']*)'\", lines);\n\n if ((sender != null) && (sdtype != null) && (server != null))\n {\n //\n // Very special server update to get correct streams.\n //\n\n Log.d(LOGTAG, \"===============\" + sender);\n Log.d(LOGTAG, \"===============\" + sdtype);\n Log.d(LOGTAG, \"===============\" + server);\n\n //\n // http://elmo.ucount.in/stats/update/custom/lstv/kabel1/sd&callback=?\n // Referer: http://www.live-stream.tv/online/fernsehen/deutsch/kabel1.html\n //\n\n if (! server.equals(\"zeus\"))\n {\n elmoreferrer = requestUrl;\n elmostring = \"http://\" + server + \".ucount.in\"\n + \"/stats/update/custom/lstv/\"\n + sender + \"/\" + sdtype\n + \"&_=424242&callback=?\";\n\n SimpleRequest.doHTTPGet(elmostring, elmoreferrer);\n }\n }\n\n //\n // type:'html5', config: { file:'http://lstv3.hls1.stream-server.org/live/orf1@sd/index.m3u8' }\n //\n\n String stream = Simple.getMatch(\"type:'html5'.*?file:'([^']*)'\", lines);\n Log.d(LOGTAG,\"=========================================>stream=\" + stream);\n\n if (stream != null) requestUrl = stream;\n\n return (stream != null);\n }",
"@Test\r\n\tpublic void testHttpURLBuilderParsing() {\r\n\t\tHttpURLBuilder parser = new HttpURLBuilder();\r\n\t\tparser.setUrl(\"http://somedomain.int/somepath?someparam=somevalue\");\r\n\t\tAssert.assertEquals(\"somedomain.int\", parser.getHost());\r\n\t\tAssert.assertEquals(\"/somepath\", parser.getPath());\r\n\t\tfor (String param : parser.getParameters().keySet()) {\r\n\t\t\tSystem.err.println(param);\r\n\t\t}\r\n\t\tAssert.assertTrue(parser.getParameters().containsKey(\"someparam\"));\r\n\t\tSystem.err.println(parser.getParameters().get(\"someparam\").get(0));\r\n\t\tAssert.assertEquals(\"somevalue\", parser.getParameters().get(\"someparam\").get(0));\r\n\t\tAssert.assertFalse(parser.isSecure());\r\n\t\tAssert.assertNotNull(parser.toString());\r\n\t\tAssert.assertNotNull(parser.toURL());\r\n\t\tAssert.assertEquals(\"http://somedomain.int/somepath?someparam=somevalue\", parser.toString());\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n \n XmlParser parser = new XmlParser();\n String [] urls = parser.leerUrls();\n \n CalcProxy calcProxy = new CalcProxy(urls);\n \n String pattern = request.getParameter(\"pattern\");\n String result = \"0\";\n String [] result2 = null;\n \n if (!pattern.equals(\"\")) {\n result = calcProxy.buscar(pattern);\n System.out.println(result);\n } else\n {\n result = calcProxy.listar();\n result2 = calcProxy.listarTxt().split(\"&\");\n System.out.println(result2.toString());\n }\n \n try (PrintWriter out = response.getWriter()) {\n /* TODO output your page here. You may use following sample code. */\n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet CalcServlet</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(result);\n if(result2 != null)\n for(int i = 0; i < result2.length;i++)\n {\n // out.println(\"<p><a href=\\\"http://localhost:8080/sgarci18WasServer/files/urls.txt\\\" download=\\\"http://localhost:8080/sgarci18WasServer/files/urls.txt\\\">urls</a></p>\\n\");\n out.println(\"<p><a href=\\\"\"+ calcProxy.uri+\"/../\"+ result2[i]+\"\\\" download=\\\"\"+ calcProxy.uri+\"/../\"+ result2[i]+\"\\\">\"+ result2[i]+\"</a></p>\\n\"); //+url del json, pero no logre parsearlo\n }\n out.println(\"<p><a href=\\\"index.html\\\" title=\\\"pag principal\\\">Volver</a></p>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n }\n }",
"public String sendGet(String url)\n\t{\n\t\t//Getting most relevant user-agent from robots.txt\n\t\tbest_match = findBestMatch();\n\t\t//Deicing whether or not to skip\n\t\tif (shouldSkip(url))\n\t\t{\n\t\t\treturn \"skipped\";\n\t\t}\n\t\tif (url.startsWith((\"https\")))\n\t\t{\n\t\t\treturn sendGetSecure(url);\n\t\t}\n\t\ttry \n\t\t{\n\t\t\t//Creating URL objects\n\t\t\tURL http_url = new URL(url);\n\t\t\t//Delaying visit if directed to by robots.txt\n\t\t\tcrawlDelay();\n\t\t\tHttpURLConnection secure_connection = (HttpURLConnection)http_url.openConnection();\n\t\t\t//Setting request method\n\t\t\tsecure_connection.setRequestMethod(\"GET\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Getting ResponseParser object to read in page content\n\t\t\tp = new ResponseParser(new BufferedReader(new InputStreamReader(secure_connection.getInputStream())));\n\t\t\t\n\t\t\t//Parsing all response headers from returned object\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn p.getData();\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\t\t\n//\t\ttry\n//\t\t{\n//\t\t\t//Deals with secure request\n//\t\t\tif (url.startsWith((\"https\")))\n//\t\t\t{\n//\t\t\t\treturn sendGetSecure(url);\n//\t\t\t}\n//\t\t\t//Parsing host and port from URL\n//\t\t\tURLInfo url_info = new URLInfo(url);\n//\t\t\thost = url_info.getHostName();\n//\t\t\tport = url_info.getPortNo();\n//\t\t\t\n//\t\t\t//Changing Host header if necessary\n//\t\t\theaders.put(\"Host\", host + \":\" + port);\n//\t\t\t\n//\t\t\t//Getting file path of URL\n//\t\t\tString file_path = url_info.getFilePath();\n//\t\t\t\n//\t\t\t//If we weren't able to find a host, URL is invalid\n//\t\t\tif (host == null)\n//\t\t\t{\n//\t\t\t\treturn \"invalid url\";\n//\t\t\t}\n//\t\t\t\n//\t\t\t//Delaying visits based on robots.txt crawl delay\n//\t\t\tcrawlDelay();\n//\t\t\t\n//\t\t\t//Otherwise, opening up socket and sending request with all headers\n//\t\t\tsocket = new Socket(host, port);\n//\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\n//\t\t\tString message = \"GET \" + file_path + \" HTTP/1.1\\r\\n\";\n//\t\t\tfor (String header: headers.keySet())\n//\t\t\t{\n//\t\t\t\tString head = header + \": \" + headers.get(header) + \"\\r\\n\";\n//\t\t\t\tmessage = message + head;\n//\t\t\t}\n//\t\t\tout.println(message);\n//\n//\t\t\t//Creating ResponseParser object to parse the Response\n//\t\t\tp = new ResponseParser(socket);\n//\t\t\t\n//\t\t\t//If we didn't get any headers in the response, the URL was invalid\n//\t\t\tif (p.getHeaders().size() == 0)\n//\t\t\t{\n//\t\t\t\treturn (\"invalid url\");\n//\t\t\t}\n//\t\t\t//Otherwise return the contents of the returned document\n//\t\t\treturn p.getData();\n//\t\t} \n//\t\tcatch (UnknownHostException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"Unknown Host Exception\");\n//\t\t\tSystem.err.println(\"Problem url is: http://www.youtube.com/motherboardtv?feature=watch&trk_source=motherboard\");\n//\t\t} \n//\t\tcatch (IOException | IllegalArgumentException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"IO Exception\");;\n//\t\t}\n//\t\t//Return null for all caught exceptions (Servlet will deal with this)\n//\t\treturn null;\n\t}",
"public void processUrl() {\n try {\n\n JsonNode rootNode = getJsonRootNode(getJsonFromURL()); // todo: pass url in this method (to support multi-urls)\n getValuesFromJsonNodes(rootNode);\n setAndFormatValues();\n\n } catch (Exception e) {\n System.out.println(\"ERROR: caught error in processUrl()\");\n e.printStackTrace();\n }\n }",
"private byte[] Parse(byte[] arr)\r\n\t{\r\n\t\tbyte[] invalid = {0};\r\n\t\tif(arr[1] == 1) {\r\n\t\t\tSystem.out.println(\"***Packet Parsing***\");\r\n\t\t System.out.println(\"'Packet is a Read Request' \\n\");\r\n\t\t\tbyte[] read = {0, 3, 0, 1};\r\n\t\t\treturn read;\r\n\t\t}\r\n\t\telse if(arr[1] == 2) {\r\n\t\t\tSystem.out.println(\"***Packet Parsing***\");\r\n\t\t System.out.println(\"'Packet is a Write Request' \\n\");\r\n\t\t\tbyte[] write = {0, 4, 0, 0};\r\n\t\t\treturn write;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"***Packet Parsing***\");\r\n\t\t System.out.println(\"'Invalid Request'\");\r\n\t\t currentStatus = false;\r\n\t\t\treturn invalid;\r\n\t\t}\r\n\t}",
"public static String parseRequest(String message){\n\t\tchar[] b = message.toCharArray();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tif('*'==b[0]){\n\t\t\tString[] list = message.split(\"<br>\");\n\t\t\t//int len = Integer.valueOf(String.valueOf(b[1]));//numbers of arguments\n\t\t\t//String[] args = new String[len];\n\t\t\tfor(int i=2;i<list.length;){\n\t\t\t\tsb.append(list[i]).append(\" \");\n\t\t\t\ti = i+2;\n\t\t\t}\n\t\t}else{\n\t\t\tSystem.out.println(\"格式错误\");\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private BigInteger extractFromRequest(ServletRequest req) {\n return null;\r\n }",
"protected RequestContext parseRequest(HttpHeaders headers) {\n return parser.parseRequest(headers, requestType);\n }",
"String processQuery(String query);",
"@Override\n public Object parseNetworkResponse(Response response, int i) throws Exception {\n return response.body().string();\n }",
"protected List<RequestParameter> parseRequestParameters(String url) throws MalformedURLException {\n\n\t\tList<RequestParameter> requestParameters = null;\n\n\t\tif (url != null) {\n\t\t\tint pos = url.indexOf(\"?\");\n\n\t\t\tif (pos >= 0) {\n\t\t\t\tString queryString = url.substring(pos + 1);\n\n\t\t\t\tif (queryString.length() > 0) {\n\t\t\t\t\trequestParameters = new ArrayList<RequestParameter>();\n\n\t\t\t\t\tString[] queryParameters = queryString.split(\"[&]\");\n\n\t\t\t\t\tfor (String queryParameter : queryParameters) {\n\n\t\t\t\t\t\tString[] nameValueArray = queryParameter.split(\"[=]\");\n\n\t\t\t\t\t\tif (nameValueArray.length == 1) {\n\n\t\t\t\t\t\t\tString name = nameValueArray[0].trim();\n\n\t\t\t\t\t\t\tif (name.length() == 0) {\n\t\t\t\t\t\t\t\tthrow new MalformedURLException(\"Invalid name/value pair=[\" + queryParameter +\n\t\t\t\t\t\t\t\t\t\"]: name cannot be empty.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\trequestParameters.add(new RequestParameter(name, \"\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (nameValueArray.length == 2) {\n\n\t\t\t\t\t\t\tString name = nameValueArray[0].trim();\n\n\t\t\t\t\t\t\tif (name.length() == 0) {\n\t\t\t\t\t\t\t\tthrow new MalformedURLException(\"Invalid name/value pair=[\" + queryParameter +\n\t\t\t\t\t\t\t\t\t\"]: name cannot be empty.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\tString value = nameValueArray[1];\n\t\t\t\t\t\t\t\trequestParameters.add(new RequestParameter(name, value));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthrow new MalformedURLException(\"Invalid name/value pair: \" + queryParameter);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn requestParameters;\n\t}",
"public static ab.a a(List<c.a.a.f> list) throws IOException {\n String string = null;\n String string2 = \"HTTP/1.1\";\n r.a a2 = new r.a();\n int n2 = list.size();\n int n3 = 0;\n do {\n String string3;\n int n4;\n f f2;\n String string4;\n if (n3 < n2) {\n f2 = ((c.a.a.f)list.get((int)n3)).h;\n string3 = ((c.a.a.f)list.get((int)n3)).i.a();\n string4 = string2;\n n4 = 0;\n } else {\n if (string == null) {\n throw new ProtocolException(\"Expected ':status' header not present\");\n }\n q q2 = q.a(string2 + \" \" + string);\n return new ab.a().a(x.c).a(q2.b).a(q2.c).a(a2.a());\n }\n while (n4 < string3.length()) {\n int n5 = string3.indexOf(0, n4);\n if (n5 == -1) {\n n5 = string3.length();\n }\n String string5 = string3.substring(n4, n5);\n if (!f2.equals((Object)c.a.a.f.a)) {\n if (f2.equals((Object)c.a.a.f.g)) {\n string4 = string5;\n string5 = string;\n } else {\n if (!j.contains((Object)f2)) {\n a2.a(f2.a(), string5);\n }\n string5 = string;\n }\n }\n int n6 = n5 + 1;\n string = string5;\n n4 = n6;\n }\n ++n3;\n string2 = string4;\n } while (true);\n }",
"HttpContent getHttpContent();",
"public void run()\n\t\t{\n\t\t\tint num = 0;\n\t\t\ttry{\n\t\t\t\tlog.debug(\"Dealing with: \" + url.toString() + \" From : \" + urlp);\n\t\t\t\t\n\t\t\t\tSocket socket = new Socket(url.getHost(), PORT);\n\t\t\t\tPrintWriter writer = new PrintWriter(socket.getOutputStream());\n\t\t\t\tBufferedReader reader = \n\t\t\t\t\tnew BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t\tString request = \"GET \" + url.getPath() + \" HTTP/1.1\\n\" +\n\t\t\t\t\t\t\t\t\"Host: \" + url.getHost() + \"\\n\" +\n\t\t\t\t\t\t\t\t\"Connection: close\\n\" + \n\t\t\t\t\t\t\t\t\"\\r\\n\";\n\t\t\t\twriter.println(request);\n\t\t\t\twriter.flush();\n\t\t\n\t\t\t\tString line = reader.readLine();\n\t\t\t\t// filter the head message of the response\n\t\t\t\twhile(line != null && line.length() != 0)\n\t\t\t\t{\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\t// keep the html context\n\t\t\t\twhile (line != null) \n\t\t\t\t{\n\t\t\t\t\tcontext += line + \"\\n\";\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t\twriter.close();\n\t\t\t\tsocket.close();\n\t\t\t\t//log.debug(context);\n\t\t\t\tstripper = new TagStripper(context);\n\t\t\t\tlog.debug(\"Removing script and style from: \" + url.toString());\n\t\t\t\tstripper.removeComments();\n\t\t\t\tstripper.removeScript();\n\t\t\t\tstripper.removeStyle();\n\t\t\t\tlog.debug(\"Getting links from: \" + url.toString());\n\t\t\t\tArrayList<String> link = new ArrayList<String>();\n\t\t\t\tstripper.buildLinks(url.toString());\n\t\t\t\t\n\t\t\t\tlink = stripper.getLinks();\n\t\t\t\tfor(String tmp : link) {\n\t\t\t\t\tif(getCount() < pageNum ) {\n\t\t\t\t\t\t// find if the link has been already visited\n\t\t\t\t\t\tif(!urlList.contains(tmp)) {\n\t\t\t\t\t\t\tworkers.execute(new SingleHTMLFetcher(new URL(tmp), this.url.toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString title = stripper.getTitle();\n\t\t\t\tif(title == null)\n\t\t\t\t\ttitle = \"NO title\";\n\t\t\t\ttitle = title.replaceAll(\"&[^;]*;\", \"\");\n\t\t\t\tlog.debug(\"Removing tags from: \" + url.toString());\n\t\t\t\tstripper.removeTags();\n\t\t\t\tstripper.removeSymbol();\n\t\t\t\tString snippet = stripper.getSnippet(title);\n\t\t\t\tdb.savePageInfo(connection, title, snippet, url.toString());\n\t\t\t\tcontext = stripper.getContext();\n\t\t\t\tString[] words = context.toLowerCase().split(\"\\\\s\");\n\t\t\t\tArrayList<String> wordsList = new ArrayList<String>();\n\t\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\t\t// delete non-word character\n\t\t\t\t\twords[i] = words[i].replaceAll(\"\\\\W\", \"\").replace(\"_\",\n\t\t\t\t\t\t\t\"\");\n\t\t\t\t\tif(words[i].length() != 0)\n\t\t\t\t\t\twordsList.add(words[i]);\n\t\t\t\t}\n\t\t\t\tfor (String w : wordsList) {\n\t\t\t\t\tif (w.length() != 0) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tindex.addNum(w, url.toString(), num);\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlog.debug(\"URL: \" + url.toString() + \" is finished!\");\n\t\t\t\tdecrementPending();\n\t\t\t}catch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}",
"JSONStreamAware processRequest(HttpServletRequest paramHttpServletRequest)\r\n/* 18: */ {\r\n/* 19:19 */ JSONObject localJSONObject = new JSONObject();\r\n/* 20:20 */ localJSONObject.put(\"host\", paramHttpServletRequest.getRemoteHost());\r\n/* 21:21 */ localJSONObject.put(\"address\", paramHttpServletRequest.getRemoteAddr());\r\n/* 22:22 */ return localJSONObject;\r\n/* 23: */ }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (ParseException ex) {\n Logger.getLogger(TestConn.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"WebCrawlerData retrieve(String url);",
"@Override\n protected Object doInBackground(Object[] objects)\n {\n URL url = null; \n\n try\n {\n url = new URL(requestUrl);\n }\n catch (MalformedURLException e)\n {\n e.printStackTrace();\n }\n\n // Create and open HTTP connection\n HttpURLConnection connection = null;\n try\n {\n connection = (HttpURLConnection) url.openConnection();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n\n try\n {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n StringBuilder stringBuilder = new StringBuilder();\n String line;\n\n while ((line = bufferedReader.readLine()) != null)\n {\n stringBuilder.append(line);\n }\n\n bufferedReader.close();\n\n return stringBuilder.toString();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n connection.disconnect();\n }\n\n return null;\n }",
"protected abstract void nextRequest ();",
"public static com.taobao.phenix.request.SchemeInfo parse(@androidx.annotation.NonNull java.lang.String r1) {\n /*\n com.taobao.phenix.request.SchemeInfo r0 = parseLocalFile(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseAssetFile(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseResFile(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseBase64(r1)\n if (r0 != 0) goto L_0x0024\n com.taobao.phenix.request.SchemeInfo r0 = parseLocalExtended(r1)\n if (r0 == 0) goto L_0x001f\n goto L_0x0024\n L_0x001f:\n com.taobao.phenix.request.SchemeInfo r1 = parseHttpUrl(r1)\n return r1\n L_0x0024:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.phenix.request.SchemeInfo.parse(java.lang.String):com.taobao.phenix.request.SchemeInfo\");\n }",
"private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }"
] | [
"0.6291634",
"0.6144211",
"0.6048331",
"0.59494793",
"0.58341885",
"0.582472",
"0.58187383",
"0.5782139",
"0.57551736",
"0.5743956",
"0.5710552",
"0.5697454",
"0.5677132",
"0.5665985",
"0.5604156",
"0.5591569",
"0.5580509",
"0.555614",
"0.5515813",
"0.54831076",
"0.5471808",
"0.54613215",
"0.5455731",
"0.54481584",
"0.54441285",
"0.54291975",
"0.541763",
"0.54041857",
"0.5396635",
"0.5388398",
"0.53831357",
"0.5376152",
"0.536681",
"0.53622574",
"0.53574866",
"0.53492355",
"0.5337847",
"0.5330968",
"0.5327331",
"0.5287439",
"0.5273006",
"0.5269367",
"0.5261785",
"0.5254133",
"0.5246487",
"0.5242374",
"0.5227652",
"0.52259713",
"0.522158",
"0.5207312",
"0.52062756",
"0.5199251",
"0.5196644",
"0.51954305",
"0.5188077",
"0.5176524",
"0.5170392",
"0.5166276",
"0.51593095",
"0.5155545",
"0.51511633",
"0.5146181",
"0.5136361",
"0.51331043",
"0.51211447",
"0.51166916",
"0.5116588",
"0.511125",
"0.5109174",
"0.5108499",
"0.51053995",
"0.5103757",
"0.5103743",
"0.51004785",
"0.5093026",
"0.5091114",
"0.5089129",
"0.5083813",
"0.50759214",
"0.5075565",
"0.50737065",
"0.5070123",
"0.50551623",
"0.50551033",
"0.50413024",
"0.50389177",
"0.5029715",
"0.5029165",
"0.50284076",
"0.5026714",
"0.50211173",
"0.5016281",
"0.5012236",
"0.50090104",
"0.5002719",
"0.50024986",
"0.49999404",
"0.49980876",
"0.49979123",
"0.4997748",
"0.4987573"
] | 0.0 | -1 |
System.out.printf("uri=%s\nlocalName=%s\nqName=%s\nattributes=%s\n\n", uri, localName, qName, attributes); | public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
if (!qName.equals("yweather:wind")) return;
temp = Integer.parseInt(attributes.getValue("chill"));
int dir = Integer.parseInt(attributes.getValue("direction")); // number from 0-359 indicating direction
// I began writing an if tree, then remembered I was lazy.
String[] dir_words = new String[] {
"east", "northeast", "north", "northwest", "west", "southwest", "south", "southeast"
};
windDir = dir_words[dir/45];
windSpeed = Integer.parseInt(attributes.getValue("speed")); // speed in mph
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String print() {\r\n String attribute = \"Title of resource:\\t\" + getTitle() + \"\\n\" + \"url of resource:\\t\" + url;\r\n System.out.println(attribute);\r\n return attribute;\r\n }",
"public void PrintAttributes()\n\t{\n\t\tSystem.out.println(\"Name: \"+ name);\n\t\tSystem.out.println(\"Address: \"+ address);\n\t\tSystem.out.println(\"Phone_Number: \"+ phoneNumber);\n\t\tSystem.out.println(\"Year_Built: \"+ yearBuilt);\n\t\tSystem.out.println(\"Price: \"+ price);\n\t\tSystem.out.println(\"Max_Residents: \"+ maxResidents);\n\t\tSystem.out.println(\"Catagory: \"+ catagory);\n\t\t\n\t\t//GetKeywords(); \n\t\tif(keywords.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Keywords\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(int i = 0; i < keywords.size(); i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Keyword: \" + keywords.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//GetAvailableDates(); \n\t\tif(openDates.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Available Date\");\n\t\t}\n\t\tfor(int j = 0; j < openDates.size(); j++)\n\t\t{\n\t\t\tSystem.out.println(\"Available Date: \"+openDates.get(j).PrintDate());\n\t\t}\n\t}",
"public static void printNode(Node parent) {\n if (parent == null) {\n System.out.println(\"null node!\");\n return;\n }\n System.out.println(parent.getNodeName() + \" node:\");\n NamedNodeMap attrs = parent.getAttributes();\n for(int i = 0 ; i < attrs.getLength() ; i++) {\n Attr attribute = (Attr)attrs.item(i);\n System.out.println(\" \" + attribute.getName()+\" = \"+attribute.getValue());\n }\n }",
"private void printlnCommon(Node n) {\n\t System.out.print(\" nodeName=\\\"\" + n.getNodeName() + \"\\\"\");\n\n\t String val = n.getNamespaceURI();\n\t if (val != null) {\n\t out.print(\" uri=\\\"\" + val + \"\\\"\");\n\t }\n\n\t val = n.getPrefix();\n\n\t if (val != null) {\n\t out.print(\" pre=\\\"\" + val + \"\\\"\");\n\t }\n\n\t val = n.getLocalName();\n\t if (val != null) {\n\t out.print(\" local=\\\"\" + val + \"\\\"\");\n\t }\n\n\t val = n.getNodeValue();\n\t if (val != null) {\n\t out.print(\" nodeValue=\");\n\t if (val.trim().equals(\"\")) {\n\t // Whitespace\n\t out.print(\"[WS]\");\n\t }\n\t else {\n\t out.print(\"\\\"\" + n.getNodeValue() + \"\\\"\");\n\t }\n\t }\n\t out.println();\n\t}",
"public void displaySchema() {\n for (String s : attributes)\n System.out.print(s + \"\");\n }",
"public String toString() {\n String id = element.getAttributeNS(null, \"id\");\n return element.getTagName() + (id.equals(\"\") ? \"\" : \"#\" + id) + \".\"\n + (attributeNamespaceURI == null || attributeNamespaceURI.equals(\"\") ? \"\" : attributeNamespaceURI + \":\")\n + attributeLocalName + \" = \" + expression;\n }",
"public String toString() {\n\t URI uri = getURI();\n\t return (uri == null) \n\t \t? \"Anonymous (\" + getAnonID() + \")\"\n\t \t: uri.toString();\n//\t \t: (kb == null)\n//\t \t ? uri.toString() \n//\t \t : kb.getQNames().shortForm(uri);\n\t}",
"public void dumpAttributeList(Attributes atts)\n {\n\tif (atts.getLength() == 0)\n\t System.out.println(nestString + \" (no attributes) \");\n\telse\n\t {\n\t System.out.println(nestString + \" AttributeList: \");\n\t for (int i = 0; i < atts.getLength(); i++)\n\t\t{\n\t\tString name = atts.getQName(i);\n\t\t// String type = atts.getType(i);\n\t\tString value = atts.getValue(i);\n\t\tSystem.out.println(nestString + \" name=\" + name + \n\t\t\t\t \" value=\" + value);\n\t\t}\n\t }\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\tString text = getElement();\r\n\t\tif (mainAttr!=null) {\r\n\t\t\ttext += \" \" + mainAttr;\r\n\t\t}\r\n\t\treturn text;\r\n\t}",
"public void print() {\n print$$dsl$guidsl$guigs();\n System.out.print( \" eqn =\" + eqn );\n }",
"public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\n\t\t// On débute une balise dont on veut le contenu textuel\n\t\tif (qName.equalsIgnoreCase(mXmlTagContainingText)) {\n\t\t\tinsideTextTag = true;\n\t\t}\n\n\t\tif (debug) {\n\t\t\tfor (int indent=0 ; indent < elementOffsetStackCursor +1; indent++) {System.out.print (\"--\");}\n\t\t\tSystem.out.print (\"Debug: startElement >\"+qName+\"< \");\n\t\t\tfor (int indent=0 ; indent < attributes.getLength() ; indent++) {System.out.print (\">\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );}\n\t\t\tSystem.out.println ();\n\t\t}\n\n\t\t// So far, I do not why but accessing here to the attributes values \n\t\t// prevent the case that further in the createAnnotation method, \n\t\t// you obtain a substring of attributes.toString which does not correspond to an attribute value \n\t\t// someway the current solution acts as a clone...\n\t\tfor (int indent=0 ; indent < attributes.getLength() ; indent++) {\n\t\t\tattributes.getValue(indent);\n\t\t\t//if (attributes.getValue(indent).startsWith(\"mph=\\\"\"))\t\t{ \n\t\t\t//\tSystem.out.println (\"Debug: startElement >\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );\n\t\t\t//}\n\t\t\t//System.out.print (\">\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );\n\t\t}\n\n\t\t// on stocke des informations concernant l'élément XML courant en l'empilant\n\t\t// le problème est que l'on n'a pas accès au begin et end offset d'une balise en même temps \n\t\t// et qu'il faut garder une trace des begins des balises ouvertes lorsque l'on rencontre leur end \n\t\t//if ( attributes.getLength() == 0) attributes = null;\n\t\tXMLElement xE = new XMLElement(uri, localName, qName, attributes);\n\t\telementOffsetStack.add(xE);\n\n\t\telementOffsetStackCursor++;\n\t\tcurrentOpenElementWithTheBeginToSet++;\n\n\t\t// debug\n\t\tif (debug) {\n\t\t\tfor (int indent=0 ; indent < elementOffsetStackCursor ; indent++) {System.out.print (\"--\");}\n\t\t\t//System.out.println (\"Debug: startElement empile uri>\" +uri+\"< localName>\"+localName+\"< qName>\"+qName+\"< arrayListIndex>\"+arrayListIndex+\" curentOpenTagToAnnotate>\"+curentOpenTagToAnnotate+\"<\");\n\t\t\tSystem.out.println (\"Debug: startElement tag>\"+qName+\"< que l'on empile ; il y a >\"+\n\t\t\telementOffsetStackCursor+\"< éléments dans la pile ; il y a >\"+\n\t\t\t\t\tcurrentOpenElementWithTheBeginToSet+\"< balise en attente dont le begin est définir\");\n\n\t\t}\n\t}",
"private static void PrintNode(Node n, String prefix, int depth) {\r\n\r\n\t\ttry {\r\n\t\t\tSystem.out.print(\"\\n\" + Pad(depth) + \"[\" + n.getNodeName());\r\n\t\t\tNamedNodeMap m = n.getAttributes();\r\n\t\t\tfor (int i = 0; m != null && i < m.getLength(); i++) {\r\n\t\t\t\tNode item = m.item(i);\r\n\t\t\t\tSystem.out.print(\" \" + item.getNodeName() + \"=\"\r\n\t\t\t\t\t\t+ item.getNodeValue());\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"] \");\r\n\r\n\t\t\tboolean has_text = false;\r\n\t\t\tif (n.getNodeType() == Node.TEXT_NODE) {\r\n\t\t\t\thas_text = true;\r\n\t\t\t\tString valn = n.getNodeValue().trim();\r\n\t\t\t\tif (valn.length() > 0)\r\n\t\t\t\t\tSystem.out.print(\"\\n\" + Pad(depth) + \" \\\"\" + valn + \"\\\"\");\r\n\t\t\t}\r\n\r\n\t\t\tNodeList cn = n.getChildNodes();\r\n\r\n\t\t\tfor (int i = 0; cn != null && i < cn.getLength(); i++) {\r\n\t\t\t\tNode item = cn.item(i);\r\n\t\t\t\tif (item.getNodeType() == Node.TEXT_NODE) {\r\n\t\t\t\t\tString val = item.getNodeValue().trim();\r\n\t\t\t\t\tif (val.length() > 0)\r\n\t\t\t\t\t\tSystem.out.print(\"\\n\" + Pad(depth) + val + \"\\\"\");\r\n\t\t\t\t} else\r\n\t\t\t\t\tPrintNode(item, prefix, depth + 2);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(Pad(depth) + \"Exception e: \");\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void print() {\n\t\tsuper.print();\r\n\t\tSystem.out.println(\"album=\" + album + \", year=\" + year);\r\n\t}",
"public void showAttributes() {\r\n\t\tSystem.out.println(\"Name : \"+getName());\r\n\t\tSystem.out.println(\"ID : \"+getId());\r\n\t\tSystem.out.println(\"Percentage : \"+getPercentage());\r\n\t\tSystem.out.println(\"Skills : \");\r\n\t\tfor(String skill:getSkills()) {\r\n\t\t\tSystem.out.print(skill+\" \");\r\n\t\t}\r\n\t\t\r\n\t}",
"public String toString() { return kind() + \":\"+ text() ; }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"@Override\n\tpublic void printNode() {\n\t\tSystem.out.println(\"------Args_list------\");\n\t\te.printNode();\n\t\tif(a!=null)\n\t\t\ta.printNode();\n\t\t\n\t}",
"@Override\r\n public String toString() {\r\n return getURI();\r\n }",
"public String printAttributes() {\n checkNotUnknown();\n StringBuilder b = new StringBuilder();\n if (hasDontDelete()) {\n b.append(\"(DontDelete\");\n if (isMaybeDontDelete())\n b.append(\"+\");\n if (isMaybeNotDontDelete())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasDontEnum()) {\n b.append(\"(DontEnum\");\n if (isMaybeDontEnum())\n b.append(\"+\");\n if (isMaybeNotDontEnum())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasReadOnly()) {\n b.append(\"(ReadOnly\");\n if (isMaybeReadOnly())\n b.append(\"+\");\n if (isMaybeNotReadOnly())\n b.append(\"-\");\n b.append(\")\");\n }\n return b.toString();\n }",
"public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }",
"@Override\n public String toString()\n {\n return albumName + ' ' + artistName + ' ' + genre + '\\n';\n }",
"public java.lang.String toString() {\n // call toString() with includeNS true by default and declareNS false\n String xml = this.toString(true, false);\n return xml;\n }",
"private void printFullTree()\r\n {\r\n System.out.println(fullXmlTree.toString());\r\n }",
"public void printString() {\n\t\tSystem.out.println(name);\n\t\t\n\t\t\n\t}",
"public void print ( InstanceAttributes instAttributes ){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}",
"public String toString()\n\t{\t\n\t\treturn \"Element name:\\t \"+elementName+\"\\nAtomic number:\\t \"+atomicNum+\"\\nSymbol:\\t\\t \"+symbol+\"\\nBoiling Point:\\t \"+boilingPoint+\" K\"+\"\\nMelting Point:\\t \"+meltingPoint+\" K\"+\"\\nDensity:\\t \"\n\t\t\t\t+density+\" g/L\"+\"\\nMolecular Weight: \"+molecularWeight+\" g/mole\\n\";\t\t\t\n\t\n\t}",
"private static void prtln(String s) {\n\t\tif (debug) {\n\t\t\t// System.out.println(\"XmlStringTester: \" + s);\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}",
"public void info()\n {\n System.out.println(toString());\n }",
"public void printInfo(){\n\t}",
"public void printInfo(){\n\t}",
"public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }",
"@Override\n public String toString(\n ){\n return toXRI(); \n }",
"public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}",
"private void echo(Node n) {\n\t outputIndentation();\n\t int type = n.getNodeType();\n\n\t switch (type) {\n\t case Node.ATTRIBUTE_NODE:\n\t out.print(\"ATTR:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.CDATA_SECTION_NODE:\n\t out.print(\"CDATA:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.COMMENT_NODE:\n\t out.print(\"COMM:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_FRAGMENT_NODE:\n\t out.print(\"DOC_FRAG:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_NODE:\n\t out.print(\"DOC:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_TYPE_NODE:\n\t out.print(\"DOC_TYPE:\");\n\t printlnCommon(n);\n\t NamedNodeMap nodeMap = ((DocumentType)n).getEntities();\n\t indent += 2;\n\t for (int i = 0; i < nodeMap.getLength(); i++) {\n\t Entity entity = (Entity)nodeMap.item(i);\n\t echo(entity);\n\t }\n\t indent -= 2;\n\t break;\n\n\t case Node.ELEMENT_NODE:\n\t out.print(\"ELEM:\");\n\t printlnCommon(n);\n\n\t NamedNodeMap atts = n.getAttributes();\n\t indent += 2;\n\t for (int i = 0; i < atts.getLength(); i++) {\n\t Node att = atts.item(i);\n\t echo(att);\n\t }\n\t indent -= 2;\n\t break;\n\n\t case Node.ENTITY_NODE:\n\t out.print(\"ENT:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.ENTITY_REFERENCE_NODE:\n\t out.print(\"ENT_REF:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.NOTATION_NODE:\n\t out.print(\"NOTATION:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.PROCESSING_INSTRUCTION_NODE:\n\t out.print(\"PROC_INST:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.TEXT_NODE:\n\t out.print(\"TEXT:\");\n\t printlnCommon(n);\n\t break;\n\n\t default:\n\t out.print(\"UNSUPPORTED NODE: \" + type);\n\t printlnCommon(n);\n\t break;\n\t }\n\n\t indent++;\n\t for (Node child = n.getFirstChild(); child != null;\n\t child = child.getNextSibling()) {\n\t echo(child);\n\t }\n\t indent--;\n\t}",
"public void startElement(String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException {\n newContent.append(\"<\");\n newContent.append(qName);\n\n for (int i = 0; i < attributes.getLength(); i++) {\n String qn = attributes.getQName(i);\n newContent.append(\" \");\n newContent.append(qn);\n newContent.append(\"=\");\n newContent.append(\"\\\"\");\n newContent.append(attributes.getValue(i));\n newContent.append(\"\\\"\");\n\n //Avoid duplicate namespace declarations\n if (qn.startsWith(\"xmlns\")) {\n String ln = attributes.getLocalName(i);\n if (ln.equals(\"xmlns\")) {\n namespaces.remove(\"\");\n } else {\n namespaces.remove(ln);\n }\n }\n }\n\n Enumeration enum = namespaces.keys();\n while ( enum.hasMoreElements() ) {\n String key = (String) enum.nextElement();\n newContent.append(\" xmlns\");\n if (key.length() > 0) {\n newContent.append(\":\");\n newContent.append(key);\n }\n newContent.append(\"=\");\n newContent.append(\"\\\"\");\n newContent.append(namespaces.get(key));\n newContent.append(\"\\\"\");\n namespaces.remove(key);\n }\n\n newContent.append(\">\");\n }",
"public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}",
"void doShowUri()\n\t{\n\t\ttry\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(\"URI = \"); //$NON-NLS-1$\n\t\t\tsb.append( m_session.getURI() );\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noUriReceived\")); //$NON-NLS-1$\n\t\t}\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"[name:]\"+name;\n\t}",
"public void startElement(String uri, String localName, String qName, Attributes attrs) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = qName;\r\n if (charState >= 0 && lineBuffer.length() > 0) {\r\n \tcharWriter.println(lineBuffer.toString());\r\n \tlineBuffer.setLength(0);\r\n }\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG)) {\r\n\t\t\t// ignore\r\n } else { // variable GEDCOM keyword\r\n\t charState = 2;\r\n \tlineBuffer.append(String.valueOf(saxLevel));\r\n \tString id = attrs.getValue(ID_ATTR);\r\n \tif (id != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(id);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tlineBuffer.append(' ');\r\n \tlineBuffer.append(qName.toUpperCase());\r\n \tString ref = attrs.getValue(REF_ATTR);\r\n \tif (ref != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(ref);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tsaxLevel ++;\r\n } // else ignore unknown elements\r\n }",
"public String toString(){\n \treturn (weight + \"\t\" + query);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Artist : \"+this.artistName+\"\\n\";\n\t}",
"public void print () {\r\n System.out.println(\"Place \"+name+\": lat \"+lat+\" lon \"+lon+\r\n \" elevation \"+ele);\r\n }",
"void printestateName(estateName iEstateName)\n {\n System.out.println(iEstateName.getElementValue());\n }",
"private static void println(String message, SimpleAttributeSet settings) {print(message + \"\\n\", settings);}",
"public String toString() {\n return getQualifiedName();\n }",
"private void printInfo(SAXParseException e) {\n\t}",
"public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}",
"@Test\n\tpublic void test_TCM__String_toString() {\n\t\t//expected value\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tString str= attr.toString();\n\t\tassertTrue(\"incorrect toString form\", str.equals(\"[Attribute: prefx:test=\\\"value\\\"]\"));\n\n\t}",
"private String printXML(Node target){\n\t\treturn \"\";\n\t}",
"public void showName() {\n\t\tSystem.out.println(\"Object id: \" + id + \", \" + description + \": \" + name);\n\t\t//System.out.println(description);\n\t}",
"public static void main(String[] args) {\n System.out.println(AIS_SART.toString());\n System.out.println(AT_ANCHOR.toString());\n }",
"@Override\n\t\tpublic void startElement(String uri, String localName, String qName,\n\t\t\t\tAttributes atts) throws SAXException {\n\t\t\tNode newNode = new Node(localName);\n\t\t\t\n\t\t\tfor(int i = 0; i < atts.getLength(); i++){\n\t\t\t\tnewNode.putAttribute(atts.getQName(i), atts.getValue(i));\n\t\t\t}\n\t\t\t\n\t\t\tnodeStack.lastElement().put(newNode);\n\t\t\tnodeStack.push(newNode);\n\t\t\t\n\t\t\tbuffer = new StringBuffer();\n\t\t\t\n\t\t\tLog.d(\"xml\", uri + \" | \" + localName + \" | \" + qName + \" | \");\n\t\t\tfor(int i = 0; i < atts.getLength(); i++)\n\t\t\t\tLog.d(\"xml\", \"att(\" + atts.getLocalName(i) + \"): \" + atts.getValue(i));\n\t\t}",
"public void printAnnuaireName() {\n\t\t\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s,%s,%s,%s\",path, title, shortDescription, fullDescription);\n\t}",
"public String toString() {\nString output = new String();\n\noutput = \"shortName\" + \" : \" + \"\" + shortName +\"\\n\"; \noutput += \"type\" + \" : \" + \"\" + type + \"\\n\";\noutput += \"description\" + \" : \" + \"\" + description + \"\\n\"; \n\nreturn output; \n}",
"@Override\n public String toString(){\n String s;\n \n s = \"\\tparseOK: \" + parseOK + Constants.NL +\n \"\\trequest_uri: \" + request_uri + Constants.NL +\n \"\\tquery_string: \" + query_string + Constants.NL +\n \"\\trestAPIkeys: \" + restAPIkeys + Constants.NL +\n \"\\ttraceMsgQ: \" + traceMsgQ + Constants.NL;\n \n return s;\n }",
"private static void print(String p) {\n\t\tSystem.out.println(PREFIX + p);\n\t}",
"public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }",
"public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }",
"public void printOWLModel(){\n\t\tmodel.write(System.out, \"RDF/XML\");\t\t\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn (this.id + \"\\t\" + this.name + \"\\t\" + this.nodeType);\r\n\t}",
"String getAttributeQName(Object attr);",
"public String getQName(int i) {\n/* 125 */ return ((Attr)this.m_attrs.item(i)).getName();\n/* */ }",
"public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }",
"public String toString() {\n String output = this.name + \"(\";\n for (int i = 0; i < attributes.size(); i++) {\n output = output + attributes.get(i) + \":\" + domains.get(i);\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n output = output + \",\";\n }\n return output + \")\";\n }",
"public void startElement(String uri, String localName,String qName,\n Attributes attributes) throws SAXException {\n\n if(qName.equalsIgnoreCase(\"sce:PLPExtract\") | (qName.equalsIgnoreCase(\"sce:Payload\"))\n | (qName.equalsIgnoreCase(\"sce:Header\"))) {\n return;\n }\n\n builder.append(\"<\").append(qName).append(\">\");\n\n if (qName.equalsIgnoreCase(\"sce:mRID\")) {\n mRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:aliasName\")) {\n aliasName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:name\")) {\n name = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:grandFatherFlag\")) {\n grandFather = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:type\")) {\n pType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:value\")) {\n value = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:baseKind\")) {\n baseKind = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:classification\")) {\n classification = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:unit\")) {\n unit = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:speciesType\")) {\n speciesT = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:rSMVal\")) {\n rSMVal = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:specialProjectName\")) {\n specialProj = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:currentRating\")) {\n cRating = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:inServiceRating\")) {\n iRating = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:highWindFlag\")) {\n highWind = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:highFireFlag\")) {\n highFire = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:srsName\")) {\n srsName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:xPosition\")) {\n xPos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:yPosition\")) {\n yPos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:description\")) {\n desc = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:street\")) {\n street = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:city\")) {\n city = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:mapRefNumber\")) {\n mapRef = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:installationDate\")) {\n installDate = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:symbolRef\")) {\n symbolRef = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:orientation\")) {\n orientation = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:substationMRID\")) {\n substationMRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:owner\")) {\n owner = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:ownerType\")) {\n ownerType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:ratedVoltage\")) {\n ratedVoltage = true;\n }\n\n if (qName.equalsIgnoreCase(\"gml:pos\")) {\n pos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:bundleType\")) {\n bundleType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:circuitName\")) {\n circuitName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:circuitSection\")) {\n circuitSection = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:material\")) {\n material = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:size\")) {\n size = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:quantity\")) {\n quantity = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:phase\")) {\n phase = true;\n }\n\n if (qName.equalsIgnoreCase(\"gml:posList\")) {\n posList = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:no_of_wires\")) {\n no_of_wires = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:commIndicator\")) {\n commIndicator = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:structureID\")) {\n structureID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:strucRefMRID\")) {\n strucRefMRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:serviceType\")) {\n serviceType = true;\n }\n\n }",
"@Override\n public String toString() {\n \treturn this.getM_Name()+\" \"+getM_Description();\n }",
"public void startElement(String uri, String localName, String qName,Attributes attributes) throws SAXException \n\t{\t\n\t\tif(qName.equals(ReqifTags.TAG_SPEC_OBJECT))\n\t\t{\n\t\t\tif(attributes.getValue(ReqifTags.TAG_IDENTIFIER)!=null && attributes.getValue(ReqifTags.TAG_DESC)!=null)\n\t\t\t{\n\t\t\t\tString s=attributes.getValue(ReqifTags.TAG_DESC);\n\t\t\t\tchar[] test=s.toCharArray();\n\t\t\t\tfor(int i=0;i<test.length;i++)\n\t\t\t\t{\n\t\t\t\t\tif(test[i]=='&' || test[i]=='' || test[i]=='‘' || test[i]== '’' || test[i]=='“' || test[i]=='”')\n\t\t\t\t\t\ttest[i]=' ';\n\n\t\t\t\t}\n\t\t\t\ts=new String(test);\n\t\t\t\tdict.put(attributes.getValue(ReqifTags.TAG_IDENTIFIER),s);\n\t\t\t}\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_REQ_IF))\n\t\t{\n\t\t\tParsedReqifElement u=new ParsedReqifElement(\"Root\",\"Root\");\n\t\t\troot=new DefaultMutableTreeNode(u);\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SPECIFICATION))\n\t\t{\t\n\t\t\tParsedReqifElement u=new ParsedReqifElement(attributes.getValue(ReqifTags.TAG_DESC),dict.get(attributes.getValue(ReqifTags.TAG_DESC)));\n\t\t\ttemp=new DefaultMutableTreeNode(u);\n\t\t\troot.add(temp);\n\t\t\ttop1=temp;\n\t\t\tlevel++;\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SPEC_HIERARCHY))\n\t\t{\n\t\t\tbuf=new StringBuffer();\n\t\t\tlevel++;\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SOURCE))\n\t\t{\n\t\t\t//System.out.println(\"source\");\n\t\t\tisSource = true;\n\t\t\tbuf.delete(0, buf.length());\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_TARGET))\n\t\t{\n\t\t\t//System.out.println(\"target\");\n\t\t\tisTarget = true;\n\t\t\tbuf.delete(0, buf.length());\n\t\t}\n\t}",
"public String toString() {\t\t\n\t\treturn (\"Caption: \" + this.caption + \", Filename: \" + this.filename + \", Rating: \" + this.rating);\n\t}",
"public void displayRelation() {\n System.out.print(this.name + \"(\");\n for (int i = 0; i < attributes.size(); i++) {\n System.out.print(attributes.get(i) + \":\" + domains.get(i));\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n System.out.print(\",\");\n\n }\n System.out.print(\")\");\n System.out.print(\"\\nNumber of Tuples: \" + table.size() + \"\\n\");\n for (Tuple t : table)\n System.out.println(t);\n\n }",
"public void startElement(String uri, String localName,String qName, \n Attributes attributes) throws SAXException {\n \n\t\tif (qName.equalsIgnoreCase(\"Author\")) {\n\t\t\tauthor = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"title\")) {\n\t\t\ttitle = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"year\")) {\n\t\t\tyear = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"journal\")) {\n\t\t\tjournal = true;\n\t\t}\n\t\tif (qName.equalsIgnoreCase(\"number\")) {\n\t\t\tnumber = true;\n\t\t}\n \n\t}",
"@Override\n\t\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t\t\t\tif(qName.equalsIgnoreCase(\"TABLE\")) {\n\t\t\t\t\tuser = true;\n\t\t\t\t\ttable = true;\n\t\t\t\t}\n\t\t\t\telse if(localName.equalsIgnoreCase(\"FIELDNAME\")){\t\n\t\t\t\t\tuser = true;\n\t\t\t\t\tfieldName = true;\n\t\t\t\t}\n\t\t\t\telse if(localName.equalsIgnoreCase(\"FIELDTYPE\")){\t\n\t\t\t\t\tuser = true;\n\t\t\t\t\tfieldType = true;\n\t\t\t\t}\n\t\t\t\telse if(localName.equalsIgnoreCase(\"SIZE\")){\n\t\t\t\t\tuser = true;\n\t\t\t\t\tsize = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int i = 0;i< attributes.getLength();i++) {\n\t\t\t\t\tSystem.out.println(attributes.getQName(i) + \": \" + attributes.getValue(i));\n\t\t\t\t}\n\t\t}",
"@Override\n public String toString() {\n return info();\n }",
"public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }",
"@Override public String toString()\n {\n return String.format( \"\\t\\t\\t[ type:'%s', name:'%s', md5:'%s', local:'%s'\\n\", f_type, f_name, f_md5, f_local );\n }",
"private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}",
"@Override\n\tpublic void print() {\n\t\tSystem.out.println(\"Avaliable Media items are\");\n\t\t\n\t\tSystem.out.println(\"Identification Number number of copies title of item\");\n\n\t\t\t\tfor(int i =0; i<getTitle().length; i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(getIdentificatioNumber()[i]+\" \"\n\t\t\t\t\t+getNumberOfCopies()[i]+\" \"+getTitle()[i]);\n\t\t\t\t}\n\t\t\t}",
"void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}",
"public void dump(String prefix) {\n System.out.print(toString(prefix));\n System.out.println(\" \"+name);\n }",
"public String printInfo()\n\t{\n\t\tStringBuilder builder = new StringBuilder();\n\t\t\n\t\tbuilder.append(AppID);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(updateID);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(aggregatedRating);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(appRatingBeforeDeployment);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(aggregatedRating - appRatingBeforeDeployment);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(oneStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(twoStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(threeStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(fourStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(fiveStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(oneStar + twoStar + threeStar + fourStar + fiveStar);\n\t\treturn builder.toString();\n\t}",
"@Override\n public String toString()\n {\n return id + \"*\" + name + \"|\" + lat + \"&\"+lon + \"\\n\";\n }",
"@Override\r\n\tpublic String toString(){\r\n\t\treturn String.format(\"%s, %s, %s\", getSongName(), getArtist(), getAlbum());\r\n\t}",
"void printInfo();",
"public String toString(){\n\t\tString s1 = \"\\n======= \" + title + \" =========\";\n\t\tString s3 = \"\\n========================================\\n\";\n\t\treturn s1 + \"\\nTitle: \" + title + \"\\nArtist Name: \" + artistName + \"\\nGenre: \" + genre + \n\t\t\t\t\"\\nRating: \" + rating + \"\\nLength: \" + time + s3;\n\t}",
"static String serializeAttrs(NamedNodeMap attrs)\n {\n\t // This method serializes attributes. It currently has a bug in that it\n\t // does not correctly escape double quotes. How to handle this bug is\n\t // not yet clear, as the initial target of the serialized XML is a\n\t // database, where people are likely to want to search for the attribute\n\t // values, not entity references.\n\n\t StringBuffer value = new StringBuffer();\n\t int i;\n\t Attr attr;\n\n\t for (i = 0; i < attrs.getLength(); i++)\n\t {\n\t\t attr = (Attr) attrs.item(i);\n\t\t value.append(SPACE);\n\t\t value.append(attr.getNodeName());\n\t\t value.append(EQUALS);\n\t\t value.append(DOUBLEQUOTE);\n\t\t value.append(attr.getNodeValue());\n\t\t value.append(DOUBLEQUOTE);\n\t }\n\t return value.toString();\n }",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(name);\n\t}",
"public static void dumpNodeList(NodeList nl) {\n int len = nl.getLength();\n System.out.println(\"NodeList (\" + len + \" items):\");\n for (int i = 0; i < len; i++) {\n Node n = nl.item(i);\n System.out.print(\" \" + i + \" (\");\n switch (n.getNodeType()) {\n case Node.ATTRIBUTE_NODE:\n System.out.print(\"Attr\");\n break;\n case Node.CDATA_SECTION_NODE:\n System.out.print(\"CDATASection\");\n break;\n case Node.COMMENT_NODE:\n System.out.print(\"Comment\");\n break;\n case Node.ELEMENT_NODE:\n System.out.print(\"Element\");\n break;\n case Node.TEXT_NODE:\n System.out.print(\"Text\");\n break;\n }\n System.out.println(\") \" + n.getNodeName() + \" \" + n.getNodeValue());\n }\n }",
"@Override\n\tpublic String toString(final Attribute att) {\n\t\treturn null;\n\t}",
"public String print()\n\t{\n\t\tString s = \"\";\n\t\t\n\t\ts = \"<explanation text=\\\"\" + text + \"\\\">\";\n\t\ts = s + commentContainer.printComments();\n\t\tif (expression != null)\n\t\t{\n\t\t\ts = s + expression.print(); \n\t\t}\n\t\ts = s + \"</explanation>\";\n\t\t\n\t\treturn s;\n\t}",
"@RDF(\"foaf:name\")\n\tString getName();",
"public String getNameAndAttributes() {\n Formatter sbuff = new Formatter();\n sbuff.format(\"Structure \");\n getNameAndDimensions(sbuff, false, true);\n sbuff.format(\"%n\");\n for (Attribute att : attributes) {\n sbuff.format(\" %s:%s;%n\", getShortName(), att.toString());\n }\n return sbuff.toString();\n }",
"void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}",
"public void println() { System.out.println( toString() ); }",
"@Override\n\t\tpublic void print() {\n\n\t\t}",
"@Override\n\tpublic void attribute(QName qName, String value) {\n\t\t\n\t}",
"public void dump()\n {\n System.out.println(toString());\n }",
"public static void printInfo(){\n }",
"@Override\n public void infixDisplay() {\n System.out.print(name);\n }",
"public void showSamples(){\n\t\tfor(int i=0; i<arrIns.size(); i++){\n\t\t\tfor(int j=0; j<arrIns.get(i).numAttributes(); j++){\n\t\t\t\tSystem.out.print(\" | \" + arrIns.get(i).value(j) + \" | \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}"
] | [
"0.6083581",
"0.59313047",
"0.58983284",
"0.58938754",
"0.58224",
"0.57671064",
"0.57664937",
"0.57586706",
"0.5626233",
"0.5557665",
"0.5557533",
"0.554269",
"0.5530502",
"0.5529926",
"0.55171394",
"0.5514132",
"0.5514132",
"0.5514132",
"0.54895914",
"0.546582",
"0.5455717",
"0.5453401",
"0.5444693",
"0.54406536",
"0.5439829",
"0.5439375",
"0.5438739",
"0.5437119",
"0.5426438",
"0.5417268",
"0.53898764",
"0.53898764",
"0.5380366",
"0.5364993",
"0.53637683",
"0.5352493",
"0.5351332",
"0.53505874",
"0.53494817",
"0.53474325",
"0.5341015",
"0.53364253",
"0.5334776",
"0.53175914",
"0.5315594",
"0.5315424",
"0.5304758",
"0.53014904",
"0.52983755",
"0.5294143",
"0.5292277",
"0.5289515",
"0.5289385",
"0.5287625",
"0.5274219",
"0.5268504",
"0.5266013",
"0.52638054",
"0.5257621",
"0.5256488",
"0.5248515",
"0.52386916",
"0.5230802",
"0.5216004",
"0.5215526",
"0.5201723",
"0.5199675",
"0.51963896",
"0.51934075",
"0.5185517",
"0.51794755",
"0.5178492",
"0.5177717",
"0.51591486",
"0.51455355",
"0.5141859",
"0.51407194",
"0.5136129",
"0.51345843",
"0.51303136",
"0.51300204",
"0.51280713",
"0.51275504",
"0.5124343",
"0.51237404",
"0.51195043",
"0.5115711",
"0.5113388",
"0.51123655",
"0.51071686",
"0.5102275",
"0.50985265",
"0.50948715",
"0.5092905",
"0.5092547",
"0.5084289",
"0.50819707",
"0.5080387",
"0.5079224",
"0.5077368",
"0.50764936"
] | 0.0 | -1 |
System.out.printf("uri=%s\nlocalName=%s\nqName=%s\nattributes=%s\n\n", uri, localName, qName, attributes); | public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
if (!qName.equals("yweather:astronomy")) return;
sunriseHour = Util.parseTime(attributes.getValue("sunrise"));
sunsetHour = Util.parseTime(attributes.getValue("sunset"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String print() {\r\n String attribute = \"Title of resource:\\t\" + getTitle() + \"\\n\" + \"url of resource:\\t\" + url;\r\n System.out.println(attribute);\r\n return attribute;\r\n }",
"public void PrintAttributes()\n\t{\n\t\tSystem.out.println(\"Name: \"+ name);\n\t\tSystem.out.println(\"Address: \"+ address);\n\t\tSystem.out.println(\"Phone_Number: \"+ phoneNumber);\n\t\tSystem.out.println(\"Year_Built: \"+ yearBuilt);\n\t\tSystem.out.println(\"Price: \"+ price);\n\t\tSystem.out.println(\"Max_Residents: \"+ maxResidents);\n\t\tSystem.out.println(\"Catagory: \"+ catagory);\n\t\t\n\t\t//GetKeywords(); \n\t\tif(keywords.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Keywords\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(int i = 0; i < keywords.size(); i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Keyword: \" + keywords.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//GetAvailableDates(); \n\t\tif(openDates.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Available Date\");\n\t\t}\n\t\tfor(int j = 0; j < openDates.size(); j++)\n\t\t{\n\t\t\tSystem.out.println(\"Available Date: \"+openDates.get(j).PrintDate());\n\t\t}\n\t}",
"public static void printNode(Node parent) {\n if (parent == null) {\n System.out.println(\"null node!\");\n return;\n }\n System.out.println(parent.getNodeName() + \" node:\");\n NamedNodeMap attrs = parent.getAttributes();\n for(int i = 0 ; i < attrs.getLength() ; i++) {\n Attr attribute = (Attr)attrs.item(i);\n System.out.println(\" \" + attribute.getName()+\" = \"+attribute.getValue());\n }\n }",
"private void printlnCommon(Node n) {\n\t System.out.print(\" nodeName=\\\"\" + n.getNodeName() + \"\\\"\");\n\n\t String val = n.getNamespaceURI();\n\t if (val != null) {\n\t out.print(\" uri=\\\"\" + val + \"\\\"\");\n\t }\n\n\t val = n.getPrefix();\n\n\t if (val != null) {\n\t out.print(\" pre=\\\"\" + val + \"\\\"\");\n\t }\n\n\t val = n.getLocalName();\n\t if (val != null) {\n\t out.print(\" local=\\\"\" + val + \"\\\"\");\n\t }\n\n\t val = n.getNodeValue();\n\t if (val != null) {\n\t out.print(\" nodeValue=\");\n\t if (val.trim().equals(\"\")) {\n\t // Whitespace\n\t out.print(\"[WS]\");\n\t }\n\t else {\n\t out.print(\"\\\"\" + n.getNodeValue() + \"\\\"\");\n\t }\n\t }\n\t out.println();\n\t}",
"public void displaySchema() {\n for (String s : attributes)\n System.out.print(s + \"\");\n }",
"public String toString() {\n String id = element.getAttributeNS(null, \"id\");\n return element.getTagName() + (id.equals(\"\") ? \"\" : \"#\" + id) + \".\"\n + (attributeNamespaceURI == null || attributeNamespaceURI.equals(\"\") ? \"\" : attributeNamespaceURI + \":\")\n + attributeLocalName + \" = \" + expression;\n }",
"public String toString() {\n\t URI uri = getURI();\n\t return (uri == null) \n\t \t? \"Anonymous (\" + getAnonID() + \")\"\n\t \t: uri.toString();\n//\t \t: (kb == null)\n//\t \t ? uri.toString() \n//\t \t : kb.getQNames().shortForm(uri);\n\t}",
"public void dumpAttributeList(Attributes atts)\n {\n\tif (atts.getLength() == 0)\n\t System.out.println(nestString + \" (no attributes) \");\n\telse\n\t {\n\t System.out.println(nestString + \" AttributeList: \");\n\t for (int i = 0; i < atts.getLength(); i++)\n\t\t{\n\t\tString name = atts.getQName(i);\n\t\t// String type = atts.getType(i);\n\t\tString value = atts.getValue(i);\n\t\tSystem.out.println(nestString + \" name=\" + name + \n\t\t\t\t \" value=\" + value);\n\t\t}\n\t }\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\tString text = getElement();\r\n\t\tif (mainAttr!=null) {\r\n\t\t\ttext += \" \" + mainAttr;\r\n\t\t}\r\n\t\treturn text;\r\n\t}",
"public void print() {\n print$$dsl$guidsl$guigs();\n System.out.print( \" eqn =\" + eqn );\n }",
"public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\n\t\t// On débute une balise dont on veut le contenu textuel\n\t\tif (qName.equalsIgnoreCase(mXmlTagContainingText)) {\n\t\t\tinsideTextTag = true;\n\t\t}\n\n\t\tif (debug) {\n\t\t\tfor (int indent=0 ; indent < elementOffsetStackCursor +1; indent++) {System.out.print (\"--\");}\n\t\t\tSystem.out.print (\"Debug: startElement >\"+qName+\"< \");\n\t\t\tfor (int indent=0 ; indent < attributes.getLength() ; indent++) {System.out.print (\">\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );}\n\t\t\tSystem.out.println ();\n\t\t}\n\n\t\t// So far, I do not why but accessing here to the attributes values \n\t\t// prevent the case that further in the createAnnotation method, \n\t\t// you obtain a substring of attributes.toString which does not correspond to an attribute value \n\t\t// someway the current solution acts as a clone...\n\t\tfor (int indent=0 ; indent < attributes.getLength() ; indent++) {\n\t\t\tattributes.getValue(indent);\n\t\t\t//if (attributes.getValue(indent).startsWith(\"mph=\\\"\"))\t\t{ \n\t\t\t//\tSystem.out.println (\"Debug: startElement >\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );\n\t\t\t//}\n\t\t\t//System.out.print (\">\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );\n\t\t}\n\n\t\t// on stocke des informations concernant l'élément XML courant en l'empilant\n\t\t// le problème est que l'on n'a pas accès au begin et end offset d'une balise en même temps \n\t\t// et qu'il faut garder une trace des begins des balises ouvertes lorsque l'on rencontre leur end \n\t\t//if ( attributes.getLength() == 0) attributes = null;\n\t\tXMLElement xE = new XMLElement(uri, localName, qName, attributes);\n\t\telementOffsetStack.add(xE);\n\n\t\telementOffsetStackCursor++;\n\t\tcurrentOpenElementWithTheBeginToSet++;\n\n\t\t// debug\n\t\tif (debug) {\n\t\t\tfor (int indent=0 ; indent < elementOffsetStackCursor ; indent++) {System.out.print (\"--\");}\n\t\t\t//System.out.println (\"Debug: startElement empile uri>\" +uri+\"< localName>\"+localName+\"< qName>\"+qName+\"< arrayListIndex>\"+arrayListIndex+\" curentOpenTagToAnnotate>\"+curentOpenTagToAnnotate+\"<\");\n\t\t\tSystem.out.println (\"Debug: startElement tag>\"+qName+\"< que l'on empile ; il y a >\"+\n\t\t\telementOffsetStackCursor+\"< éléments dans la pile ; il y a >\"+\n\t\t\t\t\tcurrentOpenElementWithTheBeginToSet+\"< balise en attente dont le begin est définir\");\n\n\t\t}\n\t}",
"private static void PrintNode(Node n, String prefix, int depth) {\r\n\r\n\t\ttry {\r\n\t\t\tSystem.out.print(\"\\n\" + Pad(depth) + \"[\" + n.getNodeName());\r\n\t\t\tNamedNodeMap m = n.getAttributes();\r\n\t\t\tfor (int i = 0; m != null && i < m.getLength(); i++) {\r\n\t\t\t\tNode item = m.item(i);\r\n\t\t\t\tSystem.out.print(\" \" + item.getNodeName() + \"=\"\r\n\t\t\t\t\t\t+ item.getNodeValue());\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"] \");\r\n\r\n\t\t\tboolean has_text = false;\r\n\t\t\tif (n.getNodeType() == Node.TEXT_NODE) {\r\n\t\t\t\thas_text = true;\r\n\t\t\t\tString valn = n.getNodeValue().trim();\r\n\t\t\t\tif (valn.length() > 0)\r\n\t\t\t\t\tSystem.out.print(\"\\n\" + Pad(depth) + \" \\\"\" + valn + \"\\\"\");\r\n\t\t\t}\r\n\r\n\t\t\tNodeList cn = n.getChildNodes();\r\n\r\n\t\t\tfor (int i = 0; cn != null && i < cn.getLength(); i++) {\r\n\t\t\t\tNode item = cn.item(i);\r\n\t\t\t\tif (item.getNodeType() == Node.TEXT_NODE) {\r\n\t\t\t\t\tString val = item.getNodeValue().trim();\r\n\t\t\t\t\tif (val.length() > 0)\r\n\t\t\t\t\t\tSystem.out.print(\"\\n\" + Pad(depth) + val + \"\\\"\");\r\n\t\t\t\t} else\r\n\t\t\t\t\tPrintNode(item, prefix, depth + 2);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(Pad(depth) + \"Exception e: \");\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void print() {\n\t\tsuper.print();\r\n\t\tSystem.out.println(\"album=\" + album + \", year=\" + year);\r\n\t}",
"public void showAttributes() {\r\n\t\tSystem.out.println(\"Name : \"+getName());\r\n\t\tSystem.out.println(\"ID : \"+getId());\r\n\t\tSystem.out.println(\"Percentage : \"+getPercentage());\r\n\t\tSystem.out.println(\"Skills : \");\r\n\t\tfor(String skill:getSkills()) {\r\n\t\t\tSystem.out.print(skill+\" \");\r\n\t\t}\r\n\t\t\r\n\t}",
"public String toString() { return kind() + \":\"+ text() ; }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"@Override\n\tpublic void printNode() {\n\t\tSystem.out.println(\"------Args_list------\");\n\t\te.printNode();\n\t\tif(a!=null)\n\t\t\ta.printNode();\n\t\t\n\t}",
"@Override\r\n public String toString() {\r\n return getURI();\r\n }",
"public String printAttributes() {\n checkNotUnknown();\n StringBuilder b = new StringBuilder();\n if (hasDontDelete()) {\n b.append(\"(DontDelete\");\n if (isMaybeDontDelete())\n b.append(\"+\");\n if (isMaybeNotDontDelete())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasDontEnum()) {\n b.append(\"(DontEnum\");\n if (isMaybeDontEnum())\n b.append(\"+\");\n if (isMaybeNotDontEnum())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasReadOnly()) {\n b.append(\"(ReadOnly\");\n if (isMaybeReadOnly())\n b.append(\"+\");\n if (isMaybeNotReadOnly())\n b.append(\"-\");\n b.append(\")\");\n }\n return b.toString();\n }",
"public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }",
"@Override\n public String toString()\n {\n return albumName + ' ' + artistName + ' ' + genre + '\\n';\n }",
"public java.lang.String toString() {\n // call toString() with includeNS true by default and declareNS false\n String xml = this.toString(true, false);\n return xml;\n }",
"private void printFullTree()\r\n {\r\n System.out.println(fullXmlTree.toString());\r\n }",
"public void printString() {\n\t\tSystem.out.println(name);\n\t\t\n\t\t\n\t}",
"public void print ( InstanceAttributes instAttributes ){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}",
"public String toString()\n\t{\t\n\t\treturn \"Element name:\\t \"+elementName+\"\\nAtomic number:\\t \"+atomicNum+\"\\nSymbol:\\t\\t \"+symbol+\"\\nBoiling Point:\\t \"+boilingPoint+\" K\"+\"\\nMelting Point:\\t \"+meltingPoint+\" K\"+\"\\nDensity:\\t \"\n\t\t\t\t+density+\" g/L\"+\"\\nMolecular Weight: \"+molecularWeight+\" g/mole\\n\";\t\t\t\n\t\n\t}",
"private static void prtln(String s) {\n\t\tif (debug) {\n\t\t\t// System.out.println(\"XmlStringTester: \" + s);\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}",
"public void info()\n {\n System.out.println(toString());\n }",
"public void printInfo(){\n\t}",
"public void printInfo(){\n\t}",
"public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }",
"@Override\n public String toString(\n ){\n return toXRI(); \n }",
"public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}",
"private void echo(Node n) {\n\t outputIndentation();\n\t int type = n.getNodeType();\n\n\t switch (type) {\n\t case Node.ATTRIBUTE_NODE:\n\t out.print(\"ATTR:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.CDATA_SECTION_NODE:\n\t out.print(\"CDATA:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.COMMENT_NODE:\n\t out.print(\"COMM:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_FRAGMENT_NODE:\n\t out.print(\"DOC_FRAG:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_NODE:\n\t out.print(\"DOC:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_TYPE_NODE:\n\t out.print(\"DOC_TYPE:\");\n\t printlnCommon(n);\n\t NamedNodeMap nodeMap = ((DocumentType)n).getEntities();\n\t indent += 2;\n\t for (int i = 0; i < nodeMap.getLength(); i++) {\n\t Entity entity = (Entity)nodeMap.item(i);\n\t echo(entity);\n\t }\n\t indent -= 2;\n\t break;\n\n\t case Node.ELEMENT_NODE:\n\t out.print(\"ELEM:\");\n\t printlnCommon(n);\n\n\t NamedNodeMap atts = n.getAttributes();\n\t indent += 2;\n\t for (int i = 0; i < atts.getLength(); i++) {\n\t Node att = atts.item(i);\n\t echo(att);\n\t }\n\t indent -= 2;\n\t break;\n\n\t case Node.ENTITY_NODE:\n\t out.print(\"ENT:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.ENTITY_REFERENCE_NODE:\n\t out.print(\"ENT_REF:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.NOTATION_NODE:\n\t out.print(\"NOTATION:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.PROCESSING_INSTRUCTION_NODE:\n\t out.print(\"PROC_INST:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.TEXT_NODE:\n\t out.print(\"TEXT:\");\n\t printlnCommon(n);\n\t break;\n\n\t default:\n\t out.print(\"UNSUPPORTED NODE: \" + type);\n\t printlnCommon(n);\n\t break;\n\t }\n\n\t indent++;\n\t for (Node child = n.getFirstChild(); child != null;\n\t child = child.getNextSibling()) {\n\t echo(child);\n\t }\n\t indent--;\n\t}",
"public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}",
"public void startElement(String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException {\n newContent.append(\"<\");\n newContent.append(qName);\n\n for (int i = 0; i < attributes.getLength(); i++) {\n String qn = attributes.getQName(i);\n newContent.append(\" \");\n newContent.append(qn);\n newContent.append(\"=\");\n newContent.append(\"\\\"\");\n newContent.append(attributes.getValue(i));\n newContent.append(\"\\\"\");\n\n //Avoid duplicate namespace declarations\n if (qn.startsWith(\"xmlns\")) {\n String ln = attributes.getLocalName(i);\n if (ln.equals(\"xmlns\")) {\n namespaces.remove(\"\");\n } else {\n namespaces.remove(ln);\n }\n }\n }\n\n Enumeration enum = namespaces.keys();\n while ( enum.hasMoreElements() ) {\n String key = (String) enum.nextElement();\n newContent.append(\" xmlns\");\n if (key.length() > 0) {\n newContent.append(\":\");\n newContent.append(key);\n }\n newContent.append(\"=\");\n newContent.append(\"\\\"\");\n newContent.append(namespaces.get(key));\n newContent.append(\"\\\"\");\n namespaces.remove(key);\n }\n\n newContent.append(\">\");\n }",
"void doShowUri()\n\t{\n\t\ttry\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(\"URI = \"); //$NON-NLS-1$\n\t\t\tsb.append( m_session.getURI() );\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noUriReceived\")); //$NON-NLS-1$\n\t\t}\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"[name:]\"+name;\n\t}",
"public void startElement(String uri, String localName, String qName, Attributes attrs) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = qName;\r\n if (charState >= 0 && lineBuffer.length() > 0) {\r\n \tcharWriter.println(lineBuffer.toString());\r\n \tlineBuffer.setLength(0);\r\n }\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG)) {\r\n\t\t\t// ignore\r\n } else { // variable GEDCOM keyword\r\n\t charState = 2;\r\n \tlineBuffer.append(String.valueOf(saxLevel));\r\n \tString id = attrs.getValue(ID_ATTR);\r\n \tif (id != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(id);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tlineBuffer.append(' ');\r\n \tlineBuffer.append(qName.toUpperCase());\r\n \tString ref = attrs.getValue(REF_ATTR);\r\n \tif (ref != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(ref);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tsaxLevel ++;\r\n } // else ignore unknown elements\r\n }",
"public String toString(){\n \treturn (weight + \"\t\" + query);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Artist : \"+this.artistName+\"\\n\";\n\t}",
"public void print () {\r\n System.out.println(\"Place \"+name+\": lat \"+lat+\" lon \"+lon+\r\n \" elevation \"+ele);\r\n }",
"private static void println(String message, SimpleAttributeSet settings) {print(message + \"\\n\", settings);}",
"void printestateName(estateName iEstateName)\n {\n System.out.println(iEstateName.getElementValue());\n }",
"public String toString() {\n return getQualifiedName();\n }",
"private void printInfo(SAXParseException e) {\n\t}",
"public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}",
"@Test\n\tpublic void test_TCM__String_toString() {\n\t\t//expected value\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tString str= attr.toString();\n\t\tassertTrue(\"incorrect toString form\", str.equals(\"[Attribute: prefx:test=\\\"value\\\"]\"));\n\n\t}",
"private String printXML(Node target){\n\t\treturn \"\";\n\t}",
"public void showName() {\n\t\tSystem.out.println(\"Object id: \" + id + \", \" + description + \": \" + name);\n\t\t//System.out.println(description);\n\t}",
"public static void main(String[] args) {\n System.out.println(AIS_SART.toString());\n System.out.println(AT_ANCHOR.toString());\n }",
"@Override\n\t\tpublic void startElement(String uri, String localName, String qName,\n\t\t\t\tAttributes atts) throws SAXException {\n\t\t\tNode newNode = new Node(localName);\n\t\t\t\n\t\t\tfor(int i = 0; i < atts.getLength(); i++){\n\t\t\t\tnewNode.putAttribute(atts.getQName(i), atts.getValue(i));\n\t\t\t}\n\t\t\t\n\t\t\tnodeStack.lastElement().put(newNode);\n\t\t\tnodeStack.push(newNode);\n\t\t\t\n\t\t\tbuffer = new StringBuffer();\n\t\t\t\n\t\t\tLog.d(\"xml\", uri + \" | \" + localName + \" | \" + qName + \" | \");\n\t\t\tfor(int i = 0; i < atts.getLength(); i++)\n\t\t\t\tLog.d(\"xml\", \"att(\" + atts.getLocalName(i) + \"): \" + atts.getValue(i));\n\t\t}",
"public void printAnnuaireName() {\n\t\t\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s,%s,%s,%s\",path, title, shortDescription, fullDescription);\n\t}",
"public String toString() {\nString output = new String();\n\noutput = \"shortName\" + \" : \" + \"\" + shortName +\"\\n\"; \noutput += \"type\" + \" : \" + \"\" + type + \"\\n\";\noutput += \"description\" + \" : \" + \"\" + description + \"\\n\"; \n\nreturn output; \n}",
"@Override\n public String toString(){\n String s;\n \n s = \"\\tparseOK: \" + parseOK + Constants.NL +\n \"\\trequest_uri: \" + request_uri + Constants.NL +\n \"\\tquery_string: \" + query_string + Constants.NL +\n \"\\trestAPIkeys: \" + restAPIkeys + Constants.NL +\n \"\\ttraceMsgQ: \" + traceMsgQ + Constants.NL;\n \n return s;\n }",
"private static void print(String p) {\n\t\tSystem.out.println(PREFIX + p);\n\t}",
"public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }",
"public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }",
"public void printOWLModel(){\n\t\tmodel.write(System.out, \"RDF/XML\");\t\t\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn (this.id + \"\\t\" + this.name + \"\\t\" + this.nodeType);\r\n\t}",
"String getAttributeQName(Object attr);",
"public String getQName(int i) {\n/* 125 */ return ((Attr)this.m_attrs.item(i)).getName();\n/* */ }",
"public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }",
"public String toString() {\n String output = this.name + \"(\";\n for (int i = 0; i < attributes.size(); i++) {\n output = output + attributes.get(i) + \":\" + domains.get(i);\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n output = output + \",\";\n }\n return output + \")\";\n }",
"public void startElement(String uri, String localName,String qName,\n Attributes attributes) throws SAXException {\n\n if(qName.equalsIgnoreCase(\"sce:PLPExtract\") | (qName.equalsIgnoreCase(\"sce:Payload\"))\n | (qName.equalsIgnoreCase(\"sce:Header\"))) {\n return;\n }\n\n builder.append(\"<\").append(qName).append(\">\");\n\n if (qName.equalsIgnoreCase(\"sce:mRID\")) {\n mRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:aliasName\")) {\n aliasName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:name\")) {\n name = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:grandFatherFlag\")) {\n grandFather = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:type\")) {\n pType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:value\")) {\n value = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:baseKind\")) {\n baseKind = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:classification\")) {\n classification = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:unit\")) {\n unit = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:speciesType\")) {\n speciesT = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:rSMVal\")) {\n rSMVal = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:specialProjectName\")) {\n specialProj = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:currentRating\")) {\n cRating = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:inServiceRating\")) {\n iRating = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:highWindFlag\")) {\n highWind = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:highFireFlag\")) {\n highFire = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:srsName\")) {\n srsName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:xPosition\")) {\n xPos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:yPosition\")) {\n yPos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:description\")) {\n desc = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:street\")) {\n street = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:city\")) {\n city = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:mapRefNumber\")) {\n mapRef = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:installationDate\")) {\n installDate = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:symbolRef\")) {\n symbolRef = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:orientation\")) {\n orientation = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:substationMRID\")) {\n substationMRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:owner\")) {\n owner = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:ownerType\")) {\n ownerType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:ratedVoltage\")) {\n ratedVoltage = true;\n }\n\n if (qName.equalsIgnoreCase(\"gml:pos\")) {\n pos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:bundleType\")) {\n bundleType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:circuitName\")) {\n circuitName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:circuitSection\")) {\n circuitSection = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:material\")) {\n material = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:size\")) {\n size = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:quantity\")) {\n quantity = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:phase\")) {\n phase = true;\n }\n\n if (qName.equalsIgnoreCase(\"gml:posList\")) {\n posList = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:no_of_wires\")) {\n no_of_wires = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:commIndicator\")) {\n commIndicator = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:structureID\")) {\n structureID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:strucRefMRID\")) {\n strucRefMRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:serviceType\")) {\n serviceType = true;\n }\n\n }",
"@Override\n public String toString() {\n \treturn this.getM_Name()+\" \"+getM_Description();\n }",
"public void startElement(String uri, String localName, String qName,Attributes attributes) throws SAXException \n\t{\t\n\t\tif(qName.equals(ReqifTags.TAG_SPEC_OBJECT))\n\t\t{\n\t\t\tif(attributes.getValue(ReqifTags.TAG_IDENTIFIER)!=null && attributes.getValue(ReqifTags.TAG_DESC)!=null)\n\t\t\t{\n\t\t\t\tString s=attributes.getValue(ReqifTags.TAG_DESC);\n\t\t\t\tchar[] test=s.toCharArray();\n\t\t\t\tfor(int i=0;i<test.length;i++)\n\t\t\t\t{\n\t\t\t\t\tif(test[i]=='&' || test[i]=='' || test[i]=='‘' || test[i]== '’' || test[i]=='“' || test[i]=='”')\n\t\t\t\t\t\ttest[i]=' ';\n\n\t\t\t\t}\n\t\t\t\ts=new String(test);\n\t\t\t\tdict.put(attributes.getValue(ReqifTags.TAG_IDENTIFIER),s);\n\t\t\t}\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_REQ_IF))\n\t\t{\n\t\t\tParsedReqifElement u=new ParsedReqifElement(\"Root\",\"Root\");\n\t\t\troot=new DefaultMutableTreeNode(u);\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SPECIFICATION))\n\t\t{\t\n\t\t\tParsedReqifElement u=new ParsedReqifElement(attributes.getValue(ReqifTags.TAG_DESC),dict.get(attributes.getValue(ReqifTags.TAG_DESC)));\n\t\t\ttemp=new DefaultMutableTreeNode(u);\n\t\t\troot.add(temp);\n\t\t\ttop1=temp;\n\t\t\tlevel++;\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SPEC_HIERARCHY))\n\t\t{\n\t\t\tbuf=new StringBuffer();\n\t\t\tlevel++;\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SOURCE))\n\t\t{\n\t\t\t//System.out.println(\"source\");\n\t\t\tisSource = true;\n\t\t\tbuf.delete(0, buf.length());\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_TARGET))\n\t\t{\n\t\t\t//System.out.println(\"target\");\n\t\t\tisTarget = true;\n\t\t\tbuf.delete(0, buf.length());\n\t\t}\n\t}",
"public String toString() {\t\t\n\t\treturn (\"Caption: \" + this.caption + \", Filename: \" + this.filename + \", Rating: \" + this.rating);\n\t}",
"public void displayRelation() {\n System.out.print(this.name + \"(\");\n for (int i = 0; i < attributes.size(); i++) {\n System.out.print(attributes.get(i) + \":\" + domains.get(i));\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n System.out.print(\",\");\n\n }\n System.out.print(\")\");\n System.out.print(\"\\nNumber of Tuples: \" + table.size() + \"\\n\");\n for (Tuple t : table)\n System.out.println(t);\n\n }",
"public void startElement(String uri, String localName,String qName, \n Attributes attributes) throws SAXException {\n \n\t\tif (qName.equalsIgnoreCase(\"Author\")) {\n\t\t\tauthor = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"title\")) {\n\t\t\ttitle = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"year\")) {\n\t\t\tyear = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"journal\")) {\n\t\t\tjournal = true;\n\t\t}\n\t\tif (qName.equalsIgnoreCase(\"number\")) {\n\t\t\tnumber = true;\n\t\t}\n \n\t}",
"@Override\n\t\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t\t\t\tif(qName.equalsIgnoreCase(\"TABLE\")) {\n\t\t\t\t\tuser = true;\n\t\t\t\t\ttable = true;\n\t\t\t\t}\n\t\t\t\telse if(localName.equalsIgnoreCase(\"FIELDNAME\")){\t\n\t\t\t\t\tuser = true;\n\t\t\t\t\tfieldName = true;\n\t\t\t\t}\n\t\t\t\telse if(localName.equalsIgnoreCase(\"FIELDTYPE\")){\t\n\t\t\t\t\tuser = true;\n\t\t\t\t\tfieldType = true;\n\t\t\t\t}\n\t\t\t\telse if(localName.equalsIgnoreCase(\"SIZE\")){\n\t\t\t\t\tuser = true;\n\t\t\t\t\tsize = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int i = 0;i< attributes.getLength();i++) {\n\t\t\t\t\tSystem.out.println(attributes.getQName(i) + \": \" + attributes.getValue(i));\n\t\t\t\t}\n\t\t}",
"@Override\n public String toString() {\n return info();\n }",
"public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }",
"@Override public String toString()\n {\n return String.format( \"\\t\\t\\t[ type:'%s', name:'%s', md5:'%s', local:'%s'\\n\", f_type, f_name, f_md5, f_local );\n }",
"private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}",
"@Override\n\tpublic void print() {\n\t\tSystem.out.println(\"Avaliable Media items are\");\n\t\t\n\t\tSystem.out.println(\"Identification Number number of copies title of item\");\n\n\t\t\t\tfor(int i =0; i<getTitle().length; i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(getIdentificatioNumber()[i]+\" \"\n\t\t\t\t\t+getNumberOfCopies()[i]+\" \"+getTitle()[i]);\n\t\t\t\t}\n\t\t\t}",
"public void dump(String prefix) {\n System.out.print(toString(prefix));\n System.out.println(\" \"+name);\n }",
"void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}",
"public String printInfo()\n\t{\n\t\tStringBuilder builder = new StringBuilder();\n\t\t\n\t\tbuilder.append(AppID);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(updateID);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(aggregatedRating);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(appRatingBeforeDeployment);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(aggregatedRating - appRatingBeforeDeployment);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(oneStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(twoStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(threeStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(fourStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(fiveStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(oneStar + twoStar + threeStar + fourStar + fiveStar);\n\t\treturn builder.toString();\n\t}",
"@Override\n public String toString()\n {\n return id + \"*\" + name + \"|\" + lat + \"&\"+lon + \"\\n\";\n }",
"@Override\r\n\tpublic String toString(){\r\n\t\treturn String.format(\"%s, %s, %s\", getSongName(), getArtist(), getAlbum());\r\n\t}",
"void printInfo();",
"public String toString(){\n\t\tString s1 = \"\\n======= \" + title + \" =========\";\n\t\tString s3 = \"\\n========================================\\n\";\n\t\treturn s1 + \"\\nTitle: \" + title + \"\\nArtist Name: \" + artistName + \"\\nGenre: \" + genre + \n\t\t\t\t\"\\nRating: \" + rating + \"\\nLength: \" + time + s3;\n\t}",
"static String serializeAttrs(NamedNodeMap attrs)\n {\n\t // This method serializes attributes. It currently has a bug in that it\n\t // does not correctly escape double quotes. How to handle this bug is\n\t // not yet clear, as the initial target of the serialized XML is a\n\t // database, where people are likely to want to search for the attribute\n\t // values, not entity references.\n\n\t StringBuffer value = new StringBuffer();\n\t int i;\n\t Attr attr;\n\n\t for (i = 0; i < attrs.getLength(); i++)\n\t {\n\t\t attr = (Attr) attrs.item(i);\n\t\t value.append(SPACE);\n\t\t value.append(attr.getNodeName());\n\t\t value.append(EQUALS);\n\t\t value.append(DOUBLEQUOTE);\n\t\t value.append(attr.getNodeValue());\n\t\t value.append(DOUBLEQUOTE);\n\t }\n\t return value.toString();\n }",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(name);\n\t}",
"public static void dumpNodeList(NodeList nl) {\n int len = nl.getLength();\n System.out.println(\"NodeList (\" + len + \" items):\");\n for (int i = 0; i < len; i++) {\n Node n = nl.item(i);\n System.out.print(\" \" + i + \" (\");\n switch (n.getNodeType()) {\n case Node.ATTRIBUTE_NODE:\n System.out.print(\"Attr\");\n break;\n case Node.CDATA_SECTION_NODE:\n System.out.print(\"CDATASection\");\n break;\n case Node.COMMENT_NODE:\n System.out.print(\"Comment\");\n break;\n case Node.ELEMENT_NODE:\n System.out.print(\"Element\");\n break;\n case Node.TEXT_NODE:\n System.out.print(\"Text\");\n break;\n }\n System.out.println(\") \" + n.getNodeName() + \" \" + n.getNodeValue());\n }\n }",
"@Override\n\tpublic String toString(final Attribute att) {\n\t\treturn null;\n\t}",
"public String print()\n\t{\n\t\tString s = \"\";\n\t\t\n\t\ts = \"<explanation text=\\\"\" + text + \"\\\">\";\n\t\ts = s + commentContainer.printComments();\n\t\tif (expression != null)\n\t\t{\n\t\t\ts = s + expression.print(); \n\t\t}\n\t\ts = s + \"</explanation>\";\n\t\t\n\t\treturn s;\n\t}",
"@RDF(\"foaf:name\")\n\tString getName();",
"public String getNameAndAttributes() {\n Formatter sbuff = new Formatter();\n sbuff.format(\"Structure \");\n getNameAndDimensions(sbuff, false, true);\n sbuff.format(\"%n\");\n for (Attribute att : attributes) {\n sbuff.format(\" %s:%s;%n\", getShortName(), att.toString());\n }\n return sbuff.toString();\n }",
"void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}",
"public void println() { System.out.println( toString() ); }",
"@Override\n\t\tpublic void print() {\n\n\t\t}",
"@Override\n\tpublic void attribute(QName qName, String value) {\n\t\t\n\t}",
"public void dump()\n {\n System.out.println(toString());\n }",
"public static void printInfo(){\n }",
"@Override\n public void infixDisplay() {\n System.out.print(name);\n }",
"public void showSamples(){\n\t\tfor(int i=0; i<arrIns.size(); i++){\n\t\t\tfor(int j=0; j<arrIns.get(i).numAttributes(); j++){\n\t\t\t\tSystem.out.print(\" | \" + arrIns.get(i).value(j) + \" | \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}"
] | [
"0.6083921",
"0.5931076",
"0.589877",
"0.5893725",
"0.582345",
"0.5767645",
"0.57670623",
"0.5759229",
"0.5626512",
"0.5556805",
"0.5556417",
"0.5542179",
"0.5531304",
"0.55302036",
"0.5517569",
"0.5515653",
"0.5515653",
"0.5515653",
"0.5489658",
"0.546588",
"0.5455742",
"0.54541075",
"0.5445424",
"0.54414916",
"0.5440278",
"0.5440204",
"0.5438555",
"0.5436911",
"0.54258966",
"0.54186225",
"0.5390574",
"0.5390574",
"0.5381077",
"0.5365101",
"0.5363378",
"0.53527266",
"0.5351232",
"0.535103",
"0.53489405",
"0.5347949",
"0.5340098",
"0.53361875",
"0.5335557",
"0.5317773",
"0.5316291",
"0.53161037",
"0.5306135",
"0.53009856",
"0.529885",
"0.5294268",
"0.52928764",
"0.52902573",
"0.52890134",
"0.5287038",
"0.52751917",
"0.5268668",
"0.52661467",
"0.52630067",
"0.52575874",
"0.52564925",
"0.52489984",
"0.5238851",
"0.5231543",
"0.52170223",
"0.52161354",
"0.5202414",
"0.51999015",
"0.51952124",
"0.5193689",
"0.5184609",
"0.5179118",
"0.51790863",
"0.51772785",
"0.51592076",
"0.51464975",
"0.5142777",
"0.5140934",
"0.51365685",
"0.51354206",
"0.51303065",
"0.51298374",
"0.51275975",
"0.5126997",
"0.51250046",
"0.5124622",
"0.5119062",
"0.51153904",
"0.5115244",
"0.51131535",
"0.51064914",
"0.5102306",
"0.5099486",
"0.509527",
"0.5094152",
"0.5093689",
"0.50844955",
"0.5082254",
"0.50810295",
"0.5079982",
"0.5077926",
"0.50762707"
] | 0.0 | -1 |
System.out.printf("uri=%s\nlocalName=%s\nqName=%s\nattributes=%s\n\n", uri, localName, qName, attributes); | public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
if (!qName.equals("yweather:condition")) return;
sky = attributes.getValue("text").toLowerCase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String print() {\r\n String attribute = \"Title of resource:\\t\" + getTitle() + \"\\n\" + \"url of resource:\\t\" + url;\r\n System.out.println(attribute);\r\n return attribute;\r\n }",
"public void PrintAttributes()\n\t{\n\t\tSystem.out.println(\"Name: \"+ name);\n\t\tSystem.out.println(\"Address: \"+ address);\n\t\tSystem.out.println(\"Phone_Number: \"+ phoneNumber);\n\t\tSystem.out.println(\"Year_Built: \"+ yearBuilt);\n\t\tSystem.out.println(\"Price: \"+ price);\n\t\tSystem.out.println(\"Max_Residents: \"+ maxResidents);\n\t\tSystem.out.println(\"Catagory: \"+ catagory);\n\t\t\n\t\t//GetKeywords(); \n\t\tif(keywords.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Keywords\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(int i = 0; i < keywords.size(); i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Keyword: \" + keywords.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//GetAvailableDates(); \n\t\tif(openDates.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Available Date\");\n\t\t}\n\t\tfor(int j = 0; j < openDates.size(); j++)\n\t\t{\n\t\t\tSystem.out.println(\"Available Date: \"+openDates.get(j).PrintDate());\n\t\t}\n\t}",
"public static void printNode(Node parent) {\n if (parent == null) {\n System.out.println(\"null node!\");\n return;\n }\n System.out.println(parent.getNodeName() + \" node:\");\n NamedNodeMap attrs = parent.getAttributes();\n for(int i = 0 ; i < attrs.getLength() ; i++) {\n Attr attribute = (Attr)attrs.item(i);\n System.out.println(\" \" + attribute.getName()+\" = \"+attribute.getValue());\n }\n }",
"private void printlnCommon(Node n) {\n\t System.out.print(\" nodeName=\\\"\" + n.getNodeName() + \"\\\"\");\n\n\t String val = n.getNamespaceURI();\n\t if (val != null) {\n\t out.print(\" uri=\\\"\" + val + \"\\\"\");\n\t }\n\n\t val = n.getPrefix();\n\n\t if (val != null) {\n\t out.print(\" pre=\\\"\" + val + \"\\\"\");\n\t }\n\n\t val = n.getLocalName();\n\t if (val != null) {\n\t out.print(\" local=\\\"\" + val + \"\\\"\");\n\t }\n\n\t val = n.getNodeValue();\n\t if (val != null) {\n\t out.print(\" nodeValue=\");\n\t if (val.trim().equals(\"\")) {\n\t // Whitespace\n\t out.print(\"[WS]\");\n\t }\n\t else {\n\t out.print(\"\\\"\" + n.getNodeValue() + \"\\\"\");\n\t }\n\t }\n\t out.println();\n\t}",
"public void displaySchema() {\n for (String s : attributes)\n System.out.print(s + \"\");\n }",
"public String toString() {\n String id = element.getAttributeNS(null, \"id\");\n return element.getTagName() + (id.equals(\"\") ? \"\" : \"#\" + id) + \".\"\n + (attributeNamespaceURI == null || attributeNamespaceURI.equals(\"\") ? \"\" : attributeNamespaceURI + \":\")\n + attributeLocalName + \" = \" + expression;\n }",
"public String toString() {\n\t URI uri = getURI();\n\t return (uri == null) \n\t \t? \"Anonymous (\" + getAnonID() + \")\"\n\t \t: uri.toString();\n//\t \t: (kb == null)\n//\t \t ? uri.toString() \n//\t \t : kb.getQNames().shortForm(uri);\n\t}",
"public void dumpAttributeList(Attributes atts)\n {\n\tif (atts.getLength() == 0)\n\t System.out.println(nestString + \" (no attributes) \");\n\telse\n\t {\n\t System.out.println(nestString + \" AttributeList: \");\n\t for (int i = 0; i < atts.getLength(); i++)\n\t\t{\n\t\tString name = atts.getQName(i);\n\t\t// String type = atts.getType(i);\n\t\tString value = atts.getValue(i);\n\t\tSystem.out.println(nestString + \" name=\" + name + \n\t\t\t\t \" value=\" + value);\n\t\t}\n\t }\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\tString text = getElement();\r\n\t\tif (mainAttr!=null) {\r\n\t\t\ttext += \" \" + mainAttr;\r\n\t\t}\r\n\t\treturn text;\r\n\t}",
"public void print() {\n print$$dsl$guidsl$guigs();\n System.out.print( \" eqn =\" + eqn );\n }",
"public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\n\t\t// On débute une balise dont on veut le contenu textuel\n\t\tif (qName.equalsIgnoreCase(mXmlTagContainingText)) {\n\t\t\tinsideTextTag = true;\n\t\t}\n\n\t\tif (debug) {\n\t\t\tfor (int indent=0 ; indent < elementOffsetStackCursor +1; indent++) {System.out.print (\"--\");}\n\t\t\tSystem.out.print (\"Debug: startElement >\"+qName+\"< \");\n\t\t\tfor (int indent=0 ; indent < attributes.getLength() ; indent++) {System.out.print (\">\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );}\n\t\t\tSystem.out.println ();\n\t\t}\n\n\t\t// So far, I do not why but accessing here to the attributes values \n\t\t// prevent the case that further in the createAnnotation method, \n\t\t// you obtain a substring of attributes.toString which does not correspond to an attribute value \n\t\t// someway the current solution acts as a clone...\n\t\tfor (int indent=0 ; indent < attributes.getLength() ; indent++) {\n\t\t\tattributes.getValue(indent);\n\t\t\t//if (attributes.getValue(indent).startsWith(\"mph=\\\"\"))\t\t{ \n\t\t\t//\tSystem.out.println (\"Debug: startElement >\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );\n\t\t\t//}\n\t\t\t//System.out.print (\">\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );\n\t\t}\n\n\t\t// on stocke des informations concernant l'élément XML courant en l'empilant\n\t\t// le problème est que l'on n'a pas accès au begin et end offset d'une balise en même temps \n\t\t// et qu'il faut garder une trace des begins des balises ouvertes lorsque l'on rencontre leur end \n\t\t//if ( attributes.getLength() == 0) attributes = null;\n\t\tXMLElement xE = new XMLElement(uri, localName, qName, attributes);\n\t\telementOffsetStack.add(xE);\n\n\t\telementOffsetStackCursor++;\n\t\tcurrentOpenElementWithTheBeginToSet++;\n\n\t\t// debug\n\t\tif (debug) {\n\t\t\tfor (int indent=0 ; indent < elementOffsetStackCursor ; indent++) {System.out.print (\"--\");}\n\t\t\t//System.out.println (\"Debug: startElement empile uri>\" +uri+\"< localName>\"+localName+\"< qName>\"+qName+\"< arrayListIndex>\"+arrayListIndex+\" curentOpenTagToAnnotate>\"+curentOpenTagToAnnotate+\"<\");\n\t\t\tSystem.out.println (\"Debug: startElement tag>\"+qName+\"< que l'on empile ; il y a >\"+\n\t\t\telementOffsetStackCursor+\"< éléments dans la pile ; il y a >\"+\n\t\t\t\t\tcurrentOpenElementWithTheBeginToSet+\"< balise en attente dont le begin est définir\");\n\n\t\t}\n\t}",
"private static void PrintNode(Node n, String prefix, int depth) {\r\n\r\n\t\ttry {\r\n\t\t\tSystem.out.print(\"\\n\" + Pad(depth) + \"[\" + n.getNodeName());\r\n\t\t\tNamedNodeMap m = n.getAttributes();\r\n\t\t\tfor (int i = 0; m != null && i < m.getLength(); i++) {\r\n\t\t\t\tNode item = m.item(i);\r\n\t\t\t\tSystem.out.print(\" \" + item.getNodeName() + \"=\"\r\n\t\t\t\t\t\t+ item.getNodeValue());\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"] \");\r\n\r\n\t\t\tboolean has_text = false;\r\n\t\t\tif (n.getNodeType() == Node.TEXT_NODE) {\r\n\t\t\t\thas_text = true;\r\n\t\t\t\tString valn = n.getNodeValue().trim();\r\n\t\t\t\tif (valn.length() > 0)\r\n\t\t\t\t\tSystem.out.print(\"\\n\" + Pad(depth) + \" \\\"\" + valn + \"\\\"\");\r\n\t\t\t}\r\n\r\n\t\t\tNodeList cn = n.getChildNodes();\r\n\r\n\t\t\tfor (int i = 0; cn != null && i < cn.getLength(); i++) {\r\n\t\t\t\tNode item = cn.item(i);\r\n\t\t\t\tif (item.getNodeType() == Node.TEXT_NODE) {\r\n\t\t\t\t\tString val = item.getNodeValue().trim();\r\n\t\t\t\t\tif (val.length() > 0)\r\n\t\t\t\t\t\tSystem.out.print(\"\\n\" + Pad(depth) + val + \"\\\"\");\r\n\t\t\t\t} else\r\n\t\t\t\t\tPrintNode(item, prefix, depth + 2);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(Pad(depth) + \"Exception e: \");\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void print() {\n\t\tsuper.print();\r\n\t\tSystem.out.println(\"album=\" + album + \", year=\" + year);\r\n\t}",
"public void showAttributes() {\r\n\t\tSystem.out.println(\"Name : \"+getName());\r\n\t\tSystem.out.println(\"ID : \"+getId());\r\n\t\tSystem.out.println(\"Percentage : \"+getPercentage());\r\n\t\tSystem.out.println(\"Skills : \");\r\n\t\tfor(String skill:getSkills()) {\r\n\t\t\tSystem.out.print(skill+\" \");\r\n\t\t}\r\n\t\t\r\n\t}",
"public String toString() { return kind() + \":\"+ text() ; }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"@Override\n\tpublic void printNode() {\n\t\tSystem.out.println(\"------Args_list------\");\n\t\te.printNode();\n\t\tif(a!=null)\n\t\t\ta.printNode();\n\t\t\n\t}",
"@Override\r\n public String toString() {\r\n return getURI();\r\n }",
"public String printAttributes() {\n checkNotUnknown();\n StringBuilder b = new StringBuilder();\n if (hasDontDelete()) {\n b.append(\"(DontDelete\");\n if (isMaybeDontDelete())\n b.append(\"+\");\n if (isMaybeNotDontDelete())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasDontEnum()) {\n b.append(\"(DontEnum\");\n if (isMaybeDontEnum())\n b.append(\"+\");\n if (isMaybeNotDontEnum())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasReadOnly()) {\n b.append(\"(ReadOnly\");\n if (isMaybeReadOnly())\n b.append(\"+\");\n if (isMaybeNotReadOnly())\n b.append(\"-\");\n b.append(\")\");\n }\n return b.toString();\n }",
"public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }",
"@Override\n public String toString()\n {\n return albumName + ' ' + artistName + ' ' + genre + '\\n';\n }",
"public java.lang.String toString() {\n // call toString() with includeNS true by default and declareNS false\n String xml = this.toString(true, false);\n return xml;\n }",
"private void printFullTree()\r\n {\r\n System.out.println(fullXmlTree.toString());\r\n }",
"public void printString() {\n\t\tSystem.out.println(name);\n\t\t\n\t\t\n\t}",
"public void print ( InstanceAttributes instAttributes ){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}",
"public String toString()\n\t{\t\n\t\treturn \"Element name:\\t \"+elementName+\"\\nAtomic number:\\t \"+atomicNum+\"\\nSymbol:\\t\\t \"+symbol+\"\\nBoiling Point:\\t \"+boilingPoint+\" K\"+\"\\nMelting Point:\\t \"+meltingPoint+\" K\"+\"\\nDensity:\\t \"\n\t\t\t\t+density+\" g/L\"+\"\\nMolecular Weight: \"+molecularWeight+\" g/mole\\n\";\t\t\t\n\t\n\t}",
"private static void prtln(String s) {\n\t\tif (debug) {\n\t\t\t// System.out.println(\"XmlStringTester: \" + s);\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}",
"public void info()\n {\n System.out.println(toString());\n }",
"public void printInfo(){\n\t}",
"public void printInfo(){\n\t}",
"public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }",
"@Override\n public String toString(\n ){\n return toXRI(); \n }",
"public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}",
"private void echo(Node n) {\n\t outputIndentation();\n\t int type = n.getNodeType();\n\n\t switch (type) {\n\t case Node.ATTRIBUTE_NODE:\n\t out.print(\"ATTR:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.CDATA_SECTION_NODE:\n\t out.print(\"CDATA:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.COMMENT_NODE:\n\t out.print(\"COMM:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_FRAGMENT_NODE:\n\t out.print(\"DOC_FRAG:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_NODE:\n\t out.print(\"DOC:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_TYPE_NODE:\n\t out.print(\"DOC_TYPE:\");\n\t printlnCommon(n);\n\t NamedNodeMap nodeMap = ((DocumentType)n).getEntities();\n\t indent += 2;\n\t for (int i = 0; i < nodeMap.getLength(); i++) {\n\t Entity entity = (Entity)nodeMap.item(i);\n\t echo(entity);\n\t }\n\t indent -= 2;\n\t break;\n\n\t case Node.ELEMENT_NODE:\n\t out.print(\"ELEM:\");\n\t printlnCommon(n);\n\n\t NamedNodeMap atts = n.getAttributes();\n\t indent += 2;\n\t for (int i = 0; i < atts.getLength(); i++) {\n\t Node att = atts.item(i);\n\t echo(att);\n\t }\n\t indent -= 2;\n\t break;\n\n\t case Node.ENTITY_NODE:\n\t out.print(\"ENT:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.ENTITY_REFERENCE_NODE:\n\t out.print(\"ENT_REF:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.NOTATION_NODE:\n\t out.print(\"NOTATION:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.PROCESSING_INSTRUCTION_NODE:\n\t out.print(\"PROC_INST:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.TEXT_NODE:\n\t out.print(\"TEXT:\");\n\t printlnCommon(n);\n\t break;\n\n\t default:\n\t out.print(\"UNSUPPORTED NODE: \" + type);\n\t printlnCommon(n);\n\t break;\n\t }\n\n\t indent++;\n\t for (Node child = n.getFirstChild(); child != null;\n\t child = child.getNextSibling()) {\n\t echo(child);\n\t }\n\t indent--;\n\t}",
"public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}",
"public void startElement(String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException {\n newContent.append(\"<\");\n newContent.append(qName);\n\n for (int i = 0; i < attributes.getLength(); i++) {\n String qn = attributes.getQName(i);\n newContent.append(\" \");\n newContent.append(qn);\n newContent.append(\"=\");\n newContent.append(\"\\\"\");\n newContent.append(attributes.getValue(i));\n newContent.append(\"\\\"\");\n\n //Avoid duplicate namespace declarations\n if (qn.startsWith(\"xmlns\")) {\n String ln = attributes.getLocalName(i);\n if (ln.equals(\"xmlns\")) {\n namespaces.remove(\"\");\n } else {\n namespaces.remove(ln);\n }\n }\n }\n\n Enumeration enum = namespaces.keys();\n while ( enum.hasMoreElements() ) {\n String key = (String) enum.nextElement();\n newContent.append(\" xmlns\");\n if (key.length() > 0) {\n newContent.append(\":\");\n newContent.append(key);\n }\n newContent.append(\"=\");\n newContent.append(\"\\\"\");\n newContent.append(namespaces.get(key));\n newContent.append(\"\\\"\");\n namespaces.remove(key);\n }\n\n newContent.append(\">\");\n }",
"void doShowUri()\n\t{\n\t\ttry\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(\"URI = \"); //$NON-NLS-1$\n\t\t\tsb.append( m_session.getURI() );\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noUriReceived\")); //$NON-NLS-1$\n\t\t}\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"[name:]\"+name;\n\t}",
"public void startElement(String uri, String localName, String qName, Attributes attrs) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = qName;\r\n if (charState >= 0 && lineBuffer.length() > 0) {\r\n \tcharWriter.println(lineBuffer.toString());\r\n \tlineBuffer.setLength(0);\r\n }\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG)) {\r\n\t\t\t// ignore\r\n } else { // variable GEDCOM keyword\r\n\t charState = 2;\r\n \tlineBuffer.append(String.valueOf(saxLevel));\r\n \tString id = attrs.getValue(ID_ATTR);\r\n \tif (id != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(id);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tlineBuffer.append(' ');\r\n \tlineBuffer.append(qName.toUpperCase());\r\n \tString ref = attrs.getValue(REF_ATTR);\r\n \tif (ref != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(ref);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tsaxLevel ++;\r\n } // else ignore unknown elements\r\n }",
"public String toString(){\n \treturn (weight + \"\t\" + query);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Artist : \"+this.artistName+\"\\n\";\n\t}",
"public void print () {\r\n System.out.println(\"Place \"+name+\": lat \"+lat+\" lon \"+lon+\r\n \" elevation \"+ele);\r\n }",
"private static void println(String message, SimpleAttributeSet settings) {print(message + \"\\n\", settings);}",
"void printestateName(estateName iEstateName)\n {\n System.out.println(iEstateName.getElementValue());\n }",
"public String toString() {\n return getQualifiedName();\n }",
"private void printInfo(SAXParseException e) {\n\t}",
"public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}",
"@Test\n\tpublic void test_TCM__String_toString() {\n\t\t//expected value\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tString str= attr.toString();\n\t\tassertTrue(\"incorrect toString form\", str.equals(\"[Attribute: prefx:test=\\\"value\\\"]\"));\n\n\t}",
"private String printXML(Node target){\n\t\treturn \"\";\n\t}",
"public void showName() {\n\t\tSystem.out.println(\"Object id: \" + id + \", \" + description + \": \" + name);\n\t\t//System.out.println(description);\n\t}",
"public static void main(String[] args) {\n System.out.println(AIS_SART.toString());\n System.out.println(AT_ANCHOR.toString());\n }",
"@Override\n\t\tpublic void startElement(String uri, String localName, String qName,\n\t\t\t\tAttributes atts) throws SAXException {\n\t\t\tNode newNode = new Node(localName);\n\t\t\t\n\t\t\tfor(int i = 0; i < atts.getLength(); i++){\n\t\t\t\tnewNode.putAttribute(atts.getQName(i), atts.getValue(i));\n\t\t\t}\n\t\t\t\n\t\t\tnodeStack.lastElement().put(newNode);\n\t\t\tnodeStack.push(newNode);\n\t\t\t\n\t\t\tbuffer = new StringBuffer();\n\t\t\t\n\t\t\tLog.d(\"xml\", uri + \" | \" + localName + \" | \" + qName + \" | \");\n\t\t\tfor(int i = 0; i < atts.getLength(); i++)\n\t\t\t\tLog.d(\"xml\", \"att(\" + atts.getLocalName(i) + \"): \" + atts.getValue(i));\n\t\t}",
"public void printAnnuaireName() {\n\t\t\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s,%s,%s,%s\",path, title, shortDescription, fullDescription);\n\t}",
"public String toString() {\nString output = new String();\n\noutput = \"shortName\" + \" : \" + \"\" + shortName +\"\\n\"; \noutput += \"type\" + \" : \" + \"\" + type + \"\\n\";\noutput += \"description\" + \" : \" + \"\" + description + \"\\n\"; \n\nreturn output; \n}",
"@Override\n public String toString(){\n String s;\n \n s = \"\\tparseOK: \" + parseOK + Constants.NL +\n \"\\trequest_uri: \" + request_uri + Constants.NL +\n \"\\tquery_string: \" + query_string + Constants.NL +\n \"\\trestAPIkeys: \" + restAPIkeys + Constants.NL +\n \"\\ttraceMsgQ: \" + traceMsgQ + Constants.NL;\n \n return s;\n }",
"private static void print(String p) {\n\t\tSystem.out.println(PREFIX + p);\n\t}",
"public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }",
"public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }",
"public void printOWLModel(){\n\t\tmodel.write(System.out, \"RDF/XML\");\t\t\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn (this.id + \"\\t\" + this.name + \"\\t\" + this.nodeType);\r\n\t}",
"String getAttributeQName(Object attr);",
"public String getQName(int i) {\n/* 125 */ return ((Attr)this.m_attrs.item(i)).getName();\n/* */ }",
"public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }",
"public String toString() {\n String output = this.name + \"(\";\n for (int i = 0; i < attributes.size(); i++) {\n output = output + attributes.get(i) + \":\" + domains.get(i);\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n output = output + \",\";\n }\n return output + \")\";\n }",
"public void startElement(String uri, String localName,String qName,\n Attributes attributes) throws SAXException {\n\n if(qName.equalsIgnoreCase(\"sce:PLPExtract\") | (qName.equalsIgnoreCase(\"sce:Payload\"))\n | (qName.equalsIgnoreCase(\"sce:Header\"))) {\n return;\n }\n\n builder.append(\"<\").append(qName).append(\">\");\n\n if (qName.equalsIgnoreCase(\"sce:mRID\")) {\n mRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:aliasName\")) {\n aliasName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:name\")) {\n name = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:grandFatherFlag\")) {\n grandFather = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:type\")) {\n pType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:value\")) {\n value = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:baseKind\")) {\n baseKind = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:classification\")) {\n classification = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:unit\")) {\n unit = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:speciesType\")) {\n speciesT = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:rSMVal\")) {\n rSMVal = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:specialProjectName\")) {\n specialProj = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:currentRating\")) {\n cRating = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:inServiceRating\")) {\n iRating = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:highWindFlag\")) {\n highWind = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:highFireFlag\")) {\n highFire = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:srsName\")) {\n srsName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:xPosition\")) {\n xPos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:yPosition\")) {\n yPos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:description\")) {\n desc = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:street\")) {\n street = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:city\")) {\n city = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:mapRefNumber\")) {\n mapRef = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:installationDate\")) {\n installDate = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:symbolRef\")) {\n symbolRef = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:orientation\")) {\n orientation = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:substationMRID\")) {\n substationMRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:owner\")) {\n owner = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:ownerType\")) {\n ownerType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:ratedVoltage\")) {\n ratedVoltage = true;\n }\n\n if (qName.equalsIgnoreCase(\"gml:pos\")) {\n pos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:bundleType\")) {\n bundleType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:circuitName\")) {\n circuitName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:circuitSection\")) {\n circuitSection = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:material\")) {\n material = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:size\")) {\n size = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:quantity\")) {\n quantity = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:phase\")) {\n phase = true;\n }\n\n if (qName.equalsIgnoreCase(\"gml:posList\")) {\n posList = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:no_of_wires\")) {\n no_of_wires = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:commIndicator\")) {\n commIndicator = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:structureID\")) {\n structureID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:strucRefMRID\")) {\n strucRefMRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:serviceType\")) {\n serviceType = true;\n }\n\n }",
"@Override\n public String toString() {\n \treturn this.getM_Name()+\" \"+getM_Description();\n }",
"public void startElement(String uri, String localName, String qName,Attributes attributes) throws SAXException \n\t{\t\n\t\tif(qName.equals(ReqifTags.TAG_SPEC_OBJECT))\n\t\t{\n\t\t\tif(attributes.getValue(ReqifTags.TAG_IDENTIFIER)!=null && attributes.getValue(ReqifTags.TAG_DESC)!=null)\n\t\t\t{\n\t\t\t\tString s=attributes.getValue(ReqifTags.TAG_DESC);\n\t\t\t\tchar[] test=s.toCharArray();\n\t\t\t\tfor(int i=0;i<test.length;i++)\n\t\t\t\t{\n\t\t\t\t\tif(test[i]=='&' || test[i]=='' || test[i]=='‘' || test[i]== '’' || test[i]=='“' || test[i]=='”')\n\t\t\t\t\t\ttest[i]=' ';\n\n\t\t\t\t}\n\t\t\t\ts=new String(test);\n\t\t\t\tdict.put(attributes.getValue(ReqifTags.TAG_IDENTIFIER),s);\n\t\t\t}\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_REQ_IF))\n\t\t{\n\t\t\tParsedReqifElement u=new ParsedReqifElement(\"Root\",\"Root\");\n\t\t\troot=new DefaultMutableTreeNode(u);\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SPECIFICATION))\n\t\t{\t\n\t\t\tParsedReqifElement u=new ParsedReqifElement(attributes.getValue(ReqifTags.TAG_DESC),dict.get(attributes.getValue(ReqifTags.TAG_DESC)));\n\t\t\ttemp=new DefaultMutableTreeNode(u);\n\t\t\troot.add(temp);\n\t\t\ttop1=temp;\n\t\t\tlevel++;\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SPEC_HIERARCHY))\n\t\t{\n\t\t\tbuf=new StringBuffer();\n\t\t\tlevel++;\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SOURCE))\n\t\t{\n\t\t\t//System.out.println(\"source\");\n\t\t\tisSource = true;\n\t\t\tbuf.delete(0, buf.length());\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_TARGET))\n\t\t{\n\t\t\t//System.out.println(\"target\");\n\t\t\tisTarget = true;\n\t\t\tbuf.delete(0, buf.length());\n\t\t}\n\t}",
"public String toString() {\t\t\n\t\treturn (\"Caption: \" + this.caption + \", Filename: \" + this.filename + \", Rating: \" + this.rating);\n\t}",
"public void displayRelation() {\n System.out.print(this.name + \"(\");\n for (int i = 0; i < attributes.size(); i++) {\n System.out.print(attributes.get(i) + \":\" + domains.get(i));\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n System.out.print(\",\");\n\n }\n System.out.print(\")\");\n System.out.print(\"\\nNumber of Tuples: \" + table.size() + \"\\n\");\n for (Tuple t : table)\n System.out.println(t);\n\n }",
"public void startElement(String uri, String localName,String qName, \n Attributes attributes) throws SAXException {\n \n\t\tif (qName.equalsIgnoreCase(\"Author\")) {\n\t\t\tauthor = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"title\")) {\n\t\t\ttitle = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"year\")) {\n\t\t\tyear = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"journal\")) {\n\t\t\tjournal = true;\n\t\t}\n\t\tif (qName.equalsIgnoreCase(\"number\")) {\n\t\t\tnumber = true;\n\t\t}\n \n\t}",
"@Override\n\t\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t\t\t\tif(qName.equalsIgnoreCase(\"TABLE\")) {\n\t\t\t\t\tuser = true;\n\t\t\t\t\ttable = true;\n\t\t\t\t}\n\t\t\t\telse if(localName.equalsIgnoreCase(\"FIELDNAME\")){\t\n\t\t\t\t\tuser = true;\n\t\t\t\t\tfieldName = true;\n\t\t\t\t}\n\t\t\t\telse if(localName.equalsIgnoreCase(\"FIELDTYPE\")){\t\n\t\t\t\t\tuser = true;\n\t\t\t\t\tfieldType = true;\n\t\t\t\t}\n\t\t\t\telse if(localName.equalsIgnoreCase(\"SIZE\")){\n\t\t\t\t\tuser = true;\n\t\t\t\t\tsize = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int i = 0;i< attributes.getLength();i++) {\n\t\t\t\t\tSystem.out.println(attributes.getQName(i) + \": \" + attributes.getValue(i));\n\t\t\t\t}\n\t\t}",
"@Override\n public String toString() {\n return info();\n }",
"public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }",
"@Override public String toString()\n {\n return String.format( \"\\t\\t\\t[ type:'%s', name:'%s', md5:'%s', local:'%s'\\n\", f_type, f_name, f_md5, f_local );\n }",
"private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}",
"@Override\n\tpublic void print() {\n\t\tSystem.out.println(\"Avaliable Media items are\");\n\t\t\n\t\tSystem.out.println(\"Identification Number number of copies title of item\");\n\n\t\t\t\tfor(int i =0; i<getTitle().length; i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(getIdentificatioNumber()[i]+\" \"\n\t\t\t\t\t+getNumberOfCopies()[i]+\" \"+getTitle()[i]);\n\t\t\t\t}\n\t\t\t}",
"public void dump(String prefix) {\n System.out.print(toString(prefix));\n System.out.println(\" \"+name);\n }",
"void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}",
"public String printInfo()\n\t{\n\t\tStringBuilder builder = new StringBuilder();\n\t\t\n\t\tbuilder.append(AppID);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(updateID);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(aggregatedRating);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(appRatingBeforeDeployment);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(aggregatedRating - appRatingBeforeDeployment);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(oneStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(twoStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(threeStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(fourStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(fiveStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(oneStar + twoStar + threeStar + fourStar + fiveStar);\n\t\treturn builder.toString();\n\t}",
"@Override\n public String toString()\n {\n return id + \"*\" + name + \"|\" + lat + \"&\"+lon + \"\\n\";\n }",
"@Override\r\n\tpublic String toString(){\r\n\t\treturn String.format(\"%s, %s, %s\", getSongName(), getArtist(), getAlbum());\r\n\t}",
"void printInfo();",
"public String toString(){\n\t\tString s1 = \"\\n======= \" + title + \" =========\";\n\t\tString s3 = \"\\n========================================\\n\";\n\t\treturn s1 + \"\\nTitle: \" + title + \"\\nArtist Name: \" + artistName + \"\\nGenre: \" + genre + \n\t\t\t\t\"\\nRating: \" + rating + \"\\nLength: \" + time + s3;\n\t}",
"static String serializeAttrs(NamedNodeMap attrs)\n {\n\t // This method serializes attributes. It currently has a bug in that it\n\t // does not correctly escape double quotes. How to handle this bug is\n\t // not yet clear, as the initial target of the serialized XML is a\n\t // database, where people are likely to want to search for the attribute\n\t // values, not entity references.\n\n\t StringBuffer value = new StringBuffer();\n\t int i;\n\t Attr attr;\n\n\t for (i = 0; i < attrs.getLength(); i++)\n\t {\n\t\t attr = (Attr) attrs.item(i);\n\t\t value.append(SPACE);\n\t\t value.append(attr.getNodeName());\n\t\t value.append(EQUALS);\n\t\t value.append(DOUBLEQUOTE);\n\t\t value.append(attr.getNodeValue());\n\t\t value.append(DOUBLEQUOTE);\n\t }\n\t return value.toString();\n }",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(name);\n\t}",
"public static void dumpNodeList(NodeList nl) {\n int len = nl.getLength();\n System.out.println(\"NodeList (\" + len + \" items):\");\n for (int i = 0; i < len; i++) {\n Node n = nl.item(i);\n System.out.print(\" \" + i + \" (\");\n switch (n.getNodeType()) {\n case Node.ATTRIBUTE_NODE:\n System.out.print(\"Attr\");\n break;\n case Node.CDATA_SECTION_NODE:\n System.out.print(\"CDATASection\");\n break;\n case Node.COMMENT_NODE:\n System.out.print(\"Comment\");\n break;\n case Node.ELEMENT_NODE:\n System.out.print(\"Element\");\n break;\n case Node.TEXT_NODE:\n System.out.print(\"Text\");\n break;\n }\n System.out.println(\") \" + n.getNodeName() + \" \" + n.getNodeValue());\n }\n }",
"@Override\n\tpublic String toString(final Attribute att) {\n\t\treturn null;\n\t}",
"public String print()\n\t{\n\t\tString s = \"\";\n\t\t\n\t\ts = \"<explanation text=\\\"\" + text + \"\\\">\";\n\t\ts = s + commentContainer.printComments();\n\t\tif (expression != null)\n\t\t{\n\t\t\ts = s + expression.print(); \n\t\t}\n\t\ts = s + \"</explanation>\";\n\t\t\n\t\treturn s;\n\t}",
"@RDF(\"foaf:name\")\n\tString getName();",
"public String getNameAndAttributes() {\n Formatter sbuff = new Formatter();\n sbuff.format(\"Structure \");\n getNameAndDimensions(sbuff, false, true);\n sbuff.format(\"%n\");\n for (Attribute att : attributes) {\n sbuff.format(\" %s:%s;%n\", getShortName(), att.toString());\n }\n return sbuff.toString();\n }",
"void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}",
"public void println() { System.out.println( toString() ); }",
"@Override\n\t\tpublic void print() {\n\n\t\t}",
"@Override\n\tpublic void attribute(QName qName, String value) {\n\t\t\n\t}",
"public void dump()\n {\n System.out.println(toString());\n }",
"public static void printInfo(){\n }",
"@Override\n public void infixDisplay() {\n System.out.print(name);\n }",
"public void showSamples(){\n\t\tfor(int i=0; i<arrIns.size(); i++){\n\t\t\tfor(int j=0; j<arrIns.get(i).numAttributes(); j++){\n\t\t\t\tSystem.out.print(\" | \" + arrIns.get(i).value(j) + \" | \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}"
] | [
"0.6083921",
"0.5931076",
"0.589877",
"0.5893725",
"0.582345",
"0.5767645",
"0.57670623",
"0.5759229",
"0.5626512",
"0.5556805",
"0.5556417",
"0.5542179",
"0.5531304",
"0.55302036",
"0.5517569",
"0.5515653",
"0.5515653",
"0.5515653",
"0.5489658",
"0.546588",
"0.5455742",
"0.54541075",
"0.5445424",
"0.54414916",
"0.5440278",
"0.5440204",
"0.5438555",
"0.5436911",
"0.54258966",
"0.54186225",
"0.5390574",
"0.5390574",
"0.5381077",
"0.5365101",
"0.5363378",
"0.53527266",
"0.5351232",
"0.535103",
"0.53489405",
"0.5347949",
"0.5340098",
"0.53361875",
"0.5335557",
"0.5317773",
"0.5316291",
"0.53161037",
"0.5306135",
"0.53009856",
"0.529885",
"0.5294268",
"0.52928764",
"0.52902573",
"0.52890134",
"0.5287038",
"0.52751917",
"0.5268668",
"0.52661467",
"0.52630067",
"0.52575874",
"0.52564925",
"0.52489984",
"0.5238851",
"0.5231543",
"0.52170223",
"0.52161354",
"0.5202414",
"0.51999015",
"0.51952124",
"0.5193689",
"0.5184609",
"0.5179118",
"0.51790863",
"0.51772785",
"0.51592076",
"0.51464975",
"0.5142777",
"0.5140934",
"0.51365685",
"0.51354206",
"0.51303065",
"0.51298374",
"0.51275975",
"0.5126997",
"0.51250046",
"0.5124622",
"0.5119062",
"0.51153904",
"0.5115244",
"0.51131535",
"0.51064914",
"0.5102306",
"0.5099486",
"0.509527",
"0.5094152",
"0.5093689",
"0.50844955",
"0.5082254",
"0.50810295",
"0.5079982",
"0.5077926",
"0.50762707"
] | 0.0 | -1 |
Feeds fake data in as a last resort | private static boolean fetchDefaultData() {
if (!Data.DEBUG) return false;
System.err.println("We cannot fetch from any online sources, so default weather data has been injected.");
sky = Util.rand("partly sunny", "mostly cloudy", "rainy", "mostly sunny");
windDir = Util.rand("north", "south", "east", "west");
windSpeed = Util.rand(0, 5, 10, 15);
temp = Util.rand(40, 50, 60, 70, 80);
sunriseHour = 6.5;
sunsetHour = 20.0;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createDataFeeds(){\n\n\t\tfinal MyDbHelper helper = new MyDbHelper(this);\n\t\tfinal SQLiteDatabase db = helper.getWritableDatabase();\n\t\t\n\t\tContentValues values = new ContentValues();\n\t\t\n\t\tDummyFeed.createFeeds(db, values);\t\t\n\t\t\n\t\tdb.close();\n\t\t\n\t}",
"private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}",
"void fetchFactFeeds();",
"private void setTestData() {\n\t\tCollections.shuffle(input);\n\t\ttestData = new LinkedList<>();\n\t\tfor (int i = 0; i < TEST_DATA_SIZE; i++) {\n\t\t\ttestData.add(input.remove(0));\n\t\t}\n\t}",
"public static void insertFakeData(Context context) {\n //Get today's normalized date\n long today = CustomDateUtils.normalizeDate(System.currentTimeMillis());\n List<ContentValues> fakeValues = new ArrayList<ContentValues>();\n //loop over 7 days starting today onwards\n for(int i=0; i<6; i++) {\n fakeValues.add(\n FakeDataUtils.createTestWeatherContentValues(\n today - TimeUnit.DAYS.toMillis(i), testNames[i]));\n }\n // Bulk Insert our new weather data into Sunshine's Database\n context.getContentResolver().bulkInsert(\n FoodEntry.CONTENT_URI,\n fakeValues.toArray(new ContentValues[6]));\n }",
"public void createFullFeed() {\n\n\t\tList<ProductDetailsDocument> productDataFromMongo = getProductListFromDb();\n\t\ttry {\n\t\t\tcreateCsvForProduct(productDataFromMongo);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"void populateData();",
"private RandomData() {\n initFields();\n }",
"public static void populateData() {\n\n }",
"@Before\n\tpublic void setUpData() {\n\n\t\t// Make sure there is a type in the database\n\t\tType defaultType = new Type();\n\t\tdefaultType.setName(\"type\");\n\t\ttypeService.save(defaultType);\n\n\t\t// Make sure there is a seed packet in the database\n\t\tSeedPacket seedPacket = new SeedPacketBuilder()\n\t\t\t\t.withName(\"seed\")\n\t\t\t\t.withType(\"type\")\n\t\t\t\t.withPackSize(500).build();\n\n\t\tseedPacketService.save(seedPacket);\n\t}",
"private void fillObservationsDataFast() {\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n// int variateCount = this.workbookStudy.getVariates().size();\n \n List<String> factorsReturn = getFactoresReturnList();\n \n fillFactorLabelDataOptimized(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n \n// List<Measurement> measurementList = workbookStudy.getMeasurements();\n \n// log.info(\"Getting Data Trial ...\");\n// List<Object> dataList;\n// if(! workbookStudy.getVariates().isEmpty()){\n// dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n// }else{\n// dataList = new ArrayList<Object>();\n// }\n// log.info(\"Getting Data Trial Done...\");\n// \n// \n// log.info(\"Getting List of Obsunit ...\");\n// List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n// log.info(\"Getting List of Obsunit...\");\n// int rowIndex = 0;\n// for (Obsunit obsUnit : obsunits) {\n// Measurement measurement = measurementList.get(rowIndex);\n// measurement.initMeasurementData(variateCount);\n//\n// assignMeasurementData(measurement, obsUnit, dataList);\n// rowIndex++;\n// }\n }",
"public static void seed() {\n\n // Get locations, employees, and custodians from database.\n ArrayList<Location> locations = new ArrayList(LocationTable.getLocations().values());\n ArrayList<User> employees = UserTable.getEmployees();\n ArrayList<User> custodians = UserTable.getCustodians();\n\n // Generate random sanitation requests\n Random rand = new Random();\n final int numEntries = 30;\n for (int i = 0; i < numEntries; i++) {\n\n // Generate location (uniform)\n Location location = locations.get(rand.nextInt(locations.size()));\n\n // Generate priority (uniform)\n Priority priority;\n switch (rand.nextInt(3)) {\n case 0: priority = Priority.HIGH; break;\n case 1: priority = Priority.MEDIUM; break;\n default: priority = Priority.LOW; break;\n }\n\n // Generate requester\n User requester = employees.get(rand.nextInt(employees.size()));\n\n // Generate request time (uniform current time + ~12 hours)\n Timestamp requestTime = new Timestamp(\n new Date().getTime() + rand.nextInt(43200000));\n\n // Generate description\n String description;\n switch (rand.nextInt(3)) {\n case 0: description = \"Drink spill\";\n case 1: description = \"Vomit\";\n default: description = \"Radioactive waste\";\n }\n\n // Add request to database\n SanitationRequest request = new SanitationRequest(\n 0, location, priority, Status.INCOMPLETE, description,\n requester, requestTime,\n null, null, null);\n\n // Mark 2/3 of requests as claimed\n int claimFlag = rand.nextInt(3);\n if (claimFlag > 0) {\n\n // Mark as claimed within 1 hour of request\n User servicer = custodians.get(rand.nextInt(custodians.size()));\n Timestamp claimedTime = new Timestamp(\n requestTime.getTime() + rand.nextInt(3600000));\n request.setServicer(servicer);\n request.setClaimedTime(claimedTime);\n\n // Mark half of claimed requests as completed within 2 hours of claim\n if (claimFlag == 2) {\n Timestamp completedTime = new Timestamp(\n claimedTime.getTime() + rand.nextInt(7200000));\n request.setCompletedTime(completedTime);\n request.setStatus(Status.COMPLETE);\n }\n\n // Update request in database\n editSanitationRequest(request);\n }\n\n // Add request to database\n addSanitationRequest(request);\n }\n }",
"public void setDataTest() {\n\n for(int i=0;i<10;i++){\n LocalDate date = DateHelper.getPastDate(i);\n\n for(int j=0;j<3;j++){\n Enums.MealTime time = Enums.MealTime.Breakfast;\n if(j==0) time = Enums.MealTime.Breakfast;\n if(j==1)time = Enums.MealTime.Lunch;\n if(j==2)time = Enums.MealTime.Dinner;\n\n for(int k=0;k<2;k++) {\n final LocalDate d = date;\n final Enums.MealTime t = time;\n FirebaseDBMenuDataHelper.getMenuData(Enums.RestaurantName.CafeVentanas, DateHelper.getCurrentDate(), time,\n new FirebaseDBCallaback<ArrayList<MenuEntity>>() {\n @Override\n public void getData(ArrayList<MenuEntity> data) {\n int ran = (int)(Math.random()*data.size());\n FirebaseDBUserDataHelper.setStatisticsData(d, t,data.get(ran));\n }\n });\n }\n }\n }\n /*\n MenuEntity ent = new MenuEntity();\n ent.setName(\"TTasdsda0\");\n ent.setPrice(200);\n FirebaseDBUserDataHelper.setStatisticsData(DateHelper.getCurrentDate(),ent);\n */\n }",
"private void fillData()\n\t{\n\t\tNightliesAdapter na = new NightliesAdapter( context );\n\t\ttry\n\t\t{\n\t\t\tna.read();\n\n\t\t\t// get Downloads\n\t\t\tCursor cur_dl = na.getDownloadsCursor();\n\t\t\tcur_dl.moveToFirst();\n\n\t\t\t// we will start db records from 1: 0 reserved for our custom record\n\t\t\tint count_dl = cur_dl.getCount() + 1;\n\t\t\tif ( count_dl > 1 )\n\t\t\t{\n\t\t\t\tdownloads = new DownloadsRecord[count_dl];\n\t\t\t\tchangelogs = new ChangeLogRecord[count_dl][];\n\n\t\t\t\tDownloadsRecord dr;\n\t\t\t\tlong dateTo = ( new Date() ).getTime();\n\t\t\t\tlong dateFrom = cur_dl.getLong( cur_dl.getColumnIndex( NightliesAdapter.CM_DATE ) );\n\n\t\t\t\t// empty first record\n\t\t\t\tdr = new DownloadsRecord();\n\t\t\t\tdr.filename = \"next nightly\";\n\t\t\t\tdr.type = \"nightly\";\n\t\t\t\tdr.size = \"\";\n\t\t\t\tdr.md5sum = \"\";\n\t\t\t\tdr.date_added = new Date();\n\t\t\t\tdownloads[0] = dr;\n\n\t\t\t\t// get change log data\n\t\t\t\tchangelogs[0] = fillChangeLogData( na, dateFrom, dateTo );\n\n\t\t\t\tfor ( int i = 1; i < count_dl && !cur_dl.isAfterLast(); i++ )\n\t\t\t\t{\n\t\t\t\t\tdr = new DownloadsRecord();\n\t\t\t\t\tdr.filename = cur_dl.getString( cur_dl\n\t\t\t\t\t\t\t.getColumnIndex( NightliesAdapter.CM_FILENAME ) );\n\t\t\t\t\tdr.type = cur_dl.getString( cur_dl.getColumnIndex( NightliesAdapter.CM_TYPE ) );\n\t\t\t\t\tdr.md5sum = cur_dl.getString( cur_dl\n\t\t\t\t\t\t\t.getColumnIndex( NightliesAdapter.CM_MD5SUM ) );\n\t\t\t\t\tdr.size = cur_dl.getString( cur_dl.getColumnIndex( NightliesAdapter.CM_SIZE ) );\n\t\t\t\t\tdateFrom = cur_dl.getLong( cur_dl.getColumnIndex( NightliesAdapter.CM_DATE ) );\n\t\t\t\t\tdr.date_added = new Date( dateFrom );\n\t\t\t\t\tdownloads[i] = dr;\n\n\t\t\t\t\t// get change log data\n\t\t\t\t\tchangelogs[i] = fillChangeLogData( na, dateFrom, dateTo );\n\n\t\t\t\t\tdateTo = dateFrom;\n\t\t\t\t\tcur_dl.moveToNext();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t\t// no records found\n\t\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\t\tdr.filename = \"No Records found, please refresh\";\n\t\t\t\tdr.type = \"nightly\";\n\t\t\t\tdr.size = \"\";\n\t\t\t\tdr.md5sum = \"\";\n\t\t\t\tdr.date_added = null;\n\t\t\t\tdownloads[0] = dr;\n\t\t\t}\n\t\t}\n\t\tcatch ( SQLException e )\n\t\t{\n\t\t\t// data base does not exist or cannot be opened for read\n\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t// no records found\n\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\tdr.filename = \"Problem with DB, please refresh\";\n\t\t\tdr.type = \"nightly\";\n\t\t\tdr.size = \"\";\n\t\t\tdr.md5sum = \"\";\n\t\t\tdr.date_added = null;\n\t\t\tdownloads[0] = dr;\n\n\t\t\tLog.e( TAG, \"DB Fail\", e );\n\t\t}\n\t\tcatch ( CursorIndexOutOfBoundsException e )\n\t\t{\n\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t// no records found\n\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\tdr.filename = \"Problem with DB, please refresh\";\n\t\t\tdr.type = \"nightly\";\n\t\t\tdr.size = \"\";\n\t\t\tdr.md5sum = \"\";\n\t\t\tdr.date_added = null;\n\t\t\tdownloads[0] = dr;\n\n\t\t\tLog.e( TAG, \"DB Fail\", e );\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tif ( na != null )\n\t\t\t{\n\t\t\t\tna.close();\n\t\t\t}\n\t\t}\n\t}",
"public void generateData()\n {\n }",
"@Before\n public void DataSmoothExamples2() {\n\t LinkedList<Episode> eps5 = new LinkedList<Episode>();\n\t\teps5.add(new Episode(\"The One with the Video Tape\", 0));\n\t\teps5.add(new Episode(\"The One with Giant Poking Device\", 0));\n\t\teps5.add(new Episode(\"The One with Ross' Tan\", 0));\t\t\n\t\tshows2.add(new Show(\"Friends\", 1830, eps5, false));\n\t\t\n\t\tLinkedList<Episode> eps6 = new LinkedList<Episode>();\n\t\teps6.add(new Episode(\"Hello World\", 0));\n\t\teps6.add(new Episode(\"This is my test\", 0));\n\t\teps6.add(new Episode(\"What's up\", 0));\n\t\teps6.add(new Episode(\"Beanbags\", 0));\n\t\tshows2.add(new Show(\"Edge case test\", 1900, eps6, false));\n\t\t\n\t\tLinkedList<Episode> eps7 = new LinkedList<Episode>();\n\t\teps7.add(new Episode(\"Yakko's\", 0));\n\t\teps7.add(new Episode(\"Hello\", 0));\n\t\teps7.add(new Episode(\"Where\", 0));\n\t\tshows2.add(new Show(\"Animals\", 1700, eps7, false));\n\t\t\n\t\tLinkedList<Episode> eps8 = new LinkedList<Episode>();\n\t\teps8.add(new Episode(\"W\", 0));\n\t\teps8.add(new Episode(\"P\", 0));\n\t\teps8.add(new Episode(\"I\", 0));\n\t\tshows2.add(new Show(\"WPI\", 1100, eps8, false));\n\n\t showResults2.add(0.0);\n\t showResults2.add(0.0);\n\t showResults2.add(0.0);\n\t showResults2.add(0.0);\n\t}",
"@Before\r\n\tpublic void setUp() {\r\n\t\tRandom r = new Random();\r\n\t\tmyID = r.nextInt(100);\r\n\t\tmyEntryData = new Entry_Database();\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\tEntry e = new Entry(myID);\r\n\t\t\te.setCat(\"Science\");\r\n\t\t\te.setEntry(new File(\"example.txt\"));\r\n\t\t\te.setName(\"Test Name\");\r\n\t\t\te.setNotes(\"\");\r\n\t\t\te.setScore(0);\r\n\t\t\tmyEntryData.addEntry(myID, e);\r\n\t\t}\r\n\t}",
"@Before\n public void setup() {\n Helpers.fillData();\n }",
"private void createTestData(String lang) {\n CreateCallback<ShoppingList> callback = new CreateCallback<ShoppingList>() {\n @Override\n public void onSuccess(ShoppingList object) {\n //refresh data\n mainFragment.setShownShoppingListsToArchived(false);\n }\n\n @Override\n public void onFailure() {\n //not used here\n }\n };\n (new TestData()).createTestData(getContentResolver(), lang, callback);\n }",
"private void generateData(){\n generateP50boys();\n generateP50girls();\n generateP97boys();\n generateP97girls();\n }",
"public void setupDryadCloudDataSets(){\n\t\ttry{\n\t\t\t\n\t\t\t// A Dryad \n\t\t\tDryadDataSet ds = new DryadDataSet(_DRYAD_D1_TREEBASE);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D1_TREEBASE_F1);\n\t\t\t_datasets.add(ds);\n\t\t\tds = new DryadDataSet(_DRYAD_D3_POPULAR);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D3_POPULAR_F1);\n\t\t\t_datasets.add(ds);\n\t\t\tds = new DryadDataSet(_DRYAD_D4_CSV);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D4_CSV_F1);\n\t\t\tds.harvestDataToRDF(_DRYAD_D4_CSV_F2);\n\t\t\t_datasets.add(ds);\n\t\t\tds = new DryadDataSet(_DRYAD_D6_CSV);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D6_CSV_F1);\n\t\t\tds.harvestDataToRDF(_DRYAD_D6_CSV_F2);\n\t\t\t_datasets.add(ds);\n\t\t\tds = new DryadDataSet(_DRYAD_D2_GENBANK);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D2_GENBANK_F1);\t\n\t\t\tds.harvestDataToRDF(_DRYAD_D2_GENBANK_F2);\n\t\t\tds.harvestDataToRDF(_DRYAD_D2_GENBANK_F3);\n\t\t\tds.harvestDataToRDF(_DRYAD_D2_GENBANK_F4);\n\t\t\t_datasets.add(ds);\n\t\t\tds = new DryadDataSet(_DRYAD_D5_CSV);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D5_CSV_F1);\n\t\t\tds.harvestDataToRDF(_DRYAD_D5_CSV_F2);\n\t\t\t_datasets.add(ds);\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tSystem.out.println(\"ERROR: Exception \"+ex.getMessage());\n\t\t}\n\t}",
"private void prepareData() {\n eventList = databaseHandler.getLatestDistinctEvents(prefs.getString(KEY_SORT_FIELD, \"name\"),\n prefs.getBoolean(KEY_SORT_ORDER_ASCENDING, true));\n\n // Send list to adapter\n eventLogAdapter.updateData(eventList);\n }",
"DataFactory getDataFactory();",
"@Before\n public void DataSmoothExamples3() {\n\t LinkedList<Episode> eps9 = new LinkedList<Episode>();\n\t\teps9.add(new Episode(\"The One with the Tea Leaves\", 150));\n\t\teps9.add(new Episode(\"The One with Pricess Consuela\", 200));\n\t\teps9.add(new Episode(\"The One with the Bird Mother\", 250));\t\t\n\t\tshows3.add(new Show(\"Friends\", 2100, eps9, false));\n\t\t\n\t\tLinkedList<Episode> eps10 = new LinkedList<Episode>();\n\t\teps10.add(new Episode(\"Java\", 200));\n\t\teps10.add(new Episode(\"Python\", 210));\n\t\teps10.add(new Episode(\"C\", 210));\n\t\teps10.add(new Episode(\"C++\", 200));\n\t\tshows3.add(new Show(\"Programming Languages\", 2000, eps10, false));\n\t\t\n\t\tLinkedList<Episode> eps11 = new LinkedList<Episode>();\n\t\teps11.add(new Episode(\"Leaving Storybrooke\", 180));\n\t\teps11.add(new Episode(\"Homecoming\", 190));\n\t\teps11.add(new Episode(\"Where\", 200));\n\t\tshows3.add(new Show(\"Sisterhood\", 600, eps11, false));\n\n\t showResults3.add(200.0);\n\t showResults3.add(198.333);\n\t showResults3.add(190.0);\n\t}",
"private void createTestData() {\n for (int i = startKey; i < startKey + numKeys; i++) {\n keys.add(i);\n }\n }",
"private void fillObservationsData() {\n\n // retrieve all oindex records\n// List<Oindex> oindexList = this.servicioApp.getMeasurementOindexListByStudy(workbookStudy.getStudy().getStudyid(), effectid);\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n\n int variateCount = this.workbookStudy.getVariates().size();\n\n List<Measurement> measurementList = new ArrayList<Measurement>();\n //todo quitar no se usa\n// int observationsCount = this.servicioApp.getObservationsCount(studyId);\n log.info(\"Getting Data Trial ...\");\n List<Object> dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n log.info(\"Getting Data Trial Done...\");\n \n log.info(\"Getting List of Obsunit ...\");\n List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n log.info(\"Getting List of Obsunit...\");\n for (Obsunit obsUnit : obsunits){\n Measurement measurement = new Measurement();\n\n measurement.initMeasurementData(variateCount);\n\n assignMeasurementData(measurement, obsUnit, dataList);\n\n measurementList.add(measurement);\n }\n\n\n workbookStudy.setMeasurements(measurementList);\n\n List<String> factorsReturn = getFactoresReturnList();\n log.info(\"Getting Trial Randomization ...\");\n ResultSet rst = servicioApp.getTrialRandomization(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n log.info(\"Getting Trial Randomization done\");\n fillFactorLabelData(rst, factorsReturn);\n }",
"@Override\n\tpublic void insertDummyData() {\n\t\t\n\t}",
"public static void fetchMarketDataTest(GeohashFactory factory) throws IOException {\n assertEquals(\"market data fetching\", \"13026.04\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 20, 0, 0)));\n assertEquals(\"market data fetching\", \"12824.94\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 21, 0, 0)));\n assertEquals(\"market data fetching\", \"12597.69\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 22, 0, 0)));\n assertEquals(\"market data fetching\", \"12620.90\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 23, 0, 0)));\n assertEquals(\"market data fetching\", \"12620.90\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 24, 0, 0)));\n assertEquals(\"market data fetching\", \"12620.90\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 25, 0, 0)));\n assertEquals(\"market data fetching\", \"12620.90\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 26, 0, 0)));\n assertEquals(\"market data fetching\", \"12479.63\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 27, 0, 0)));\n assertEquals(\"market data fetching\", \"12542.90\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 28, 0, 0)));\n assertEquals(\"market data fetching\", \"12593.87\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 29, 0, 0)));\n assertEquals(\"market data fetching\", \"12647.36\", GenericGeohashLogic.fetchMarketData(new DateTime(2008, 5, 30, 0, 0)));\n assertEquals(\"market data fetching\", \"12981.20\", GenericGeohashLogic.fetchMarketData(new DateTime(2012, 2, 26, 0, 0)));\n }",
"private void createTestDataSet() throws Exception {\n LOG.info(\"creating test data set...\"); \n Database db = null;\n try {\n db = this._category.getDatabase();\n db.begin();\n\n LazyEmployee person = new LazyEmployee();\n person.setFirstName(\"First\");\n person.setLastName(\"Person\");\n person.setBirthday(JDO_ORIGINAL_DATE);\n person.setStartDate(JDO_ORIGINAL_DATE);\n\n LazyAddress address1 = new LazyAddress();\n address1.setId(1);\n address1.setStreet(Integer.toString(1) + JDO_ORIGINAL_STRING);\n address1.setCity(\"First City\");\n address1.setState(\"AB\");\n address1.setZip(\"10000\");\n address1.setPerson(person);\n\n LazyAddress address2 = new LazyAddress();\n address2.setId(2);\n address2.setStreet(Integer.toString(2) + JDO_ORIGINAL_STRING);\n address2.setCity(\"Second City\");\n address2.setState(\"BC\");\n address2.setZip(\"22222\");\n address2.setPerson(person);\n\n LazyAddress address3 = new LazyAddress();\n address3.setId(3);\n address3.setStreet(Integer.toString(3) + JDO_ORIGINAL_STRING);\n address3.setCity(\"Third Ave\");\n address3.setState(\"AB\");\n address3.setZip(\"30003\");\n address3.setPerson(person);\n\n ArrayList addresslist = new ArrayList();\n addresslist.add(address1);\n addresslist.add(address2);\n addresslist.add(address3);\n\n person.setAddress(addresslist);\n\n LazyPayRoll pr1 = new LazyPayRoll();\n pr1.setId(1);\n pr1.setHoliday(15);\n pr1.setHourlyRate(25);\n pr1.setEmployee(person);\n person.setPayRoll(pr1);\n\n LazyContractCategory cc = new LazyContractCategory();\n cc.setId(101);\n cc.setName(\"Full-time slave\");\n db.create(cc);\n\n LazyContractCategory cc2 = new LazyContractCategory();\n cc2.setId(102);\n cc2.setName(\"Full-time employee\");\n db.create(cc2);\n \n ArrayList category = new ArrayList();\n category.add(cc);\n category.add(cc2);\n\n LazyContract con = new LazyContract();\n con.setPolicyNo(1001);\n con.setComment(\"80 hours a week, no pay hoilday, \"\n + \"no sick leave, arrive office at 7:30am everyday\");\n con.setContractNo(78);\n con.setEmployee(person);\n con.setCategory(category);\n person.setContract(con);\n \n db.create(person);\n \n db.commit();\n db.close();\n } catch (Exception e) {\n LOG.error(\"createTestDataSet: exception caught\", e);\n throw e;\n }\n }",
"public static void initGenerateOfflineTestData(){\n dbInstance = Database.newInstance();\n initPlayer();\n initMatches();\n }",
"@Before\n public void DataSmoothExamples4() {\n\t LinkedList<Episode> eps12 = new LinkedList<Episode>();\n\t\teps12.add(new Episode(\"How your mother met me\", 22));\n\t\teps12.add(new Episode(\"Unpause\", 23));\n\t\teps12.add(new Episode(\"Slapsgiving\", 24));\t\t\n\t\tshows4.add(new Show(\"How I Met Your Mother\", 1300, eps12, false));\n\t\t\n\t\tLinkedList<Episode> eps13 = new LinkedList<Episode>();\n\t\teps13.add(new Episode(\"Hello\", 44));\n\t\teps13.add(new Episode(\"Test\", 44));\n\t\teps13.add(new Episode(\"Maybe\", 50));\n\t\teps13.add(new Episode(\"Cool\", 50));\n\t\tshows4.add(new Show(\"Words\", 1900, eps13, false));\n\t\t\n\t\tLinkedList<Episode> eps14 = new LinkedList<Episode>();\n\t\teps14.add(new Episode(\"Beaver\", 21));\n\t\teps14.add(new Episode(\"Giraffe\", 23));\n\t\teps14.add(new Episode(\"Ostrich\", 25));\n\t\tshows4.add(new Show(\"Animals\", 500, eps14, false));\n\t\t\n\t\tLinkedList<Episode> eps15 = new LinkedList<Episode>();\n\t\teps15.add(new Episode(\"W\", 28));\n\t\teps15.add(new Episode(\"P\", 27));\n\t\teps15.add(new Episode(\"I\", 29));\n\t\tshows4.add(new Show(\"WPI\", 1100, eps15, false));\n\n\t showResults4.add(23.0);\n\t showResults4.add(31.0);\n\t showResults4.add(32.67);\n\t showResults4.add(28.0);\n }",
"@Before\n public void DataSmoothExamples7() {\n\t LinkedList<Episode> eps20 = new LinkedList<Episode>();\n\t\teps20.add(new Episode(\"Best of Both Worlds\", 88));\n\t\teps20.add(new Episode(\"The Ultimate Computer\", 49));\n\t\teps20.add(new Episode(\"Trials and Tribble-ations\", 43));\t\t\n\t\tshows7.add(new Show(\"Star Trek\", 1800, eps20, false));\n\t\t\n\t\tLinkedList<Episode> eps21 = new LinkedList<Episode>();\n\t\teps21.add(new Episode(\"Fear of a Bot Planet\", 23));\n\t\teps21.add(new Episode(\"The Why of Fry\", 21));\n\t\teps21.add(new Episode(\"Roswell that Ends Well\", 23));\n\t\teps21.add(new Episode(\"Meanwhile\", 22));\n\t\tshows7.add(new Show(\"Futurama\", 1900, eps21, false));\n\t\t\n\t\tshowResults7.add(60.0);\n\t\tshowResults7.add(22.25);\n }",
"private static void dataFiltering() {\n\t\tDataGenerationMngr dtgen = new DataGenerationMngr();\n\t\tdtgen.genenrateData();\n\n\t\t// Perform Java and Gradle code diff in between commit and save the diff\n\t\t// information in database\n\n\t}",
"private void createDummyData() {\n YangInstanceIdentifier yiid;\n // create 2 links (stored in waitingLinks)\n LeafNode<String> link1Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_1);\n LeafNode<String> link2Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_3);\n\n ContainerNode source1Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link1Source).build();\n ContainerNode source2Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link2Source).build();\n\n LeafNode<String> link1Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_2);\n LeafNode<String> link2Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_4);\n ContainerNode dest1Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link1Dest).build();\n ContainerNode dest2Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link2Dest).build();\n\n MapEntryNode link1 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_1)\n .withChild(source1Container).withChild(dest1Container).build();\n MapEntryNode link2 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_2)\n .withChild(source2Container).withChild(dest2Container).build();\n\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_1);\n UnderlayItem item = new UnderlayItem(link1, null, TOPOLOGY_ID, LINK_ID_1, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_2);\n item = new UnderlayItem(link2, null, TOPOLOGY_ID, LINK_ID_2, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create 2 supporting nodes under two overlay nodes\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_1).build();\n Map<QName, Object> suppNode1KeyValues = new HashMap<>();\n suppNode1KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode1KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_1);\n MapEntryNode menSuppNode1 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode1KeyValues)).build();\n MapNode suppNode1List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode1).build();\n MapEntryNode overlayNode1 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_1)\n .addChild(suppNode1List).build();\n item = new UnderlayItem(overlayNode1, null, TOPOLOGY_ID, OVERLAY_NODE_ID_1, CorrelationItemEnum.Node);\n // overlayNode1 is created\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_2).build();\n Map<QName, Object> suppNode2KeyValues = new HashMap<>();\n suppNode2KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode2KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_2);\n MapEntryNode menSuppNode2 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode2KeyValues)).build();\n MapNode suppNode2List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode2).build();\n MapEntryNode overlayNode2 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_2)\n .addChild(suppNode2List).build();\n item = new UnderlayItem(overlayNode2, null, TOPOLOGY_ID, OVERLAY_NODE_ID_2, CorrelationItemEnum.Node);\n // overlayNode2 is created and link:1 is matched\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create a third supporting node under a third overlay node\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_3).build();\n Map<QName, Object> suppNode3KeyValues = new HashMap<>();\n suppNode3KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode3KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_3);\n MapEntryNode menSuppNode3 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode3KeyValues)).build();\n MapNode suppNode3List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode3).build();\n MapEntryNode node3 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_3)\n .addChild(suppNode3List).build();\n item = new UnderlayItem(node3, null, TOPOLOGY_ID, OVERLAY_NODE_ID_3, CorrelationItemEnum.Node);\n\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create another matched link (link:3)\n LeafNode<String> link3Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_2);\n ContainerNode source3Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link3Source).build();\n LeafNode<String> link3Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_3);\n ContainerNode dest3Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link3Dest).build();\n MapEntryNode link3 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_3)\n .withChild(source3Container).withChild(dest3Container).build();\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_3);\n item = new UnderlayItem(link3, null, TOPOLOGY_ID, LINK_ID_3, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n }",
"private void addSampleData() {\r\n }",
"private void loadSimulatedHeavyData() throws Exception {\n setLowestMeasuredPercentile(1.0);\n\n setSampleCount(sentinelA, 1000);\n setSampleCount(sentinelB, 1000);\n setSampleCount(sentinelC, 1000);\n setSampleCount(sentinelD, 1000);\n setSampleCount(sentinelE, 1000);\n\n when(mbeanServer.getAttribute(sentinelA, \"50thPercentile\")).thenReturn(0.1);\n when(mbeanServer.getAttribute(sentinelB, \"75thPercentile\")).thenReturn(0.1);\n when(mbeanServer.getAttribute(sentinelC, \"75thPercentile\")).thenReturn(3.3);\n when(mbeanServer.getAttribute(sentinelD, \"75thPercentile\")).thenReturn(4.3);\n when(mbeanServer.getAttribute(sentinelE, \"75thPercentile\")).thenReturn(4.3);\n\n when(mbeanServer.isRegistered(sentinelA)).thenReturn(Boolean.TRUE);\n when(mbeanServer.isRegistered(sentinelB)).thenReturn(Boolean.TRUE);\n when(mbeanServer.isRegistered(sentinelC)).thenReturn(Boolean.TRUE);\n when(mbeanServer.isRegistered(sentinelD)).thenReturn(Boolean.TRUE);\n when(mbeanServer.isRegistered(sentinelE)).thenReturn(Boolean.TRUE);\n\n System.out.println(\"Start manual evaluation ...\");\n qosHandler.evaluateQoSActions();\n }",
"@Before\n public void DataSmoothExamples5() {\n\t LinkedList<Episode> eps16 = new LinkedList<Episode>();\n\t \n\t shows5.add(new Show(\"Bates Motel\", 1300, eps16, false));\n\t\t\n\t\tLinkedList<Episode> eps17 = new LinkedList<Episode>();\n\t\teps17.add(new Episode(\"Hello\", 44));\n\t\teps17.add(new Episode(\"Test\", 44));\n\t\teps17.add(new Episode(\"Maybe\", 50));\n\t\tshows5.add(new Show(\"Words\", 1900, eps17, false));\n\t\t\n\t\tLinkedList<Episode> eps18 = new LinkedList<Episode>();\n\t\teps18.add(new Episode(\"Beaver\", 21));\n\t\teps18.add(new Episode(\"Giraffe\", 23));\n\t\teps18.add(new Episode(\"Ostrich\", 25));\n\t\tshows5.add(new Show(\"Animals\", 500, eps18, false)); \n\t\t\n\t\tshowResults5.add(0.0);\n\t\tshowResults5.add(23.0);\n\t\tshowResults5.add(23.0);\n }",
"private static List<Supplier> createSupplierData(ConsumerQuery query, boolean testing) {\n\t\tRepository repository;\n\t\t\n\t\t//use name of processes in query to retrieve subset of relevant supplier data from semantic infrastructure\n\t\tList<String> processNames = new ArrayList<String>();\t\n\n\t\tif (query.getProcesses() == null || query.getProcesses().isEmpty()) {\n\t\t\tSystem.err.println(\"There are no processes specified!\");\n\t\t} else {\n\t\t\n\t\tfor (Process process : query.getProcesses()) {\n\t\t\tprocessNames.add(process.getName());\n\t\t}\n\t\t}\n\t\t\t\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\tif (testing == false) {\n\n\t\t\tMap<String, String> headers = new HashMap<String, String>();\n\t\t\theaders.put(\"Authorization\", AUTHORISATION_TOKEN);\n\t\t\theaders.put(\"accept\", \"application/JSON\");\n\n\t\t\trepository = new SPARQLRepository(SPARQL_ENDPOINT );\n\n\t\t\trepository.initialize();\n\t\t\t((SPARQLRepository) repository).setAdditionalHttpHeaders(headers);\n\n\t\t} else {\n\n\t\t\t//connect to GraphDB\n\t\t\trepository = new HTTPRepository(GRAPHDB_SERVER, REPOSITORY_ID);\n\t\t\trepository.initialize();\n\t\t}\n\t\t\n\t\t//creates a SPARQL query that is run against the Semantic Infrastructure\n\t\tString strQuery = SparqlQuery.createQueryMVP(processNames);\n\t\t\n\t\t//System.out.println(strQuery);\n\n\t\t//open connection to GraphDB and run SPARQL query\n\t\tSet<SparqlRecord> recordSet = new HashSet<SparqlRecord>();\n\t\tSparqlRecord record;\n\t\ttry(RepositoryConnection conn = repository.getConnection()) {\n\n\t\t\tTupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, strQuery);\t\t\n\n\t\t\t//if querying the local KB, we need to set setIncludeInferred to false, otherwise inference will include irrelevant results.\n\t\t\t//when querying the Semantic Infrastructure the non-inference is set in the http parameters.\n\t\t\tif (testing == true) {\n\t\t\t\t//do not include inferred statements from the KB\n\t\t\t\ttupleQuery.setIncludeInferred(false);\n\t\t\t}\n\n\t\t\ttry (TupleQueryResult result = tupleQuery.evaluate()) {\t\t\t\n\n\t\t\t\twhile (result.hasNext()) {\n\n\t\t\t\t\tBindingSet solution = result.next();\n\n\t\t\t\t\t//omit the NamedIndividual types from the query result\n\t\t\t\t\tif (!solution.getValue(\"processType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")\n\t\t\t\t\t\t\t&& !solution.getValue(\"certificationType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")\n\t\t\t\t\t\t\t&& !solution.getValue(\"materialType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")) {\n\n\t\t\t\t\t\trecord = new SparqlRecord();\n\t\t\t\t\t\trecord.setSupplierId(solution.getValue(\"supplierId\").stringValue().replaceAll(\"\\\\s+\",\"\"));\n\t\t\t\t\t\trecord.setProcess(stripIRI(solution.getValue(\"processType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\t\t\t\t\t\trecord.setMaterial(stripIRI(solution.getValue(\"materialType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\t\t\t\t\t\trecord.setCertification(stripIRI(solution.getValue(\"certificationType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\n\t\t\t\t\t\trecordSet.add(record);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\tSystem.err.println(\"Wrong test data!\");\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\n\t\t}\n\n\t\t//close connection to KB repository\n\t\trepository.shutDown();\n\n\t\tlong stopTime = System.currentTimeMillis();\n\t\tlong elapsedTime = stopTime - startTime;\n\n\t\tif (testing == true ) {\n\t\tSystem.out.println(\"The SPARQL querying process took \" + elapsedTime/1000 + \" seconds.\");\n\t\t}\n\n\t\t//get unique supplier ids used for constructing the supplier structure below\n\t\tSet<String> supplierIds = new HashSet<String>();\n\t\tfor (SparqlRecord sr : recordSet) {\n\t\t\tsupplierIds.add(sr.getSupplierId());\n\t\t}\n\n\t\tCertification certification = null;\n\t\tSupplier supplier = null;\n\t\tList<Supplier> suppliersList = new ArrayList<Supplier>();\n\n\t\t//create a map of processes and materials relevant for each supplier\n\t\tMap<String, SetMultimap<Object, Object>> multimap = new HashMap<String, SetMultimap<Object, Object>>();\n\n\t\tfor (String id : supplierIds) {\n\t\t\tSetMultimap<Object, Object> map = HashMultimap.create();\n\n\t\t\tString supplierID = null;\n\n\t\t\tfor (SparqlRecord sr : recordSet) {\n\n\t\t\t\tif (sr.getSupplierId().equals(id)) {\n\n\t\t\t\t\tmap.put(sr.getProcess(), sr.getMaterial());\n\n\t\t\t\t\tsupplierID = sr.getSupplierId();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tmultimap.put(supplierID, map);\n\t\t}\t\t\n\n\t\tProcess process = null;\n\n\t\t//create supplier objects (supplier id, processes (including materials) and certifications) based on the multimap created in the previous step\n\t\tfor (String id : supplierIds) {\n\t\t\tSetMultimap<Object, Object> processAndMaterialMap = null;\n\n\t\t\tList<Certification> certifications = new ArrayList<Certification>();\n\t\t\tList<Process> processes = new ArrayList<Process>();\t\t\n\n\t\t\tfor (SparqlRecord sr : recordSet) {\n\n\t\t\t\tif (sr.getSupplierId().equals(id)) {\n\n\t\t\t\t\t//add certifications\n\t\t\t\t\tcertification = new Certification(sr.getCertification());\n\t\t\t\t\tif (!certifications.contains(certification)) {\n\t\t\t\t\t\tcertifications.add(certification);\n\t\t\t\t\t}\n\n\t\t\t\t\t//add processes and associated materials\n\t\t\t\t\tprocessAndMaterialMap = multimap.get(sr.getSupplierId());\n\n\t\t\t\t\tString processName = null;\n\n\t\t\t\t\tSet<Object> list = new HashSet<Object>();\n\n\t\t\t\t\t//iterate processAndMaterialMap and extract process and relevant materials for that process\n\t\t\t\t\tfor (Entry<Object, Collection<Object>> e : processAndMaterialMap.asMap().entrySet()) {\n\n\t\t\t\t\t\tSet<Material> materialsSet = new HashSet<Material>();\n\n\t\t\t\t\t\t//get list/set of materials\n\t\t\t\t\t\tlist = new HashSet<>(e.getValue());\n\n\t\t\t\t\t\t//transform to Set<Material>\n\t\t\t\t\t\tfor (Object o : list) {\n\t\t\t\t\t\t\tmaterialsSet.add(new Material((String)o));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tprocessName = (String) e.getKey();\n\n\t\t\t\t\t\t//add relevant set of materials together with process name\n\t\t\t\t\t\tprocess = new Process(processName, materialsSet);\n\n\t\t\t\t\t\t//add processes\n\t\t\t\t\t\tif (!processes.contains(process)) {\n\t\t\t\t\t\t\tprocesses.add(process);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tsupplier = new Supplier(id, processes, certifications );\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsuppliersList.add(supplier);\n\t\t}\n\n\t\treturn suppliersList;\n\n\t}",
"private void seedSuppliers() throws IOException, JAXBException {\n this.supplierService.seed();\n }",
"private BatchPoints generateInfluxData(BuildData buildData, Target target) {\n BatchPoints batchPoints = BatchPoints.database(target.getDatabase())\n .tag(\"async\", \"true\")\n .retentionPolicy(\"default\")\n .consistency(ConsistencyLevel.ALL)\n .build();\n\n // prepare the measurement point for the timeseries\n Point point = Point.measurement(INFLUX_MEASUREMENT_PREFIX + \"_\" + buildData.getJobName())\n .time(System.currentTimeMillis(), TimeUnit.MILLISECONDS)\n .field(INFLUX_FIELDNAME_JOBDURATION, buildData.getJobDurationSeconds())\n .build();\n \n batchPoints.point(point);\n return batchPoints;\n }",
"private void generateTrades() {\n\t\tSystem.out.println(\"\\nGenerating fake trade records for stock: \" + stockSymbol);\n Random rd = new Random();\n \n for (int i = 0; i < 5; i++) {\n // Create arbitrary timestamp and TradeRecord data \n \t// within the last 20 minutes\n \n int minutes = rd.nextInt(21);\n int sharesQty = rd.nextInt(100) + 1;\n boolean isBuy = rd.nextBoolean();\n double price = (rd.nextDouble() + 0.1) * 100;\n // truncate price to 2 decimal places\n String tmpPrc = String.format(Locale.ENGLISH, \"%.2f\", price);\n price = Double.parseDouble(tmpPrc);\n TradeRecordType indicator = isBuy ? TradeRecordType.BUY : TradeRecordType.SELL;\n \n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.MINUTE, -minutes);\n Date date = cal.getTime();\n \n // Create and save fake trade record\n TradeRecord rec = new TradeRecord(date, sharesQty, indicator, price);\n System.out.println(rec);\n this.stockTrades.put(date, rec);\n }\n }",
"private void loadTestData() {\n try(Realm r = Realm.getDefaultInstance()) {\n r.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n PromotionsResponseDto promotionsResponseDto =\n PromotionsApiFactory.gson().fromJson(TEST_ANF_FULL_RESPONSE, PromotionsResponseDto.class);\n for(PromotionDto promotionDto : promotionsResponseDto.getPromotions()) {\n Promotion promotion = Promotion.fromDto(promotionDto);\n r.copyToRealm(promotion);\n }\n }\n });\n }\n }",
"public void testFeed() throws Exception {\n String query = \"harry potter\";\n List<Work> works = session.g.search(query).getResults();\n\n //assertEquals(\"Wrong feed 1\", works.get(0).getBestBook().getTitle(),\n // \"Harry Potter and the Sorcerer's Stone (Harry Potter, #1)\");\n\n assertEquals(\"Wrong feed 11\", works.get(1).getBestBook().getTitle(),\n \"Harry Potter and the Prisoner of Azkaban (Harry Potter, #3)\");\n\n assertEquals(\"Wrong feed 1\", works.get(0).getBestBook().getAuthor().getName(),\n \"J.K. Rowling\");\n }",
"public final void generateAll() {\n ConsoleUtils.display(\">> Generate Rest test...\");\n\n List<IUpdater> updaters = this.getAdapter().getRestUpdatersTest();\n this.processUpdater(updaters);\n\n Iterable<EntityMetadata> entities =\n this.getAppMetas().getEntities().values();\n\n for (final EntityMetadata entity : entities) {\n if (entity.getOptions().containsKey(\"rest\") \n && !entity.isInternal() \n && !entity.getFields().isEmpty()) {\n\n ConsoleUtils.display(\">>> Generate Rest test for \" \n + entity.getName());\n\n this.getDatamodel().put(\n TagConstant.CURRENT_ENTITY, entity.getName());\n\n updaters = this.getAdapter()\n .getRestEntityUpdatersTest(entity);\n this.processUpdater(updaters);\n }\n }\n }",
"@Override\n public Collection<SimpleModel> mungee(Collection<MockData> src) {\n return src\n .stream()\n .filter(data -> data.getContent() != null)\n .map(SimpleModel::build)\n .collect(Collectors.toList());\n }",
"void fetchForRentHousesData();",
"@BeforeClass\n public static void setUp() {\n serviceMock = mock(DefaultMisthYpalService.class);\n String inputFile = \"MisthYpal.json\";\n try {\n String json = FileUtils.readFileFromResource2String(inputFile, Charset.defaultCharset());\n records = gson.fromJson(json, MisthYpal[].class);\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n // test data\n when(serviceMock.find(records[0].getKodoikog())).thenReturn(records[0]);\n }",
"private void createData() {\n//\n// tour = new Tour();\n// tour.setTitle(\"Death Valley\");\n// tour.setDescription(\"A tour to Death Valley\");\n// tour.setPrice(900);\n// tour.setImage(\"death_valley\");\n// tour = dataSource.create(tour);\n// Log.i(LOGTAG, \"Tour created with id \" + tour.getId());\n//\n// tour = new Tour();\n// tour.setTitle(\"San Francisco\");\n// tour.setDescription(\"A tour to San Francisco\");\n// tour.setPrice(1200);\n// tour.setImage(\"san_francisco\");\n// tour = dataSource.create(tour);\n// Log.i(LOGTAG, \"Tour created with id \" + tour.getId());\n\n ToursPullParser parser = new ToursPullParser();\n tours = parser.parseXML(this);\n\n for (Tour tour : tours) {\n dataSource.create(tour);\n }\n\n }",
"void fetchForSaleHousesData();",
"@Override\n public void run() {\n addDelay();\n\n AppDatabase appDatabase = AppDatabase.getInstance(appContext, executors);\n\n List<WeatherEntry> weathers = DataGenerator.generateWeathers();\n\n Log.d(TAG, \"Codelab AppDatabase insertAll - begin\");\n\n insertAll(appDatabase, weathers);\n\n // notify that the database was created and it's ready to be used\n appDatabase.setDatabaseCreated();\n }",
"void insertEpicsData(List<EpicsData> epicsDataList, int run);",
"public void init() {\n for (int i = 1; i <= 20; i++) {\n List<Data> dataList = new ArrayList<Data>();\n if (i % 2 == 0 || (1 + i % 10) == _siteIndex) {\n dataList.add(new Data(i, 10 * i));\n _dataMap.put(i, dataList);\n }\n }\n }",
"public void dummyUsersToDB(){\n\t\tUser nick = new User(db,\"Nick\",9);\n\t\tUser lin = new User(db,\"Lin\",10);\n\t\tUser evan = new User(db,\"Evan\",8);\n\t\tUser karthik = new User(db,\"Karthik\",10);\n\t\tUser bernadette = new User(db,\"Bernadette\",8);\n\t\tUser james = new User(db,\"James\",7);\n\t}",
"private void pullBikes() {\n try {\n if (!connected) {\n this.reconnectSupplier();\n }\n\n synchronized (this.writeLock) {\n if (!this.dataVersion.equals(supplier.getDataVersion())) {\n DataPatch<ArrayList<Bike>> dataPatch = supplier.getNewBikes(dataVersion);\n for (Bike bike : dataPatch.getData()) {\n cache.put(bike.getItemNumber(), bike);\n }\n dataVersion = dataPatch.getDataVersion();\n }\n }\n } catch (RemoteException e) {\n System.out.println(\"Cannot load new bikes from supplier, keep using cached data\");\n e.printStackTrace();\n connected = false; // connection lost so remove reference to supplier, reacquire later\n }\n }",
"List<OrderFlowerData> getFlowersData(Order order);",
"private static Dataset<Row> loadbetaFeed() {\n\t\tconf.set(TableInputFormat.INPUT_TABLE, RSSFeedUtils.betatable);\n\t\tconf.set(TableInputFormat.SCAN_COLUMN_FAMILY, RSSFeedUtils.hbaseTab_cf);\n\t\t\n\t\tString feedCols = RSSFeedUtils.hbaseTab_cf + \":rssFeed \" + RSSFeedUtils.hbaseTab_cf + \":title \" + RSSFeedUtils.hbaseTab_cf + \":articleLink \" \n\t\t\t\t\t\t+ RSSFeedUtils.hbaseTab_cf + \":description \" + RSSFeedUtils.hbaseTab_cf + \":articleDate \" + RSSFeedUtils.hbaseTab_cf + \":categories\";\n\t\t\n\t\tconf.set(TableInputFormat.SCAN_COLUMNS, feedCols);\n\t\tJavaPairRDD<ImmutableBytesWritable, Result> feedPairRDD = jsc.newAPIHadoopRDD(conf, TableInputFormat.class, ImmutableBytesWritable.class, Result.class);\n\t\t\n\t\tJavaRDD<DatasetBean> feedRDD = feedPairRDD.map(new Function<Tuple2<ImmutableBytesWritable,Result>, DatasetBean>() {\n\t\t\t\n\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\tpublic DatasetBean call(Tuple2<ImmutableBytesWritable, Result> arg0) throws Exception {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tResult r = arg0._2;\n\t\t\t\t//keylist.add(new Delete(r.getRow())); \n\t\t\t\t\n\t\t\t\tDatasetBean databean = new DatasetBean();\n\t\t\t\tdatabean.setRssFeed(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"rssFeed\"))));\n\t\t\t\tdatabean.setTitle(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"title\"))));\n\t\t\t\tdatabean.setArticleLink(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"articleLink\"))));\n\t\t\t\tdatabean.setDescription(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"description\"))));\n\t\t\t\tdatabean.setCategories(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"categories\"))));\n\t\t\t\tdatabean.setArticleDate(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"articleDate\"))));\n\t\t\t\t\n\t\t\t\treturn databean;\n\t\t\t}\n\t\t});\n\t\t\n\t\tDataset<Row> feeddataset = sparkSession.createDataFrame(feedRDD, DatasetBean.class);\n\t\treturn feeddataset;\n\t}",
"private ArrayList<Item> prepareDataSet() {\n ArrayList<Item> flowerData = new ArrayList<>();\n Item flower;\n\n //1st Item\n flower = new Item();\n flower.setItemName(\"CAR Lock\");\n flower.setItemphoto(R.drawable.locks);\n flowerData.add(flower);\n\n //2nd Item\n flower = new Item();\n flower.setItemName(\"Car Unlock\");\n flower.setItemphoto(R.drawable.unlock);\n flowerData.add(flower);\n\n\n //3rd Item\n flower = new Item();\n flower.setItemName(\"Doors\");\n flower.setItemphoto(R.drawable.doors);\n flowerData.add(flower);\n\n\n //4th Item\n flower = new Item();\n flower.setItemName(\"Vehicle Speed\");\n flower.setItemphoto(R.drawable.speed);\n flowerData.add(flower);\n\n\n //5th Item\n flower = new Item();\n flower.setItemName(\"Location\");\n flower.setItemphoto(R.drawable.location);\n flowerData.add(flower);\n\n\n //6th Item\n flower = new Item();\n flower.setItemName(\"Previous Trips\");\n flower.setItemphoto(R.drawable.trips);\n flowerData.add(flower);\n\n //6th Item\n flower = new Item();\n flower.setItemName(\"Honk\");\n flower.setItemphoto(R.drawable.honk);\n flowerData.add(flower);\n\n\n return flowerData;\n\n }",
"@Before\n public void setup()\n {\n for (int i = 0; i < getInt(); ++i)\n {\n invoiceRepository.saveAndFlush(new Invoice(new Long(i + 1), new Date(), BigDecimal.TEN));\n }\n }",
"public static void generateSeedData()\n\t{\n\t\teventIDCounter = 1; //set counter for ID of events to 1\n\t\t\n\t\t// generate the grid world\n\t\tfor(int i = 0; i <= (MAX_COORDS*2); i++)\n\t\t{\n\t\t\tfor(int j = 0; j <= (MAX_COORDS*2); j++)\n\t\t\t{\n\t\t\t\tgridWorld[i][j] = new Coordinate(i-MAX_COORDS,j-MAX_COORDS);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Assumption that there will be 1 event to every 10 coordinates\n\t\t// grid of 21*21=441, 441/10=44\n\t\tint numOfEvents = ((MAX_COORDS*2)+1)*((MAX_COORDS*2)+1)/10;\n\t\tEvent newEvent;\n\t\tint newXCoord;\n\t\tint newYCoord;\n\t\tTicket ticket;\n\t\tArrayList<Ticket> tickets;\n\t\t\n\t\tfor(int i = 1; i <= numOfEvents; i++)\n\t\t{\n\t\t\t// create random coordinates for new event\n\t\t\tnewXCoord = rand.nextInt(MAX_COORDS + 1 +MAX_COORDS) -MAX_COORDS;\n\t\t\tnewYCoord = rand.nextInt(MAX_COORDS + 1 +MAX_COORDS) -MAX_COORDS;\n\t\t\t\n\t\t\tnewEvent = new Event(i, gridWorld[newXCoord+MAX_COORDS][newYCoord+MAX_COORDS], \"Event \"+String.format(\"%03d\", i)); \n\t\t\t\n\t\t\t//create a random number of tickets between 0 and 5\n\t\t\ttickets = new ArrayList<Ticket>(); // clear all tickets in the arraylist\n\t\t\tfor(int j = 0; j < 4; j++)\n\t\t\t{\n\t\t\t\tint num = rand.nextInt(5000 - 1000) +1000; // create price in cents, from $10 to $50 \n\t\t\t\tdouble price = num/100.0; // convert to double\n\t\t\t\tticket = new BasicTicket((new BigDecimal(price)).setScale(2, RoundingMode.CEILING));\n\t\t\t\ttickets.add(ticket);\n\t\t\t}\n\t\t\tnewEvent.setTickets(tickets);\n\t\t\t\t\n\t\t\t// set the grid coordinate to have this event\n\t\t\tgridWorld[newXCoord+MAX_COORDS][newYCoord+MAX_COORDS].setEvent(newEvent);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// Add a couple of events hard coded first for testing\n\t\t/*Event newEvent1 = new Event(gridWorld[18][20], \"Event 001\"); //distance of 18 from 0,0\n\t\tgridWorld[18][20].setEvent(newEvent1);\n\t\t\n\t\tEvent newEvent2 = new Event(gridWorld[9][10], \"Event 002\"); //distance of 1 from 0,0\n\t\tgridWorld[9][10].setEvent(newEvent2);\n\t\t\n\t\tEvent newEvent3 = new Event(gridWorld[8][5], \"Event 003\"); //distance of 7 from 0,0\n\t\tgridWorld[8][5].setEvent(newEvent3);\n\t\t\n\t\tEvent newEvent4 = new Event(gridWorld[10][14], \"Event 004\"); //distance of 4 from 0,0\n\t\tgridWorld[10][14].setEvent(newEvent4);\n\t\t\n\t\tEvent newEvent5 = new Event(gridWorld[10][11], \"Event 005\"); //distance of 1 from 0,0\n\t\tgridWorld[10][11].setEvent(newEvent5);\n\t\t\n\t\tEvent newEvent6 = new Event(gridWorld[5][10], \"Event 006\"); //distance of 5 from 0,0\n\t\tgridWorld[5][10].setEvent(newEvent6);\n\t\t\n\t\tEvent newEvent7 = new Event(gridWorld[11][12], \"Event 007\"); //distance of 3 from 0,0\n\t\tgridWorld[11][12].setEvent(newEvent7);\n\t\t\n\t\tEvent newEvent8 = new Event(gridWorld[0][0], \"Event 008\"); //distance of 20 from 0,0\n\t\tgridWorld[0][0].setEvent(newEvent8);*/\n\t\t\n\t\t\n\t\t\n\t}",
"private static void createDemoData() {\n if (userManager.user_map.isEmpty() || accountManager.account_map.isEmpty() || banknoteManager.banknotes.isEmpty()) {\n if (userManager.user_map.isEmpty()) {\n userManager.createAccount(BankManager.class.getSimpleName(), \"jen\", \"1234\");\n userManager.createAccount(Teller.class.getSimpleName(), \"pete\", \"1234\");\n userManager.createAccount(Customer.class.getSimpleName(), \"steve\", \"1234\");\n }\n\n if (accountManager.account_map.isEmpty()) {\n accountManager.addAccount(CreditCard.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Youth.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Saving.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Chequing.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(CreditLine.class.getSimpleName(), Collections.singletonList(\"steve\"));\n }\n\n if (banknoteManager.banknotes.isEmpty()) {\n banknoteManager.banknotes = new HashMap<>();\n for (int d : banknoteManager.DENOMINATIONS) {\n banknoteManager.banknotes.put(String.valueOf(d), 50);\n }\n }\n }\n }",
"@BeforeClass (alwaysRun = true)\n public void dataPreparation()\n {\n serverHealth.isServerReachable();\n serverHealth.assertServerIsOnline();\n\n // Before we start testing the live indexing we need to use the reindexing component to index the system nodes.\n Step.STEP(\"Index system nodes.\");\n AlfrescoStackInitializer.reindexEverything();\n\n Step.STEP(\"Create a test user and private site.\");\n testUser = dataUser.createRandomTestUser();\n testSite = helper.createPrivateSite(testUser);\n }",
"private void fillData()\n {\n\n }",
"public List<TwitterDataExtract> GetData();",
"public DummyDataMaker(int entries)\n\t{\n\t\tint total = (entries < 1) ? 20 : entries;\n\n\t\tfor (int entry = 0; entry < total; entry++)\n\t\t{\n\t\t\tdevices.add(new Device());\n\t\t}\n\t}",
"private void fillData() {\n\t\tmCursor = dbHelper.getResultsByTime();\n\t\tstartManagingCursor(mCursor);\n\n\t\tdataListAdapter = new SimpleCursorAdapter(this, R.layout.row, mCursor,\n\t\t\t\tFROM, TO);\n\t\tmConversationView.setAdapter(dataListAdapter);\n\t}",
"public void loadTestData() {\n profilepages.addAll(DefaultDataStore.getInstance().getAllProfiles());\n }",
"private void freshTheData() {\n mData.clear();\n mData.addAll(mDataOrg);\n }",
"private DataSet normalDataSet(){\n //create normal distribution with mean .05 and sd .05/3 so that 99.7% of events are < .1\n NormalDistribution normalDistribution = new NormalDistribution(TARGET_MEAN, TARGET_MEAN/3D);\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n Long cost = (long) Math.max(1, normalDistribution.sample()); //make sure no 0 cost events\n tasks[i] = new Task(cost, uuid);\n }\n //generate task multiplities from sampling from uniform distribution\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }",
"@Test\n public void noFilteringAllowsRepeatedResults() {\n final Dataset dataset = new Dataset(\"TEST1\", \"sql\");\n\n List<String> entry1 = new ArrayList<>();\n entry1.add(\"abcd\");\n entry1.add(\"123\");\n\n List<String> entry2 = new ArrayList<>();\n entry2.add(\"wxyz\");\n entry2.add(\"789\");\n\n List<String> entry3 = new ArrayList<>();\n entry3.add(\"wxyz\"); // same key as entry2\n entry3.add(\"456\");\n\n List<String> entry4 = new ArrayList<>();\n entry4.add(\"efgh\");\n entry4.add(\"001\");\n\n List<List<String>> queryResults = new ArrayList<>();\n queryResults.add(entry1);\n queryResults.add(entry2);\n queryResults.add(entry3);\n queryResults.add(entry4);\n\n // given\n dataset.populateCache(queryResults, 100L);\n\n // when\n final List<String> result1 = dataset.getCachedResult();\n final List<String> result2 = dataset.getCachedResult();\n final List<String> result3 = dataset.getCachedResult();\n final List<String> result4 = dataset.getCachedResult();\n\n // then\n assertEquals(\"Wrong result 1\", entry1, result1);\n assertEquals(\"Wrong result 2\", entry2, result2);\n assertEquals(\"Wrong result 3\", entry3, result3);\n assertEquals(\"Wrong result 4\", entry4, result4);\n\n // and\n try {\n dataset.getCachedResult();\n fail(\"Expected to run out of data\");\n\n } catch (IllegalStateException ex) {\n assertEquals(\"Wrong error\", \"No more data available for dataset: TEST1\", ex.getMessage());\n }\n\n // and\n assertEquals(\"Wrong cache size\", Optional.of(4), dataset.getMetrics().getCacheSize());\n assertEquals(\"Wrong timing\", Optional.of(100L), dataset.getMetrics().getTimingMilliseconds());\n assertEquals(\"Wrong cache requested\", Optional.of(5), dataset.getMetrics().getCacheRequested());\n assertEquals(\"Wrong filtered out\", Optional.empty(), dataset.getMetrics().getFilteredOut());\n }",
"public FeedCustomAdapter(List<Post> dataSet) {\n outfitDataSet = dataSet;\n }",
"public List<HashMap> feedCafeAll() {\n Query query = new Query(cmm.getKind());\n query.addFilter(\"deleteFlag\", Query.FilterOperator.EQUAL, \"0\");\n DatastoreService ds = DatastoreServiceFactory.getDatastoreService();\n List<Entity> listAll = null;\n List<HashMap> list = new ArrayList<HashMap>();\n listAll = ds.prepare(query).asList(FetchOptions.Builder.withOffset(0).limit(5000));\n for(Entity cm : listAll){\n\n \n HashMap<String,String> cafeData = new HashMap<String,String>();\n cafeData.put(\"key\", EscapeUtil.toHtmlString(String.valueOf(cm.getKey().getId())));\n String storeSubName = EscapeUtil.toHtmlStringForObject(cm.getProperty(\"storeName\")).trim();\n String storeMainName = CafeUtil.createStoreMainName(EscapeUtil.toHtmlStringForObject(cm.getProperty(\"storeFlag\")).trim());\n \n //エスケープして、トリムする\n cafeData.put(\"storeName\",storeMainName+\" \"+storeSubName);\n cafeData.put(\"storeSubName\",storeSubName);\n cafeData.put(\"storeMainName\",storeMainName);\n cafeData.put(\"phoneNumber\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"phoneNumber\")));\n cafeData.put(\"storeCaption\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"storeCaption\")));\n cafeData.put(\"storeAddress\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"storeAddress\")));\n cafeData.put(\"zipCode\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"zipCode\")));\n cafeData.put(\"lat\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"lat\")));\n cafeData.put(\"lon\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"lon\")));\n cafeData.put(\"geohash4\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"geohash4\")));\n cafeData.put(\"geohash5\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"geohash5\")));\n cafeData.put(\"geohash6\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"geohash6\")));\n cafeData.put(\"geohash8\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"geohash8\")));\n cafeData.put(\"geohashAll\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"geohashAll\")));\n cafeData.put(\"geohashAround\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"geohashAround\")));\n cafeData.put(\"tabako\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"tabako\")));\n cafeData.put(\"kinen\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"kinen\")));\n cafeData.put(\"koshitsu\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"koshitsu\")));\n cafeData.put(\"wifi\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"wifi\")));\n cafeData.put(\"pc\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"pc\")));\n cafeData.put(\"shinya\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"shinya\")));\n cafeData.put(\"terace\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"terace\")));\n cafeData.put(\"pet\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"pet\")));\n cafeData.put(\"only\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"only\")));\n\n cafeData.put(\"dateMuki\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"dateMuki\")));\n\n cafeData.put(\"friendMattari\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"friendMattari\")));\n\n cafeData.put(\"manyPerson\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"manyPerson\")));\n\n cafeData.put(\"suiteruTime\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"suiteruTime\")));\n \n cafeData.put(\"iine\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"iine\")));\n cafeData.put(\"storeFlag\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"storeFlag\")));\n cafeData.put(\"deleteFlag\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"deleteFlag\")));\n cafeData.put(\"userSendFlag\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"userSendFlag\")));\n cafeData.put(\"updateTime\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"updateTime\")));\n cafeData.put(\"nickName\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"nickName\")));\n cafeData.put(\"deviceId\", EscapeUtil.toHtmlStringForObject(cm.getProperty(\"deviceId\")));\n list.add(cafeData);\n \n }\n return list;\n }",
"@Before\n public void setUp() throws ServiceException, FlickrException {\n flickrService = Mockito.spy(flickrService);\n\n //add some testdata\n int dummyId = 93838;\n int dummySecret = 45353454;\n int dummyOriSecret = 654567;\n for(int i=0; i<4; i++){\n Photo photo = new Photo();\n photo.setId(String.valueOf(dummyId+i));\n photo.setFarm(\"1\");\n photo.setServer(\"459\");\n photo.setOriginalFormat(\"jpg\");\n photo.setSecret(String.valueOf(dummySecret+i));\n photo.setOriginalSecret(String.valueOf(dummyOriSecret+i));\n Mockito.doNothing().when(flickrService).downloadTempPhoto(eq(buildOriFlickrUrl(photo)), eq(photo.getId()+\"_o\"),\n eq(photo.getOriginalFormat()));\n Mockito.doNothing().when(flickrService).downloadTempPhoto(eq(buildFlickrUrl(photo)), eq(photo.getId()),\n eq(photo.getOriginalFormat()));\n Mockito.doReturn(geoData).when(flickrService).getLocation(photo.getId());\n flickrPhotos.add(photo);\n }\n }",
"private void prepareData() {\n devices.clear();\n\n Set<String> s = Blue.getInstance().devices.keySet();\n Iterator<String> it = s.iterator();\n String address;\n while (it.hasNext()) {\n address = it.next();\n devices.add(new Device(address, Blue.getInstance().devices.get(address)));\n }\n }",
"public FakeDatabase() {\n\t\t\n\t\t// Add initial data\n\t\t\n//\t\tSystem.out.println(authorList.size() + \" authors\");\n//\t\tSystem.out.println(bookList.size() + \" books\");\n\t}",
"private void getDataFromDB() {\n ArrayList<ArtworkData> artworkData = getArtworksFromDatabase();\n if (artworkData.size() <= 0) {\n // there is no data in local DB, error\n onErrorReceived();\n } else {\n sendArtworkData(artworkData);\n }\n }",
"private Dataset prepareDataset() {\n // create TAPIR dataset with single endpoint\n Dataset dataset = new Dataset();\n dataset.setKey(UUID.randomUUID());\n dataset.setTitle(\"Beavers\");\n dataset.addEndpoint(endpoint);\n\n // add single Contact\n Contact contact = new Contact();\n contact.setKey(1);\n contact.addEmail(\"test@gbif.org\");\n dataset.setContacts(Lists.newArrayList(contact));\n\n // add single Identifier\n Identifier identifier = new Identifier();\n identifier.setKey(1);\n identifier.setType(IdentifierType.GBIF_PORTAL);\n identifier.setIdentifier(\"450\");\n dataset.setIdentifiers(Lists.newArrayList(identifier));\n\n // add 2 MachineTags 1 with metasync.gbif.org namespace, and another not having it\n List<MachineTag> machineTags = Lists.newArrayList();\n\n MachineTag machineTag = new MachineTag();\n machineTag.setKey(1);\n machineTag.setNamespace(Constants.METADATA_NAMESPACE);\n machineTag.setName(Constants.DECLARED_COUNT);\n machineTag.setValue(\"1000\");\n machineTags.add(machineTag);\n\n MachineTag machineTag2 = new MachineTag();\n machineTag2.setKey(2);\n machineTag2.setNamespace(\"public\");\n machineTag2.setName(\"IsoCountryCode\");\n machineTag2.setValue(\"DK\");\n machineTags.add(machineTag2);\n\n dataset.setMachineTags(machineTags);\n\n // add 1 Tag\n Tag tag = new Tag();\n tag.setKey(1);\n tag.setValue(\"Invasive\");\n dataset.setTags(Lists.newArrayList(tag));\n\n return dataset;\n }",
"private void testDB(){\n DB=new LinkedList<>(); \n DB.add(new Offer(\"ID1\",\"AGV923\",\"Nico\",\"Leo\",\"Salvo\",\"\"));\n DB.add(new Offer(\"ID2\",\"ADJ325\",\"Tizio\", \"Caio\", \"Sempronio\",\"\"));\n DB.add(new Offer(\"ID3\",\"T56G2G\",\"Antonella\", \"Daniele\",\"\",\"\"));\n }",
"private void initialData() {\n\n }",
"@TestFactory\n Stream<DynamicTest> testStreamFactoryTableDataTest() {\n List<String[]> testData = Arrays.stream(new Object[][]{\n {\"Col 1, Row 1\", \"Col 2, Row 1\", dummyFruits.get(1).getType().toString()},\n {\"Col 1, Row 2\", \"Col 2, Row 2\", dummyFruits.get(2).getType().toString()}\n })\n .map(objects -> Arrays.stream(objects).map(Object::toString).toArray(String[]::new))\n .collect(Collectors.toList());\n\n return testData.stream()\n .map(strings -> DynamicTest.dynamicTest(testData.toString(), () -> Assertions.assertNotNull(testData)));\n }",
"@Disabled\r\n\t@Test\r\n\tvoid saveBatch ( ) {\r\n\r\n\t\tlogger.info( Utils.testHeader( ) ) ;\r\n\r\n\t\tvar testEmployees = IntStream.rangeClosed( 1, TEST_RECORD_COUNT )\r\n\t\t\t\t.mapToObj( EmpHelpers::buildRandomizeEmployee )\r\n\t\t\t\t.collect( Collectors.toList( ) ) ;\r\n\r\n\t\temployeeRepository.saveAll( testEmployees ) ;\r\n\r\n\t}",
"public int[] fillDatabase()\n {\n int [] db = new int [20];\n \n \n for (int i = 0; i < db.length; i++)\n {\n db[i] = new java.util.Random().nextInt(25);\n }\n return db;\n }",
"public List<Article> generateArticles(Data data) {\n List<Article> articles = new ArrayList<>();\n for (int i = 0; i < Integer.parseInt(data.getArticleNumber()); i++) {\n articles.add(new Article(\n data.getArticle().getTitle() + RandomStringUtils.random(5, false, true),\n data.getArticle().getDescription() + RandomStringUtils.random(5, false, true),\n data.getArticle().getBody(),\n data.getArticle().getTags() + RandomStringUtils.random(5, false, true)\n ));\n }\n return articles;\n }",
"private void getCustomerData() {\r\n\t\t// get next customer data : from file or random number generator\r\n\t\t// set anyNewArrival and transactionTime\r\n\t\t// see readme file for more info\r\n\r\n\t\tif (dataSource == 1) { // file\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0/1 random or file input\r\n\t\t\t\t\tif (dataFile.hasNextInt()) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// checks for a line of information\r\n\t\t\t\t\t\tint data1 = dataFile.nextInt();\t\t\t\t\t\t\t\t\t\t\t\t\t\t// every line has 2 numbers of info\r\n\t\t\t\t\t\tint data2 = dataFile.nextInt();\r\n\t\t\t\t\t\tanyNewArrival \t= (((data1%100)+1)<= chancesOfArrival);\t\t// computes anyNewArrival boolean\r\n\t\t\t\t transactionTime = (data2%maxTransactionTime)+1;\t\t\t\t\t// computes transactionTime integer\r\n\t\t\t\t\t}\r\n\t\t} else { // random\r\n\t\t\tdataRandom = new Random();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// generates random boolean and int\r\n\t\t\tanyNewArrival \t= ((dataRandom.nextInt(100) + 1) <= chancesOfArrival);\r\n\t\t\ttransactionTime = dataRandom.nextInt(maxTransactionTime) + 1;\r\n\t\t}\r\n\t}",
"@Test\n public void singleFilterEnsuresUniqueResults() {\n final Dataset dataset = new Dataset(\"TEST1\", \"sql\", new Filter(\"test-filter\"));\n\n List<String> entry1 = new ArrayList<>();\n entry1.add(\"abcd\");\n entry1.add(\"123\");\n\n List<String> entry2 = new ArrayList<>();\n entry2.add(\"wxyz\");\n entry2.add(\"789\");\n\n List<String> entry3 = new ArrayList<>();\n entry3.add(\"wxyz\"); // same key as entry2\n entry3.add(\"456\");\n\n List<String> entry4 = new ArrayList<>();\n entry4.add(\"efgh\");\n entry4.add(\"001\");\n\n List<List<String>> queryResults = new ArrayList<>();\n queryResults.add(entry1);\n queryResults.add(entry2);\n queryResults.add(entry3);\n queryResults.add(entry4);\n\n // given\n dataset.populateCache(queryResults, 100L);\n\n // when\n List<String> result1 = dataset.getCachedResult();\n List<String> result2 = dataset.getCachedResult();\n List<String> result3 = dataset.getCachedResult();\n\n // then\n assertEquals(\"Wrong result 1\", entry1, result1);\n assertEquals(\"Wrong result 2\", entry2, result2);\n assertEquals(\"Wrong result 3\", entry4, result3); // ignores entry 3, returns entry 4\n\n // and\n try {\n dataset.getCachedResult();\n fail(\"Expected to run out of data\");\n\n } catch (IllegalStateException ex) {\n assertEquals(\"Wrong error\", \"No more data available for dataset: TEST1\", ex.getMessage());\n }\n\n // and\n assertEquals(\"Wrong cache size\", Optional.of(4), dataset.getMetrics().getCacheSize());\n assertEquals(\"Wrong timing\", Optional.of(100L), dataset.getMetrics().getTimingMilliseconds());\n assertEquals(\"Wrong cache requested\", Optional.of(4), dataset.getMetrics().getCacheRequested());\n assertEquals(\"Wrong filtered out\", Optional.of(1), dataset.getMetrics().getFilteredOut());\n }",
"protected void loadMockData() {\n\n int ctr;\n InputStream inputStream = getResources().openRawResource(R.raw.song_list);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n\n try {\n ctr = inputStream.read();\n while (ctr != -1) {\n byteArrayOutputStream.write(ctr);\n ctr = inputStream.read();\n }\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Parse the data.\n try {\n JSONObject jObject = new JSONObject(byteArrayOutputStream.toString());\n\n String status_code = jObject.getString(\"statusCode\");\n\n if (status_code.equalsIgnoreCase(\"200\")) {\n JSONArray jArray = jObject.getJSONArray(\"data\");\n\n audioList = new ArrayList<>();\n\n for (int i = 0; i < jArray.length(); i++) {\n JSONObject song = jArray.getJSONObject(i);\n\n String genre = song.getString(\"genre\");\n String album = song.getString(\"album\");\n String author = song.getString(\"author\");\n String title = song.getString(\"title\");\n String url = song.getString(\"url\");\n String imgUrl = song.getString(\"img\");\n\n Audio audio = new Audio(genre, album, author, title, url, imgUrl);\n\n // Save to audioList.\n audioList.add(audio);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"List<WebCrawlerData> retrieveAllEntity();",
"List<String> getFeeds();",
"private DataSet zipfDataSet(){\n ZipfDistribution zipfDistribution = new ZipfDistribution(NUM_DISTINCT_TASKS, 1);\n //Magic number which is computed the following way\n //Take the H_{2500,1}/(1+4+9+...) * Target Mean\n //this will result in mean of 50\n Double multiplier = (8.4/1.644)*TARGET_MEAN;\n DataSet dataSet = new DataSet();\n Map<Integer, UUID> ids = new HashMap<>();\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_TASKS; i++){\n //zipf gives numbers from 1 to NUM_DISTINCT_TASKS where 1 is most frequent\n int sample = zipfDistribution.sample();\n UUID id = ids.getOrDefault(sample, UUID.randomUUID());\n ids.put(sample, id);\n Double cost = multiplier * (1D/sample);\n dataSet.getTasks().add(new Task(cost.longValue(), id));\n }\n return dataSet;\n }",
"@Test\n public void listAll_200() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n List<Workflow> wfList = new ArrayList<>();\n wfList.add(addMOToDb(1));\n wfList.add(addMOToDb(2));\n wfList.add(addMOToDb(3));\n\n // PREPARE THE TEST\n // Fill in the workflow db\n\n // DO THE TEST\n Response response = callAPI(VERB.GET, \"/mo/\", null);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(200, status);\n\n List<Workflow> readWorkflowList = response.readEntity(new GenericType<List<Workflow>>() {\n });\n assertEquals(wfList.size(), readWorkflowList.size());\n for (int i = 0; i < wfList.size(); i++) {\n assertEquals(wfList.get(i).getId(), readWorkflowList.get(i).getId());\n assertEquals(wfList.get(i).getName(), readWorkflowList.get(i).getName());\n assertEquals(wfList.get(i).getDescription(), readWorkflowList.get(i).getDescription());\n }\n\n\n }",
"private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }",
"private void addMockData() {\n League league1 = new League(\"1\", \"Premier League\");\n League league2 = new League(\"2\", \"La Liga\");\n League league3 = new League(\"3\", \"Bundesliga\");\n\n leagueList.add(league1);\n leagueList.add(league2);\n leagueList.add(league3);\n }",
"public synchronized void updateData() {\n updateDataFields(this::defaultFetcher);\n }",
"void getForecastInitially(DarkSkyApi api, PlaceWeather weather){\n\n long newWeatherPlaceId = databaseInstance.weatherDao().insertPlaceWeather(weather);\n\n weather.getDaily().setParentPlaceId(newWeatherPlaceId);\n databaseInstance.weatherDao().insertDaily(weather.getDaily());\n\n List<DailyData> dailyData = weather.getDaily().getData();\n\n for(int i = 0; i < dailyData.size(); ++i){\n dailyData.get(i).setParentPlaceId(newWeatherPlaceId);\n dailyData.get(i).setId(\n databaseInstance.weatherDao().insertDailyData(dailyData.get(i))\n );\n }\n\n long currentDayId = dailyData.get(0).getId();\n\n weather.getHourly().setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourly(weather.getHourly());\n\n List<HourlyData> hourlyData = weather.getHourly().getData();\n\n for(int i = 0; i < hourlyData.size(); ++i){\n hourlyData.get(i).setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(i));\n }\n\n //now load hours of next 7 days initially\n String apiKey = context.getString(R.string.api_key);\n Map<String, String> avoid = new HashMap<>();\n avoid.put(\"units\", \"si\");\n avoid.put(\"lang\", \"en\");\n avoid.put(\"exclude\", \"alerts,daily\");\n\n\n PlaceWeather dayWeather;\n for(int i = 1; i < dailyData.size(); ++i){\n try{\n dayWeather = api.getTimeForecast(apiKey,\n weather.getLatitude(),\n weather.getLongitude(),\n dailyData.get(i).getTime()+1,\n avoid).execute().body();\n }catch (IOException e){\n break;\n }\n\n dayWeather.getHourly().setParentDayId(dailyData.get(i).getId());\n dayWeather.getHourly().setId(\n databaseInstance.weatherDao().insertHourly(dayWeather.getHourly())\n );\n\n hourlyData = dayWeather.getHourly().getData();\n\n for(int j = 0; j < hourlyData.size(); ++j){\n hourlyData.get(j).setParentDayId(dailyData.get(i).getId());\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(j));\n }\n }\n\n }",
"private void populateDataAndVerify(ReplicatedEnvironment masterEnv) {\n createTestData();\n populateDB(masterEnv, dbName, keys);\n readDB(masterEnv, dbName, startKey, numKeys);\n logger.info(numKeys + \" records (start key: \" +\n startKey + \") have been populated into db \" +\n dbName + \" and verified\");\n }",
"public void resetRepositoryDefaultData() {\n\t\trepository.deleteAll();\n\t\tList<Temper> tempers = new ArrayList<Temper>();\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-01T11:30:00\"), 25.4F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-07-31T04:13:00\"), 9.8F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-07-31T09:09:00\"), 16.8F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-03T05:15:00\"), 5.0F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-04T08:00:00\"), 15.0F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-13T12:00:00\"), 25.0F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-13T12:00:01\"), 25.01F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-15T13:20:00\"), 17F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-25T12:00:00\"), 17F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-27T11:30:00\"), 35F));\n\t\trepository.saveAll(tempers);\n\t}",
"@Before\n public void setup() {\n rest = new RestTemplate();\n jdbc = new JdbcTemplate(dataSource);\n playlists = jdbc.query(\"SELECT * FROM \\\"Playlist\\\";\", playlistMapper);\n }",
"@Before\n public void setUp() {\n this.forecastService = new ForecastAdapter(new Forecast());\n }",
"private void makeDummies()\n {\n \n MessagePost messagePost1;\n MessagePost messagePost2;\n PhotoPost photoPost1;\n PhotoPost photoPost2;\n EventPost eventPost1;\n \n //Making 2 message posts and 2 photo posts.\n messagePost1 = new MessagePost(\"kniven\",\"Jeg er skarp idag\");\n messagePost2 = new MessagePost(\"Oscar\", \"I dag er livet verdt å leve\");\n photoPost1 = new PhotoPost(\"Eirik\", \"sol.jpg\", \"Sola skinner fint idag\");\n photoPost2 = new PhotoPost(\"Ole Martin\", \"noSkjeg.jpg\", \"Tatt skjegget\");\n eventPost1 = new EventPost(\"Ole Martin\", \"Ole Martin has joined Solider of Are og Odin\");\n \n //Adding posts to the newsfeed\n newsFeed.addPost(messagePost1);\n newsFeed.addPost(messagePost2);\n newsFeed.addPost(photoPost1);\n newsFeed.addPost(photoPost2);\n newsFeed.addPost(eventPost1);\n newsFeed.addComment(messagePost1, \"Skarping as\");\n newsFeed.addComment(messagePost2, \"Så flott!\");\n newsFeed.addComment(messagePost2, \"Like, Betyr likar\");\n newsFeed.addComment(photoPost1, \"Deilig med sol\");\n newsFeed.addComment(photoPost2, \"Neeeeeeeeeeeeeeeeei! :'(\");\n \n }",
"private void loadSimulatedNormalData() throws Exception {\n setLowestMeasuredPercentile(1.0);\n\n setSampleCount(sentinelA, 1000);\n setSampleCount(sentinelB, 1000);\n setSampleCount(sentinelC, 1000);\n setSampleCount(sentinelD, 1000);\n setSampleCount(sentinelE, 1000);\n\n when(mbeanServer.getAttribute(sentinelA, \"50thPercentile\")).thenReturn(1.0);\n when(mbeanServer.getAttribute(sentinelB, \"75thPercentile\")).thenReturn(1.0);\n when(mbeanServer.getAttribute(sentinelC, \"75thPercentile\")).thenReturn(1.0);\n when(mbeanServer.getAttribute(sentinelD, \"75thPercentile\")).thenReturn(1.0);\n when(mbeanServer.getAttribute(sentinelE, \"75thPercentile\")).thenReturn(1.0);\n\n when(mbeanServer.isRegistered(sentinelA)).thenReturn(Boolean.TRUE);\n when(mbeanServer.isRegistered(sentinelB)).thenReturn(Boolean.TRUE);\n when(mbeanServer.isRegistered(sentinelC)).thenReturn(Boolean.TRUE);\n when(mbeanServer.isRegistered(sentinelD)).thenReturn(Boolean.TRUE);\n when(mbeanServer.isRegistered(sentinelE)).thenReturn(Boolean.TRUE);\n\n System.out.println(\"Start manual evaluation ...\");\n qosHandler.evaluateQoSActions();\n }",
"@Query(\"SELECT * FROM song_table WHERE isRandom = 1\")\n LiveData<List<Song>> loadRandomSongsLiveData();"
] | [
"0.68558115",
"0.6582842",
"0.6231293",
"0.62139314",
"0.59843093",
"0.5969697",
"0.5772972",
"0.5747554",
"0.56385624",
"0.5631926",
"0.5623786",
"0.5618976",
"0.5616622",
"0.5611692",
"0.55462325",
"0.55432016",
"0.5538815",
"0.55240595",
"0.54949844",
"0.5403976",
"0.5397217",
"0.5360104",
"0.53554565",
"0.53539366",
"0.53387314",
"0.5332332",
"0.5328091",
"0.53178006",
"0.53118634",
"0.5305638",
"0.5301535",
"0.52943236",
"0.5285287",
"0.5276181",
"0.52666974",
"0.5259839",
"0.5249468",
"0.52416617",
"0.52407444",
"0.5230699",
"0.5230173",
"0.52068436",
"0.51946187",
"0.519246",
"0.5187702",
"0.5187537",
"0.5186488",
"0.5184881",
"0.51826906",
"0.51643515",
"0.51588315",
"0.5154812",
"0.5141638",
"0.5127055",
"0.5124556",
"0.51233",
"0.512229",
"0.5120812",
"0.511553",
"0.51125336",
"0.5112135",
"0.51105344",
"0.5106691",
"0.5102836",
"0.509642",
"0.509337",
"0.5090232",
"0.50885224",
"0.50846463",
"0.5063942",
"0.5058055",
"0.5054036",
"0.5052439",
"0.5052348",
"0.50497216",
"0.5039677",
"0.5002563",
"0.49905184",
"0.49899366",
"0.49877998",
"0.49850652",
"0.498359",
"0.49768898",
"0.49737945",
"0.49672842",
"0.49669668",
"0.49660206",
"0.49590388",
"0.4958841",
"0.49545306",
"0.49544778",
"0.495139",
"0.49508366",
"0.49501818",
"0.49453974",
"0.49425462",
"0.49301276",
"0.49279833",
"0.49276948",
"0.4924662"
] | 0.55425596 | 16 |
/ loaded from: classes.dex | public interface PackageStatusNotifier {
/* loaded from: classes.dex */
public interface Listener {
void onPackageChanged(String str, int i);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Object toDexFile();",
"@Override\n public Class<?> loadClassBytes(String name, ClassLoader cl) {\n return dexFile.loadClass(name.replace('.', '/'), cl);\n }",
"public void decodeDex() throws Exception {\r\n\t\tLog.p(tag, \"Decode DEX/ODEX...\");\r\n\t\tif(dexFile == null){\r\n\t\t\tLog.p(\"No .dex/.odex file. Skip decodeDex()\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tString jarFile = dexFile + \".jar\";\r\n\t\t// Read Dex file\r\n\t\tDex2jar dj = Dex2jar.from(new File(dexFile));\r\n\t\t\r\n\t\t// Create Jar\r\n\t\tdj.to(jarFile);\r\n\t\tLog.p(\"Converted Dex/ODex to Jar.\");\r\n\t\tLog.p(\"I'm Done! ....huh :-)\");\r\n\t}",
"private void loadClassesFromJar(final String runnableID, final File jarfile) {\n \n mTaskCache.get(runnableID).taskClasses = new LinkedList<Class>();\n \n Log.i(TAG,\n \"XXX: Calling DexClassLoader with jarfile: \" + jarfile.getAbsolutePath());\n final File tmpDir = mContext.getDir(\"dex\", 0);\n \n mTaskCache.get(runnableID).classLoader = new DexClassLoader(\n jarfile.getAbsolutePath(),\n tmpDir.getAbsolutePath(),\n null,\n BackgroundService.class.getClassLoader());\n // mTaskCache.get(mCurrentRunnableID).classLoader = mTaskCache.get(runnableID).classLoader;\n // setRunnableID(runnableID); \n \n // load all available classes\n String path = jarfile.getPath();\n \n \n try {\n // load dexfile\n DexFile dx = DexFile.loadDex(\n path,\n File.createTempFile(\"opt\", \"dex\", mContext.getCacheDir()).getPath(),\n 0);\n \n // extract all available classes\n for (Enumeration<String> classNames = dx.entries(); classNames.hasMoreElements();) {\n String className = classNames.nextElement();\n Log.i(TAG, String.format(\"found class: %s\", className));\n try {\n // TODO: do only forName() here?\n // final Class<Object> loadedClass = (Class<Object>) mClassLoaderWrapper.get().loadClass(className);\n final Class<Object> loadedClass = (Class<Object>) mTaskCache.get(runnableID).classLoader.loadClass(className);\n Log.i(TAG, String.format(\"Loaded class: %s\", className));\n // add associated classes to task class list\n if (loadedClass == null) {\n Log.e(TAG, \"EEEEEE loadedClass is null\");\n }\n if (mTaskCache.get(runnableID) == null) {\n Log.e(TAG, \"EEEEEE no mapentry found\");\n }\n if (mTaskCache.get(runnableID).taskClasses == null) {\n Log.e(TAG, \"EEEEEE taskClasses empty\");\n }\n mTaskCache.get(runnableID).taskClasses.add(loadedClass);\n // add task class to task list\n if (DistributedRunnable.class.isAssignableFrom(loadedClass)) {\n mTaskCache.get(runnableID).taskClass = loadedClass;\n }\n }\n catch (ClassNotFoundException ex) {\n Log.getStackTraceString(ex);\n }\n }\n }\n catch (IOException e) {\n System.out.println(\"Error opening \" + path);\n }\n // notify listeners\n for (JobCenterHandler handler : mHandlerList) {\n handler.onBinaryReceived(runnableID);\n }\n }",
"private static void zza(java.lang.ClassLoader r3) throws com.google.android.gms.dynamite.DynamiteModule.zzc {\n /*\n r0 = 0\n java.lang.String r1 = \"com.google.android.gms.dynamiteloader.DynamiteLoaderV2\"\n java.lang.Class r3 = r3.loadClass(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1 = 0\n java.lang.Class[] r2 = new java.lang.Class[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.reflect.Constructor r3 = r3.getConstructor(r2) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object[] r1 = new java.lang.Object[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object r3 = r3.newInstance(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n android.os.IBinder r3 = (android.os.IBinder) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r3 != 0) goto L_0x001a\n r3 = r0\n goto L_0x002e\n L_0x001a:\n java.lang.String r1 = \"com.google.android.gms.dynamite.IDynamiteLoaderV2\"\n android.os.IInterface r1 = r3.queryLocalInterface(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n boolean r2 = r1 instanceof com.google.android.gms.dynamite.zzl // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r2 == 0) goto L_0x0028\n r3 = r1\n com.google.android.gms.dynamite.zzl r3 = (com.google.android.gms.dynamite.zzl) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n goto L_0x002e\n L_0x0028:\n com.google.android.gms.dynamite.zzm r1 = new com.google.android.gms.dynamite.zzm // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1.<init>(r3) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r3 = r1\n L_0x002e:\n zzaSH = r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n return\n L_0x0031:\n r3 = move-exception\n com.google.android.gms.dynamite.DynamiteModule$zzc r1 = new com.google.android.gms.dynamite.DynamiteModule$zzc\n java.lang.String r2 = \"Failed to instantiate dynamite loader\"\n r1.<init>(r2, r3, r0)\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.dynamite.DynamiteModule.zza(java.lang.ClassLoader):void\");\n }",
"private Dex2JarProxy() {\r\n\t}",
"public Class<?> loadClass(String str, boolean z) throws ClassNotFoundException {\n if (str.startsWith(BuildConfig.APPLICATION_ID) || str.startsWith(\"android\") || str.startsWith(\"external\") || str.startsWith(\"me.weishu.epic.art\") || str.startsWith(\"com.taobao.android.dexposed\")) {\n return this.mHostClassLoader.loadClass(str);\n }\n return super.loadClass(str, z);\n }",
"private void loadClasses() {\n\t\tString[] classes = new String[] { \"com.sssprog.delicious.api.ApiAsyncTask\" };\n\t\tfor (String c : classes) {\n\t\t\ttry {\n\t\t\t\tClass.forName(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"protected void extractDexInstructions(MethodImplementation code) {\n int address = 0;\n for (Instruction instruction : code.getInstructions()) {\n DexlibAbstractInstruction dexInstruction = fromInstruction(instruction, address);\n instructions.add(dexInstruction);\n instructionAtAddress.put(address, dexInstruction);\n address += instruction.getCodeUnits();\n }\n }",
"public void scanClasspath() {\n List<String> classNames = new ArrayList<>(Collections.list(dexFile.entries()));\n\n ClassLoader classLoader = org.upacreekrobotics.dashboard.ClasspathScanner.class.getClassLoader();\n\n for (String className : classNames) {\n if (filter.shouldProcessClass(className)) {\n try {\n Class klass = Class.forName(className, false, classLoader);\n\n filter.processClass(klass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoClassDefFoundError e) {\n e.printStackTrace();\n }\n }\n }\n }",
"private static void m3301e(Context context) throws C1108a {\n try {\n byte[] d = f3068kj.mo6439d(C1159r.getKey());\n byte[] c = f3068kj.mo6438c(d, C1159r.m3507A());\n File cacheDir = context.getCacheDir();\n if (cacheDir == null) {\n cacheDir = context.getDir(\"dex\", 0);\n if (cacheDir == null) {\n throw new C1108a();\n }\n }\n File createTempFile = File.createTempFile(\"ads\", \".jar\", cacheDir);\n FileOutputStream fileOutputStream = new FileOutputStream(createTempFile);\n fileOutputStream.write(c, 0, c.length);\n fileOutputStream.close();\n DexClassLoader dexClassLoader = new DexClassLoader(createTempFile.getAbsolutePath(), cacheDir.getAbsolutePath(), null, context.getClassLoader());\n Class loadClass = dexClassLoader.loadClass(m3299b(d, C1159r.m3508B()));\n Class loadClass2 = dexClassLoader.loadClass(m3299b(d, C1159r.m3514H()));\n Class loadClass3 = dexClassLoader.loadClass(m3299b(d, C1159r.m3512F()));\n Class loadClass4 = dexClassLoader.loadClass(m3299b(d, C1159r.m3518L()));\n Class loadClass5 = dexClassLoader.loadClass(m3299b(d, C1159r.m3510D()));\n Class loadClass6 = dexClassLoader.loadClass(m3299b(d, C1159r.m3516J()));\n f3061kc = loadClass.getMethod(m3299b(d, C1159r.m3509C()), new Class[0]);\n f3062kd = loadClass2.getMethod(m3299b(d, C1159r.m3515I()), new Class[0]);\n f3063ke = loadClass3.getMethod(m3299b(d, C1159r.m3513G()), new Class[]{Context.class});\n f3064kf = loadClass4.getMethod(m3299b(d, C1159r.m3519M()), new Class[]{MotionEvent.class, DisplayMetrics.class});\n f3065kg = loadClass5.getMethod(m3299b(d, C1159r.m3511E()), new Class[]{Context.class});\n f3066kh = loadClass6.getMethod(m3299b(d, C1159r.m3517K()), new Class[]{Context.class});\n String name = createTempFile.getName();\n createTempFile.delete();\n new File(cacheDir, name.replace(\".jar\", \".dex\")).delete();\n } catch (FileNotFoundException e) {\n throw new C1108a(e);\n } catch (IOException e2) {\n throw new C1108a(e2);\n } catch (ClassNotFoundException e3) {\n throw new C1108a(e3);\n } catch (C1157a e4) {\n throw new C1108a(e4);\n } catch (NoSuchMethodException e5) {\n throw new C1108a(e5);\n } catch (NullPointerException e6) {\n throw new C1108a(e6);\n }\n }",
"public static void loadClass(String name) {\n\n }",
"public String[] readClasses();",
"@Override\n public void onClick(View view) {\n\n File libdir = getDir(\"jniLibs\",Context.MODE_PRIVATE);\n File file = new File(libdir, \"arm64-v8a\");\n File[] files = file.listFiles();\n for(File file1:files){\n Log.e(\"files\",file1.getAbsolutePath());\n }\n //System.load(file.getAbsolutePath());\n }",
"public String[] getClassesToCompile();",
"static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }",
"private static native void initCachedClassMap();",
"public interface Instrumentor {\n\n InstrumentionClass getInstrucmentClass(ClassLoader loader, String className, byte[] classfileBuffer);\n\n}",
"public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }",
"AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.telephony.SmsCbCmasInfo.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.<init>():void\");\n }",
"@Test\n @MediumTest\n public void testLoadDifferentDexInLocalDataDir() {\n Assert.assertTrue(mLocalDexDir.mkdir());\n\n // Load canary.dex\n ClassLoader loader1 =\n mDexLoader.load(mRemoteContext, DEX_ASSET_NAME, CANARY_CLASS_NAME, mLocalDexDir);\n Assert.assertNotNull(loader1);\n Assert.assertTrue(canLoadCanaryClass(loader1));\n\n File canaryDexFile1 = new File(mLocalDexDir, DEX_ASSET_NAME);\n Assert.assertTrue(canaryDexFile1.exists());\n\n mDexLoader.deleteCachedDexes(mLocalDexDir);\n\n ClassLoader loader2 =\n mDexLoader.load(mRemoteContext, DEX_ASSET_NAME2, CANARY_CLASS_NAME2, mLocalDexDir);\n Assert.assertNotNull(loader2);\n Assert.assertTrue(canLoadClass(loader2, CANARY_CLASS_NAME2));\n\n // canary2.dex should have been extracted and the previously extracted canary.dex file\n // should have been deleted.\n Assert.assertTrue(new File(mLocalDexDir, DEX_ASSET_NAME2).exists());\n Assert.assertFalse(canaryDexFile1.exists());\n }",
"@Override\n public byte[] getClassBytes(String name) {\n return null;\n }",
"AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.<init>():void\");\n }",
"private String get2thDexSHA1(Context context) {\n ApplicationInfo ai = context.getApplicationInfo();\n String source = ai.sourceDir;\n try {\n JarFile jar = new JarFile(source);\n Manifest mf = jar.getManifest();\n Map<String, Attributes> map = mf.getEntries();\n Attributes a = map.get(\"classes2.dex\");\n return a.getValue(\"SHA1-Digest\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"private static native void classInitNative();",
"public static void m5813a(java.lang.String r2, java.lang.String r3, java.lang.String r4, boolean r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.PurchaseEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r0.putItemId(r2);\n r0.putItemType(r3);\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = java.math.BigDecimal.valueOf(r2);\t Catch:{ Exception -> 0x0021 }\n r0.putItemPrice(r2);\t Catch:{ Exception -> 0x0021 }\n L_0x0021:\n r0.putSuccess(r5);\n r2 = com.crashlytics.android.answers.Answers.getInstance();\n r2.logPurchase(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String, boolean):void\");\n }",
"public Class<?> loadClass(String name, byte[] bytes){\n return this.defineClass(name, bytes, 0, bytes.length);\n }",
"public int getMessageClass() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.telephony.SmsCbCmasInfo.getMessageClass():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.getMessageClass():int\");\n }",
"private static void m13385d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }",
"@Override\n\tpublic void doAction() {\n\t\tString filename = ModuleContext.getInstance().getAppContext().getFilesDir()+\"/dexfile.dex\";\n\t\tDexFileInfoCollecter.getInstance().backsmaliDexFile(filename, dexpath);\n\t\tLogger.log(\"the dexfile data save to =\"+filename);\n\t}",
"@Test\n public void multidex() throws IOException {\n Set<String> result = classPathScanner.getClassPathEntries(new AcceptAllFilter());\n assertThat(result)\n .containsAtLeast(\n \"androidx.test.multidex.app.MultiDexTestClassA\",\n \"androidx.test.multidex.app.MultiDexTestClassB\",\n \"androidx.test.multidex.app.MultiDexTestClassC\",\n \"androidx.test.multidex.app.MultiDexTestClassD\",\n \"androidx.test.multidex.app.MultiDexApplication\");\n\n // ensure classes from binary under test are not included\n // this relies on build adding \"androidx.test.testing.fixtures.CustomTestFilter\" to target app\n // only\n assertThat(result).doesNotContain(\"androidx.test.testing.fixtures.CustomTestFilter\");\n }",
"public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }",
"static native void classInitNative();",
"public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }",
"private void onClassesFound(List<UMDClass> classes) {\n\t}",
"public static int m22557b(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }",
"private byte[] loadUrlClass(final String name) throws ClassNotFoundException {\n\t\tfinal byte[] result;\n\t\ttry {\n\t\t\tresult = AccessController.doPrivileged(\n\t\t\t\tnew PrivilegedExceptionAction<byte[]>() {\n\t\t\t\t\t@SneakyThrows\n\t\t\t\t\tpublic byte[] run() {\n\t\t\t\t\t\tString path = name.replace('.', '/').concat(\".class\");\n\t\t\t\t\t\tResource res = getUcp().getResource(path, false); // ucp replaced by getUcp()\n\t\t\t\t\t\tif (res != null) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\treturn toBytes(name, res); // defineClass() replaced by toBytes()\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\tthrow new ClassNotFoundException(name, e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, getAcc());\n\t\t} catch (java.security.PrivilegedActionException pae) {\n\t\t\tthrow (ClassNotFoundException) pae.getException();\n\t\t}\n\t\tif (result == null) {\n\t\t\tthrow new ClassNotFoundException(name);\n\t\t}\n\t\treturn result;\n\t}",
"@Override\n public Class getJavaClass() throws IOException, ClassNotFoundException {\n open();\n URL url;\n int p = path.lastIndexOf('/');\n int p2 = path.substring(0,p-1).lastIndexOf('/');\n\n File f = new File(path.substring(0,p2));\n url = f.toURI().toURL();\n URL[] urls = new URL[1];\n urls[0] = url;\n ClassLoader loader = new URLClassLoader(urls);\n\n String cls = path.substring(p2 + 1, path.lastIndexOf('.')).replace('/', '.');\n\n if (cfile.getParentFile().getParentFile().getName().equals(\"production\")) {\n cls = cls.substring(cls.lastIndexOf('.') + 1);\n }\n\n\n\n return loader.loadClass(cls);\n }",
"private static void fixDexElementsForProtectedApp(Application application, Object[] newDexElements) throws Exception {\n Field zipField = null;\n Field dexFileField = null;\n final Field mFileNameField = ShareReflectUtil.findField(DexFile.class, \"mFileName\");\n final Field mCookieField = ShareReflectUtil.findField(DexFile.class, \"mCookie\");\n final Field mInternalCookieField = ShareReflectUtil.findField(DexFile.class, \"mInternalCookie\");\n\n // Always ignore the last element since it should always be the base.apk.\n for (int i = 0; i < newDexElements.length - 1; ++i) {\n final Object newElement = newDexElements[i];\n\n if (zipField == null && dexFileField == null) {\n zipField = ShareReflectUtil.findField(newElement, \"zip\");\n dexFileField = ShareReflectUtil.findField(newElement, \"dexFile\");\n }\n\n final DexFile origDexFile = oldDexFiles.get(i);\n final String origFileName = (String) mFileNameField.get(origDexFile);\n final Object origCookie = mCookieField.get(origDexFile);\n final Object origInternalCookie = mInternalCookieField.get(origDexFile);\n\n final DexFile dupOrigDexFile = DexFile.loadDex(application.getApplicationInfo().sourceDir, null, 0);\n mFileNameField.set(dupOrigDexFile, origFileName);\n mCookieField.set(dupOrigDexFile, origCookie);\n mInternalCookieField.set(dupOrigDexFile, origInternalCookie);\n\n dexFileField.set(newElement, dupOrigDexFile);\n\n // Just for better looking when dump new classloader.\n // Avoid such output like this: DexPathList{zip file: /xx/yy/zz/uu.odex}\n final File newZip = (File) zipField.get(newElement);\n final String newZipPath = (newZip != null ? newZip.getAbsolutePath() : null);\n if (newZipPath != null && !newZipPath.endsWith(\".zip\") && !newZipPath.endsWith(\".jar\") && !newZipPath.endsWith(\".apk\")) {\n zipField.set(newElement, null);\n }\n }\n }",
"void initClasses() {\n\t\tif (programUnit == null) return;\n\n\t\t// Add all classes\n\t\tList<BdsNode> cdecls = BdsNodeWalker.findNodes(programUnit, ClassDeclaration.class, true, true);\n\t\tfor (BdsNode n : cdecls) {\n\t\t\tClassDeclaration cd = (ClassDeclaration) n;\n\t\t\tbdsvm.addType(cd.getType());\n\t\t}\n\t}",
"public synchronized void defineClass(String fullClassName, byte[] bytes)\r\n {\r\n try\r\n {\r\n defineClass(fullClassName, bytes, 0, bytes.length);\r\n }\r\n finally\r\n {\r\n }\r\n }",
"private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }",
"AnonymousClass1(android.widget.ColorListView r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.widget.ColorListView.1.<init>(android.widget.ColorListView):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.ColorListView.1.<init>(android.widget.ColorListView):void\");\n }",
"public ITravelClassType getClassCode();",
"private Class loadClass(ClassInfo classInfo) {\n Class type = null;\n try {\n URLClassLoader classLoader = new URLClassLoader(new URL[]{\n new File(classInfo.getPath()).toURI().toURL()\n });\n type = classLoader.loadClass(classInfo.getName());\n } catch (MalformedURLException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Class url stimmt nicht. Ggf. hat der ClassIndexer einen falschen Pfad!\", ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Klasse konnte nicht gefunden werden!\", ex);\n }\n return type;\n }",
"AnonymousClass1(javax.crypto.JarVerifier r1, java.net.URL r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: javax.crypto.JarVerifier.1.<init>(javax.crypto.JarVerifier, java.net.URL):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: javax.crypto.JarVerifier.1.<init>(javax.crypto.JarVerifier, java.net.URL):void\");\n }",
"IArenaClass getClass(final String name);",
"private byte[] loadByteCode(String className) {\n Class<?> clazz = loadClass(className);\n\n if (clazz != null) {\n return collector.getByteCode(clazz);\n }\n\n return null;\n }",
"GpsClock() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.<init>():void\");\n }",
"public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }",
"private static AndroidNClassLoader createAndroidNClassLoader(PathClassLoader original, Application application) throws Exception {\n AndroidNClassLoader androidNClassLoader = new AndroidNClassLoader(\"\", original, application);\n Field originPathList = ShareReflectUtil.findField(original, \"pathList\");\n Object originPathListObject = originPathList.get(original);\n //should reflect definingContext also\n Field originClassloader = ShareReflectUtil.findField(originPathListObject, \"definingContext\");\n originClassloader.set(originPathListObject, androidNClassLoader);\n //copy pathList\n Field pathListField = ShareReflectUtil.findField(androidNClassLoader, \"pathList\");\n //just use PathClassloader's pathList\n pathListField.set(androidNClassLoader, originPathListObject);\n\n //we must recreate dexFile due to dexCache\n List<File> additionalClassPathEntries = new ArrayList<>();\n Field dexElement = ShareReflectUtil.findField(originPathListObject, \"dexElements\");\n Object[] originDexElements = (Object[]) dexElement.get(originPathListObject);\n for (Object element : originDexElements) {\n DexFile dexFile = (DexFile) ShareReflectUtil.findField(element, \"dexFile\").get(element);\n if (dexFile == null) {\n continue;\n }\n additionalClassPathEntries.add(new File(dexFile.getName()));\n //protect for java.lang.AssertionError: Failed to close dex file in finalizer.\n oldDexFiles.add(dexFile);\n }\n Method makePathElements = ShareReflectUtil.findMethod(originPathListObject, \"makePathElements\", List.class, File.class,\n List.class);\n ArrayList<IOException> suppressedExceptions = new ArrayList<>();\n Object[] newDexElements = (Object[]) makePathElements.invoke(originPathListObject, additionalClassPathEntries, null, suppressedExceptions);\n dexElement.set(originPathListObject, newDexElements);\n\n try {\n Class.forName(CHECK_CLASSLOADER_CLASS, true, androidNClassLoader);\n } catch (Throwable thr) {\n Log.e(TAG, \"load TinkerTestAndroidNClassLoader fail, try to fixDexElementsForProtectedApp\");\n fixDexElementsForProtectedApp(application, newDexElements);\n }\n\n return androidNClassLoader;\n }",
"private void gatherInformation(String className, byte[] bytes) {\n ClassReader reader = new ClassReader(bytes);\n ClassWriter writer = new NonClassloadingClassWriter(reader, ClassWriter.COMPUTE_FRAMES);\n ClassVisitor visitor = new ClassInformationAdapter(writer, methodInformation);\n reader.accept(visitor, 0);\n }",
"private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }",
"DexArchive(BundleArchiveImpl ba, FileTree dir, int rev) {\n super(ba, dir, rev);\n }",
"AnonymousClass1(android.telecom.ConnectionServiceAdapterServant r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.1.<init>(android.telecom.ConnectionServiceAdapterServant):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.1.<init>(android.telecom.ConnectionServiceAdapterServant):void\");\n }",
"public DebugInfoItem(DexFile dexFile) {\n super(dexFile);\n }",
"public lj az() {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"public byte[] get(String res) {\n return classes.get(res);\n }",
"public interface AttributedCharacterIterator extends CharacterIterator {\n\n /* JADX ERROR: NullPointerException in pass: ReSugarCode\n java.lang.NullPointerException\n \tat jadx.core.dex.visitors.ReSugarCode.initClsEnumMap(ReSugarCode.java:159)\n \tat jadx.core.dex.visitors.ReSugarCode.visit(ReSugarCode.java:44)\n \tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:12)\n \tat jadx.core.dex.visitors.DepthTraversal.lambda$visit$0(DepthTraversal.java:13)\n \tat java.util.ArrayList.forEach(ArrayList.java:1251)\n \tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:13)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:32)\n \tat jadx.core.ProcessClass.lambda$processDependencies$0(ProcessClass.java:51)\n \tat java.lang.Iterable.forEach(Iterable.java:75)\n \tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:51)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:37)\n \tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)\n \tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n \tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n */\n public static class Attribute implements Serializable {\n public static final Attribute INPUT_METHOD_SEGMENT = null;\n public static final Attribute LANGUAGE = null;\n public static final Attribute READING = null;\n private static final Map instanceMap = null;\n private static final long serialVersionUID = -9142742483513960612L;\n private String name;\n\n /* JADX ERROR: Method load error\n jadx.core.utils.exceptions.DecodeException: Load method exception: bogus opcode: 0073 in method: java.text.AttributedCharacterIterator.Attribute.<clinit>():void, dex: \n \tat jadx.core.dex.nodes.MethodNode.load(MethodNode.java:118)\n \tat jadx.core.dex.nodes.ClassNode.load(ClassNode.java:248)\n \tat jadx.core.dex.nodes.ClassNode.load(ClassNode.java:254)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:29)\n \tat jadx.core.ProcessClass.lambda$processDependencies$0(ProcessClass.java:51)\n \tat java.lang.Iterable.forEach(Iterable.java:75)\n \tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:51)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:37)\n \tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)\n \tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n \tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n Caused by: java.lang.IllegalArgumentException: bogus opcode: 0073\n \tat com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1227)\n \tat com.android.dx.io.OpcodeInfo.getName(OpcodeInfo.java:1234)\n \tat jadx.core.dex.instructions.InsnDecoder.decode(InsnDecoder.java:581)\n \tat jadx.core.dex.instructions.InsnDecoder.process(InsnDecoder.java:74)\n \tat jadx.core.dex.nodes.MethodNode.load(MethodNode.java:104)\n \t... 10 more\n */\n static {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: java.text.AttributedCharacterIterator.Attribute.<clinit>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.text.AttributedCharacterIterator.Attribute.<clinit>():void\");\n }\n\n protected Attribute(String name) {\n this.name = name;\n if (getClass() == Attribute.class) {\n instanceMap.put(name, this);\n }\n }\n\n public final boolean equals(Object obj) {\n return super.equals(obj);\n }\n\n public final int hashCode() {\n return super.hashCode();\n }\n\n public String toString() {\n return getClass().getName() + \"(\" + this.name + \")\";\n }\n\n protected String getName() {\n return this.name;\n }\n\n protected Object readResolve() throws InvalidObjectException {\n if (getClass() != Attribute.class) {\n throw new InvalidObjectException(\"subclass didn't correctly implement readResolve\");\n }\n Attribute instance = (Attribute) instanceMap.get(getName());\n if (instance != null) {\n return instance;\n }\n throw new InvalidObjectException(\"unknown attribute name\");\n }\n }\n\n Set<Attribute> getAllAttributeKeys();\n\n Object getAttribute(Attribute attribute);\n\n Map<Attribute, Object> getAttributes();\n\n int getRunLimit();\n\n int getRunLimit(Attribute attribute);\n\n int getRunLimit(Set<? extends Attribute> set);\n\n int getRunStart();\n\n int getRunStart(Attribute attribute);\n\n int getRunStart(Set<? extends Attribute> set);\n}",
"public java.lang.Object run() throws java.lang.Exception {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: javax.crypto.JarVerifier.1.run():java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: javax.crypto.JarVerifier.1.run():java.lang.Object\");\n }",
"@Override\r\n\tpublic void decompileFromArchive( String archivePath, String packege, String className )\r\n\t{\r\n\t\tstart = System.currentTimeMillis( );\r\n\t\tFile workingDir = new File(\r\n\t\t\t\tJavaDecompilerPlugin.getDefault( ).getPreferenceStore( ).getString( JavaDecompilerPlugin.TEMP_DIR )\r\n\t\t\t\t\t\t+ \"/\" //$NON-NLS-1$\r\n\t\t\t\t\t\t+ System.currentTimeMillis( ) );\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tworkingDir.mkdirs( );\r\n\t\t\tJarClassExtractor.extract( archivePath, packege, className, true, workingDir.getAbsolutePath( ) );\r\n\t\t\tdecompile( workingDir.getAbsolutePath( ), \"\", className ); //$NON-NLS-1$\r\n\t\t}\r\n\t\tcatch ( Exception e )\r\n\t\t{\r\n\t\t\texcList.add( e );\r\n\t\t\t// logExceptions();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tFileUtil.deltree( workingDir );\r\n\t\t}\r\n\t}",
"@Override\n\tprotected Class<?> findClass(String name) throws ClassNotFoundException {\n\t\tFile file = new File(getSimpleName(name) + \".class\");\n FileInputStream fis = null;\n Class<?> clazz = null;\n try {\n fis = new FileInputStream(file);\n int content = 0;\n int i = 0;\n byte[] data = new byte[fis.available()];\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n data[i] = (byte) content;\n i++;\n }\n clazz = defineClass(name, data, 0, data.length);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n \t\tex.printStackTrace();\n \t}\n }\n return clazz;\n\t}",
"private ClassUtil() {}",
"private static byte[] instrumentClassFile(byte[] classfileBuffer) {\n String className = new ClassReader(classfileBuffer).getClassName().replace(\"/\", \".\");\n ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();\n byte[] newClassfileBuffer = new EkstaziCFT().transform(currentClassLoader, className, null, null, classfileBuffer);\n return newClassfileBuffer;\n }",
"public interface ClassContainer {\n\n void addLoadableClass(String className, byte[] classData);\n}",
"public lj ax() {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"SmsCbCmasInfo(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.<init>(android.os.Parcel):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.<init>(android.os.Parcel):void\");\n }",
"@SuppressWarnings(\"unused\")\n private void saveClassfileBufferForDebugging(String className, byte[] classfileBuffer) {\n try {\n if (className.contains(\"CX\")) {\n java.io.DataOutputStream tmpout = new java.io.DataOutputStream(new java.io.FileOutputStream(\"out\"));\n tmpout.write(classfileBuffer, 0, classfileBuffer.length);\n tmpout.close();\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"west.twouse.language.sparqlas.Class getClass_();",
"private String[] getReferencedJavaClasses() {\n\t\tclass ClassNameVisitor extends JVisitor {\n\t\t\tList<String> classNames = new ArrayList<String>();\n\n\t\t\t@Override\n\t\t\tpublic boolean visit(JClassType x, Context ctx) {\n\t\t\t\tclassNames.add(x.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tClassNameVisitor v = new ClassNameVisitor();\n\t\tv.accept(jprogram);\n\t\treturn v.classNames.toArray(new String[v.classNames.size()]);\n\t}",
"void registerAsUsed (ClassType c, int pos) {\r\n if (used_classes == null) {\r\n used_classes = new java.util.Vector ();\r\n used_class_offsets = new java.util.Vector ();\r\n }\r\n used_classes.addElement (c);\r\n used_class_offsets.addElement (new Integer (pos));\r\n }",
"private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }",
"public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"java.lang.String getClass_();",
"java.lang.String getClass_();",
"private void initialize() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00ee in method: android.location.GpsClock.initialize():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.initialize():void\");\n }",
"public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }",
"public ContactsProvider() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: org.gsma.joyn.contacts.ContactsProvider.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.gsma.joyn.contacts.ContactsProvider.<init>():void\");\n }",
"private LoadMethodMapper ()\n {}",
"public void importClass(String klass) throws Exception;",
"@InputFiles\n @Incremental\n @PathSensitive(PathSensitivity.RELATIVE)\n public abstract ConfigurableFileCollection getDexFolders();",
"public ecDSAnone() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSAnone.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSAnone.<init>():void\");\n }",
"protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }",
"Object getClass_();",
"Object getClass_();",
"public ClassesInfoFragment() {\r\n }",
"public X509V1CertificateGenerator() {\n /*\n // Can't load method instructions: Load method exception: null in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.<init>():void, dex: in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.<init>():void\");\n }",
"public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"AnonymousClass2(android.telecom.ConnectionServiceAdapterServant r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.2.<init>(android.telecom.ConnectionServiceAdapterServant):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.<init>(android.telecom.ConnectionServiceAdapterServant):void\");\n }",
"public lj au() {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }",
"public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }",
"DelegatingX509Certificate(java.security.cert.X509Certificate r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: android.security.keystore.DelegatingX509Certificate.<init>(java.security.cert.X509Certificate):void, dex: in method: android.security.keystore.DelegatingX509Certificate.<init>(java.security.cert.X509Certificate):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.<init>(java.security.cert.X509Certificate):void\");\n }",
"public static void m5812a(java.lang.String r0, java.lang.String r1, java.lang.String r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = new com.crashlytics.android.answers.AddToCartEvent;\n r2.<init>();\n r2.putItemType(r0);\n r0 = java.lang.Long.parseLong(r1);\t Catch:{ Exception -> 0x0013 }\n r0 = java.math.BigDecimal.valueOf(r0);\t Catch:{ Exception -> 0x0013 }\n r2.putItemPrice(r0);\t Catch:{ Exception -> 0x0013 }\n L_0x0013:\n r0 = java.util.Locale.getDefault();\n r0 = java.util.Currency.getInstance(r0);\n r2.putCurrency(r0);\n r0 = com.crashlytics.android.answers.Answers.getInstance();\n r0.logAddToCart(r2);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String):void\");\n }",
"public ClassBundle() {\n }",
"public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tIOUtils.loadMethodIODeps(\"cb\");\n\t\t\n\t\tFile clazz = new File(args[0]);\n\n\t\tfinal ClassReader cr1 = new ClassReader(new FileInputStream(clazz));\n//\t\tPrintWriter pw = new PrintWriter(new FileWriter(\"z.txt\"));\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t/*ClassWriter cw1 = new ClassWriter(ClassWriter.COMPUTE_FRAMES) {\n\t\t\t@Override\n\t\t\tprotected String getCommonSuperClass(String type1, String type2) {\n\t\t\t\ttry {\n\t\t\t\t\treturn super.getCommonSuperClass(type1, type2);\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t//\t\t\t\t\tSystem.err.println(\"err btwn \" + type1 + \" \" +type2);\n\t\t\t\t\treturn \"java/lang/Unknown\";\n\t\t\t\t}\n\t\t\t}\n\t\t};*/\n\t\t\n\t\tClassWriter cw1 = new ClassWriter(ClassWriter.COMPUTE_MAXS);\n\t\t\n\t\tcr1.accept(new ClassVisitor(Opcodes.ASM5, cw1) {\n\t\t\t@Override\n\t\t\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new JSRInlinerAdapter(super.visitMethod(access, name, desc, signature, exceptions), access, name, desc, signature, exceptions);\n\t\t\t}\n\t\t}, ClassReader.EXPAND_FRAMES);\n\t\t\n\t\tfinal ClassReader cr = new ClassReader(cw1.toByteArray());\n\t\tTraceClassVisitor tcv = new TraceClassVisitor(null,new Textifier(),pw);\n\t\t//ClassWriter tcv = new ClassWriter(cr, ClassWriter.COMPUTE_MAXS);\n\t\tClassVisitor cv = new ClassVisitor(Opcodes.ASM5, tcv) {\n\t\t\tString className;\n\n\t\t\t@Override\n\t\t\tpublic void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {\n\t\t\t\tsuper.visit(version, access, name, signature, superName, interfaces);\n\t\t\t\tthis.className = name;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tboolean isSynthetic = ClassInfoUtils.checkAccess(access, Opcodes.ACC_SYNTHETIC);\n\t\t\t\tboolean isNative = ClassInfoUtils.checkAccess(access, Opcodes.ACC_NATIVE);\n\t\t\t\tboolean isInterface = ClassInfoUtils.checkAccess(access, Opcodes.ACC_INTERFACE);\n\t\t\t\tboolean isAbstract = ClassInfoUtils.checkAccess(access, Opcodes.ACC_ABSTRACT);\n\t\t\t\t\n\t\t\t\tMethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);\n\t\t\t\tif (name.equals(\"toString\") && desc.equals(\"()Ljava/lang/String;\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (name.equals(\"equals\") && desc.equals(\"(Ljava/lang/Object;)Z\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (name.equals(\"hashCode\") && desc.equals(\"()I\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (isSynthetic || isNative || isInterface || isAbstract) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else {\n\t\t\t\t\tmv = new DependencyAnalyzer(className, \n\t\t\t\t\t\t\taccess, \n\t\t\t\t\t\t\tname, \n\t\t\t\t\t\t\tdesc, \n\t\t\t\t\t\t\tsignature, \n\t\t\t\t\t\t\texceptions, \n\t\t\t\t\t\t\tmv, \n\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\ttrue, \n\t\t\t\t\t\t\ttrue);\n\t\t\t\t\t//mv = new CalleeAnalyzer(className, access, name, desc, signature, exceptions, mv, true);\n\t\t\t\t\treturn mv;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcr.accept(cv, ClassReader.EXPAND_FRAMES);\n\t\tpw.flush();\n\t}",
"private void dumpClassBytesToFile ()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int lastSlash =\n\t\t\t\tclassInternalName.lastIndexOf('/');\n\t\t\tfinal String pkg =\n\t\t\t\tclassInternalName.substring(0, lastSlash);\n\t\t\tfinal Path tempDir = Paths.get(\"debug\", \"jvm\");\n\t\t\tfinal Path dir = tempDir.resolve(Paths.get(pkg));\n\t\t\tFiles.createDirectories(dir);\n\t\t\tfinal String base = classInternalName.substring(lastSlash + 1);\n\t\t\tfinal Path classFile = dir.resolve(base + \".class\");\n\t\t\tFiles.write(classFile, stripNull(classBytes));\n\t\t}\n\t\tcatch (final IOException e)\n\t\t{\n\t\t\tInterpreter.log(\n\t\t\t\tInterpreter.loggerDebugJVM,\n\t\t\t\tLevel.WARNING,\n\t\t\t\t\"unable to write class bytes for generated class {0}\",\n\t\t\t\tclassInternalName);\n\t\t}\n\t}",
"AllocationAdapter(long r1, android.renderscript.RenderScript r3, android.renderscript.Allocation r4, android.renderscript.Type r5) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.renderscript.AllocationAdapter.<init>(long, android.renderscript.RenderScript, android.renderscript.Allocation, android.renderscript.Type):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.renderscript.AllocationAdapter.<init>(long, android.renderscript.RenderScript, android.renderscript.Allocation, android.renderscript.Type):void\");\n }",
"public Attributes2Impl() {\n /*\n // Can't load method instructions: Load method exception: null in method: org.xml.sax.ext.Attributes2Impl.<init>():void, dex: in method: org.xml.sax.ext.Attributes2Impl.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.xml.sax.ext.Attributes2Impl.<init>():void\");\n }"
] | [
"0.7060199",
"0.6879663",
"0.6330274",
"0.6188854",
"0.59869087",
"0.587778",
"0.57089436",
"0.5644008",
"0.56421155",
"0.56071657",
"0.5607065",
"0.5489435",
"0.54543763",
"0.5432141",
"0.5424917",
"0.5419515",
"0.5392293",
"0.53908557",
"0.53701884",
"0.5353152",
"0.53457505",
"0.53403074",
"0.5337068",
"0.53183115",
"0.531821",
"0.53103846",
"0.5308997",
"0.53029627",
"0.5259852",
"0.52508634",
"0.5228873",
"0.52158177",
"0.52139884",
"0.5204548",
"0.5191165",
"0.5178514",
"0.51776445",
"0.51732194",
"0.5170561",
"0.51614934",
"0.5146653",
"0.513763",
"0.51338536",
"0.51309305",
"0.5127093",
"0.51264536",
"0.51259536",
"0.51131105",
"0.51079786",
"0.5098626",
"0.5097432",
"0.50958097",
"0.50722826",
"0.50714225",
"0.50565475",
"0.5049672",
"0.50482213",
"0.5047796",
"0.50449413",
"0.50431323",
"0.5035124",
"0.50340927",
"0.50260353",
"0.5022211",
"0.5018539",
"0.5018166",
"0.5010675",
"0.5006978",
"0.49985033",
"0.49938124",
"0.49911663",
"0.49847645",
"0.49779764",
"0.49747595",
"0.49747595",
"0.49608305",
"0.49253473",
"0.49203455",
"0.49051073",
"0.49033263",
"0.49024987",
"0.49020618",
"0.4899321",
"0.48893416",
"0.48893416",
"0.48874882",
"0.48771676",
"0.4875896",
"0.4875244",
"0.48721063",
"0.4866379",
"0.4862937",
"0.48588553",
"0.4848421",
"0.48460156",
"0.48418263",
"0.48395592",
"0.4835679",
"0.48346353",
"0.4831688"
] | 0.5406961 | 16 |
/ loaded from: classes.dex | public interface Listener {
void onPackageChanged(String str, int i);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Object toDexFile();",
"@Override\n public Class<?> loadClassBytes(String name, ClassLoader cl) {\n return dexFile.loadClass(name.replace('.', '/'), cl);\n }",
"public void decodeDex() throws Exception {\r\n\t\tLog.p(tag, \"Decode DEX/ODEX...\");\r\n\t\tif(dexFile == null){\r\n\t\t\tLog.p(\"No .dex/.odex file. Skip decodeDex()\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tString jarFile = dexFile + \".jar\";\r\n\t\t// Read Dex file\r\n\t\tDex2jar dj = Dex2jar.from(new File(dexFile));\r\n\t\t\r\n\t\t// Create Jar\r\n\t\tdj.to(jarFile);\r\n\t\tLog.p(\"Converted Dex/ODex to Jar.\");\r\n\t\tLog.p(\"I'm Done! ....huh :-)\");\r\n\t}",
"private void loadClassesFromJar(final String runnableID, final File jarfile) {\n \n mTaskCache.get(runnableID).taskClasses = new LinkedList<Class>();\n \n Log.i(TAG,\n \"XXX: Calling DexClassLoader with jarfile: \" + jarfile.getAbsolutePath());\n final File tmpDir = mContext.getDir(\"dex\", 0);\n \n mTaskCache.get(runnableID).classLoader = new DexClassLoader(\n jarfile.getAbsolutePath(),\n tmpDir.getAbsolutePath(),\n null,\n BackgroundService.class.getClassLoader());\n // mTaskCache.get(mCurrentRunnableID).classLoader = mTaskCache.get(runnableID).classLoader;\n // setRunnableID(runnableID); \n \n // load all available classes\n String path = jarfile.getPath();\n \n \n try {\n // load dexfile\n DexFile dx = DexFile.loadDex(\n path,\n File.createTempFile(\"opt\", \"dex\", mContext.getCacheDir()).getPath(),\n 0);\n \n // extract all available classes\n for (Enumeration<String> classNames = dx.entries(); classNames.hasMoreElements();) {\n String className = classNames.nextElement();\n Log.i(TAG, String.format(\"found class: %s\", className));\n try {\n // TODO: do only forName() here?\n // final Class<Object> loadedClass = (Class<Object>) mClassLoaderWrapper.get().loadClass(className);\n final Class<Object> loadedClass = (Class<Object>) mTaskCache.get(runnableID).classLoader.loadClass(className);\n Log.i(TAG, String.format(\"Loaded class: %s\", className));\n // add associated classes to task class list\n if (loadedClass == null) {\n Log.e(TAG, \"EEEEEE loadedClass is null\");\n }\n if (mTaskCache.get(runnableID) == null) {\n Log.e(TAG, \"EEEEEE no mapentry found\");\n }\n if (mTaskCache.get(runnableID).taskClasses == null) {\n Log.e(TAG, \"EEEEEE taskClasses empty\");\n }\n mTaskCache.get(runnableID).taskClasses.add(loadedClass);\n // add task class to task list\n if (DistributedRunnable.class.isAssignableFrom(loadedClass)) {\n mTaskCache.get(runnableID).taskClass = loadedClass;\n }\n }\n catch (ClassNotFoundException ex) {\n Log.getStackTraceString(ex);\n }\n }\n }\n catch (IOException e) {\n System.out.println(\"Error opening \" + path);\n }\n // notify listeners\n for (JobCenterHandler handler : mHandlerList) {\n handler.onBinaryReceived(runnableID);\n }\n }",
"private static void zza(java.lang.ClassLoader r3) throws com.google.android.gms.dynamite.DynamiteModule.zzc {\n /*\n r0 = 0\n java.lang.String r1 = \"com.google.android.gms.dynamiteloader.DynamiteLoaderV2\"\n java.lang.Class r3 = r3.loadClass(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1 = 0\n java.lang.Class[] r2 = new java.lang.Class[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.reflect.Constructor r3 = r3.getConstructor(r2) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object[] r1 = new java.lang.Object[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object r3 = r3.newInstance(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n android.os.IBinder r3 = (android.os.IBinder) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r3 != 0) goto L_0x001a\n r3 = r0\n goto L_0x002e\n L_0x001a:\n java.lang.String r1 = \"com.google.android.gms.dynamite.IDynamiteLoaderV2\"\n android.os.IInterface r1 = r3.queryLocalInterface(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n boolean r2 = r1 instanceof com.google.android.gms.dynamite.zzl // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r2 == 0) goto L_0x0028\n r3 = r1\n com.google.android.gms.dynamite.zzl r3 = (com.google.android.gms.dynamite.zzl) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n goto L_0x002e\n L_0x0028:\n com.google.android.gms.dynamite.zzm r1 = new com.google.android.gms.dynamite.zzm // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1.<init>(r3) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r3 = r1\n L_0x002e:\n zzaSH = r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n return\n L_0x0031:\n r3 = move-exception\n com.google.android.gms.dynamite.DynamiteModule$zzc r1 = new com.google.android.gms.dynamite.DynamiteModule$zzc\n java.lang.String r2 = \"Failed to instantiate dynamite loader\"\n r1.<init>(r2, r3, r0)\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.dynamite.DynamiteModule.zza(java.lang.ClassLoader):void\");\n }",
"private Dex2JarProxy() {\r\n\t}",
"public Class<?> loadClass(String str, boolean z) throws ClassNotFoundException {\n if (str.startsWith(BuildConfig.APPLICATION_ID) || str.startsWith(\"android\") || str.startsWith(\"external\") || str.startsWith(\"me.weishu.epic.art\") || str.startsWith(\"com.taobao.android.dexposed\")) {\n return this.mHostClassLoader.loadClass(str);\n }\n return super.loadClass(str, z);\n }",
"private void loadClasses() {\n\t\tString[] classes = new String[] { \"com.sssprog.delicious.api.ApiAsyncTask\" };\n\t\tfor (String c : classes) {\n\t\t\ttry {\n\t\t\t\tClass.forName(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"protected void extractDexInstructions(MethodImplementation code) {\n int address = 0;\n for (Instruction instruction : code.getInstructions()) {\n DexlibAbstractInstruction dexInstruction = fromInstruction(instruction, address);\n instructions.add(dexInstruction);\n instructionAtAddress.put(address, dexInstruction);\n address += instruction.getCodeUnits();\n }\n }",
"public void scanClasspath() {\n List<String> classNames = new ArrayList<>(Collections.list(dexFile.entries()));\n\n ClassLoader classLoader = org.upacreekrobotics.dashboard.ClasspathScanner.class.getClassLoader();\n\n for (String className : classNames) {\n if (filter.shouldProcessClass(className)) {\n try {\n Class klass = Class.forName(className, false, classLoader);\n\n filter.processClass(klass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoClassDefFoundError e) {\n e.printStackTrace();\n }\n }\n }\n }",
"private static void m3301e(Context context) throws C1108a {\n try {\n byte[] d = f3068kj.mo6439d(C1159r.getKey());\n byte[] c = f3068kj.mo6438c(d, C1159r.m3507A());\n File cacheDir = context.getCacheDir();\n if (cacheDir == null) {\n cacheDir = context.getDir(\"dex\", 0);\n if (cacheDir == null) {\n throw new C1108a();\n }\n }\n File createTempFile = File.createTempFile(\"ads\", \".jar\", cacheDir);\n FileOutputStream fileOutputStream = new FileOutputStream(createTempFile);\n fileOutputStream.write(c, 0, c.length);\n fileOutputStream.close();\n DexClassLoader dexClassLoader = new DexClassLoader(createTempFile.getAbsolutePath(), cacheDir.getAbsolutePath(), null, context.getClassLoader());\n Class loadClass = dexClassLoader.loadClass(m3299b(d, C1159r.m3508B()));\n Class loadClass2 = dexClassLoader.loadClass(m3299b(d, C1159r.m3514H()));\n Class loadClass3 = dexClassLoader.loadClass(m3299b(d, C1159r.m3512F()));\n Class loadClass4 = dexClassLoader.loadClass(m3299b(d, C1159r.m3518L()));\n Class loadClass5 = dexClassLoader.loadClass(m3299b(d, C1159r.m3510D()));\n Class loadClass6 = dexClassLoader.loadClass(m3299b(d, C1159r.m3516J()));\n f3061kc = loadClass.getMethod(m3299b(d, C1159r.m3509C()), new Class[0]);\n f3062kd = loadClass2.getMethod(m3299b(d, C1159r.m3515I()), new Class[0]);\n f3063ke = loadClass3.getMethod(m3299b(d, C1159r.m3513G()), new Class[]{Context.class});\n f3064kf = loadClass4.getMethod(m3299b(d, C1159r.m3519M()), new Class[]{MotionEvent.class, DisplayMetrics.class});\n f3065kg = loadClass5.getMethod(m3299b(d, C1159r.m3511E()), new Class[]{Context.class});\n f3066kh = loadClass6.getMethod(m3299b(d, C1159r.m3517K()), new Class[]{Context.class});\n String name = createTempFile.getName();\n createTempFile.delete();\n new File(cacheDir, name.replace(\".jar\", \".dex\")).delete();\n } catch (FileNotFoundException e) {\n throw new C1108a(e);\n } catch (IOException e2) {\n throw new C1108a(e2);\n } catch (ClassNotFoundException e3) {\n throw new C1108a(e3);\n } catch (C1157a e4) {\n throw new C1108a(e4);\n } catch (NoSuchMethodException e5) {\n throw new C1108a(e5);\n } catch (NullPointerException e6) {\n throw new C1108a(e6);\n }\n }",
"public static void loadClass(String name) {\n\n }",
"public String[] readClasses();",
"@Override\n public void onClick(View view) {\n\n File libdir = getDir(\"jniLibs\",Context.MODE_PRIVATE);\n File file = new File(libdir, \"arm64-v8a\");\n File[] files = file.listFiles();\n for(File file1:files){\n Log.e(\"files\",file1.getAbsolutePath());\n }\n //System.load(file.getAbsolutePath());\n }",
"public String[] getClassesToCompile();",
"static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }",
"public interface PackageStatusNotifier {\n\n /* loaded from: classes.dex */\n public interface Listener {\n void onPackageChanged(String str, int i);\n }\n}",
"private static native void initCachedClassMap();",
"public interface Instrumentor {\n\n InstrumentionClass getInstrucmentClass(ClassLoader loader, String className, byte[] classfileBuffer);\n\n}",
"public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }",
"AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.telephony.SmsCbCmasInfo.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.<init>():void\");\n }",
"@Test\n @MediumTest\n public void testLoadDifferentDexInLocalDataDir() {\n Assert.assertTrue(mLocalDexDir.mkdir());\n\n // Load canary.dex\n ClassLoader loader1 =\n mDexLoader.load(mRemoteContext, DEX_ASSET_NAME, CANARY_CLASS_NAME, mLocalDexDir);\n Assert.assertNotNull(loader1);\n Assert.assertTrue(canLoadCanaryClass(loader1));\n\n File canaryDexFile1 = new File(mLocalDexDir, DEX_ASSET_NAME);\n Assert.assertTrue(canaryDexFile1.exists());\n\n mDexLoader.deleteCachedDexes(mLocalDexDir);\n\n ClassLoader loader2 =\n mDexLoader.load(mRemoteContext, DEX_ASSET_NAME2, CANARY_CLASS_NAME2, mLocalDexDir);\n Assert.assertNotNull(loader2);\n Assert.assertTrue(canLoadClass(loader2, CANARY_CLASS_NAME2));\n\n // canary2.dex should have been extracted and the previously extracted canary.dex file\n // should have been deleted.\n Assert.assertTrue(new File(mLocalDexDir, DEX_ASSET_NAME2).exists());\n Assert.assertFalse(canaryDexFile1.exists());\n }",
"@Override\n public byte[] getClassBytes(String name) {\n return null;\n }",
"AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.<init>():void\");\n }",
"private String get2thDexSHA1(Context context) {\n ApplicationInfo ai = context.getApplicationInfo();\n String source = ai.sourceDir;\n try {\n JarFile jar = new JarFile(source);\n Manifest mf = jar.getManifest();\n Map<String, Attributes> map = mf.getEntries();\n Attributes a = map.get(\"classes2.dex\");\n return a.getValue(\"SHA1-Digest\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"private static native void classInitNative();",
"public static void m5813a(java.lang.String r2, java.lang.String r3, java.lang.String r4, boolean r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.PurchaseEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r0.putItemId(r2);\n r0.putItemType(r3);\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = java.math.BigDecimal.valueOf(r2);\t Catch:{ Exception -> 0x0021 }\n r0.putItemPrice(r2);\t Catch:{ Exception -> 0x0021 }\n L_0x0021:\n r0.putSuccess(r5);\n r2 = com.crashlytics.android.answers.Answers.getInstance();\n r2.logPurchase(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String, boolean):void\");\n }",
"public Class<?> loadClass(String name, byte[] bytes){\n return this.defineClass(name, bytes, 0, bytes.length);\n }",
"public int getMessageClass() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.telephony.SmsCbCmasInfo.getMessageClass():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.getMessageClass():int\");\n }",
"private static void m13385d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }",
"@Override\n\tpublic void doAction() {\n\t\tString filename = ModuleContext.getInstance().getAppContext().getFilesDir()+\"/dexfile.dex\";\n\t\tDexFileInfoCollecter.getInstance().backsmaliDexFile(filename, dexpath);\n\t\tLogger.log(\"the dexfile data save to =\"+filename);\n\t}",
"@Test\n public void multidex() throws IOException {\n Set<String> result = classPathScanner.getClassPathEntries(new AcceptAllFilter());\n assertThat(result)\n .containsAtLeast(\n \"androidx.test.multidex.app.MultiDexTestClassA\",\n \"androidx.test.multidex.app.MultiDexTestClassB\",\n \"androidx.test.multidex.app.MultiDexTestClassC\",\n \"androidx.test.multidex.app.MultiDexTestClassD\",\n \"androidx.test.multidex.app.MultiDexApplication\");\n\n // ensure classes from binary under test are not included\n // this relies on build adding \"androidx.test.testing.fixtures.CustomTestFilter\" to target app\n // only\n assertThat(result).doesNotContain(\"androidx.test.testing.fixtures.CustomTestFilter\");\n }",
"public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }",
"static native void classInitNative();",
"public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }",
"private void onClassesFound(List<UMDClass> classes) {\n\t}",
"public static int m22557b(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }",
"private byte[] loadUrlClass(final String name) throws ClassNotFoundException {\n\t\tfinal byte[] result;\n\t\ttry {\n\t\t\tresult = AccessController.doPrivileged(\n\t\t\t\tnew PrivilegedExceptionAction<byte[]>() {\n\t\t\t\t\t@SneakyThrows\n\t\t\t\t\tpublic byte[] run() {\n\t\t\t\t\t\tString path = name.replace('.', '/').concat(\".class\");\n\t\t\t\t\t\tResource res = getUcp().getResource(path, false); // ucp replaced by getUcp()\n\t\t\t\t\t\tif (res != null) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\treturn toBytes(name, res); // defineClass() replaced by toBytes()\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\tthrow new ClassNotFoundException(name, e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, getAcc());\n\t\t} catch (java.security.PrivilegedActionException pae) {\n\t\t\tthrow (ClassNotFoundException) pae.getException();\n\t\t}\n\t\tif (result == null) {\n\t\t\tthrow new ClassNotFoundException(name);\n\t\t}\n\t\treturn result;\n\t}",
"@Override\n public Class getJavaClass() throws IOException, ClassNotFoundException {\n open();\n URL url;\n int p = path.lastIndexOf('/');\n int p2 = path.substring(0,p-1).lastIndexOf('/');\n\n File f = new File(path.substring(0,p2));\n url = f.toURI().toURL();\n URL[] urls = new URL[1];\n urls[0] = url;\n ClassLoader loader = new URLClassLoader(urls);\n\n String cls = path.substring(p2 + 1, path.lastIndexOf('.')).replace('/', '.');\n\n if (cfile.getParentFile().getParentFile().getName().equals(\"production\")) {\n cls = cls.substring(cls.lastIndexOf('.') + 1);\n }\n\n\n\n return loader.loadClass(cls);\n }",
"private static void fixDexElementsForProtectedApp(Application application, Object[] newDexElements) throws Exception {\n Field zipField = null;\n Field dexFileField = null;\n final Field mFileNameField = ShareReflectUtil.findField(DexFile.class, \"mFileName\");\n final Field mCookieField = ShareReflectUtil.findField(DexFile.class, \"mCookie\");\n final Field mInternalCookieField = ShareReflectUtil.findField(DexFile.class, \"mInternalCookie\");\n\n // Always ignore the last element since it should always be the base.apk.\n for (int i = 0; i < newDexElements.length - 1; ++i) {\n final Object newElement = newDexElements[i];\n\n if (zipField == null && dexFileField == null) {\n zipField = ShareReflectUtil.findField(newElement, \"zip\");\n dexFileField = ShareReflectUtil.findField(newElement, \"dexFile\");\n }\n\n final DexFile origDexFile = oldDexFiles.get(i);\n final String origFileName = (String) mFileNameField.get(origDexFile);\n final Object origCookie = mCookieField.get(origDexFile);\n final Object origInternalCookie = mInternalCookieField.get(origDexFile);\n\n final DexFile dupOrigDexFile = DexFile.loadDex(application.getApplicationInfo().sourceDir, null, 0);\n mFileNameField.set(dupOrigDexFile, origFileName);\n mCookieField.set(dupOrigDexFile, origCookie);\n mInternalCookieField.set(dupOrigDexFile, origInternalCookie);\n\n dexFileField.set(newElement, dupOrigDexFile);\n\n // Just for better looking when dump new classloader.\n // Avoid such output like this: DexPathList{zip file: /xx/yy/zz/uu.odex}\n final File newZip = (File) zipField.get(newElement);\n final String newZipPath = (newZip != null ? newZip.getAbsolutePath() : null);\n if (newZipPath != null && !newZipPath.endsWith(\".zip\") && !newZipPath.endsWith(\".jar\") && !newZipPath.endsWith(\".apk\")) {\n zipField.set(newElement, null);\n }\n }\n }",
"void initClasses() {\n\t\tif (programUnit == null) return;\n\n\t\t// Add all classes\n\t\tList<BdsNode> cdecls = BdsNodeWalker.findNodes(programUnit, ClassDeclaration.class, true, true);\n\t\tfor (BdsNode n : cdecls) {\n\t\t\tClassDeclaration cd = (ClassDeclaration) n;\n\t\t\tbdsvm.addType(cd.getType());\n\t\t}\n\t}",
"public synchronized void defineClass(String fullClassName, byte[] bytes)\r\n {\r\n try\r\n {\r\n defineClass(fullClassName, bytes, 0, bytes.length);\r\n }\r\n finally\r\n {\r\n }\r\n }",
"private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }",
"AnonymousClass1(android.widget.ColorListView r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.widget.ColorListView.1.<init>(android.widget.ColorListView):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.ColorListView.1.<init>(android.widget.ColorListView):void\");\n }",
"public ITravelClassType getClassCode();",
"private Class loadClass(ClassInfo classInfo) {\n Class type = null;\n try {\n URLClassLoader classLoader = new URLClassLoader(new URL[]{\n new File(classInfo.getPath()).toURI().toURL()\n });\n type = classLoader.loadClass(classInfo.getName());\n } catch (MalformedURLException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Class url stimmt nicht. Ggf. hat der ClassIndexer einen falschen Pfad!\", ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Klasse konnte nicht gefunden werden!\", ex);\n }\n return type;\n }",
"AnonymousClass1(javax.crypto.JarVerifier r1, java.net.URL r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: javax.crypto.JarVerifier.1.<init>(javax.crypto.JarVerifier, java.net.URL):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: javax.crypto.JarVerifier.1.<init>(javax.crypto.JarVerifier, java.net.URL):void\");\n }",
"IArenaClass getClass(final String name);",
"private byte[] loadByteCode(String className) {\n Class<?> clazz = loadClass(className);\n\n if (clazz != null) {\n return collector.getByteCode(clazz);\n }\n\n return null;\n }",
"GpsClock() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.<init>():void\");\n }",
"public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }",
"private static AndroidNClassLoader createAndroidNClassLoader(PathClassLoader original, Application application) throws Exception {\n AndroidNClassLoader androidNClassLoader = new AndroidNClassLoader(\"\", original, application);\n Field originPathList = ShareReflectUtil.findField(original, \"pathList\");\n Object originPathListObject = originPathList.get(original);\n //should reflect definingContext also\n Field originClassloader = ShareReflectUtil.findField(originPathListObject, \"definingContext\");\n originClassloader.set(originPathListObject, androidNClassLoader);\n //copy pathList\n Field pathListField = ShareReflectUtil.findField(androidNClassLoader, \"pathList\");\n //just use PathClassloader's pathList\n pathListField.set(androidNClassLoader, originPathListObject);\n\n //we must recreate dexFile due to dexCache\n List<File> additionalClassPathEntries = new ArrayList<>();\n Field dexElement = ShareReflectUtil.findField(originPathListObject, \"dexElements\");\n Object[] originDexElements = (Object[]) dexElement.get(originPathListObject);\n for (Object element : originDexElements) {\n DexFile dexFile = (DexFile) ShareReflectUtil.findField(element, \"dexFile\").get(element);\n if (dexFile == null) {\n continue;\n }\n additionalClassPathEntries.add(new File(dexFile.getName()));\n //protect for java.lang.AssertionError: Failed to close dex file in finalizer.\n oldDexFiles.add(dexFile);\n }\n Method makePathElements = ShareReflectUtil.findMethod(originPathListObject, \"makePathElements\", List.class, File.class,\n List.class);\n ArrayList<IOException> suppressedExceptions = new ArrayList<>();\n Object[] newDexElements = (Object[]) makePathElements.invoke(originPathListObject, additionalClassPathEntries, null, suppressedExceptions);\n dexElement.set(originPathListObject, newDexElements);\n\n try {\n Class.forName(CHECK_CLASSLOADER_CLASS, true, androidNClassLoader);\n } catch (Throwable thr) {\n Log.e(TAG, \"load TinkerTestAndroidNClassLoader fail, try to fixDexElementsForProtectedApp\");\n fixDexElementsForProtectedApp(application, newDexElements);\n }\n\n return androidNClassLoader;\n }",
"private void gatherInformation(String className, byte[] bytes) {\n ClassReader reader = new ClassReader(bytes);\n ClassWriter writer = new NonClassloadingClassWriter(reader, ClassWriter.COMPUTE_FRAMES);\n ClassVisitor visitor = new ClassInformationAdapter(writer, methodInformation);\n reader.accept(visitor, 0);\n }",
"private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }",
"DexArchive(BundleArchiveImpl ba, FileTree dir, int rev) {\n super(ba, dir, rev);\n }",
"AnonymousClass1(android.telecom.ConnectionServiceAdapterServant r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.1.<init>(android.telecom.ConnectionServiceAdapterServant):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.1.<init>(android.telecom.ConnectionServiceAdapterServant):void\");\n }",
"public DebugInfoItem(DexFile dexFile) {\n super(dexFile);\n }",
"public lj az() {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"public byte[] get(String res) {\n return classes.get(res);\n }",
"public interface AttributedCharacterIterator extends CharacterIterator {\n\n /* JADX ERROR: NullPointerException in pass: ReSugarCode\n java.lang.NullPointerException\n \tat jadx.core.dex.visitors.ReSugarCode.initClsEnumMap(ReSugarCode.java:159)\n \tat jadx.core.dex.visitors.ReSugarCode.visit(ReSugarCode.java:44)\n \tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:12)\n \tat jadx.core.dex.visitors.DepthTraversal.lambda$visit$0(DepthTraversal.java:13)\n \tat java.util.ArrayList.forEach(ArrayList.java:1251)\n \tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:13)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:32)\n \tat jadx.core.ProcessClass.lambda$processDependencies$0(ProcessClass.java:51)\n \tat java.lang.Iterable.forEach(Iterable.java:75)\n \tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:51)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:37)\n \tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)\n \tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n \tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n */\n public static class Attribute implements Serializable {\n public static final Attribute INPUT_METHOD_SEGMENT = null;\n public static final Attribute LANGUAGE = null;\n public static final Attribute READING = null;\n private static final Map instanceMap = null;\n private static final long serialVersionUID = -9142742483513960612L;\n private String name;\n\n /* JADX ERROR: Method load error\n jadx.core.utils.exceptions.DecodeException: Load method exception: bogus opcode: 0073 in method: java.text.AttributedCharacterIterator.Attribute.<clinit>():void, dex: \n \tat jadx.core.dex.nodes.MethodNode.load(MethodNode.java:118)\n \tat jadx.core.dex.nodes.ClassNode.load(ClassNode.java:248)\n \tat jadx.core.dex.nodes.ClassNode.load(ClassNode.java:254)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:29)\n \tat jadx.core.ProcessClass.lambda$processDependencies$0(ProcessClass.java:51)\n \tat java.lang.Iterable.forEach(Iterable.java:75)\n \tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:51)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:37)\n \tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)\n \tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n \tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n Caused by: java.lang.IllegalArgumentException: bogus opcode: 0073\n \tat com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1227)\n \tat com.android.dx.io.OpcodeInfo.getName(OpcodeInfo.java:1234)\n \tat jadx.core.dex.instructions.InsnDecoder.decode(InsnDecoder.java:581)\n \tat jadx.core.dex.instructions.InsnDecoder.process(InsnDecoder.java:74)\n \tat jadx.core.dex.nodes.MethodNode.load(MethodNode.java:104)\n \t... 10 more\n */\n static {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: java.text.AttributedCharacterIterator.Attribute.<clinit>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.text.AttributedCharacterIterator.Attribute.<clinit>():void\");\n }\n\n protected Attribute(String name) {\n this.name = name;\n if (getClass() == Attribute.class) {\n instanceMap.put(name, this);\n }\n }\n\n public final boolean equals(Object obj) {\n return super.equals(obj);\n }\n\n public final int hashCode() {\n return super.hashCode();\n }\n\n public String toString() {\n return getClass().getName() + \"(\" + this.name + \")\";\n }\n\n protected String getName() {\n return this.name;\n }\n\n protected Object readResolve() throws InvalidObjectException {\n if (getClass() != Attribute.class) {\n throw new InvalidObjectException(\"subclass didn't correctly implement readResolve\");\n }\n Attribute instance = (Attribute) instanceMap.get(getName());\n if (instance != null) {\n return instance;\n }\n throw new InvalidObjectException(\"unknown attribute name\");\n }\n }\n\n Set<Attribute> getAllAttributeKeys();\n\n Object getAttribute(Attribute attribute);\n\n Map<Attribute, Object> getAttributes();\n\n int getRunLimit();\n\n int getRunLimit(Attribute attribute);\n\n int getRunLimit(Set<? extends Attribute> set);\n\n int getRunStart();\n\n int getRunStart(Attribute attribute);\n\n int getRunStart(Set<? extends Attribute> set);\n}",
"public java.lang.Object run() throws java.lang.Exception {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: javax.crypto.JarVerifier.1.run():java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: javax.crypto.JarVerifier.1.run():java.lang.Object\");\n }",
"@Override\r\n\tpublic void decompileFromArchive( String archivePath, String packege, String className )\r\n\t{\r\n\t\tstart = System.currentTimeMillis( );\r\n\t\tFile workingDir = new File(\r\n\t\t\t\tJavaDecompilerPlugin.getDefault( ).getPreferenceStore( ).getString( JavaDecompilerPlugin.TEMP_DIR )\r\n\t\t\t\t\t\t+ \"/\" //$NON-NLS-1$\r\n\t\t\t\t\t\t+ System.currentTimeMillis( ) );\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tworkingDir.mkdirs( );\r\n\t\t\tJarClassExtractor.extract( archivePath, packege, className, true, workingDir.getAbsolutePath( ) );\r\n\t\t\tdecompile( workingDir.getAbsolutePath( ), \"\", className ); //$NON-NLS-1$\r\n\t\t}\r\n\t\tcatch ( Exception e )\r\n\t\t{\r\n\t\t\texcList.add( e );\r\n\t\t\t// logExceptions();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tFileUtil.deltree( workingDir );\r\n\t\t}\r\n\t}",
"@Override\n\tprotected Class<?> findClass(String name) throws ClassNotFoundException {\n\t\tFile file = new File(getSimpleName(name) + \".class\");\n FileInputStream fis = null;\n Class<?> clazz = null;\n try {\n fis = new FileInputStream(file);\n int content = 0;\n int i = 0;\n byte[] data = new byte[fis.available()];\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n data[i] = (byte) content;\n i++;\n }\n clazz = defineClass(name, data, 0, data.length);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n \t\tex.printStackTrace();\n \t}\n }\n return clazz;\n\t}",
"private ClassUtil() {}",
"private static byte[] instrumentClassFile(byte[] classfileBuffer) {\n String className = new ClassReader(classfileBuffer).getClassName().replace(\"/\", \".\");\n ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();\n byte[] newClassfileBuffer = new EkstaziCFT().transform(currentClassLoader, className, null, null, classfileBuffer);\n return newClassfileBuffer;\n }",
"public interface ClassContainer {\n\n void addLoadableClass(String className, byte[] classData);\n}",
"public lj ax() {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"SmsCbCmasInfo(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.<init>(android.os.Parcel):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.<init>(android.os.Parcel):void\");\n }",
"@SuppressWarnings(\"unused\")\n private void saveClassfileBufferForDebugging(String className, byte[] classfileBuffer) {\n try {\n if (className.contains(\"CX\")) {\n java.io.DataOutputStream tmpout = new java.io.DataOutputStream(new java.io.FileOutputStream(\"out\"));\n tmpout.write(classfileBuffer, 0, classfileBuffer.length);\n tmpout.close();\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"west.twouse.language.sparqlas.Class getClass_();",
"private String[] getReferencedJavaClasses() {\n\t\tclass ClassNameVisitor extends JVisitor {\n\t\t\tList<String> classNames = new ArrayList<String>();\n\n\t\t\t@Override\n\t\t\tpublic boolean visit(JClassType x, Context ctx) {\n\t\t\t\tclassNames.add(x.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tClassNameVisitor v = new ClassNameVisitor();\n\t\tv.accept(jprogram);\n\t\treturn v.classNames.toArray(new String[v.classNames.size()]);\n\t}",
"void registerAsUsed (ClassType c, int pos) {\r\n if (used_classes == null) {\r\n used_classes = new java.util.Vector ();\r\n used_class_offsets = new java.util.Vector ();\r\n }\r\n used_classes.addElement (c);\r\n used_class_offsets.addElement (new Integer (pos));\r\n }",
"private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }",
"public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"java.lang.String getClass_();",
"java.lang.String getClass_();",
"private void initialize() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00ee in method: android.location.GpsClock.initialize():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.initialize():void\");\n }",
"public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }",
"public ContactsProvider() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: org.gsma.joyn.contacts.ContactsProvider.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.gsma.joyn.contacts.ContactsProvider.<init>():void\");\n }",
"private LoadMethodMapper ()\n {}",
"public void importClass(String klass) throws Exception;",
"@InputFiles\n @Incremental\n @PathSensitive(PathSensitivity.RELATIVE)\n public abstract ConfigurableFileCollection getDexFolders();",
"public ecDSAnone() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSAnone.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSAnone.<init>():void\");\n }",
"protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }",
"Object getClass_();",
"Object getClass_();",
"public ClassesInfoFragment() {\r\n }",
"public X509V1CertificateGenerator() {\n /*\n // Can't load method instructions: Load method exception: null in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.<init>():void, dex: in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.<init>():void\");\n }",
"public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"AnonymousClass2(android.telecom.ConnectionServiceAdapterServant r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.2.<init>(android.telecom.ConnectionServiceAdapterServant):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.<init>(android.telecom.ConnectionServiceAdapterServant):void\");\n }",
"public lj au() {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }",
"public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }",
"DelegatingX509Certificate(java.security.cert.X509Certificate r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: android.security.keystore.DelegatingX509Certificate.<init>(java.security.cert.X509Certificate):void, dex: in method: android.security.keystore.DelegatingX509Certificate.<init>(java.security.cert.X509Certificate):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.<init>(java.security.cert.X509Certificate):void\");\n }",
"public static void m5812a(java.lang.String r0, java.lang.String r1, java.lang.String r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = new com.crashlytics.android.answers.AddToCartEvent;\n r2.<init>();\n r2.putItemType(r0);\n r0 = java.lang.Long.parseLong(r1);\t Catch:{ Exception -> 0x0013 }\n r0 = java.math.BigDecimal.valueOf(r0);\t Catch:{ Exception -> 0x0013 }\n r2.putItemPrice(r0);\t Catch:{ Exception -> 0x0013 }\n L_0x0013:\n r0 = java.util.Locale.getDefault();\n r0 = java.util.Currency.getInstance(r0);\n r2.putCurrency(r0);\n r0 = com.crashlytics.android.answers.Answers.getInstance();\n r0.logAddToCart(r2);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String):void\");\n }",
"public ClassBundle() {\n }",
"public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tIOUtils.loadMethodIODeps(\"cb\");\n\t\t\n\t\tFile clazz = new File(args[0]);\n\n\t\tfinal ClassReader cr1 = new ClassReader(new FileInputStream(clazz));\n//\t\tPrintWriter pw = new PrintWriter(new FileWriter(\"z.txt\"));\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t/*ClassWriter cw1 = new ClassWriter(ClassWriter.COMPUTE_FRAMES) {\n\t\t\t@Override\n\t\t\tprotected String getCommonSuperClass(String type1, String type2) {\n\t\t\t\ttry {\n\t\t\t\t\treturn super.getCommonSuperClass(type1, type2);\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t//\t\t\t\t\tSystem.err.println(\"err btwn \" + type1 + \" \" +type2);\n\t\t\t\t\treturn \"java/lang/Unknown\";\n\t\t\t\t}\n\t\t\t}\n\t\t};*/\n\t\t\n\t\tClassWriter cw1 = new ClassWriter(ClassWriter.COMPUTE_MAXS);\n\t\t\n\t\tcr1.accept(new ClassVisitor(Opcodes.ASM5, cw1) {\n\t\t\t@Override\n\t\t\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new JSRInlinerAdapter(super.visitMethod(access, name, desc, signature, exceptions), access, name, desc, signature, exceptions);\n\t\t\t}\n\t\t}, ClassReader.EXPAND_FRAMES);\n\t\t\n\t\tfinal ClassReader cr = new ClassReader(cw1.toByteArray());\n\t\tTraceClassVisitor tcv = new TraceClassVisitor(null,new Textifier(),pw);\n\t\t//ClassWriter tcv = new ClassWriter(cr, ClassWriter.COMPUTE_MAXS);\n\t\tClassVisitor cv = new ClassVisitor(Opcodes.ASM5, tcv) {\n\t\t\tString className;\n\n\t\t\t@Override\n\t\t\tpublic void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {\n\t\t\t\tsuper.visit(version, access, name, signature, superName, interfaces);\n\t\t\t\tthis.className = name;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tboolean isSynthetic = ClassInfoUtils.checkAccess(access, Opcodes.ACC_SYNTHETIC);\n\t\t\t\tboolean isNative = ClassInfoUtils.checkAccess(access, Opcodes.ACC_NATIVE);\n\t\t\t\tboolean isInterface = ClassInfoUtils.checkAccess(access, Opcodes.ACC_INTERFACE);\n\t\t\t\tboolean isAbstract = ClassInfoUtils.checkAccess(access, Opcodes.ACC_ABSTRACT);\n\t\t\t\t\n\t\t\t\tMethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);\n\t\t\t\tif (name.equals(\"toString\") && desc.equals(\"()Ljava/lang/String;\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (name.equals(\"equals\") && desc.equals(\"(Ljava/lang/Object;)Z\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (name.equals(\"hashCode\") && desc.equals(\"()I\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (isSynthetic || isNative || isInterface || isAbstract) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else {\n\t\t\t\t\tmv = new DependencyAnalyzer(className, \n\t\t\t\t\t\t\taccess, \n\t\t\t\t\t\t\tname, \n\t\t\t\t\t\t\tdesc, \n\t\t\t\t\t\t\tsignature, \n\t\t\t\t\t\t\texceptions, \n\t\t\t\t\t\t\tmv, \n\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\ttrue, \n\t\t\t\t\t\t\ttrue);\n\t\t\t\t\t//mv = new CalleeAnalyzer(className, access, name, desc, signature, exceptions, mv, true);\n\t\t\t\t\treturn mv;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcr.accept(cv, ClassReader.EXPAND_FRAMES);\n\t\tpw.flush();\n\t}",
"private void dumpClassBytesToFile ()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int lastSlash =\n\t\t\t\tclassInternalName.lastIndexOf('/');\n\t\t\tfinal String pkg =\n\t\t\t\tclassInternalName.substring(0, lastSlash);\n\t\t\tfinal Path tempDir = Paths.get(\"debug\", \"jvm\");\n\t\t\tfinal Path dir = tempDir.resolve(Paths.get(pkg));\n\t\t\tFiles.createDirectories(dir);\n\t\t\tfinal String base = classInternalName.substring(lastSlash + 1);\n\t\t\tfinal Path classFile = dir.resolve(base + \".class\");\n\t\t\tFiles.write(classFile, stripNull(classBytes));\n\t\t}\n\t\tcatch (final IOException e)\n\t\t{\n\t\t\tInterpreter.log(\n\t\t\t\tInterpreter.loggerDebugJVM,\n\t\t\t\tLevel.WARNING,\n\t\t\t\t\"unable to write class bytes for generated class {0}\",\n\t\t\t\tclassInternalName);\n\t\t}\n\t}",
"AllocationAdapter(long r1, android.renderscript.RenderScript r3, android.renderscript.Allocation r4, android.renderscript.Type r5) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.renderscript.AllocationAdapter.<init>(long, android.renderscript.RenderScript, android.renderscript.Allocation, android.renderscript.Type):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.renderscript.AllocationAdapter.<init>(long, android.renderscript.RenderScript, android.renderscript.Allocation, android.renderscript.Type):void\");\n }",
"public Attributes2Impl() {\n /*\n // Can't load method instructions: Load method exception: null in method: org.xml.sax.ext.Attributes2Impl.<init>():void, dex: in method: org.xml.sax.ext.Attributes2Impl.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.xml.sax.ext.Attributes2Impl.<init>():void\");\n }"
] | [
"0.7060199",
"0.6879663",
"0.6330274",
"0.6188854",
"0.59869087",
"0.587778",
"0.57089436",
"0.5644008",
"0.56421155",
"0.56071657",
"0.5607065",
"0.5489435",
"0.54543763",
"0.5432141",
"0.5424917",
"0.5419515",
"0.5406961",
"0.5392293",
"0.53908557",
"0.53701884",
"0.5353152",
"0.53457505",
"0.53403074",
"0.5337068",
"0.53183115",
"0.531821",
"0.53103846",
"0.5308997",
"0.53029627",
"0.5259852",
"0.52508634",
"0.5228873",
"0.52158177",
"0.52139884",
"0.5204548",
"0.5191165",
"0.5178514",
"0.51776445",
"0.51732194",
"0.5170561",
"0.51614934",
"0.5146653",
"0.513763",
"0.51338536",
"0.51309305",
"0.5127093",
"0.51264536",
"0.51259536",
"0.51131105",
"0.51079786",
"0.5098626",
"0.5097432",
"0.50958097",
"0.50722826",
"0.50714225",
"0.50565475",
"0.5049672",
"0.50482213",
"0.5047796",
"0.50449413",
"0.50431323",
"0.5035124",
"0.50340927",
"0.50260353",
"0.5022211",
"0.5018539",
"0.5018166",
"0.5010675",
"0.5006978",
"0.49985033",
"0.49938124",
"0.49911663",
"0.49847645",
"0.49779764",
"0.49747595",
"0.49747595",
"0.49608305",
"0.49253473",
"0.49203455",
"0.49051073",
"0.49033263",
"0.49024987",
"0.49020618",
"0.4899321",
"0.48893416",
"0.48893416",
"0.48874882",
"0.48771676",
"0.4875896",
"0.4875244",
"0.48721063",
"0.4866379",
"0.4862937",
"0.48588553",
"0.4848421",
"0.48460156",
"0.48418263",
"0.48395592",
"0.4835679",
"0.48346353",
"0.4831688"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Map<Integer, String> getMakingMtList() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<MakingMt> findActiveMakingMts() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public String makingMtListing(Integer limit, Integer offset, String sort, String order, String search,
Principal principal) throws ParseException {
StringBuilder sb = new StringBuilder();
Page<MakingMt> makingMtList = null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
User user = userService.findByName(principal.getName());
UserRole userRole = userRoleService.findByUser(user);
MenuMast menuMast = menuMastService.findByMenuNm("makingMt");
RoleRights roleRights = roleRightsService.findByRoleMastAndMenuMast(userRole.getRoleMast(), menuMast);
if ((search != null) && (search.trim().length() == 0)) {
search = null;
}
makingMtList = searchAll(limit, offset, sort, order, search, true);
sb.append("{\"total\":").append(makingMtList.getTotalElements()).append(",\"rows\": [");
for (MakingMt makingMt : makingMtList) {
Date currdate = sdf.parse(sdf.format(new Date()));
Date invDate = sdf.parse(sdf.format(makingMt.getInvDate()));
sb.append("{\"id\":\"")
.append(makingMt.getId())
.append("\",\"invNo\":\"")
.append(makingMt.getInvNo())
.append("\",\"invDate\":\"")
.append(makingMt.getInvDateStr())
.append("\",\"purity\":\"")
.append((makingMt.getPurity() != null ? makingMt.getPurity().getName() : ""))
.append("\",\"color\":\"")
.append((makingMt.getColor() != null ? makingMt.getColor().getName() : ""));
sb.append("\",\"action1\":\"");
if (userRole.getRoleMast().getRoleNm().equalsIgnoreCase("ADMINISTRATOR")
|| userRole.getRoleMast().getRoleNm().equalsIgnoreCase("ADMIN")
|| userRole.getRoleMast().getRoleNm().equalsIgnoreCase("ADMIN ROLE")) {
sb.append("<a href='/jewels/manufacturing/transactions/makingMt/edit/")
.append(makingMt.getId()).append(".html'");
sb.append(
".html' class='btn btn-xs btn-warning' ><span class='glyphicon glyphicon-edit'></span> Edit</a>");
sb.append("\",\"action2\":\"");
sb.append("<a onClick='javascript:doDelete(event, this)' href='/jewels/manufacturing/transactions/makingMt/delete/");
sb.append(makingMt.getId());
sb.append(");' class='btn btn-xs btn-danger triggerRemove").append(makingMt.getId())
.append("'><span class='glyphicon glyphicon-trash'></span> Delete</a>")
.append("\"},");
} else {
if (roleRights.getCanEdit()) {
sb.append("<a href='/jewels/manufacturing/transactions/makingMt/edit/")
.append(makingMt.getId()).append(".html'");
} else {
sb.append("<a onClick='javascript:displayMsg(event, this)' href='javascript:void(0)'");
}
sb.append(
".html' class='btn btn-xs btn-warning' ><span class='glyphicon glyphicon-edit'></span> Edit</a>");
sb.append("\",\"action2\":\"");
if (roleRights.getCanDelete()) {
if (currdate.equals(invDate)) {
sb.append("<a onClick='javascript:doDelete(event, this)' href='/jewels/manufacturing/transactions/makingMt/delete/")
.append(makingMt.getId()).append(".html'");
} else {
sb.append("<a onClick='javascript:displayBackDatedMsg(event, this)' href='javascript:void(0)'");
}
} else {
sb.append("<a onClick='javascript:displayMsg(event, this)' href='javascript:void(0)'");
}
sb.append(".html' class='btn btn-xs btn-danger triggerRemove").append(makingMt.getId())
.append("'><span class='glyphicon glyphicon-trash'></span> Delete</a>")
.append("\"},");
}
}
String str = sb.toString();
str = (str.indexOf("},") != -1 ? str.substring(0, str.length() - 1) : str);
str += "]}";
return str;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Page<MakingMt> searchAll(Integer limit, Integer offset, String sort, String order, String search,
Boolean onlyActive) {
QMakingMt qMakingMt = QMakingMt.makingMt;
BooleanExpression expression=null;
if (onlyActive) {
if (search == null) {
expression = qMakingMt.deactive.eq(false);
}else{
expression = qMakingMt.deactive.eq(false).and(qMakingMt.invNo.like("%" + search + "%"));
}
}else{
if (search != null) {
expression =qMakingMt.invNo.like("%" + search + "%");
}
}
if(limit == null){
limit=1000;
}
if(offset == null){
offset = 0;
}
int page = (offset == 0 ? 0 : (offset / limit));
if (sort == null) {
sort = "id";
} else if (sort.equalsIgnoreCase("invNo")) {
sort = "invNo";
}else if (sort.equalsIgnoreCase("deactive")) {
sort = "deactive";
}
Page<MakingMt> makingList =(Page<MakingMt>) makingMtRepository.findAll(
expression, new PageRequest(page, limit, (order.equalsIgnoreCase("asc") ? Direction.DESC: Direction.ASC),sort));
return makingList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO: Warning this method won't work in the case the id fields are not set | @Override
public boolean equals(Object object) {
if (!(object instanceof PmaUsergroupsPK)) {
return false;
}
PmaUsergroupsPK other = (PmaUsergroupsPK) object;
if ((this.usergroup == null && other.usergroup != null) || (this.usergroup != null && !this.usergroup.equals(other.usergroup))) {
return false;
}
if ((this.tab == null && other.tab != null) || (this.tab != null && !this.tab.equals(other.tab))) {
return false;
}
if ((this.allowed == null && other.allowed != null) || (this.allowed != null && !this.allowed.equals(other.allowed))) {
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 setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public void setId(long id) { this.id = id; }",
"public void setId(long id) { this.id = id; }",
"public int getId(){ return id; }",
"public int getId() {return id;}",
"public int getId() {return Id;}",
"public int getId(){return id;}",
"public void setId(long id) {\n id_ = id;\n }",
"private int getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId(){return id;}",
"public int id() {return id;}",
"public long getId(){return this.id;}",
"public int getId(){\r\n return this.id;\r\n }",
"@Override public String getID() { return id;}",
"public Long id() { return this.id; }",
"public Integer getId() { return id; }",
"@Override\n\tpublic Integer getId() {\n return id;\n }",
"@Override\n public Long getId () {\n return id;\n }",
"@Override\n public long getId() {\n return id;\n }",
"public Long getId() {return id;}",
"public Long getId() {return id;}",
"public String getId(){return id;}",
"@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}",
"public Integer getId() { return this.id; }",
"@Override\r\n public int getId() {\n return id;\r\n }",
"@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}",
"public int getId() {\n return id;\n }",
"public long getId() { return _id; }",
"public int getId() {\n/* 35 */ return this.id;\n/* */ }",
"public long getId() { return id; }",
"public long getId() { return id; }",
"public void setId(Long id) \n {\n this.id = id;\n }",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"public void setId(String id) {\n this.id = id;\n }",
"@Override\n\tpublic void setId(Long id) {\n\t}",
"public Long getId() {\n return id;\n }",
"public long getId() { return this.id; }",
"public int getId()\n {\n return id;\n }",
"public void setId(int id){\r\n this.id = id;\r\n }",
"protected abstract String getId();",
"@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}",
"@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public int getID() {return id;}",
"public int getID() {return id;}",
"public int getId ()\r\n {\r\n return id;\r\n }",
"@Override\n public int getField(int id) {\n return 0;\n }",
"public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }",
"public int getId(){\r\n return localId;\r\n }",
"void setId(int id) {\n this.id = id;\n }",
"@Override\n public Integer getId() {\n return id;\n }",
"@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"@Override\n public int getId() {\n return id;\n }",
"@Override\n public int getId() {\n return id;\n }",
"public void setId(int id)\n {\n this.id=id;\n }",
"@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }",
"@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}",
"public int getId()\r\n {\r\n return id;\r\n }",
"public void setId(Long id){\n this.id = id;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"final protected int getId() {\n\t\treturn id;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"public abstract Long getId();",
"public void setId(Long id) \r\n {\r\n this.id = id;\r\n }",
"@Override\n public long getId() {\n return this.id;\n }",
"public String getId(){ return id.get(); }",
"@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }",
"public Long getId() \n {\n return id;\n }",
"@Override\n\tpublic void setId(int id) {\n\n\t}",
"@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}",
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"public int getId()\n {\n return id;\n }",
"public int getID(){\n return id;\n }",
"public String getID(){\n return Id;\n }"
] | [
"0.6896632",
"0.68387574",
"0.67055523",
"0.664161",
"0.664161",
"0.6591609",
"0.6579122",
"0.6579122",
"0.6574789",
"0.6574789",
"0.6574789",
"0.6574789",
"0.6574789",
"0.6574789",
"0.65622264",
"0.65622264",
"0.6544065",
"0.6524693",
"0.6515855",
"0.6487308",
"0.64771354",
"0.6427262",
"0.64187664",
"0.64169776",
"0.6401703",
"0.6366995",
"0.6355141",
"0.6352062",
"0.63480914",
"0.632507",
"0.6319893",
"0.6302324",
"0.62939113",
"0.62939113",
"0.6283244",
"0.62715423",
"0.62667876",
"0.6266187",
"0.6262896",
"0.625957",
"0.6256161",
"0.6250557",
"0.6247988",
"0.6247988",
"0.62448",
"0.62393653",
"0.62393653",
"0.6232335",
"0.6224515",
"0.6220515",
"0.62201786",
"0.6211765",
"0.6209805",
"0.62017703",
"0.6200779",
"0.6193537",
"0.61900336",
"0.61900336",
"0.61900336",
"0.61890036",
"0.61890036",
"0.6184653",
"0.61833143",
"0.61741275",
"0.617277",
"0.6168385",
"0.616688",
"0.61606914",
"0.61574304",
"0.61574304",
"0.61574304",
"0.61574304",
"0.61574304",
"0.61574304",
"0.61574304",
"0.6156549",
"0.6156549",
"0.61428857",
"0.6133989",
"0.61290866",
"0.61281896",
"0.6106005",
"0.6104989",
"0.6104989",
"0.61033344",
"0.6103079",
"0.610231",
"0.61007476",
"0.60999465",
"0.60942084",
"0.60933405",
"0.60932326",
"0.60932326",
"0.6090314",
"0.6089786",
"0.6077103",
"0.60718673",
"0.6071703",
"0.60704315",
"0.6069645",
"0.6069055"
] | 0.0 | -1 |
Check if the given language is supported. Implementations may provide a more effective way to check without getting all languages. | default boolean hasLanguage(@NotNull Language language) {
return getLanguages().contains(language);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean isAvailableForLanguage(Language language){\n return true;\n }",
"boolean hasLanguage();",
"@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }",
"public int isLanguageAvailable(String lang, String country, String variant) {\n return mSelf.isLanguageAvailable(lang, country, variant);\n }",
"boolean hasLanguageConstant();",
"boolean isAnyLanguageSupported(List<Locale.LanguageRange> languageRanges) {\n return mLanguageIndependent || Locale.lookup(languageRanges, mSupportedLocales) != null;\n }",
"protected boolean isLanguage( String word )\r\n\t{\r\n\t\treturn m_listLanguage.contains(word);\r\n\t}",
"@JsonIgnore\n public boolean isWelshLanguageRequested() {\n Optional<String> languageValue = Optional.ofNullable(languageRequirement);\n if (languageValue.isEmpty()) {\n return false;\n }\n return languageValue.get().equals(\"Yes\");\n }",
"public boolean hasLanguage() {\n return ((bitField0_ & 0x00000001) != 0);\n }",
"@Test\n public void testDetermineSupportedLocale() throws Exception {\n final File messagesFile = new File(\"messages_es.properties\");\n final Locale supportedLocale = parser.determineSupportedLocale(messagesFile);\n assertThat(supportedLocale.getLanguage()).isEqualTo(\"es\");\n assertThat(supportedLocale.getCountry()).isEmpty();\n }",
"boolean hasLocale();",
"@java.lang.Override\n public boolean hasLanguage() {\n return ((bitField0_ & 0x00000001) != 0);\n }",
"public boolean isSetLanguage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(LANGUAGE$14) != null;\n }\n }",
"public boolean isSetLanguage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(LANGUAGE$14) != null;\n }\n }",
"public boolean isSetLanguage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(LANGUAGE$14) != null;\n }\n }",
"public Future<List<String>> getSupportedLanguages() throws DynamicCallException, ExecutionException {\n return call(\"getSupportedLanguages\");\n }",
"@Test\n public void listAllAvailableLanguages() throws IOException {\n System.out.println(\n \"Language preprocessing components for the following languages are available:\\n \"\n + String.join(\", \", LanguageComponents.languages()));\n }",
"private void ensureLanguageIsDefined() {\n SharedPreferences sharedPref;\n SharedPreferences.Editor editor;\n sharedPref = getSharedPreferences(\"LlPreferences\", Context.MODE_PRIVATE);\n if (sharedPref.getBoolean(\"app_need_lang_def\", true) == true) {\n startActivity(chooseLanguageIntent);\n }\n }",
"public static ULocale acceptLanguage(ULocale[] acceptLanguageList, ULocale[] availableLocales, boolean[] fallback) {\n/* 883 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public static ULocale acceptLanguage(String acceptLanguageList, ULocale[] availableLocales, boolean[] fallback) {\n/* 866 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private void checkLanguage(Language language1, Language language2) {\n\t\t\n\t\tassertEquals(\"wrong id\", language1.getId(), language2.getId());\n\t\tassertEquals(\"wrong name\", language1.getName(), language2.getName());\n\t\tassertEquals(\"wrong desc\", language1.getDescription(), language2.getDescription());\n\t\tassertEquals(\"wrong options\", language1.getOptions(), language2.getOptions());\n\t\tassertEquals(\"wrong compiler\", language1.getCompiler(), language2.getCompiler());\t\n\t}",
"public static ULocale acceptLanguage(ULocale[] acceptLanguageList, boolean[] fallback) {\n/* 920 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"boolean hasI18();",
"@Override\n protected synchronized int onLoadLanguage(String lang, String country, String variant) {\n final int isLanguageAvailable = onIsLanguageAvailable(lang, country, variant);\n\n if (isLanguageAvailable == TextToSpeech.LANG_NOT_SUPPORTED) {\n return isLanguageAvailable;\n }\n\n String loadCountry = country;\n if (isLanguageAvailable == TextToSpeech.LANG_AVAILABLE) {\n loadCountry = \"USA\";\n }\n\n // If we've already loaded the requested language, we can return early.\n if (mCurrentLanguage != null) {\n if (mCurrentLanguage[0].equals(lang) && mCurrentLanguage[1].equals(country)) {\n return isLanguageAvailable;\n }\n }\n\n Map<Character, Integer> newFrequenciesMap = null;\n try {\n InputStream file = getAssets().open(lang + \"-\" + loadCountry + \".freq\");\n newFrequenciesMap = buildFrequencyMap(file);\n file.close();\n } catch (IOException e) {\n Log.e(TAG, \"Error loading data for : \" + lang + \"-\" + country);\n }\n\n mFrequenciesMap = newFrequenciesMap;\n mCurrentLanguage = new String[] { lang, loadCountry, \"\"};\n\n return isLanguageAvailable;\n }",
"public static ULocale acceptLanguage(String acceptLanguageList, boolean[] fallback) {\n/* 902 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test\n public void testDetermineSupportedLocaleWithCountry() throws Exception {\n final File messagesFile = new File(\"messages_es_MX.properties\");\n final Locale supportedLocale = parser.determineSupportedLocale(messagesFile);\n assertThat(supportedLocale.getLanguage()).isEqualTo(\"es\");\n assertThat(supportedLocale.getCountry()).isEqualTo(\"MX\");\n }",
"@Test\n public void acceptLanguage() throws Exception {\n final String html = \"<html><body></body></html>\";\n final HtmlPage p = loadPageWithAlerts(html);\n assertEquals(\"en-us\", p.getWebResponse().getWebRequest().getAdditionalHeaders().get(\"Accept-Language\"));\n\n final WebClient client = p.getWebClient();\n final String lang = client.getBrowserVersion().getBrowserLanguage();\n try {\n client.getBrowserVersion().setBrowserLanguage(\"fr\");\n final HtmlPage p2 = client.getPage(getDefaultUrl());\n assertEquals(\"fr\", p2.getWebResponse().getWebRequest().getAdditionalHeaders().get(\"Accept-Language\"));\n }\n finally {\n // Restore original language.\n client.getBrowserVersion().setBrowserLanguage(lang);\n }\n }",
"public Future<List<String>> getAvailableLanguages() throws DynamicCallException, ExecutionException {\n return call(\"getAvailableLanguages\");\n }",
"Optional<Locale> getLanguage();",
"private void checkLanguagePreferences() {\n if (submitter.languagePref == null) {\n if (rootValidator.autorepair) {\n submitter.languagePref = new ArrayList<StringWithCustomTags>();\n addInfo(\"Submitter language preference collection was null - autorepaired\", submitter);\n } else {\n addInfo(\"Submitter language preference collection is null\", submitter);\n }\n } else {\n if (submitter.languagePref.size() > 3) {\n addError(\"Submitter exceeds limit on language preferences (3)\", submitter);\n }\n for (StringWithCustomTags s : submitter.languagePref) {\n checkRequiredString(s, \"language pref\", submitter);\n }\n }\n }",
"public boolean isSetLang()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(LANG$28) != null;\n }\n }",
"public List<String> getSupportedLanguages() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getSupportedLanguages\").get();\n }",
"@Test(priority=6)\n\tpublic void verifyRemaininglanguagedisplaysOnclickingLanguageDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\tclick(overviewObj.languageAtHeader);\n\t\tString[] expectedLangOptions= {\"Deutsch\",\"English\",\"Español\",\"Français\",\"Italiano\",\"Nederlands\",\"Polski\",\"Português\",\"Română\",\"Русский\"};\n\t\tList<WebElement> availableLangOptions=overviewObj.languageDropdownOptionsList;\n\t\tfor(int i=0;i<expectedLangOptions.length;i++) {\n\t\t\tAssert.assertTrue(expectedLangOptions[i].equals(availableLangOptions.get(i).getText().trim()),\n\t\t\t\t\texpectedLangOptions[i]+\" is not present in lang dropdown\");\n\t\t}\n\t}",
"public static Boolean checkLangTtf(String localeCode) {\n if (MyApplication.getTtf() != null) {\n Locale locale = new Locale(localeCode);\n int result = MyApplication.getTtf().setLanguage(locale);\n return !(result == MyApplication.getTtf().LANG_MISSING_DATA || result == MyApplication.getTtf().LANG_NOT_SUPPORTED);\n }\n return false;\n }",
"@Test\n\tpublic void areCompatible_shouldConfirmSameLanguageMissingCountryAsCompatible() {\n\t\tLocale lhs = Locale.US;\n\t\tLocale rhs = Locale.ENGLISH;\n\t\t\n\t\tassertTrue(LocaleUtility.areCompatible(lhs, rhs));\n\t}",
"public boolean isSetLang() {\n\t\treturn this.lang != null;\n\t}",
"public boolean isSetLang() {\n\t\treturn this.lang != null;\n\t}",
"private Language askForLanguage() {\r\n // Build a message\r\n String message = \"Which language ? \\n\";\r\n for (int i = 0; i < listLanguages.size(); i++) {\r\n message += \"\\t\" + i + \"\\\\ \" + listLanguages.get(i).getName() + \"\\n\";\r\n }\r\n // Ask for number and get the correct Language\r\n return listLanguages.get(new Integer(askForLine(message)));\r\n }",
"java.lang.String getLanguage();",
"java.lang.String getLanguage();",
"private boolean isSupported(PlanGraphLiteral literal, int currentLevel) {\n\t\t\n\t\t/* check facts for support*/\n\t\tif (currentLevel > 0)\n\t\t\treturn facts.get(currentLevel).contains(literal);\n\t\t\n\t\t/* if currentLevel = 0, check if literal in initial conditions */\n\t\telse\n\t\t\treturn literal.getInitialLevel() == 0; \n\t}",
"public void selectLanguage(String language){\n\t\t\t if (language ==\"Spanish\"){\n\t\t\t\t driver.findElement(By.id(\"SignupRequest_language_0\")).click();\n\t\t\t }\n\t\t\t else if (language==\"English\"){\n\t\t\t\t driver.findElement(By.id(\"SignupRequest_language_2\")).click();\t\t\t \n\t\t\t }\n\t\t\t else if (language==\"Portuguese\"){\n\t\t\t\t driver.findElement(By.id(\"SignupRequest_language_1\")).click();\n\t\t\t\t }\n\t \t }",
"@Test\n\tpublic void areCompatible_shouldConfirmDifferentLanguageMissingCountryAsCompatible() {\n\t\tLocale lhs = Locale.US;\n\t\tLocale rhs = Locale.FRENCH;\n\t\t\n\t\tassertFalse(LocaleUtility.areCompatible(lhs, rhs));\n\t}",
"String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"public List<String> getAvailableLanguages() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getAvailableLanguages\").get();\n }",
"@Test\n public void checkIfSupportedTest() {\n assertTrue(EngineController.checkIfSupported(\"getMaxRotateSpeed\"));\n assertTrue(EngineController.checkIfSupported(\"rotate 10 1\"));\n assertTrue(EngineController.checkIfSupported(\"orient\"));\n // check interface, that specific for engine\n assertTrue(EngineController.checkIfSupported(\"getMaxThrust\"));\n assertTrue(EngineController.checkIfSupported(\"getCurrentThrust\"));\n assertTrue(EngineController.checkIfSupported(\"setThrust 333\"));\n }",
"public boolean exists(String languageId) {\r\n\r\n try {\r\n\r\n if (findConfigurationFile(languageId, CONFIGURATION_DIRECTORY) != null) {\r\n return true;\r\n }\r\n\r\n } catch (UnsupportedEncodingException e) {\r\n }\r\n\r\n return false;\r\n }",
"@SmallTest\n @Feature({\"AndroidWebView\"})\n public void testAcceptLanguage() throws Throwable {\n getAwSettingsOnUiThread(mAwContents).setJavaScriptEnabled(true);\n\n TestWebServer webServer = TestWebServer.start();\n try {\n HttpRequest request;\n\n final String pagePath = \"/test_accept_language.html\";\n final String pageUrl = webServer.setResponse(\n pagePath, \"<html><body>hello world</body></html>\", null);\n loadUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),\n pageUrl);\n\n assertEquals(1, webServer.getRequestCount(pagePath));\n\n request = webServer.getLastRequest(pagePath);\n\n assertEquals(LocaleUtils.getDefaultLocale(), getPrimaryAcceptLanguage(request));\n } finally {\n webServer.shutdown();\n }\n }",
"private static boolean isQualifiedLocale(Locale locale) {\r\n\t\tResourceBundle rb = ResourceBundleProvider.getAdminBundle(locale);\r\n\t\tif(isAvailable(rb, locale)) {\r\n\t\t\trb = ResourceBundleProvider.getAuditEventsBundle(locale);\r\n\t\t\tif(isAvailable(rb, locale))\t{\r\n\t\t\t\trb = ResourceBundleProvider.getExceptionsBundle(locale);\r\n\t\t\t\tif(isAvailable(rb, locale))\t{\r\n\t\t\t\t\trb = ResourceBundleProvider.getFormatBundle(locale);\r\n\t\t\t\t\tif(isAvailable(rb, locale))\t{\r\n\t\t\t\t\t\trb = ResourceBundleProvider.getPageMessagesBundle(locale);\r\n\t\t\t\t\t\tif(isAvailable(rb, locale)) {\r\n\t\t\t\t\t\t\trb = ResourceBundleProvider.getTermsBundle(locale);\r\n\t\t\t\t\t\t\tif(isAvailable(rb, locale)) {\r\n\t\t\t\t\t\t\t\trb = ResourceBundleProvider.getTextsBundle(locale);\r\n\t\t\t\t\t\t\t\tif(isAvailable(rb, locale)) {\r\n\t\t\t\t\t\t\t\t\trb = ResourceBundleProvider.getWordsBundle(locale);\r\n\t\t\t\t\t\t\t\t\tif(isAvailable(rb, locale)) {\r\n\t\t\t\t\t\t\t\t\t\trb = ResourceBundleProvider.getWorkflowBundle(locale);\r\n\t\t\t\t\t\t\t\t\t\treturn isAvailable(rb, locale);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"com.google.ads.googleads.v6.resources.LanguageConstantOrBuilder getLanguageConstantOrBuilder();",
"boolean hasValueLanguageId();",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"public String getLanguage();",
"Language getLanguage(LanguageID languageID, int version) throws LanguageNotFoundException;",
"public void setLanguage(String language);",
"@Test\n\tpublic void languageTest() {\n\t\tassertNotNull(queryTest.query(\"漢語\"));\n\t\tassertNotNull(queryTest.query(\"ンサートは\"));\n\t\tassertNotNull(queryTest.query(\"Ζ Θ Ι ΚΛ\"));\n\t\tassertNotNull(queryTest.query(\"Ζ Θ Ι ΚΛ\"));\n\t\tassertNotNull(queryTest.query(\"nalità umana ed al rafforzamento del rispetto dei diritti umani e delle libertà f\"));\n\t}",
"public void addLanguage(String language){\n if(!this.languages.contains(language)){this.languages.add(language);}\n }",
"public static boolean isLangRTL(String lang) {\n return Arrays.binarySearch(RTL_LANGS, lang, null) >= 0;\n }",
"public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }",
"public static SupportedLanguage getLang() {\n\t\tif (SINGLETON == null) {\n\t\t\tSINGLETON = new I18nHelper();\n\t\t}\n\t\treturn SINGLETON.getAndroidLang();\n\t}",
"public interface Language {\n\n /**\n * @return the language name\n */\n String getName();\n\n /**\n * @return the language display name, including the version if possible\n */\n String getDisplayName();\n\n /**\n * @return true if this language is active. Implementation can decide based on the runtime, for instance the\n * Groovy language can be inactive when the Groovy runtime is not available\n */\n boolean isActive();\n\n /**\n * @return the repl for this language, null should be returned when the language does not support the repl feature\n */\n Repl getRepl();\n\n /**\n * @return the compiler for this language, null should be returned when the language does not support the compilation feature\n */\n Compiler getCompiler();\n\n /**\n * Init session callback.\n *\n * @param session the initialized session\n */\n void init(ShellSession session);\n\n /**\n * Destroy session callback.\n *\n * @param session the destroyed session\n */\n void destroy(ShellSession session);\n\n}",
"public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }",
"public boolean isLanguageSaved(){\n return sharedPreferences.contains(PRIMARY_LANGUAGE) && sharedPreferences.contains(SECONDARY_LANGUAGE);\n }",
"String getLang();",
"public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }",
"public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }",
"protected void addLanguageParameter() throws Exception\n {\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n try\n {\n ArrayList termbaseLangs = new ArrayList();\n termbaseLangs.add(ALL);\n c = ConnectionPool.getConnection();\n ps = c.prepareStatement(TERM_LANG_QUERY);\n rs = ps.executeQuery();\n while (rs.next())\n {\n termbaseLangs.add(rs.getString(1));\n }\n\n // We should use .addList() and use a multi-select list instead\n // to let the user select multiple languages...BUT\n // this widget just does not work in the current inetsoft version\n // with the DHTML viewer (ok for java viewer)\n // So, we're stuck with giving the user one value to choose.\n theParameters.addChoice(\"selectedLang\", ALL,\n termbaseLangs.toArray());\n theParameters.setAlias(\"selectedLang\", \"Language\");\n }\n finally\n {\n ConnectionPool.silentClose(rs);\n ConnectionPool.silentClose(ps);\n ConnectionPool.silentReturnConnection(c);\n }\n }",
"public void setLanguage(String language) {\r\n this.language = language;\r\n }",
"public void setLanguage(String language) {\n this.language = language;\n }",
"public void setLanguage(String language) {\n this.language = language;\n }",
"boolean isFeatureSupported(String feature);",
"@RequestMapping(value = \"/{languageCode}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseBody\n public ApiResponse<SupportedLanguage> getOneLanguageByCode(@PathVariable String languageCode) {\n LOG.debug(\"REST request to get Language : {}\", languageCode);\n\n final ApiResponse <SupportedLanguage> apiResponse = new ApiResponse <SupportedLanguage>();\n\n SupportedLanguage language = null;\n\n try {\n language = supportedLanguageService.findOneLanguageByCode(languageCode);\n apiResponse.setData(language);\n\n } catch (Exception e) {\n throw new LucasRuntimeException(LucasRuntimeException.INTERNAL_ERROR, e);\n }\n\n return apiResponse;\n\n }",
"com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();",
"private void checkLanguages(List languages1, List languages2) {\n\t\tif (languages1 == null && languages2 == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (languages1 == null) {\n\t\t\tassertEquals(\"wrong size\", 0, languages2.size());\n\t\t} else {\n\t\t\tassertEquals(\"wrong size\", languages1.size(), languages1.size());\n\t\t\tIterator it1 = languages1.iterator();\n\t\t\tIterator it2 = languages2.iterator();\n\t\t\twhile (it1.hasNext()) {\n\t\t\t\tcheckLanguage((Language) it1.next(), (Language) it2.next());\n\t\t\t}\n\t\t}\n\t}",
"public boolean enableLocaleOverride( ) {\n\t\ttry {\n\t\t\tURIBuilder builder = new URIBuilder( I18N_URL );\n\t\t\tbuilder.addParameter( \"locale\", \"en_US\" );\n\t\t\tHttpGet get = new HttpGet( builder.build( ).toURL( ).toString( ) );\n\t\t\tString result = EntityUtils.toString( this.httpClient( ).execute( get ).getEntity( ) ).trim( );\n\t\t\treturn result.contains(\"Succeeded\" );\n\t\t} catch( Exception e ) {\n\t\t\tthrow new FitbitExecutionException( e );\n\t\t}\n\t}",
"public boolean isSetXmlLang()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(XMLLANG$26) != null;\n }\n }",
"@Test(expected = NotEnglishWordException.class)\r\n\tpublic void testEnglishAdd() throws LanguageSyntaxException {\r\n\t\ttrans.addWord(\"дом\", \"домик\");\r\n\t}",
"boolean checkCourse (String course){\r\n // If the course either .net or c/c++ or java, then return true\r\n if (course.equalsIgnoreCase(\".net\") \r\n || course.equalsIgnoreCase(\"c/c++\") \r\n || course.equalsIgnoreCase(\"java\"))\r\n return true;\r\n // else if it's not neither, return false\r\n else return false;\r\n \r\n }",
"public void setLanguage(java.lang.String language) {\n this.language = language;\n }",
"public void setLanguage(java.lang.String language) {\n this.language = language;\n }",
"public final void setLanguage(@Nullable final String languageParam) {\n this.language = languageParam;\n }",
"@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}",
"public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}",
"@PermitAll\n @Override\n public List<Language> getLanguages(String lang) {\n Map params = new HashMap<String, Object>();\n if (lang != null) {\n params.put(CommonSqlProvider.PARAM_LANGUAGE_CODE, lang);\n }\n params.put(CommonSqlProvider.PARAM_ORDER_BY_PART, \"item_order\");\n return getRepository().getEntityList(Language.class, params);\n }",
"public void setLanguage(String language) {\n _language = language;\n }",
"boolean hasSemanticLangidParams();",
"private boolean isEncryptionSupported() {\n // Note, this can be implemented as\n // return getEncryptionStatus() != DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED;\n // But is provided as a separate internal method if there's a faster way to do a\n // simple check for supported-or-not.\n return getEncryptionStatus() != DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED;\n }",
"public void setLanguages(List<String> languages) {\n this.languages = languages;\n }",
"public static boolean encodingSupported(String encoding) {\r\n\t\tboolean supported = true;\r\n\t\ttry {\r\n\t\t\tCharToByteConverter.getConverter(encoding);\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\tsupported = false;\r\n\t\t}\r\n\t\treturn supported;\r\n\t}",
"public boolean isSetOriginal_language() {\n return this.original_language != null;\n }",
"Language create(Language language);",
"private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }",
"CLanguage getClanguage();",
"public static Language getAD_Language() {\n\t\treturn null;\r\n\t}",
"void setLanguage(Language language);",
"public void setLanguage(String language)\n\t{\n\t\tthis.language = language;\n\t}",
"public boolean isInDictionary(String word, Language language) {\n if (isInDictionaryWithLabelAskQuery(word, language)) return true;\n else return isInDictionaryWithAltLabelAskQuery(word, language);\n }",
"public interface LanguageProvider {\n\tLanguageService study();\n}"
] | [
"0.7770526",
"0.7495158",
"0.6855557",
"0.68139386",
"0.64604986",
"0.6217088",
"0.6190021",
"0.60876197",
"0.6047855",
"0.59250414",
"0.5894312",
"0.5856865",
"0.5853507",
"0.5853507",
"0.5853507",
"0.58025926",
"0.57952344",
"0.5792828",
"0.5766281",
"0.57075095",
"0.56928146",
"0.56748974",
"0.5634091",
"0.561379",
"0.5592259",
"0.5580197",
"0.5580166",
"0.55711824",
"0.5568949",
"0.55443966",
"0.5491802",
"0.54494303",
"0.54436976",
"0.54386866",
"0.5421377",
"0.5351277",
"0.5351277",
"0.5350017",
"0.5330576",
"0.5330576",
"0.5324983",
"0.52905416",
"0.5285728",
"0.5274626",
"0.5274626",
"0.5274626",
"0.52452916",
"0.52197",
"0.52163315",
"0.5199135",
"0.51969546",
"0.5153308",
"0.51433635",
"0.5139648",
"0.5132259",
"0.5120789",
"0.51146835",
"0.5093356",
"0.50771064",
"0.50576156",
"0.50540817",
"0.5046416",
"0.5032739",
"0.50230956",
"0.49902478",
"0.49878505",
"0.49569172",
"0.49413678",
"0.49392942",
"0.49336335",
"0.49304068",
"0.49304068",
"0.49289945",
"0.49289086",
"0.49160266",
"0.49113157",
"0.49041528",
"0.49021453",
"0.48907125",
"0.48814124",
"0.4879911",
"0.4879911",
"0.48766664",
"0.48657167",
"0.48636395",
"0.48522013",
"0.48456705",
"0.48387057",
"0.48305342",
"0.48250794",
"0.482068",
"0.48156413",
"0.48148826",
"0.4810669",
"0.48093596",
"0.48044756",
"0.48035473",
"0.48010498",
"0.47985056",
"0.47979188"
] | 0.7246087 | 2 |
Invoked when any PSI change happens in any of the PSI files corresponding to this view provider. | void rootChanged(@NotNull PsiFile psiFile); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void selectionChanged(@Nonnull final FileEditorManagerEvent event) {\n PsiDocumentManager.getInstance(myProject).performWhenAllCommitted(() -> {\n updateHistoryEntry(event.getOldFile(), event.getOldEditor(), event.getOldProvider(), false);\n updateHistoryEntry(event.getNewFile(), true);\n });\n }",
"@Override\r\n\t\t\tpublic void onPropertyChange(String... paths) {\n\t\t\t\t\r\n\t\t\t}",
"private void notifyListeners() {\n IDisplayPaneContainer container = (IDisplayPaneContainer) activeEditorMap\n .get(currentWindow);\n for (IVizEditorChangedListener listener : changeListeners) {\n listener.editorChanged(container);\n }\n }",
"@Override\n public void fileStatusesChanged() {\n assertDispatchThread();\n LOG.debug(\"FileEditorManagerImpl.MyFileStatusListener.fileStatusesChanged()\");\n final VirtualFile[] openFiles = getOpenFiles();\n for (int i = openFiles.length - 1; i >= 0; i--) {\n final VirtualFile file = openFiles[i];\n LOG.assertTrue(file != null);\n ApplicationManager.getApplication().invokeLater(() -> {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"updating file status in tab for \" + file.getPath());\n }\n updateFileStatus(file);\n }, IdeaModalityState.NON_MODAL, myProject.getDisposed());\n }\n }",
"@Override\n public void fileChanged(FileChangeEvent fileChangeEvent) throws Exception {\n\n }",
"void handleChanged(Collection<AGStoredFile> existingFiles, Collection<AGStoredFile> changedFiles);",
"protected void fileHasChanged(File file) {\n NSMutableSet observers = (NSMutableSet)_observersByFilePath.objectForKey(cacheKeyForFile(file));\n if (observers == null)\n log.warn(\"Unable to find observers for file: {}\", file);\n else {\n NSNotification notification = new NSNotification(FileDidChange, file);\n for (Enumeration e = observers.objectEnumerator(); e.hasMoreElements();) {\n _ObserverSelectorHolder holder = (_ObserverSelectorHolder)e.nextElement();\n try {\n holder.selector.invoke(holder.observer, notification);\n } catch (Exception ex) {\n log.error(\"Catching exception when invoking method on observer: {}\", ex, ex);\n }\n }\n registerLastModifiedDateForFile(file); \n }\n }",
"@Override\n public void refreshUI(final List<OIFitsFile> oifitsFiles) {\n for (OIFitsFile oifitsFile : oifitsFiles) {\n // fire OIFitsCollectionChanged:\n addOIFitsFile(oifitsFile);\n }\n }",
"public void fireModelChanged() {\n if (enabled)\n for (IInifileChangeListener listener : getListeners())\n listener.modelChanged();\n }",
"protected void initModifiedListeners()\n\t{\n\t\tif (path != null)\n\t\t{\n\t\t\tpath.addModifiedListener(this);\n\t\t}\n\t}",
"@Override\n public void eventsChanged() {\n }",
"public void pathChanged(){\r\n ctrlDomain.pathChanged();\r\n }",
"private void handleViewChanged(Viewer view, ViewChangeType type)\n {\n for (final GeometryProcessor<? extends Geometry> proc : myGeometryProcessorsSnapshot)\n {\n if (proc instanceof AbstractProcessor)\n {\n ((AbstractProcessor<? extends Geometry>)proc).handleViewChanged(view, type);\n }\n }\n }",
"public void projectModified() { }",
"public void projectModified() { }",
"@Override\n public void refreshUI(final List<OIFitsFile> oifitsFiles) {\n // add OIFits files to collection = fire OIFitsCollectionChanged:\n super.refreshUI(oifitsFiles);\n\n listener.done(false);\n }",
"protected void repositoryMetadataChanged() {\n }",
"public void projectRunnableChanged() { }",
"public void projectRunnableChanged() { }",
"public void changedUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) {\n }",
"private void notifyChange() {\n\t\tif (OllieProvider.isImplemented()) {\n\t\t\tOllie.getContext().getContentResolver().notifyChange(OllieProvider.createUri(getClass(), id), null);\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t}",
"public void updateAllViews()\r\n { for (IView view : this.views)\r\n { view.updateView();\r\n }\r\n }",
"@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}",
"protected final void notifyContentChanged() {\n // notify all listeners (including parents)\n for (DialogModuleChangeListener listener : listeners) {\n listener.onContentChanged();\n }\n }",
"@Override\n public void changedUpdate(DocumentEvent e) {\n verifierSaisie();\n }",
"@Override\n\tpublic void onViewChanged(JFrame frame) {\n\t\tupdateCourses();\n\t}",
"public void changed() {\n // from ChangeHandler\n configSave.enable();\n }",
"public void projectWorkDirChanged() { }",
"public void projectWorkDirChanged() { }",
"private void fireRebuildPerformedEvent() {\r\n final Vector listeners = getProjectChangedListeners();\r\n final Enumeration enumer = listeners.elements();\r\n while (enumer.hasMoreElements()) {\r\n final ProjectChangedListener listener = (ProjectChangedListener) enumer.\r\n nextElement();\r\n listener.rebuildPerformed(getProject());\r\n }\r\n }",
"private void updateFiles() {\n\t}",
"static void NotifyCorrespondingObservers() {}",
"private void dialogChanged() {\n\t\tIResource container = ResourcesPlugin.getWorkspace().getRoot()\n\t\t\t\t.findMember(new Path(getContainerName().get(\"ProjectPath\")));\n\n\t\tif(!containerSourceText.getText().isEmpty() && !containerTargetText.getText().isEmpty())\n\t\t{\n\t\t\tokButton.setEnabled(true);\n\t\t}\n\n\t\tif (getContainerName().get(\"ProjectPath\").length() == 0) {\n\t\t\tupdateStatus(\"File container must be specified\");\n\t\t\treturn;\n\t\t}\n\t\tif (container == null\n\t\t\t\t|| (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {\n\t\t\tupdateStatus(\"File container must exist\");\n\t\t\treturn;\n\t\t}\n\t\tif (!container.isAccessible()) {\n\t\t\tupdateStatus(\"Project must be writable\");\n\t\t\treturn;\n\t\t}\n\t\tupdateStatus(null);\n\t}",
"private void addFileOpenListener() {\n\t\tview.addFileOpenListener(new FileOpenListener());\n\t}",
"protected void _notifyInterpreterChanged(final boolean inProgress) {\n for (int i=0; i < _listeners.size(); i++) {\n ((InteractionsListener)_listeners.get(i)).interpreterChanged(inProgress);\n }\n }",
"@Override\n\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\tchange();\n\t\t\t\t}",
"@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t}",
"@Override\n public void fileStatusChanged(@Nonnull final VirtualFile file) {\n assertDispatchThread();\n if (isFileOpen(file)) {\n updateFileStatus(file);\n }\n }",
"public void modelsChanged(IModelProviderEvent event);",
"final void fireListeners(){\n /// Fire target edited listeners\n if (editedTarget){\n fire(spanEditedListeners);\n editedTarget = false;\n }\n\n /// Fire child edited listeners\n if (editedChild){\n fire(childEditedListeners);\n editedChild = false;\n }\n\n /// Fire doc edited listeners\n fire(docEditedListeners);\n\n /// Recusive call\n for (Span span: this){\n if (span instanceof SpanNode){\n ((SpanNode<?>)span).fireListeners();\n }\n }\n }",
"@Override\n\tpublic void refreshAvailableProcedures()\n\t{\n\t\tm_models.obtainAvailableProcedures(true);\n\t}",
"private void notifyViews(Event event) {\n // Notify the views. This must be done in the UI thread,\n // since views might have to redraw themselves\n new Handler(Looper.getMainLooper()).post\n (() -> MVC.forEachView(view -> view.onModelChanged(event)));\n }",
"@Override\n public void saveFile() {\n LOG.fine(\"no.of viewers:\" + viewers.size());\n // assuming the widget that is active is the dirty widget. save it\n for (FileViewer viewer : viewers) {\n if (viewer.isDirty()) {\n saveFile(viewer);\n break;\n }\n }\n }",
"@Override\n\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\n\t\t}",
"@Override\r\n public void changedUpdate(DocumentEvent e)\r\n {\n }",
"public void resourceChanged(final IResourceChangeEvent event) {\n\t\tif (event.getType() == IResourceChangeEvent.POST_CHANGE) {\n\t\t\tif (event.getDelta() != null) {\n\t\t\t\tif (event.getDelta().getKind() == IResourceDelta.CHANGED || event.getDelta().getKind() == IResourceDelta.REMOVED) {\n\t\t\t\t\tDisplay.getDefault().asyncExec(new Runnable() {\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tpageMainEditor.refreshLstClasses();\n\t\t\t\t\t\t\tpageMainEditor.updateBuildPathStatus(getEditor(1));\n\t\t\t\t\t\t\tpageMainEditor.checkCache();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (event.getType() == IResourceChangeEvent.PRE_CLOSE) {\n\t\t\tDisplay.getDefault().asyncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIWorkbenchPage[] pages = getSite().getWorkbenchWindow().getPages();\n\t\t\t\t\tfor (int i = 0; i < pages.length; i++) {\n\t\t\t\t\t\tif (((FileEditorInput) editor.getEditorInput()).getFile().getProject().equals(event.getResource())) {\n\t\t\t\t\t\t\tIEditorPart editorPart = pages[i].findEditor(editor.getEditorInput());\n\t\t\t\t\t\t\tpages[i].closeEditor(editorPart, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"protected void updateDisplay() {\n\t\t\t// this is called when upload is completed\n\n\t\t\tString filename = getLastFileName();\n\t\t\tfor (SetupMapViewListener listener : listeners)\n\t\t\t\tlistener.shapeFileUploadedEvent(filename, new ByteArrayInputStream((byte[]) getValue()));\n\t\t}",
"private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}",
"public void activeCompilerChanged() { }",
"protected void notifyChangeListeners() { \n Utilities.invokeLater(new Runnable() {\n public void run() { for(ChangeListener l: _changeListeners) l.apply(this); }\n });\n }",
"private void \n doMethodChanged()\n {\n int idx = pMasterMethodField.getSelectedIndex();\n for(JCollectionField field : pMethodFields.values()) \n field.setSelectedIndex(idx);\n }",
"@FXML\r\n private void onRefresh() {\n HomeLibrary.refreshBooks();\r\n HomeLibrary.refreshAuthors();\r\n HomeLibrary.refreshGenres();\r\n HomeLibrary.refreshPublishingHouses();\r\n HomeLibrary.refreshFriends();\r\n\r\n HomeLibrary.getLibraryOverviewController().refreshOverallInfo();\r\n HomeLibrary.getBookOverviewController().refreshBooks();\r\n HomeLibrary.getGenresOverviewController().refreshGenres();\r\n HomeLibrary.getPubHousesOverviewController().refreshPubHouses();\r\n HomeLibrary.getFriendsOverviewController().refreshFriends();\r\n }",
"public void fireListenersOnPaths(Collection<IPath> pathList) {\r\n\t\tfor (Pair<IPath, IResourceChangeHandler> entry : trackedResources) {\r\n\t\t\tif (pathList.contains(entry.first)) {\r\n\t\t\t\tentry.second.resourceChanged(entry.first);\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}",
"@Override\n\t\t\t\tpublic void changedUpdate(final DocumentEvent e) {\n\t\t\t\t}",
"public void tellChanged(QueryView view) {\n updateQueryView(view);\n }",
"public void classListChanged();",
"public void changedUpdate(DocumentEvent event) {\n\t\t\t}",
"@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}",
"private void handleProjectionChanged(ProjectionChangedEvent evt)\n {\n mySpecializedProcessorsLock.readLock().lock();\n try\n {\n myProjectionSyncManager.setProjectionSnapshot(evt.getProjectionSnapshot());\n for (final GeometryProcessor<? extends Geometry> proc : myProjectionSensitiveProcessors.values())\n {\n proc.handleProjectionChanged(evt);\n }\n }\n finally\n {\n mySpecializedProcessorsLock.readLock().unlock();\n }\n }",
"@Override\n\tpublic void settingsChanged(AbstractSettings settings) {\n\t}",
"public abstract void modelStructureChanged();",
"@Override\n public void notify(String newFileContent) {\n Repository.getRepositoryInstance().updateStockOrders(newFileContent);\n//end of modifiable zone..................E/a170c128-ca49-4fc4-abdd-43b714481007\n }",
"void resourceChanged(IPath workspacePath);",
"public void changedUpdate(DocumentEvent e)\n {\n performFlags();\n }",
"@Override\n public void notifyChange(Path path) {\n if (path.toString().equals(JOSSO_GATEWAY_CONFIGURATION.getName())) {\n configureAccessTokens();\n log.debug(\"AuthService reloaded configuration on change to \"+JOSSO_GATEWAY_CONFIGURATION);\n } else if (path.toString().equals(FOUNDATION_CONFIGURATION.getName())) {\n configure();\n log.debug(\"AuthService reloaded configuration on change to \"+FOUNDATION_CONFIGURATION);\n }\n }",
"public void update() {\n\t\tthis.editorView.update();\n\t}",
"private void dialogChanged() {\n\t\tIResource ecoreFile = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getEcoreProjectName() + \"/\" + getEcoreFilePath()));\n\t\tString fileName = getFileName();\n\t\tString diagramId = getDiagramId();\n\n\t\tif (getEcoreFilePath().length() == 0) {\n\t\t\tupdateStatus(\"Ecore file must be specified. Please select an .ecore file in the workspace when launching this wizard.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!(ecoreFile instanceof IFile && ((IFile) ecoreFile).getFileExtension().equals(\"ecore\"))) {\n\t\t\tupdateStatus(\"Ecore file must have .ecore extension\");\n\t\t\treturn;\n\t\t}\n\n\t\t//\t\tIResource ecoreFile = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(page.getEcoreProjectName() + \"/\" + page.getEcoreFilePath()));\n\t\tResourceSet rs = new ResourceSetImpl();\n\n\t\tURI modelLocation = URI.createFileURI(ecoreFile.getLocation().toString());\n\t\tResource resource = rs.getResource(modelLocation, true);\n\t\tePackage = (EPackage) resource.getContents().get(0);\n\n\t\tint rootSel = rootCombo.getSelectionIndex();\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (EClassifier eClassifier : ePackage.getEClassifiers()) {\n\t\t\tif(eClassifier instanceof EClass && !((EClass) eClassifier).isAbstract())\n\t\t\t\tlist.add(eClassifier.getName());\n\t\t}\n\t\trootCombo.setItems(list.toArray(new String[list.size()]));\n\t\tif(list.size() == 0) {\n\t\t\tupdateStatus(\"Ecore model must contain at least one class\");\n\t\t\treturn;\n\t\t}\n\t\telse if(rootSel != -1) {\n\t\t\trootCombo.select(rootSel);\n\t\t}\n\t\telse {\n\t\t\trootCombo.select(0);\n\t\t}\n\n\t\tif(getProjectName().isEmpty()) {\n\t\t\tupdateStatus(\"Project name must be defined.\");\n\t\t\treturn;\n\t\t}\n\t\telse if(ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectName()).exists()) {\n\t\t\tupdateStatus(\"A project exists in the workspace with the specified name.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (fileName.length() == 0) {\n\t\t\tupdateStatus(\"File name must be specified\");\n\t\t\treturn;\n\t\t}\n\t\tif (fileName.replace('\\\\', '/').indexOf('/', 1) > 0) {\n\t\t\tupdateStatus(\"File name must be valid\");\n\t\t\treturn;\n\t\t}\n\t\tint dotLoc = fileName.lastIndexOf('.');\n\t\tif (dotLoc != -1) {\n\t\t\tString ext = fileName.substring(dotLoc + 1);\n\t\t\tif (!ext.equals(\"xdia\")) {\n\t\t\t\tupdateStatus(\"File extension of Xdiagram specification must be \\\"xdia\\\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tupdateStatus(\"File extension of Xdiagram specification must be \\\"xdia\\\"\");\n\t\t\treturn;\n\t\t}\n\n\t\tif(!diagramId.matches(\"[a-zA-Z]+\")) {\n\t\t\tupdateStatus(\"Diagram id must be an identifier composed only of letter characters\");\n\t\t\treturn;\n\t\t}\n\n\t\tupdateStatus(null);\n\t}",
"@Override\n public void refreshUI(final List<OIFitsFile> oifitsFiles) {\n // first reset if this we do not add files only:\n if (!appendOIFitsFilesOnly) {\n reset();\n }\n\n // add OIFits files to collection = fire OIFitsCollectionChanged:\n super.refreshUI(oifitsFiles);\n\n if (!appendOIFitsFilesOnly) {\n postLoadOIFitsCollection(file, oiDataCollection, checker);\n }\n\n listener.done(false);\n }",
"@Override\n\tpublic void changedUpdate(DocumentEvent de) {\n\n\t}",
"@Override\n\tpublic void valueChanged(TreeSelectionEvent e) {\n\n\t\tTreePath path = e.getPath();\n\t\t/**\n\t\t * provera sta je selektovano ako nije Project, ikona za new diag je\n\t\t * iskljucena\n\t\t */\n\t\tif (path.getLastPathComponent() instanceof Diagram\n\t\t\t\t|| path.getLastPathComponent() instanceof Workspace) {\n\t\t\tMainFrame.getInstance().getActionManager().getFileNewDiagAction()\n\t\t\t\t\t.setEnabled(false);\n\n\t\t} else {\n\t\t\tMainFrame.getInstance().getActionManager().getFileNewDiagAction()\n\t\t\t\t\t.setEnabled(true);\n\n\t\t}\n\n\t\t/**\n\t\t * prolazak kroz kolekciju dijagrama i provera koji diag ce doci u fokus\n\t\t */\n\t\tfor (int i = 0; i < path.getPathCount(); i++) {\n\t\t\tif (path.getPathComponent(i) instanceof Diagram) {\n\t\t\t\tdiag = (Diagram) path.getPathComponent(i);\n\t\t\t\tString dname = diag.getName();\n\n\t\t\t\tJInternalFrame[] allframes = MainFrame.getInstance()\n\t\t\t\t\t\t.getDesktop().getAllFrames();\n\n\t\t\t\tfor (int j = 0; j < allframes.length; j++) {\n\t\t\t\t\tif (dname == allframes[j].getName()) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tallframes[j].setSelected(true);\n\t\t\t\t\t\t\tallframes[j].setVisible(true);\n\t\t\t\t\t\t} catch (PropertyVetoException e1) {\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"private static void informListeners() {\r\n\t\tfor (ATEListener l : listeners) {\r\n\t\t\tl.classListChanged( );\r\n\t\t}\r\n\t}",
"public interface Listener\n extends AbstractPasswdSafeFileDataFragment.Listener\n {\n /** Update the view */\n void updateViewPrefLicenses();\n }",
"@Override\n public void notifyStructureObservers() {\n for(StructureObserver structureObserver : structureObservers){\n structureObserver.update(entities.returnStructureRenderInformation());\n }\n }",
"public void run() {\n if (infomap.containsKey(\"updateListFiles\")) {\n tblDocChanges.setModel(new DocumentApproveRejectChangesTableModel());\n List<String> odfdocs =\n (List<String>) infomap.get(\"updateListFiles\");\n changesInfo.reload(odfdocs.toArray(new String[odfdocs.size()]));\n ((DocApproveRejectListModel) listMembers.getModel()).resetModel();\n\n }\n\n if (infomap.containsKey(\"updateListFile\")) {\n tblDocChanges.setModel(new DocumentApproveRejectChangesTableModel());\n String odfdoc = (String) infomap.get(\"updateListFile\");\n changesInfo.reload(odfdoc);\n ((DocApproveRejectListModel) listMembers.getModel()).resetModel();\n }\n }",
"public void changedUpdate(DocumentEvent e) {\n\n\t}",
"public void onAnnotationsModified(Map<Annot, Integer> annots, Bundle extra) {\n/* 348 */ if (annots == null || annots.size() == 0 || !this.mPdfViewCtrl.isUndoRedoEnabled()) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 354 */ JSONObject result = prepareAnnotSnapshot(annots, AnnotAction.MODIFY, this.mPreModifyAnnotRect, this.mPreModifyPageNum);\n/* 355 */ this.mPreModifyAnnotRect = null;\n/* 356 */ takeAnnotSnapshot(result);\n/* 357 */ if (this.mToolManager.getAnnotManager() != null) {\n/* 358 */ this.mToolManager.getAnnotManager().onLocalChange(\"modify\");\n/* */ }\n/* */ }",
"protected void fireDateChanged() {\n\t\tfor(ReadingPointListener l : listeners) l.dateChanged(this);\n\t}",
"void firePluginsMonitored()\n {\n // Set that at least one iteration was done. That means that \"all available\" plugins\n // have been loaded by now.\n if ( !XMPPServer.getInstance().isSetupMode() )\n {\n executed = true;\n }\n\n for ( final PluginManagerListener listener : pluginManagerListeners )\n {\n firePluginsMonitored(listener);\n }\n }",
"private Vector getProjectChangedListeners() {\r\n return this.projectChangedListeners;\r\n }",
"public void projectOpened(File pfile, FileOpenSelector files) { }",
"public void notifyChange()\r\n {\r\n setChanged();\r\n notifyObservers();\r\n }",
"@Override\n\tpublic void changedUpdate(DocumentEvent e)\n\t{\n\t\t\n\t}",
"private static void fireMazeChanged() {\r\n\t\tfor (ATEListener l : listeners) {\r\n\t\t\tl.mazeChanged(currentMaze);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void selectionChanged(IAction action, ISelection selection) {\r\n\t\tif (selection instanceof IStructuredSelection) {\r\n\t\t\tIStructuredSelection ssel = (IStructuredSelection) selection;\r\n\t\t\tObject obj = ssel.getFirstElement();\r\n\t\t\tif (obj != null) {\r\n\t\t\t\tIFile file = (IFile) Platform.getAdapterManager().getAdapter(obj, IFile.class);\r\n\t\t\t\tif (file == null) {\r\n\t\t\t\t\tif (obj instanceof IAdaptable) {\r\n\t\t\t\t\t\tfile = (IFile) ((IAdaptable) obj).getAdapter(IFile.class);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (file != null) {\r\n\t\t\t\t\tString fileExtension = file.getFileExtension();\r\n\t\t\t\t\t//If file is of type Papyrus diagram, call getUMLModelOfDI method to set the selectedFile variable\r\n\t\t\t\t\tif (\"di\".equals(fileExtension)) {\r\n\t\t\t\t\t\tselectedFile = getUMLModelOfDI(file);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tselectedFile = file;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//If the file is null, it might be of type PapyrusFile, then the uml file is found by passing mainFile to the getUMLModelOfDI method\r\n\t\t\t\telse {\r\n\t\t\t\t\tIPapyrusFile papyrusFile = (IPapyrusFile) Platform.getAdapterManager().getAdapter(obj, IPapyrusFile.class);\r\n\t\t\t\t\tif (papyrusFile != null) {\r\n\t\t\t\t\t\tselectedFile = getUMLModelOfDI(papyrusFile.getMainFile());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tIProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(selectedFile.getProject().getName());\r\n\t\t\t\tReportGenerator.INSTANCE.setProject(project);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected void childrenChanged() {\n\n }",
"private void updateView(File selectedFile) {\n\n if (selectedFile != null && selectedFile != currentFile) {\n currentFile = selectedFile;\n setFileDetails(currentFile);\n previewFile(currentFile);\n }\n\n if (currentFile.isDirectory()) {\n view.getFileOperations().disableFileOperations();\n } else {\n enableFileOperations();\n }\n }",
"@Override\n\tpublic void staticByViewListener() {\n\t\t\n\t}",
"public void notifyObservers(){\n\t\tfor (ModelObserver c : controllers){\n\t\t\tc.update();\n\t\t}\n\t}",
"private void firePageChangedEvent() {\r\n\t\tfor (PaginatorListener listener : listeners) {\r\n\t\t\tlistener.pageChanged(new PageChangedEvent(this, page, getStartIndex(), getTotalPages(), pageSize));\r\n\t\t}\r\n\t}",
"@Override\n void notesUpdated(int nSlideIndex) {\n }",
"public interface ProjectDiagramListener {\n\n /**\n * Listener method. Whenever any publishable change occurs, this method of all listeners is invoked.\n *\n * @param change is an object holding info about the change\n *\n * @see cz.cvut.promod.services.projectService.treeProjectNode.ProjectDiagramChange\n */\n public void changePerformed(final ProjectDiagramChange change);\n}",
"public void projectBuildDirChanged() { }",
"public void projectBuildDirChanged() { }",
"public void notifyObservers() {}",
"protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"@Override\n\t\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\t\tint selectedIndex = methodsList.getSelectedIndex();\n\t\t\t\t\n\t\t\t\tif (selectedIndex == -1) {\n\t\t\t\t\t// Si es -1, es porque no hay nada seleccionado\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// En este caso ya sabemos que hay algo que esta \n\t\t\t\t// seleccionado, de modo que podemos obtener el metodo seleccionado!\n\t\t\t\tMethod selectedMethod = methodFinder.getMethods().get(selectedIndex);\n\t\t\t\t\n\t\t\t\tservicios = new ArrayList<CodeInspectionService>();\n\t\t\t\t\n\t\t\t\t// Agregamos todos los servicios que necesitamos para analizar el codigo.\n\t\t\t\t// Cada vez que el programa pase por una linea, la enviará\n\t\t\t\t// a todos los servicios que esten registrados.\n\t\t\t\t// Los servicios entonces van a procesar esa linea y van a registrar\n\t\t\t\t// los resultados en un objeto CodeMetric.\n\t\t\t\t\n\t\t\t\t// Con este servicio contamos las lineas de codigo.\n\t\t\t\tservicios.add(new CodeLinesNumberInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos las lineas comentadas\n\t\t\t\tservicios.add(new CommentedLinesInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos la complejidad ciclomatica\n\t\t\t\tservicios.add(new CyclomaticComplexityInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos Halstead (?) quizas esto tengamos que separarlo en \n\t\t\t\t// otros servicios mas pequeños, porque hay varias metricas de halstead\n\t\t\t\tservicios.add(new HalsteadInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos el Fan In del metodo seleccionado\n\t\t\t\t// Fan in es la cantidad de veces que ese metodo\n\t\t\t\t// es invocado desde afuera\n\t\t\t\tservicios.add(new FanInInspectionService(methodFinder.getMethods(), selectedMethod));\n\t\t\t\t\n\t\t\t\t// Contamos el Fan Out del metodo seleccionado\n\t\t\t\t// Fan out es la cantidad de veces que el metodo seleccionado\n\t\t\t\t// llama a otros metodos.\n\t\t\t\tservicios.add(new FanOutInspectionService(methodFinder.getMethods(), selectedMethod));\n\t\t\t\t\n\t\t\t\tIterator<String> methodLinesIterator = selectedMethod.getLines().iterator();\n\t\t\t\twhile(methodLinesIterator.hasNext()) {\n\t\t\t\t\tString line = methodLinesIterator.next();\n\t\t\t\t\tfor (CodeInspectionService servicio : servicios) {\n\t\t\t\t\t\tservicio.analyzeLine(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tfor (CodeInspectionService servicio : servicios) {\n\t\t\t\t\tCodeMetric metrica = servicio.getMetric();\n\t\t\t\t\tsb.append(metrica.getName() + \": \" + metrica.getValue() + \"\\n\");\n\t\t\t\t}\n\t\t\t\teditorTextArea.setText(sb.toString());\n\t\t\t\t\n\t\t\t\t// Imprimimos el codigo en pantalla\n\t\t\t\t// para mostrar el metodo que estamos analizando.\n\t\t\t\tcodeTextArea.setText(selectedMethod.toString());\n\t\t\t\t\n\t\t\t}",
"protected void applyNewStatements() {\r\n\t\tbldInfView.updateCurrentDirectory(bldInfView.getModel().getPath());\r\n\r\n\t\tapplyNewListArgumentStatements();\r\n\t\tapplyNewBlockStatements();\r\n\t}",
"public void run() {\n\t\tISelection selection = viewer.getSelection();\n\t\tif (selection.isEmpty()) {\n\t\t\tthis.setEnabled(false);\n\t\t}\n\t\tTreeObject object = (TreeObject) ((IStructuredSelection) selection)\n\t\t\t\t.getFirstElement();\n\t\tif (object instanceof DocumentTreeObject) {\n\n\t\t\tString oldValue = object.getValue().toString();\n\t\t\t\n\t\t\tIInputValidator validator = new TextValidator(oldValue);\n\t\t\tInputDialog dialog = new InputDialog(parent.getShell(), Properties\n\t\t\t\t\t.getProperty(\"rename\"), Properties.getProperty(\"new_name\"),\n\t\t\t\t\toldValue, validator);\n\t\t\tdialog.setBlockOnOpen(true); // waits for user enter a name\n\n\t\t\tint res = dialog.open(); // opens the rename dialog\n\n\t\t\tif (res == InputDialog.OK) {\n\t\t\t\tString newValue = dialog.getValue();\n\t\t\t\t\n\t\t\t\tString newExtension = GUIUtil.getFileExtension(newValue);\n\t\t\t\tString oldExtension = GUIUtil.getFileExtension(oldValue);\n\t\t\t\t\t\t\n\t\t\t\tif(!newExtension.equalsIgnoreCase(oldExtension)){\n\t\t\t\t\tnewValue += oldExtension;\n\t\t\t\t}\n\n\t\t\t\tif (!newValue.equalsIgnoreCase(oldValue)) {\n\t\t\t\t\tif (!ProjectManagerController.getInstance().renameDocument(\n\t\t\t\t\t\t\toldValue, newValue)) {\n\t\t\t\t\t\tMessageDialog.openError(parent.getShell(), Properties\n\t\t\t\t\t\t\t\t.getProperty(\"error_while_renaming\"),\n\t\t\t\t\t\t\t\tProperties.getProperty(\"can_not_rename\"));\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tGUIManager.getInstance().refreshViews();\n\t\t\t\t\t} catch (TargetException e) {\n\t\t\t\t\t\tMessageDialog\n\t\t\t\t\t\t\t\t.openError(\n\t\t\t\t\t\t\t\t\t\tthis.parent.getShell(),\n\t\t\t\t\t\t\t\t\t\tProperties\n\t\t\t\t\t\t\t\t\t\t\t\t.getProperty(\"error_while_reloading_project\"),\n\t\t\t\t\t\t\t\t\t\te.getMessage());\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void onNewDirLoaded(File dirFile);"
] | [
"0.62063754",
"0.60709685",
"0.59891546",
"0.59495616",
"0.5896519",
"0.5737799",
"0.5735522",
"0.56930524",
"0.56564736",
"0.56133825",
"0.5605059",
"0.5557413",
"0.5528821",
"0.55024207",
"0.55024207",
"0.5486462",
"0.5486067",
"0.54320383",
"0.54320383",
"0.54267454",
"0.54230803",
"0.5396386",
"0.53662825",
"0.5361428",
"0.53443915",
"0.5303166",
"0.5303041",
"0.52778363",
"0.5267188",
"0.5267188",
"0.5260094",
"0.5259104",
"0.52295285",
"0.5225883",
"0.5225651",
"0.5224922",
"0.5216842",
"0.5215455",
"0.5209845",
"0.5209424",
"0.52003723",
"0.5199925",
"0.51911545",
"0.5177501",
"0.51633346",
"0.51616037",
"0.5158552",
"0.51552665",
"0.51546997",
"0.51528585",
"0.5130227",
"0.51290697",
"0.5119903",
"0.51087064",
"0.5107453",
"0.51072985",
"0.5102528",
"0.50936353",
"0.50838",
"0.5082004",
"0.5081787",
"0.5076401",
"0.50743634",
"0.50632924",
"0.5051814",
"0.50516945",
"0.5046595",
"0.5045382",
"0.5042526",
"0.50383854",
"0.5026298",
"0.50108826",
"0.5009713",
"0.50066423",
"0.5001503",
"0.49981233",
"0.49957767",
"0.49941024",
"0.49914664",
"0.49852172",
"0.49798965",
"0.49767286",
"0.49750286",
"0.49694574",
"0.49686006",
"0.4968555",
"0.4968158",
"0.49624407",
"0.4961772",
"0.49607053",
"0.49593246",
"0.49560484",
"0.49508846",
"0.49508846",
"0.4947785",
"0.49388584",
"0.49335802",
"0.49285007",
"0.49282432",
"0.49282378"
] | 0.6000532 | 2 |
Invoked before document or VFS changes are processed that affect PSI inside the corresponding file. | void beforeContentsSynchronized(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void rootChanged(@NotNull PsiFile psiFile);",
"@Override\n public void fileChanged(FileChangeEvent fileChangeEvent) throws Exception {\n\n }",
"private void updateFiles() {\n\t}",
"@Override\n public void changedUpdate(DocumentEvent e) {\n verifierSaisie();\n }",
"public void preCommitChanges() {\n if (onEditListener != null)\n onEditListener.onPreEdit();\n }",
"public void changedUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) {\n }",
"protected void initModifiedListeners()\n\t{\n\t\tif (path != null)\n\t\t{\n\t\t\tpath.addModifiedListener(this);\n\t\t}\n\t}",
"public void multiFileStartDocument() throws SAXException\r\n\t{\r\n\t\tsuper.startDocument();\r\n\t\ttagPath = new Stack<Path>();\r\n\t\ttagBeingIgnored = null;\r\n\t\tpassedARecord = false;\r\n\t}",
"public void setDirty() {\r\n\t\tif (LOG.isLoggable(Level.FINE)) { LOG.fine(\"setDirty\"); }\r\n\r\n \tif(clean) { fireFileCleanStatusChangedEvent(new FileChangeEvent(eventSource, false)); }\r\n \tfireFileChangedEvent(new FileChangeEvent(this, false));\r\n \tclean = false;\r\n }",
"@Override\n\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\tchange();\n\t\t\t\t}",
"public void saveBeforeCompile() { }",
"public void saveBeforeCompile() { }",
"@Override\n public void fileStatusesChanged() {\n assertDispatchThread();\n LOG.debug(\"FileEditorManagerImpl.MyFileStatusListener.fileStatusesChanged()\");\n final VirtualFile[] openFiles = getOpenFiles();\n for (int i = openFiles.length - 1; i >= 0; i--) {\n final VirtualFile file = openFiles[i];\n LOG.assertTrue(file != null);\n ApplicationManager.getApplication().invokeLater(() -> {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"updating file status in tab for \" + file.getPath());\n }\n updateFileStatus(file);\n }, IdeaModalityState.NON_MODAL, myProject.getDisposed());\n }\n }",
"public void performOperation() {\n processFile(this.scopedFile);\n }",
"@Override\n\t\t\t\tpublic void changedUpdate(final DocumentEvent e) {\n\t\t\t\t}",
"public void projectModified() { }",
"public void projectModified() { }",
"@Override\n\t\tpublic void documentAboutToBeChanged(DocumentEvent event) {\n\t\t\tTextDocumentContentChangeEvent changeEvent = toChangeEvent(event);\n\t\t\tif (changeEvent == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.change = new DidChangeTextDocumentParams();\n\t\t\tVersionedTextDocumentIdentifier doc = new VersionedTextDocumentIdentifier();\n\t\t\tdoc.setUri(fileURI.toString());\n\t\t\tdoc.setVersion(version);\n\t\t\tthis.change.setTextDocument(doc);\n\t\t\tthis.change.setContentChanges(Arrays.asList(new TextDocumentContentChangeEvent[] { changeEvent }));\n\t\t}",
"public void testModifyFile() throws Exception {\n System.out.print(\".. Testing file modification ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Current] (\" + userName + \")\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(workingDirectory + File.separator + \"Work\" + File.separator + \"A_File.java\"));\n writer.write(\"/** This is testing A_File.java file.\\n */\\n public class Testing_File {\\n int i;\\n }\\n\");\n writer.flush();\n writer.close();\n new OpenAction().perform(A_FileNode);\n new Action(VERSIONING_MENU + \"|\" + REFRESH, REFRESH).perform(A_FileNode);\n Thread.sleep(5000);\n A_FileNode = new Node( filesystemNode, \"A_File [Locally Modified] (\" + userName + \")\");\n System.out.println(\". done !\");\n }",
"@Override\n public void selectionChanged(@Nonnull final FileEditorManagerEvent event) {\n PsiDocumentManager.getInstance(myProject).performWhenAllCommitted(() -> {\n updateHistoryEntry(event.getOldFile(), event.getOldEditor(), event.getOldProvider(), false);\n updateHistoryEntry(event.getNewFile(), true);\n });\n }",
"public void visitFile(ICVSFile file) throws CVSException {\n \t\t\t\t}",
"public void saveBeforeJavadoc() { }",
"public void saveBeforeJavadoc() { }",
"@Override\n\tprotected void prepareChangeSetProcessing() {\n\t\t// change set processing is not supported for the product associations import\n\t}",
"@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t}",
"@Override\n protected void process() {\n final List<File> srtFiles = new FileFinder().collect(new File(Constants.FILEFIXER_ROOT_DIR), Constants.SRT_EXTENSION);\n\n // process each file, making a backup first if it is enabled\n for (final File srtFile : srtFiles) {\n System.out.println(\"Processing subtitle file :: \" + srtFile.getName());\n\n if (Constants.MAKE_BACKUPS) {\n backupFile(srtFile);\n }\n\n fix(srtFile);\n }\n }",
"void handleChanged(Collection<AGStoredFile> existingFiles, Collection<AGStoredFile> changedFiles);",
"public void fileReverted(OpenDefinitionsDocument doc) { }",
"public void fileReverted(OpenDefinitionsDocument doc) { }",
"@Override\r\n\tpublic void startDocument() throws SAXException\r\n\t{\r\n\t\t//\t\ttry \n\t\t//\t\t{\n\t\t//\t\t\tif (task.isMergeSourceFiles())\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\t//\r\n\t\t//\t\t\t}\r\n\t\t//\t\t\telse\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\tmultiFileStartDocument();\r\n\t\t//\t\t\t}\n\t\t//\t\t} \n\t\t//\t\tcatch (Exception e) \n\t\t//\t\t{\n\t\t//\t\t\tthrow new SAXException(\"Exception on starting document \", e);\n\t\t//\t\t}\r\n\t}",
"@Override\n public void notify(String newFileContent) {\n Repository.getRepositoryInstance().updateStockOrders(newFileContent);\n//end of modifiable zone..................E/a170c128-ca49-4fc4-abdd-43b714481007\n }",
"public final void run() {\t\n\t\tlong timeStamp = file.lastModified();\n\t if( this.timeStamp != timeStamp ) {\n\t \tthis.timeStamp = timeStamp;\n\t \tonChange(file);\n\t }\n\t}",
"public void changedUpdate(DocumentEvent e)\n {\n performFlags();\n }",
"public void reParse() {\r\n \r\n \t\tSystem.out.println(\"Starting reparse\");\r\n \r\n \t\t// to reparse an entire document\r\n \r\n \t\t// A. remove all document positions & problem markers\r\n \t\tSystem.out.println(\"DUMPING POSITIONS\");\r\n \t\tdumpPositions();\r\n \t\ttry {\r\n \t\t\tgetFile().deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO);\r\n \t\t\t_parseErrors.clear();\r\n \t\t} catch (CoreException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \r\n \t\t// if this is not set, the document is new and has never been parsed before.\r\n \t\tif (_doc == null) {\r\n \t\t\tgetProjectNature().addToModel(this);\r\n \t\t} else {\r\n \r\n \t\t\t// B. remove compilation unit from model tree\r\n \t\t\tif(Config.debug()) {\r\n \t\t\t System.out.println(\"removing compilation unit from tree\");\r\n \t\t\t}\r\n \t\t\t// C. remove Document from project\r\n \t\t\tif(Config.debug()) {\r\n \t\t\t\tSystem.out.println(\"Remove document from project\");\r\n \t\t\t}\r\n \t\t\tgetProjectNature().removeDocument(this);\r\n \r\n \t\t\t// D. Re-add Document to the project (wich will cause it to be parsed)\r\n \t\t\tif(Config.debug()) {\r\n \t\t\t System.out.println(\"Re-add document to project\");\r\n \t\t\t}\r\n \t\t\tNamespace root = getProjectNature().getModel();\r\n \t\t\tgetProjectNature().addModelElement(this, root);\r\n \t\t}\r\n \r\n \t\tSystem.out.println(\"Einde reparse\");\r\n \t}",
"@Override\r\n public void changedUpdate(DocumentEvent e)\r\n {\n }",
"protected void additionalProcessing() {\n\t}",
"@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t}",
"public void newFileCreated(OpenDefinitionsDocument doc) { }",
"public void newFileCreated(OpenDefinitionsDocument doc) { }",
"@Override\n\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\n\t\t}",
"private void setFile() {\n\t}",
"protected void runBeforeIteration() {}",
"@Override\n\tpublic void postExecution() throws CommandListenerException {\n\t\tString extraContents = \"0xbeef\";\n\t\tByteArrayInputStream inputStream = new ByteArrayInputStream(extraContents.getBytes());\n\t\tSourcesFile sources = fedoraProjectRoot.getSourcesFile();\n\t\tfor (String filename: sources.getAllSources()) {\n\t\t\tIFile sourceFile;\n\t\t\t\tsourceFile = (IFile)fedoraProjectRoot.getContainer().findMember(new Path(filename));\n\t\t\tif (sourceFile != null) {\n\t\t\t\ttry {\n\t\t\t\t\tsourceFile.appendContents(inputStream, IResource.FORCE, new NullProgressMonitor());\n\t\t\t\t} catch (CoreException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tfedoraProjectRoot.getContainer().refreshLocal(IResource.DEPTH_ONE, null);\n\t\t} catch (CoreException e) {\n\t\t\t// ignore\n\t\t}\n\n\t}",
"public void fireDocumentInit() {\n\t\tsuper.fireDocumentInit();\n\t\ttheStructures.fireDocumentInit();\n\t}",
"@Override\n\tpublic void changedUpdate(DocumentEvent de) {\n\n\t}",
"@Override\n\tpublic void setAutomataChanges() {\n\t\t\n\t}",
"@Override\n public void fileStatusChanged(@Nonnull final VirtualFile file) {\n assertDispatchThread();\n if (isFileOpen(file)) {\n updateFileStatus(file);\n }\n }",
"@Override\n\tpublic void svnLogPrepare() {\n\t}",
"public void testCheckinFile() throws Exception {\n System.out.print(\".. Testing checking in a file ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Locally Modified] (\" + userName + \")\");\n new Action(VERSIONING_MENU + \"|\" + CHECK_IN, CHECK_IN).perform(A_FileNode);\n CheckinCommandOperator checkinCommand = new CheckinCommandOperator(\"A_File.java\");\n checkinCommand.setChangeDescription(\"Three lines have changed.\");\n checkinCommand.ok();\n Thread.sleep(2000);\n A_FileNode = new Node(filesystemNode, \"A_File [Current]\");\n File A_File = new File(workingDirectory + File.separator + \"Work\" + File.separator + \"A_File.java\");\n if (A_File.canWrite()) captureScreen(\"Error: A_File.java remained read-write after check in.\");\n System.out.println(\". done !\");\n }",
"public void prepareForRun(OpenDefinitionsDocument doc) { }",
"@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void setEditedContent(CGFile file) {\n\n\t\t}",
"public void testChanges(String filePath) {\n Object[] fileObjectArray = fetchTextFile(filePath);\n String newFile = prepareText(fileObjectArray);\n System.out.println(newFile);\n }",
"@Override\n public void preRun() {\n super.preRun();\n }",
"protected void post_commit_hook() { }",
"@Override\n\tpublic void changedUpdate(DocumentEvent e)\n\t{\n\t\t\n\t}",
"protected void runBeforeIterations() {}",
"@Override\n\tpublic void startDocument() {\n\t\t\n\t}",
"@Override\n public void process(IeDocument document) {\n\n }",
"void documentFilePathUpdated(SingleDocumentModel model);",
"void documentFilePathUpdated(SingleDocumentModel model);",
"protected void applyNewStatements() {\r\n\t\tbldInfView.updateCurrentDirectory(bldInfView.getModel().getPath());\r\n\r\n\t\tapplyNewListArgumentStatements();\r\n\t\tapplyNewBlockStatements();\r\n\t}",
"private void doBeforeUpdateModel(final PhaseEvent arg0) {\n\t}",
"public void ProcessFiles() {\n LOG.info(\"Processing SrcML files ...\");\n final Collection<File> allFiles = ctx.files.AllFiles();\n int processed = 0;\n final int numAllFiles = allFiles.size();\n final int logDiv = Math.max(1, Math.round(numAllFiles / 100f));\n\n for (File file : allFiles) {\n final String filePath = file.filePath;\n final FilePath fp = ctx.internFilePath(filePath);\n\n Document document = readSrcmlFile(filePath);\n DocWithFileAndCppDirectives extDoc = new DocWithFileAndCppDirectives(file, fp, document, ctx);\n\n internAllFunctionsInFile(file, document);\n processFeatureLocationsInFile(extDoc);\n\n if ((++processed) % logDiv == 0) {\n int percent = Math.round((100f * processed) / numAllFiles);\n LOG.info(\"Parsed SrcML file \" + processed + \"/\" + numAllFiles\n + \" (\" + percent + \"%) (\" + (numAllFiles - processed) + \" to go)\");\n }\n }\n\n LOG.info(\"Parsed all \" + processed + \" SrcML file(s).\");\n }",
"public void changedUpdate(DocumentEvent e) {\n\n\t}",
"@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }",
"public void changed() {\n // from ChangeHandler\n configSave.enable();\n }",
"@Test\n public void testClassFieldModifierChange() {\n String fileBeforePath = FILE_DIR_FIX + \"0_CompilerConfiguration.java\";\n String fileAfterPath = FILE_DIR_FIX + \"1_CompilerConfiguration.java\";\n Commit testCommit = new Commit(fileBeforePath, fileAfterPath);\n\n // for this file only one change should be detected, in specific LOC\n assertEquals(Range.between(59, 59), testCommit.getChanges().get(0).getSrcNodeFineLOCs());\n assertEquals(Range.between(60, 60), testCommit.getChanges().get(0).getDstNodeFineLOCs());\n }",
"public void run() {\n\t\tISelection selection = viewer.getSelection();\n\t\tif (selection.isEmpty()) {\n\t\t\tthis.setEnabled(false);\n\t\t}\n\t\tTreeObject object = (TreeObject) ((IStructuredSelection) selection)\n\t\t\t\t.getFirstElement();\n\t\tif (object instanceof DocumentTreeObject) {\n\n\t\t\tString oldValue = object.getValue().toString();\n\t\t\t\n\t\t\tIInputValidator validator = new TextValidator(oldValue);\n\t\t\tInputDialog dialog = new InputDialog(parent.getShell(), Properties\n\t\t\t\t\t.getProperty(\"rename\"), Properties.getProperty(\"new_name\"),\n\t\t\t\t\toldValue, validator);\n\t\t\tdialog.setBlockOnOpen(true); // waits for user enter a name\n\n\t\t\tint res = dialog.open(); // opens the rename dialog\n\n\t\t\tif (res == InputDialog.OK) {\n\t\t\t\tString newValue = dialog.getValue();\n\t\t\t\t\n\t\t\t\tString newExtension = GUIUtil.getFileExtension(newValue);\n\t\t\t\tString oldExtension = GUIUtil.getFileExtension(oldValue);\n\t\t\t\t\t\t\n\t\t\t\tif(!newExtension.equalsIgnoreCase(oldExtension)){\n\t\t\t\t\tnewValue += oldExtension;\n\t\t\t\t}\n\n\t\t\t\tif (!newValue.equalsIgnoreCase(oldValue)) {\n\t\t\t\t\tif (!ProjectManagerController.getInstance().renameDocument(\n\t\t\t\t\t\t\toldValue, newValue)) {\n\t\t\t\t\t\tMessageDialog.openError(parent.getShell(), Properties\n\t\t\t\t\t\t\t\t.getProperty(\"error_while_renaming\"),\n\t\t\t\t\t\t\t\tProperties.getProperty(\"can_not_rename\"));\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tGUIManager.getInstance().refreshViews();\n\t\t\t\t\t} catch (TargetException e) {\n\t\t\t\t\t\tMessageDialog\n\t\t\t\t\t\t\t\t.openError(\n\t\t\t\t\t\t\t\t\t\tthis.parent.getShell(),\n\t\t\t\t\t\t\t\t\t\tProperties\n\t\t\t\t\t\t\t\t\t\t\t\t.getProperty(\"error_while_reloading_project\"),\n\t\t\t\t\t\t\t\t\t\te.getMessage());\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected void onChange_InitInfected() {\n onChange_InitInfected_xjal( InitInfected );\n }",
"@Override\r\n protected void parseDocuments()\r\n {\n\r\n }",
"public void fileOpened(OpenDefinitionsDocument doc) { }",
"public void fileOpened(OpenDefinitionsDocument doc) { }",
"private void onContentsChanged(IChangeEvent event) {\n IPosition fromPos = event.getFrom();\n int fromOffset = mapper.getOffset(fromPos.getLine(), fromPos.getChar());\n IPosition toPos = event.getTo();\n int toOffset = mapper.getOffset(toPos.getLine(), toPos.getChar());\n // Create a transformation that corresponds to the change.\n TransformBuilder builder = new TransformBuilder();\n builder.skip(fromOffset);\n if (fromOffset != toOffset)\n builder.delete(mapper.substring(fromOffset, toOffset));\n for (int i = 0; i < event.getTextLineCount(); i++) {\n if (i > 0)\n builder.insert(\"\\n\");\n builder.insert(event.getTextLine(i));\n }\n builder.skip(mapper.getLength() - toOffset);\n Transform transform = builder.flush();\n Assert.equals(mapper.getLength(), transform.getInputLength());\n for (IListener listener : listeners)\n listener.onChange(transform);\n doc.apply(transform);\n mapper.apply(transform);\n }",
"void doCF()\n {\n try\n {\n int module = propertyGet(LIST_MODULE);\n\t\t\tint currentLine = propertyGet(LIST_LINE);\n\n if (hasMoreTokens())\n {\n String arg = nextToken();\n module = parseFileArg(module, arg);\n\t\t\t\tcurrentLine = 1;\n setListingPosition(module, currentLine);\n }\n\n SourceFile sourceFile = m_fileInfo.getFile(module);\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(sourceFile.getName());\n\t\t\tsb.append('#');\n\t\t\tsb.append(sourceFile.getId());\n\t\t\tsb.append(':');\n\t\t\tsb.append(currentLine);\n\t\t\tout( sb.toString() );\n }\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noFilesFound\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(ParseException pe)\n\t\t{\n\t\t\terr(pe.getMessage());\n\t\t}\n\t\tcatch(AmbiguousException ae)\n\t\t{\n\t\t\terr(ae.getMessage());\n\t\t}\n\t\tcatch(NoMatchException nme)\n\t\t{\n\t\t\terr(nme.getMessage());\n\t\t}\n }",
"@Override\n public void handleEditStart ()\n {\n\n }",
"public void insertUpdate(DocumentEvent e) {\r\n changed();\r\n }",
"private void processFile(final FilePath filePath, final ChangelistBuilder builder)\r\n {\r\n String path = filePath.getPath();\r\n\r\n // Files that match with the ignored patterns are processed separately.\r\n if( host.isFileIgnored( filePath.getVirtualFile() ) )\r\n {\r\n filesIgnored.add( path );\r\n return;\r\n }\r\n\r\n com.starbase.starteam.File file = host.findFile( getSTCanonicPath( filePath ) );\r\n\r\n try\r\n {\r\n if( file == null )\r\n {\r\n if( !isFileUnderRenamedDir( path ) && isProperNotification( filePath ) )\r\n {\r\n filesNew.add( path );\r\n }\r\n }\r\n else\r\n {\r\n // In certain cases we still get status \"UNKNOWN\" (int 6) after the\r\n // particular amount of time (even after full resync). Try to refresh.\r\n try { file.updateStatus(false, true); }\r\n catch( Exception e )\r\n {\r\n // Nothing to do - if <updateStatus> throws an exception then most\r\n // probably we deal with latest version\r\n }\r\n\r\n int status = file.getStatus();\r\n if( status == Status.NEW )\r\n filesNew.add( path );\r\n else\r\n if( status == Status.MERGE )\r\n builder.processChange( new Change( new STContentRevision(host, filePath ), new CurrentContentRevision( filePath ), FileStatus.MERGE ),\r\n StarteamVcs.getKey());\r\n else\r\n if( status == Status.MODIFIED )\r\n filesChanged.add( path );\r\n else\r\n if( status == Status.MISSING )\r\n {\r\n // We have two source of information on locally deleted files:\r\n // - one is stored in StarteamVcs host as a list controllable by VFS listener\r\n // - here, on folder traverse.\r\n // So do not duplicate files in the dirty lists.\r\n\r\n String normPath = filePath.getPath().replace( File.separatorChar, '/');\r\n if( !host.removedFiles.contains( normPath ))\r\n builder.processLocallyDeletedFile( filePath );\r\n }\r\n }\r\n }\r\n catch( Exception e )\r\n {\r\n // By default if any exception happens, we consider file status to be\r\n // \"unknown\" and do not indicate any change.\r\n }\r\n }",
"@Override\n\t\t\t\tpublic void insertUpdate(DocumentEvent e) {\n\t\t\t\t\tchange();\n\t\t\t\t}",
"public void chg() {\n currentChangeStep = 3;\n }",
"@Override\n\tpublic void pre()\n\t{\n\n\t}",
"public void changedUpdate(DocumentEvent event) {\n\t\t\t}",
"public void changedUpdate(DocumentEvent event)\n\t{\n\t\t// do nothing\n\t}",
"public void activeCompilerChanged() { }",
"@Override\r\n\t\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\t\tcheckID();\r\n\t\t\t\t\t}",
"@Override\r\n public boolean eventSourcing(){\n loadSnapshot();\r\n\r\n // check offsets value\r\n\r\n // rerun events\r\n\r\n // rerun commands\r\n\r\n // print es results\r\n\r\n return true;\r\n }",
"void processBeforeLocking(MutableCachedNode modifiedOrNewNode,\n SaveContext context) throws Exception;",
"public void approveSelection()\r\n/* 24: */ {\r\n/* 25:23 */ if ((!getFileFilter().accept(getSelectedFile())) && \r\n/* 26:24 */ ((getFileFilter() instanceof FileNameExtensionFilter)))\r\n/* 27: */ {\r\n/* 28:25 */ String[] extensions = ((FileNameExtensionFilter)getFileFilter()).getExtensions();\r\n/* 29:26 */ String ext = extensions.length > 0 ? extensions[0] : \"\";\r\n/* 30:27 */ setSelectedFile(new File(getSelectedFile().getAbsolutePath() + ((ext == null) || (ext.length() == 0) ? \"\" : new StringBuilder().append(\".\").append(ext).toString())));\r\n/* 31: */ }\r\n/* 32:32 */ File f = getSelectedFile();\r\n/* 33:33 */ if ((f.exists()) && (getDialogType() == 1))\r\n/* 34: */ {\r\n/* 35:34 */ int result = JOptionPane.showConfirmDialog(this, \"Are you sure you want to override existing file?\", \"Existing file\", 1, 3);\r\n/* 36:40 */ switch (result)\r\n/* 37: */ {\r\n/* 38: */ case 0: \r\n/* 39:42 */ super.approveSelection();\r\n/* 40:43 */ return;\r\n/* 41: */ case 2: \r\n/* 42:45 */ cancelSelection();\r\n/* 43:46 */ return;\r\n/* 44: */ }\r\n/* 45:48 */ return;\r\n/* 46: */ }\r\n/* 47:51 */ super.approveSelection();\r\n/* 48: */ }",
"private void setInitialSourceFile()\n\t{\n\t\tint largestAuthoredId = -1;\n\t\tSourceFile[] files = m_fileInfo.getFileList();\n\t\tfor (int i=0; i<files.length; ++i)\n\t\t{\n\t\t\tSourceFile sf = files[i];\n\t\t\tif (sf.getId() > largestAuthoredId && getFileType(sf) == AUTHORED_FILE)\n\t\t\t\tlargestAuthoredId = sf.getId();\n\t\t}\n\t\tif (largestAuthoredId != -1)\n\t\t\tsetListingPosition(largestAuthoredId, 1);\n\t}",
"private void ReplaceJob()\r\n\t{\n\t\tif (check_Gui_Field_value() == true)\r\n\t\t{ //file exist yes/no\r\n\t\t\tif (check_file_existence(frm1txtSelectFile.getText()) == true)\r\n\t\t\t{\t\t\t\t\t\t\r\n\t\t\t\tStSourceFileName = frm1txtSelectFile.getText();\r\n\r\n\t\t\t\tSplit_Seek_value(); //erase old file + split seek\r\n\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t//check if file/folder/other.\r\n\t\t\t\t\tif (check_file_status(frm1txtSelectFile.getText().toString()) == true)\r\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t//snr s = new snr();\r\n\t\t\t\t\t\tsnr r = new snr();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tr.setParameters(StSourceFileName,StStrSplit[0]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tr.getparameters();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tr.setParametersGui();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tl = new log(\"info\",\"Replace Button\" ,\"opened the a Seek and Replace Window\");\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void onOpenFile() {\n\t\t\n\t\t//if things are dirty, ask if they're sure they want to do this\n\t\tif(FormDesignerController.getIsDirty())\n\t\t{\n\t\t\t//if the use says no, then bounce\n\t\t\tif(!Window.confirm(LocaleText.get(\"newFormConfirm\")))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tOpenFromFileDialog dlg = OpenFromFileDialog.getInstnace(controller);\n\t\tdlg.center();\n\t\t\n\t}",
"protected void fileHasChanged(File file) {\n NSMutableSet observers = (NSMutableSet)_observersByFilePath.objectForKey(cacheKeyForFile(file));\n if (observers == null)\n log.warn(\"Unable to find observers for file: {}\", file);\n else {\n NSNotification notification = new NSNotification(FileDidChange, file);\n for (Enumeration e = observers.objectEnumerator(); e.hasMoreElements();) {\n _ObserverSelectorHolder holder = (_ObserverSelectorHolder)e.nextElement();\n try {\n holder.selector.invoke(holder.observer, notification);\n } catch (Exception ex) {\n log.error(\"Catching exception when invoking method on observer: {}\", ex, ex);\n }\n }\n registerLastModifiedDateForFile(file); \n }\n }",
"public void projectOpened(File pfile, FileOpenSelector files) { }",
"@Override\r\n public void beforeCommit(boolean readOnly) {\n }",
"@Override\n\tpublic void beforePhase(PhaseEvent arg0) {\n\t\t\n\t}",
"@Override\n protected void execute(File file, int offset) throws IOException {\n }",
"protected void onCompileInternal() {\r\n\t}",
"void initBeforeParsing() {\r\n }",
"@Override\n\tpublic void preBacktrack() {\n\t\t\n\t}",
"protected void runBeforeStep() {}"
] | [
"0.61914974",
"0.60595065",
"0.5840479",
"0.57282865",
"0.5716883",
"0.57021624",
"0.5693649",
"0.5682928",
"0.56407356",
"0.55927634",
"0.55855876",
"0.55855876",
"0.558201",
"0.55457467",
"0.55363643",
"0.55287623",
"0.55287623",
"0.55285907",
"0.5500836",
"0.5495947",
"0.54784083",
"0.5466473",
"0.5466473",
"0.546643",
"0.54653263",
"0.54616547",
"0.54393315",
"0.54293233",
"0.54293233",
"0.5428361",
"0.5416685",
"0.5416311",
"0.5406159",
"0.54003334",
"0.53962",
"0.53936756",
"0.53878325",
"0.5382341",
"0.5382341",
"0.5379217",
"0.5378043",
"0.5367242",
"0.53669363",
"0.53553843",
"0.5345984",
"0.5345547",
"0.5338393",
"0.5324125",
"0.5311755",
"0.5309236",
"0.53020775",
"0.52960235",
"0.528438",
"0.52820486",
"0.52781135",
"0.5252056",
"0.52476615",
"0.5240196",
"0.5232051",
"0.52232283",
"0.52232283",
"0.522134",
"0.5195724",
"0.5191161",
"0.5190188",
"0.51860225",
"0.517964",
"0.5175838",
"0.5175304",
"0.51732844",
"0.5162136",
"0.5158469",
"0.5158469",
"0.51499623",
"0.5135278",
"0.51349527",
"0.51330984",
"0.5114532",
"0.511194",
"0.51096344",
"0.5109333",
"0.5100801",
"0.50884736",
"0.50848854",
"0.50836587",
"0.50724083",
"0.5072023",
"0.5068249",
"0.5067462",
"0.5051531",
"0.5044943",
"0.5043642",
"0.5032747",
"0.50276506",
"0.5027606",
"0.5024627",
"0.5023023",
"0.5020179",
"0.5019597",
"0.5018438"
] | 0.55089855 | 18 |
Invoked after PSI in the corresponding file is synchronized with the corresponding document, which can happen after VFS, document or PSI changes. Multilanguage file view providers may override this method to recalculate template data languages. | void contentsSynchronized(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void update(VelocityContext context, String templateName)\n {\n long start = System.currentTimeMillis();\n long merged = 0;\n \n StringWriter sw = new StringWriter();\n try\n {\n final Template template = velocity.getTemplate(templateName, \"UTF-8\");\n template.merge(context, sw);\n merged = System.currentTimeMillis() - start;\n }\n catch (Exception e)\n {\n Utils.logError(\"Error while loading template\", e, true);\n return;\n }\n \n browser.setText(sw.toString());\n long displayed = System.currentTimeMillis() - start - merged;\n \n LoggerFactory.getLogger(DocumentList.class).debug(\n String.format(Locale.ENGLISH, \n \"Velocity [rendering: %.2f, display: %.2f]\",\n merged / 1000.0,\n displayed / 1000.0));\n }",
"public void componentsLocaleChanged() {\n\t\ttextRes = PeralexLibsBundle.getResource();\n\n\t\tlocaleChanged();\n\t}",
"void changeLanguage() {\n\n this.currentLocaleIndex++;\n if(this.currentLocaleIndex > this.locales.size() - 1) this.currentLocaleIndex = 0;\n this.updateBundle();\n }",
"@Override\n void loadData() {\n langConfigFile = new File(plugin.getDataFolder() + \"/messages.yml\");\n // Attempt to read the config in the config file.\n langConfig = YamlConfiguration.loadConfiguration(langConfigFile);\n // If the config file is null (due to the config file being invalid or not there) create a new one.\n // If the file doesnt exist, populate it from the template.\n if (!langConfigFile.exists()) {\n langConfigFile = new File(plugin.getDataFolder() + \"/messages.yml\");\n langConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(plugin.getResource(\"messages.yml\")));\n saveData();\n }\n }",
"void documentFilePathUpdated(SingleDocumentModel model);",
"void documentFilePathUpdated(SingleDocumentModel model);",
"public void reParse() {\r\n \r\n \t\tSystem.out.println(\"Starting reparse\");\r\n \r\n \t\t// to reparse an entire document\r\n \r\n \t\t// A. remove all document positions & problem markers\r\n \t\tSystem.out.println(\"DUMPING POSITIONS\");\r\n \t\tdumpPositions();\r\n \t\ttry {\r\n \t\t\tgetFile().deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO);\r\n \t\t\t_parseErrors.clear();\r\n \t\t} catch (CoreException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \r\n \t\t// if this is not set, the document is new and has never been parsed before.\r\n \t\tif (_doc == null) {\r\n \t\t\tgetProjectNature().addToModel(this);\r\n \t\t} else {\r\n \r\n \t\t\t// B. remove compilation unit from model tree\r\n \t\t\tif(Config.debug()) {\r\n \t\t\t System.out.println(\"removing compilation unit from tree\");\r\n \t\t\t}\r\n \t\t\t// C. remove Document from project\r\n \t\t\tif(Config.debug()) {\r\n \t\t\t\tSystem.out.println(\"Remove document from project\");\r\n \t\t\t}\r\n \t\t\tgetProjectNature().removeDocument(this);\r\n \r\n \t\t\t// D. Re-add Document to the project (wich will cause it to be parsed)\r\n \t\t\tif(Config.debug()) {\r\n \t\t\t System.out.println(\"Re-add document to project\");\r\n \t\t\t}\r\n \t\t\tNamespace root = getProjectNature().getModel();\r\n \t\t\tgetProjectNature().addModelElement(this, root);\r\n \t\t}\r\n \r\n \t\tSystem.out.println(\"Einde reparse\");\r\n \t}",
"@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }",
"public void pageChanged(String inputDocument, String modelType, boolean documentTypeSelected)\n {\n \n if (inputDocument.endsWith(\".docx\") || inputDocument.endsWith(\".odt\")) //$NON-NLS-1$ //$NON-NLS-2$\n {\n isSpreadsheet = false;\n \n if (documentTypeSelected)\n {\n valueToRecognizeReq = controller.getIDRegexOrStyle();\n RecognizedTree newTree = controller.getStylesAndRegex();\n tree.getChildren().clear();\n if (newTree != null)\n {\n tree.getChildren().addAll(newTree.getChildren());\n }\n }\n \n boolean b = Constants.SYSML_EXTENSION.equals(modelType) || Constants.UML_EXTENSION.equals(modelType);\n \n descriptionComposite.setAttributeComboVisible(b);\n } \n else\n {\n isSpreadsheet = true;\n\n if (documentTypeSelected)\n {\n valueToRecognizeReq = controller.getIDColumn();\n RecognizedTree newTree = controller.getColumns();\n tree.getChildren().clear();\n if (newTree != null)\n {\n tree.getChildren().addAll(newTree.getChildren());\n }\n }\n }\n \n if (documentTypeSelected)\n {\n descriptionText = controller.getDescriptionEndText();\n descriptionRegex = controller.getDescriptionRegex();\n }\n \n updateWizard();\n \n if (inputDocument != null)\n {\n if (inputDocument.contains(\"file:\")) //$NON-NLS-1$\n {\n currentFileSystem = new File(URI.createURI(inputDocument).toFileString());\n controller.setCurrentFileSystem(currentFileSystem);\n }\n else if (inputDocument.contains(\"platform:\")) //$NON-NLS-1$\n {\n currentFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(URI.createURI(inputDocument).toPlatformString(true)));\n controller.setCurrentFile(currentFile);\n if (currentFile != null)\n {\n currentFileSystem = currentFile.getLocation().toFile();\n controller.setCurrentFileSystem(currentFileSystem);\n }\n }\n else\n {\n currentFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(URI.createURI(inputDocument).toFileString()));\n controller.setCurrentFile(currentFile);\n if (currentFile != null)\n {\n currentFileSystem = currentFile.getLocation().toFile();\n controller.setCurrentFileSystem(currentFileSystem);\n }\n }\n }\n setDocumentFile(currentFileSystem);\n }",
"protected void localeChanged() {\n\t}",
"private void updateFiles() {\n\t}",
"protected void updateViewerInput() {\n \t\tIStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();\n \n \t\tif (selection.size() == 1) {\n \t\t\tTemplatePersistenceData data= (TemplatePersistenceData) selection.getFirstElement();\n \t\t\tTemplate template= data.getTemplate();\n \t\t\tfPatternViewer.getDocument().set(template.getPattern());\n \t\t} else {\n \t\t\tfPatternViewer.getDocument().set(\"\"); //$NON-NLS-1$\n \t\t}\n \t}",
"@Override\n public void textFileLoaded(File file, int wc, String contents)\n {\n cur_file = file;\n this.action_panel.setWordCount(wc);\n \n new Thread(new MarkdownProcessor(file, this)).start();\n }",
"private void setTemplateFile() throws IOException, BusinessException, ObjectNotFoundException, JackrabbitException,\n CertitoolsAuthorizationException, BadElementException {\n super.setFolder(folder);\n if (fileTemplate1 != null) {\n String folderPath;\n if (insertFolderFlag) {\n folderPath = folderId + \"/folders/\" + folder.getName();\n } else {\n folderPath = PlanUtils.getParentPath(folderId) + \"/folders/\" + folder.getName();\n }\n\n Template1Diagram template1Diagram = new Template1Diagram(new Resource(\"/\" + fileTemplate1.getFileName(),\n fileTemplate1.getFileName(),\n fileTemplate1.getContentType(), fileTemplate1.getInputStream(),\n \"\" + fileTemplate1.getSize(), true),\n PlanUtils.convertResourceToHTML(folderPath, getContext().getRequest().getContextPath(),\n getModuleTypeFromEnum()));\n if (replaceImageMap == null) {\n replaceImageMap = Boolean.FALSE;\n }\n if (!insertFolderFlag && !replaceImageMap) {\n\n Folder previousVersion =\n planService.findFolder(folderId, true, getUserInSession(), getModuleTypeFromEnum());\n try {\n TemplateWithImage previousTemplate = (TemplateWithImage) previousVersion.getTemplate();\n String htmlContent = template.getImageMap();\n Image newImage = TemplateWithImageUtils.getImage(fileTemplate1.getInputStream());\n Image oldImage = TemplateWithImageUtils.getImage(previousTemplate.getResource().getData());\n\n String unescapedHtml = StringEscapeUtils.unescapeHtml(htmlContent);\n\n String htmlResultContent = TemplateWithImageUtils.resizeImageMap(unescapedHtml, oldImage, newImage);\n\n if(htmlResultContent != null){\n template1Diagram.setImageMap(htmlResultContent);\n }\n } catch (ClassCastException ex) {\n //Do nothing\n }\n }\n super.setTemplateToFolder(template1Diagram);\n\n } else {\n Folder dbFolder = planService.findFolder(folderId, false, getUserInSession(), getModuleTypeFromEnum());\n //User does not changed template\n if (dbFolder.getTemplate().getName().equals(Template.Type.TEMPLATE_DIAGRAM.getName())) {\n Template1Diagram dbTemplate1Diagram = (Template1Diagram) dbFolder.getTemplate();\n //set old resource and update image Map\n super.setTemplateToFolder(\n new Template1Diagram(dbTemplate1Diagram.getResource(), template.getImageMap()));\n } else {\n //User changed template to this one, and do not upload image, so create empty template\n super.setTemplateToFolder(new Template1Diagram());\n }\n }\n }",
"private void updateFile(CrowdinFile _file) {\n String fileN = _file.getFile().getName();\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Initializing: \" + fileN);\n // Making sure the file is a master file and not a translation\n if (_file.getClass().equals(CrowdinFile.class)) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Init dir\");\n initDir(_file.getCrowdinPath());\n try {\n if (_file.getFile().exists()) {\n \n //escape special character before sync\n FileUtils.replaceCharactersInFile(_file.getFile().getPath(), \"config/special_character_processing.properties\", \"EscapeSpecialCharactersBeforeSyncFromCodeToCrowdin\");\n \n if (!getHelper().elementExists(_file.getCrowdinPath())) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Add file: \" + _file.getCrowdinPath());\n String result = getHelper().addFile(_file);\n if (result.contains(\"success\")) {\n getLog().info(\"File \" + fileN + \" created succesfully.\");\n initTranslations(_file);\n } else {\n getLog().warn(\"Cannot create file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n if (_file.isShouldBeCleaned()) {\n _file.getFile().delete();\n }\n }\n } else {\n if (getLog().isDebugEnabled()) {\n getLog().debug(\"*** Update file: \" + _file.getCrowdinPath());\n }\n String result = getHelper().updateFile(_file);\n System.out.println(result);\n if (result.contains(\"success\"))\n getLog().info(\"File \" + fileN + \" updated succesfully.\");\n else\n getLog().warn(\"Cannot update file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n if (_file.isShouldBeCleaned()) {\n _file.getFile().delete();\n }\n \n //remove escape special character before sync\n FileUtils.replaceCharactersInFile(_file.getFile().getPath(), \"config/special_character_processing.properties\", \"EscapeSpecialCharactersAfterSyncFromCodeToCrowdin\");\n \n }\n } else {\n if (getHelper().elementExists(_file.getCrowdinPath())) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Delete file: \" + _file.getCrowdinPath());\n String result = getHelper().deleteFile(_file);\n if (result.contains(\"success\"))\n getLog().info(\"File \" + fileN + \" deleted succesfully.\");\n else\n getLog().warn(\"Cannot delete file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n }\n }\n } catch (MojoExecutionException e) {\n getLog().error(\"Error while updating file '\" + _file.getFile().getPath() + \"'. Exception:\\n\" + e.getMessage());\n }\n }\n }",
"public void refreshLanguage() {\n\t\tbutton.setText(\"<html><p>\"+Translation.SEARCH.getTranslation(PropertiesWorker.language)+\"</p></html>\");\n\t\trefresh.setText(\"<html><p>\"+Translation.REFRESH.getTranslation(PropertiesWorker.language)+\"</p></html>\");\n\t}",
"public void update() {\n\t\tthis.editorView.update();\n\t}",
"private void updateBundle() {\n\n this.bundle = ResourceBundle.getBundle(\"languages\", this.locales.get(this.currentLocaleIndex));\n }",
"public void initMessagesIfNeeded() {\n\t\tif (this.i18nFile.lastModified() != this.lastModified) {\n\t\t\tinitMessages();\n\t\t\tthis.lastModified = this.i18nFile.lastModified();\n\t\t}\n\t}",
"public void updateLanguage() {\n try {\n getUserTicket().setLanguage(EJBLookup.getLanguageEngine().load(updateLanguageId));\n } catch (FxApplicationException e) {\n new FxFacesMsgErr(e).addToContext();\n }\n }",
"@Override\n\t\tpublic void documentAboutToBeChanged(DocumentEvent event) {\n\t\t\tTextDocumentContentChangeEvent changeEvent = toChangeEvent(event);\n\t\t\tif (changeEvent == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.change = new DidChangeTextDocumentParams();\n\t\t\tVersionedTextDocumentIdentifier doc = new VersionedTextDocumentIdentifier();\n\t\t\tdoc.setUri(fileURI.toString());\n\t\t\tdoc.setVersion(version);\n\t\t\tthis.change.setTextDocument(doc);\n\t\t\tthis.change.setContentChanges(Arrays.asList(new TextDocumentContentChangeEvent[] { changeEvent }));\n\t\t}",
"private void dictionary(boolean updateDictionary) {\n try {\n loadDictionary(filePathDictionaryAuto);\n loadNonDictionaryTerms(filePathNonDictionaryAuto);\n if (updateDictionary) {\n upgradeDictionary();\n populateDictionary();\n writeToDictionary();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void updateView(File selectedFile) {\n\n if (selectedFile != null && selectedFile != currentFile) {\n currentFile = selectedFile;\n setFileDetails(currentFile);\n previewFile(currentFile);\n }\n\n if (currentFile.isDirectory()) {\n view.getFileOperations().disableFileOperations();\n } else {\n enableFileOperations();\n }\n }",
"@Override\r\n\tpublic void selectionChanged(IAction action, ISelection selection) {\r\n\t\tif (selection instanceof IStructuredSelection) {\r\n\t\t\tIStructuredSelection ssel = (IStructuredSelection) selection;\r\n\t\t\tObject obj = ssel.getFirstElement();\r\n\t\t\tif (obj != null) {\r\n\t\t\t\tIFile file = (IFile) Platform.getAdapterManager().getAdapter(obj, IFile.class);\r\n\t\t\t\tif (file == null) {\r\n\t\t\t\t\tif (obj instanceof IAdaptable) {\r\n\t\t\t\t\t\tfile = (IFile) ((IAdaptable) obj).getAdapter(IFile.class);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (file != null) {\r\n\t\t\t\t\tString fileExtension = file.getFileExtension();\r\n\t\t\t\t\t//If file is of type Papyrus diagram, call getUMLModelOfDI method to set the selectedFile variable\r\n\t\t\t\t\tif (\"di\".equals(fileExtension)) {\r\n\t\t\t\t\t\tselectedFile = getUMLModelOfDI(file);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tselectedFile = file;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//If the file is null, it might be of type PapyrusFile, then the uml file is found by passing mainFile to the getUMLModelOfDI method\r\n\t\t\t\telse {\r\n\t\t\t\t\tIPapyrusFile papyrusFile = (IPapyrusFile) Platform.getAdapterManager().getAdapter(obj, IPapyrusFile.class);\r\n\t\t\t\t\tif (papyrusFile != null) {\r\n\t\t\t\t\t\tselectedFile = getUMLModelOfDI(papyrusFile.getMainFile());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tIProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(selectedFile.getProject().getName());\r\n\t\t\t\tReportGenerator.INSTANCE.setProject(project);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void checkInternationalization(String folderName, Boolean interactive){\r\n\t\tFile dir = new File(viewsFoldersPath+\"/\"+folderName);\r\n\t\tString[] dirFiles;\r\n\t\tCollection<String> actual = null, past = null, aux;\t// used for messages comparison\r\n\t\tCollection<String> viewsMessages = new HashSet<String>();\r\n\t\tString fileName, pastFileName = \"\";\r\n\t\t\r\n\t\tdirFiles = dir.list();\r\n\t\t// Loads all messages used into views (.jsp files)\r\n\t\tfor(int i=0; i<dirFiles.length; i++){\r\n\t\t\tfileName = dirFiles[i];\r\n\t\t\t\r\n\t\t\tif(fileName.contains(\".jsp\"))\tviewsMessages.addAll(searchMessagesIntoViewFile(folderName, fileName));\r\n\t\t}\r\n\t\t\r\n\t\t// Looks for differences between languages\r\n\t\tfor(int i=0; i<dirFiles.length; i++){\r\n\t\t\tfileName = dirFiles[i];\r\n\t\t\t\r\n\t\t\tif(fileName.contains(\"messages\")){\r\n\t\t\t\tactual = loadMessagesFromFile(folderName, fileName);\r\n\t\t\t\t//TODO: refactorizar, codigo repetido\r\n\t\t\t\tif(past != null){\r\n\t\t\t\t\t// Adds all messages defined into past i18n&l10n file and not defined into the actual one\r\n\t\t\t\t\tif(!actual.containsAll(past)){\r\n\t\t\t\t\t\taux = new HashSet<String>(past);\r\n\t\t\t\t\t\taux.remove(\"\");\r\n\t\t\t\t\t\taux.removeAll(actual);\r\n\t\t\t\t\t\taddAllMessages(folderName, fileName, aux);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Adds all messages defined into actual i18n&l10n file and not defined into the past one\r\n\t\t\t\t\tif(!past.containsAll(actual)){\r\n\t\t\t\t\t\taux = new HashSet<String>(actual);\r\n\t\t\t\t\t\taux.remove(\"\");\r\n\t\t\t\t\t\taux.removeAll(past);\r\n\t\t\t\t\t\taddAllMessages(folderName, pastFileName, aux);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Adds all messages used into views but not defined into file\r\n\t\t\t\tif(!actual.containsAll(viewsMessages)){\r\n\t\t\t\t\taux = new HashSet<String>(viewsMessages);\r\n\t\t\t\t\taux.removeAll(actual);\r\n\t\t\t\t\taddAllMessages(folderName, fileName, aux);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tpast = new HashSet<String>(actual);\r\n\t\t\t\tpastFileName = fileName;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void fileReverted(OpenDefinitionsDocument doc) { }",
"public void fileReverted(OpenDefinitionsDocument doc) { }",
"@Override\n\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\tchange();\n\t\t\t\t}",
"public void updateLocale() {\r\n\t\tsuper.updateLocale();\r\n\t}",
"private void ini_Translations()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_Translations\");\r\n\t\tnew Translation(\"data\", FileType.Internal);\r\n\t\ttry\r\n\t\t{\r\n\t\t\tTranslation.LoadTranslation(\"data/lang/en-GB/strings.ini\");\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void run() {\n if (infomap.containsKey(\"updateListFiles\")) {\n tblDocChanges.setModel(new DocumentApproveRejectChangesTableModel());\n List<String> odfdocs =\n (List<String>) infomap.get(\"updateListFiles\");\n changesInfo.reload(odfdocs.toArray(new String[odfdocs.size()]));\n ((DocApproveRejectListModel) listMembers.getModel()).resetModel();\n\n }\n\n if (infomap.containsKey(\"updateListFile\")) {\n tblDocChanges.setModel(new DocumentApproveRejectChangesTableModel());\n String odfdoc = (String) infomap.get(\"updateListFile\");\n changesInfo.reload(odfdoc);\n ((DocApproveRejectListModel) listMembers.getModel()).resetModel();\n }\n }",
"public void dataUpdated() {\r\n finish = getConfiguration().getTransformTarget() != null;\r\n this.wizardControl.updateView();\r\n }",
"@Override\n\t\t\t\tpublic void changedUpdate(final DocumentEvent e) {\n\t\t\t\t}",
"@Override\n\tprotected void treeContentChanged ( ) {\n\n\t\tSubTypingProofNode rootNode = ( SubTypingProofNode ) this.proofModel.getRoot ( );\n\n\t\t// initiate the index\n\t\tthis.index = 1;\n\t\tcheckForUserObject ( rootNode );\n\t\trelayout ( );\n\n\t}",
"@Override\n protected void process() {\n final List<File> srtFiles = new FileFinder().collect(new File(Constants.FILEFIXER_ROOT_DIR), Constants.SRT_EXTENSION);\n\n // process each file, making a backup first if it is enabled\n for (final File srtFile : srtFiles) {\n System.out.println(\"Processing subtitle file :: \" + srtFile.getName());\n\n if (Constants.MAKE_BACKUPS) {\n backupFile(srtFile);\n }\n\n fix(srtFile);\n }\n }",
"private void syncSources(String name) {\n TemplateSourceInfo info = (TemplateSourceInfo)mTemplateMap.get(name);\n Unit compUnit = (Unit)this.getCompilationUnit(name,null);\n File destFile = compUnit.getDestinationFile();\n if (destFile != null) {\n destFile.setLastModified(info.timestamp);\n }\n }",
"public void commit() {\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tDOMSource domSource = new DOMSource(document);\n\t\t\tStreamResult streamResult = new StreamResult(new File(fileName));\n\t\t\ttransformer.transform(domSource, streamResult);\n\t\t\t//Reload nodes list\n\t\t\tnodes = document.getDocumentElement().getChildNodes();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void onSuccess(String result) {\n StructuredText structuredText = getStructuredText(result);\n for(FileViewer view : viewers){\n // FIXME Possible issue with data compatibility between views\n if (view instanceof AbstractStructuredTextViewer) {\n view.setData(structuredText);\n }\n }\n simpleContainer.unmask();\n }",
"@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tparseFile(\"english_file.txt\");\r\n\t\t\t\t}",
"public void addToTemplates() {\n mTemplateId = mPreferenceManager.getTemplateId();\n if (isConverted) {\n if (mPreferenceManager.getTemplateId().equals(ConstantsManager.CONVERTER_TEMPLATE_ID_DEFAULT)) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n } else {\n showDialog();\n }\n } else {\n mBaseActivity.showToast(mToastFailure);\n }\n }",
"public void run() {\n\t\tISelection selection = viewer.getSelection();\n\t\tif (selection.isEmpty()) {\n\t\t\tthis.setEnabled(false);\n\t\t}\n\t\tTreeObject object = (TreeObject) ((IStructuredSelection) selection)\n\t\t\t\t.getFirstElement();\n\t\tif (object instanceof DocumentTreeObject) {\n\n\t\t\tString oldValue = object.getValue().toString();\n\t\t\t\n\t\t\tIInputValidator validator = new TextValidator(oldValue);\n\t\t\tInputDialog dialog = new InputDialog(parent.getShell(), Properties\n\t\t\t\t\t.getProperty(\"rename\"), Properties.getProperty(\"new_name\"),\n\t\t\t\t\toldValue, validator);\n\t\t\tdialog.setBlockOnOpen(true); // waits for user enter a name\n\n\t\t\tint res = dialog.open(); // opens the rename dialog\n\n\t\t\tif (res == InputDialog.OK) {\n\t\t\t\tString newValue = dialog.getValue();\n\t\t\t\t\n\t\t\t\tString newExtension = GUIUtil.getFileExtension(newValue);\n\t\t\t\tString oldExtension = GUIUtil.getFileExtension(oldValue);\n\t\t\t\t\t\t\n\t\t\t\tif(!newExtension.equalsIgnoreCase(oldExtension)){\n\t\t\t\t\tnewValue += oldExtension;\n\t\t\t\t}\n\n\t\t\t\tif (!newValue.equalsIgnoreCase(oldValue)) {\n\t\t\t\t\tif (!ProjectManagerController.getInstance().renameDocument(\n\t\t\t\t\t\t\toldValue, newValue)) {\n\t\t\t\t\t\tMessageDialog.openError(parent.getShell(), Properties\n\t\t\t\t\t\t\t\t.getProperty(\"error_while_renaming\"),\n\t\t\t\t\t\t\t\tProperties.getProperty(\"can_not_rename\"));\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tGUIManager.getInstance().refreshViews();\n\t\t\t\t\t} catch (TargetException e) {\n\t\t\t\t\t\tMessageDialog\n\t\t\t\t\t\t\t\t.openError(\n\t\t\t\t\t\t\t\t\t\tthis.parent.getShell(),\n\t\t\t\t\t\t\t\t\t\tProperties\n\t\t\t\t\t\t\t\t\t\t\t\t.getProperty(\"error_while_reloading_project\"),\n\t\t\t\t\t\t\t\t\t\te.getMessage());\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void changedUpdate(DocumentEvent e) {\n verifierSaisie();\n }",
"void rootChanged(@NotNull PsiFile psiFile);",
"@Override\n\tpublic void changedUpdate(DocumentEvent de) {\n\n\t}",
"@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t}",
"@Override\r\n public void changedUpdate(DocumentEvent e)\r\n {\n }",
"private void updateTexts( DocumentEvent e ) {\n Document doc = e.getDocument();\n if (doc == projectNameTextField.getDocument() || doc == projectLocationTextField.getDocument()) {\n String projectName = projectNameTextField.getText();\n \n if (doc == projectLocationTextField.getDocument()) {\n if (projectName.equals(generatedProjectName)) {\n File f = new File(projectLocationTextField.getText().trim());\n generatedProjectNameIndex = getValidProjectNameIndex(nameFormatter, generatedProjectNameIndex, f);\n } else {\n generatedProjectNameIndex = 0;\n }\n generatedProjectName = generatedProjectNameIndex > 0 ? getProjectName(nameFormatter, generatedProjectNameIndex) : null;\n if(generatedProjectNameIndex > 0) {\n projectName = generatedProjectName;\n projectNameTextField.setText(generatedProjectName);\n projectNameTextField.selectAll();\n }\n }\n \n String projectFolder = projectLocationTextField.getText();\n String projFolderPath = FileUtil.normalizeFile(new File(projectFolder)).getAbsolutePath();\n if (projFolderPath.endsWith(File.separator)) {\n createdFolderTextField.setText(projFolderPath + projectName);\n } else {\n createdFolderTextField.setText(projFolderPath + File.separator + projectName);\n }\n }\n wizard.fireChangeEvent();\n }",
"protected void aktualisieren() {\r\n\r\n\t}",
"void localizationChanged();",
"void localizationChanged();",
"void localizationChanged();",
"public void reload() {\n\t\tif (file.lastModified() <= fileModified)\n\t\t\treturn;\n\t\n\t\treadFile();\n\t}",
"@Override\r\n public String createTranlatedDocument(TopElement topElement, String filePath, boolean is) {\n return null;\r\n }",
"public void newFileCreated(OpenDefinitionsDocument doc) { }",
"public void newFileCreated(OpenDefinitionsDocument doc) { }",
"public void widgetSelected(SelectionEvent e)\n\t\t\t{\n\t\t\t\ttranslatePhrases(getIOldSegmentPosition());\n\t\t\t\tshowAltTrans(getIOldSegmentPosition(), 0, 0);\n\t\t\t\tif (xliffEditorSegmentDictionaryViewer != null)\n\t\t\t\t{\n\t\t\t\t\txliffEditorSegmentDictionaryViewer.adaptDictionaryViewer(xliffFile, sourceLanguage, targetLanguage);\n\t\t\t\t\txliffEditorSegmentDictionaryViewer.setTerms(getPhrases(getIOldSegmentPosition()));\n\t\t\t\t}\n\t\t\t\tif (xliffEditorDictionaryViewer != null)\n\t\t\t\t{\n\t\t\t\t\txliffEditorDictionaryViewer.adaptDictionaryViewer(sourceLanguage, targetLanguage);\n\t\t\t\t}\n\t\t\t}",
"public void changedUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) {\n }",
"protected void updatePageCompletion() {\r\n boolean pageComplete = determinePageCompletion();\r\n setPageComplete(pageComplete);\r\n if (pageComplete) {\r\n setErrorMessage(null);\r\n }\r\n }",
"public void updateLanguage() {\n this.title.setText(LanguageStringMap.get().getMap().get(TITLE_KEY));\n this.skinSwitcher.updateLanguage();\n this.langSwitcher.updateLanguage();\n this.pawnSwitcher.updateLanguage();\n this.musicManager.updateLanguage();\n this.back.setText(LanguageStringMap.get().getMap().get(BACK_KEY));\n }",
"@Override\n protected void postSequenceProcessing() {\n htmlReport.addTestVerdict(getVerdict(latestState));\n }",
"@Override\n public void onUploadFinish() {\n currentContent = this.loadContent(currentPath);\n populateContentListView(currentContent);\n }",
"private void updateListView() {\n fileList.getItems().setAll(files.readList());\n //System.out.println(System.currentTimeMillis() - start + \" мс\");\n }",
"public final void insertUpdate(DocumentEvent e) {\n Document doc = e.getDocument();\n Object o = doc.getProperty(\"i18n\");\n if (o instanceof Boolean) {\n Boolean i18nFlag = (Boolean) o;\n if (i18nFlag.booleanValue() != i18nView) {\n // i18n flag changed, rebuild the view\n i18nView = i18nFlag.booleanValue();\n modelChanged();\n return;\n }\n }\n\n // normal insert update\n Rectangle alloc = (painted) ? getVisibleEditorRect() : null;\n rootView.insertUpdate(e, alloc, rootView.getViewFactory());\n }",
"@ChangeSet(order = \"001\", id = \"initialWordType\", author = \"zdoh\", runAlways = true)\n public void initWordType(MongoTemplate template) {\n partOfSpeechMap.putIfAbsent(\"num\", template.save(PartOfSpeech.builder()\n .shortName(\"num\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"числительное\"), new TranslateEntity(languageMap.get(\"en\"), \"numeral\")))\n .japanName(\"数詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"n\", template.save(PartOfSpeech.builder()\n .shortName(\"n\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"существительное\"), new TranslateEntity(languageMap.get(\"en\"), \"noun (common)\")))\n .japanName(\"名詞\")\n .kuramojiToken(\"名詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"pn\", template.save(PartOfSpeech.builder()\n .shortName(\"pn\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"местоимение\"), new TranslateEntity(languageMap.get(\"en\"), \"pronoun\")))\n .japanName(\"代名詞\")\n .kuramojiToken(\"代名詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n // no kuramoji\n partOfSpeechMap.putIfAbsent(\"hon\", template.save(PartOfSpeech.builder()\n .shortName(\"hon\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"вежливая речь\"), new TranslateEntity(languageMap.get(\"en\"), \"honorific or respectful (sonkeigo) language\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"mr-suf\", template.save(PartOfSpeech.builder()\n .shortName(\"mr-suf\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"суффикс обращения к кому-то: мистер, миссис и тд, используемый в японском языке\")))\n .build()));\n\n\n partOfSpeechMap.putIfAbsent(\"adv\", template.save(PartOfSpeech.builder()\n .shortName(\"adv\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"наречие\"), new TranslateEntity(languageMap.get(\"en\"), \"adverb\")))\n .japanName(\"副詞\")\n .kuramojiToken(\"副詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.OTHER)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"int\", template.save(PartOfSpeech.builder()\n .shortName(\"int\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"междометие\"), new TranslateEntity(languageMap.get(\"en\"), \"interjection\")))\n .japanName(\"感動詞\")\n .kuramojiToken(\"感動詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.OTHER)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"adj-na\", template.save(PartOfSpeech.builder()\n .shortName(\"adj-na\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"na-прилагательное (предикативное)\"), new TranslateEntity(languageMap.get(\"en\"), \"adjectival nouns or quasi-adjectives\")))\n .japanName(\"な形容詞\")\n .kuramojiToken(\"形容動詞語幹\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"adj-i\", template.save(PartOfSpeech.builder()\n .shortName(\"adj-i\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"i-прилагательное (полупредикативное)\"), new TranslateEntity(languageMap.get(\"en\"), \"adjective\")))\n .japanName(\"い形容詞\")\n .kuramojiToken(\"形容詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v\", template.save(PartOfSpeech.builder()\n .shortName(\"v\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол\"), new TranslateEntity(languageMap.get(\"en\"), \"verb\")))\n .japanName(\"動詞\")\n .kuramojiToken(\"動詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5b\", template.save(PartOfSpeech.builder()\n .shortName(\"v5b\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -ぶ\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'bu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5g\", template.save(PartOfSpeech.builder()\n .shortName(\"v5g\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -ぐ\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'gu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5k\", template.save(PartOfSpeech.builder()\n .shortName(\"v5k\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -く\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'ku' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5k-s\", template.save(PartOfSpeech.builder()\n .shortName(\"v5k-s\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -す (специальный клаас)\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'su' ending (special class)\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5m\", template.save(PartOfSpeech.builder()\n .shortName(\"v5m\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -む\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'mu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5n\", template.save(PartOfSpeech.builder()\n .shortName(\"v5n\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -ぬ\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'nu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5r\", template.save(PartOfSpeech.builder()\n .shortName(\"v5r\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -る\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'ru' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5s\", template.save(PartOfSpeech.builder()\n .shortName(\"v5s\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -す\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'su' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5t\", template.save(PartOfSpeech.builder()\n .shortName(\"v5t\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -つ\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'tu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5u\", template.save(PartOfSpeech.builder()\n .shortName(\"v5u\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -う\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'u' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5z\", template.save(PartOfSpeech.builder()\n .shortName(\"v5z\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -ず\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'zu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"vi\", template.save(PartOfSpeech.builder()\n .shortName(\"vi\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"непереходный глагол\"), new TranslateEntity(languageMap.get(\"en\"), \"intransitive verb\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"prefix\", template.save(PartOfSpeech.builder()\n .shortName(\"prefix\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"префикс\"), new TranslateEntity(languageMap.get(\"en\"), \"prefix\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v1\", template.save(PartOfSpeech.builder()\n .shortName(\"v1\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол II-спряжение\"), new TranslateEntity(languageMap.get(\"en\"), \"ichidan verb\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"vt\", template.save(PartOfSpeech.builder()\n .shortName(\"vt\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"переходный глагол\"), new TranslateEntity(languageMap.get(\"en\"), \"transitive verb\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"n-adv\", template.save(PartOfSpeech.builder()\n .shortName(\"n-adv\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"отглагольное существительное\"), new TranslateEntity(languageMap.get(\"en\"), \"adverbial noun\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"n-t\", template.save(PartOfSpeech.builder()\n .shortName(\"n-t\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"существительное (временное)\"), new TranslateEntity(languageMap.get(\"en\"), \"noun (temporal)\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"vk\", template.save(PartOfSpeech.builder()\n .shortName(\"vk\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"специальный глагол 来る\"), new TranslateEntity(languageMap.get(\"en\"), \"来る verb - special class\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"vs\", template.save(PartOfSpeech.builder()\n .shortName(\"vs\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"существительное, которое используется с する\"), new TranslateEntity(languageMap.get(\"en\"), \"noun or participle which takes the aux. verb suru\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"ctr\", template.save(PartOfSpeech.builder()\n .shortName(\"ctr\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"счетчик\"), new TranslateEntity(languageMap.get(\"en\"), \"counter\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"n-suf\", template.save(PartOfSpeech.builder()\n .shortName(\"n-suf\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"существительное, котором может использоваться как суффикс\"), new TranslateEntity(languageMap.get(\"en\"), \"noun, used as a suffix\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"n-pref\", template.save(PartOfSpeech.builder()\n .shortName(\"n-pref\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"существительное, котором может использоваться как префикс\"), new TranslateEntity(languageMap.get(\"en\"), \"noun, used as a prefix\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"suf\", template.save(PartOfSpeech.builder()\n .shortName(\"suf\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"суффикс\"), new TranslateEntity(languageMap.get(\"en\"), \"suffix\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"exp\", template.save(PartOfSpeech.builder()\n .shortName(\"exp\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"выражение\"), new TranslateEntity(languageMap.get(\"en\"), \"expressions (phrases, clauses, etc.)\")))\n .build()));\n\n /// part of speech for grammar\n\n partOfSpeechMap.putIfAbsent(\"は\", template.save(PartOfSpeech.builder()\n .shortName(\"は\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"частица は\"), new TranslateEntity(languageMap.get(\"en\"), \"particle は\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"です\", template.save(PartOfSpeech.builder()\n .shortName(\"です\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"связка です\"), new TranslateEntity(languageMap.get(\"en\"), \".... です\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"じゃありません\", template.save(PartOfSpeech.builder()\n .shortName(\"じゃありません\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"разговорная отрицательная форма связки です\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"ではありません\", template.save(PartOfSpeech.builder()\n .shortName(\"ではありません\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"отрицательная форма связки です\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"か\", template.save(PartOfSpeech.builder()\n .shortName(\"か\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"вопросительная частица か\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"も\", template.save(PartOfSpeech.builder()\n .shortName(\"も\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"частица も\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"の\", template.save(PartOfSpeech.builder()\n .shortName(\"の\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"частица の\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"さん\", template.save(PartOfSpeech.builder()\n .shortName(\"さん\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"суффикс さん\")))\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.SUFFIX)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"ちゃん\", template.save(PartOfSpeech.builder()\n .shortName(\"ちゃん\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"суффикс ちゃん\")))\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.SUFFIX)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"くん\", template.save(PartOfSpeech.builder()\n .shortName(\"くん\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"суффикс くん\")))\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.SUFFIX)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"これ\", template.save(PartOfSpeech.builder()\n .shortName(\"これ\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"предметно-указательное местоимение これ\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"それ\", template.save(PartOfSpeech.builder()\n .shortName(\"それ\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"предметно-указательное местоимение それ\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"あれ\", template.save(PartOfSpeech.builder()\n .shortName(\"あれ\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"предметно-указательное местоимение あれ\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"この\", template.save(PartOfSpeech.builder()\n .shortName(\"この\")\n .translateName( List.of(new TranslateEntity(languageMap.get(\"ru\"), \"относительно-указательное местоимение この\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"その\", template.save(PartOfSpeech.builder()\n .shortName(\"その\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"относительно-указательное местоимение その\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"あの\", template.save(PartOfSpeech.builder()\n .shortName(\"あの\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"относительно-указательное местоимение あの\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"文\", template.save(PartOfSpeech.builder()\n .shortName(\"文\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"показатель предложения\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"、\", template.save(PartOfSpeech.builder()\n .shortName(\"、\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"символ запятой\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"。\", template.save(PartOfSpeech.builder()\n .shortName(\"。\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"символ точки\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"お\", template.save(PartOfSpeech.builder()\n .shortName(\"お\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"показатель вежливости, префикс к существительному\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"name\", template.save(PartOfSpeech.builder()\n .shortName(\"name\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"имя, фамилия и тд\")))\n .build()));\n\n/*\n wordTypeMap.putIfAbsent(\"\", template.save(new WordType(\"\",\n List.of(new TranslateEntity(languageMap.get(\"ru\"), \"\"), new TranslateEntity(languageMap.get(\"en\"), \"\")), \"\")));\n*/\n\n }",
"public void loadTemplates()\n {\n for (PageTemplate template : templates.values())\n {\n template.load(pageDirectory);\n }\n }",
"private void browseTemplateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseTemplateActionPerformed\n JFileChooser chooser = new JFileChooser();\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Word document\", new String[]{\"doc\", \"docx\"});\n chooser.setFileFilter(filter);\n chooser.setCurrentDirectory(new java.io.File(\".\"));\n chooser.setDialogTitle(\"Select a file\");\n chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n chooser.setAcceptAllFileFilterUsed(false);\n\n if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n templateDoc.setText(chooser.getSelectedFile().getPath());\n }\n }",
"@Override\n public void onSuccess(List<VMResource> result) {\n newFile.setName(checkDuplicateName(result, fileName, newFile.getExtension(), 0));\n ZGCreateFileCommand createFileCommand = new ZGCreateFileCommand(editResourceService, viewHandler, dirID, newFile, null);\n createFileCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createFileCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n editResourceService.getFileContent(createFileCommand.getFileId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n EPackage.Registry.INSTANCE.put(FSMPackage.eNS_URI, FSMPackage.eINSTANCE);\n\n FSMDStateMachine machine = null;\n try {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n machine = (FSMDStateMachine) r.getContents().get(0);\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n ARCState newState = ARCFactory.eINSTANCE.createARCState();\n newState.setFileId(machine.getId());\n newState.setTop(arcEditor.getStateTop());\n newState.setLeft(arcEditor.getStateLeft());\n newState.setHeight(40);\n newState.setWidth(80);\n newState.setEvalPriority(arcEditor.getMaxEvalPriority());\n\n CompoundCommand cmd = ARCEditorCommandProvider.getInstance().addState(arcEditor.getARCRoot(), newState,\n arcEditor.getARCRoot().getStates().size());\n arcEditor.getEditManager().execute(cmd.unwrap());\n arcEditor.refresh();\n }\n });\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(createFileCommand);\n manager.execute(c.unwrap());\n }",
"public RSyntaxDocument updateDocument() {\r\n \r\n docVar = (RSyntaxDocument) editorPane.getDocument();\r\n syntaxDocument = docVar;\r\n \r\n return syntaxDocument;\r\n }",
"@Override\n\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\n\t\t}",
"@Override\n public void process(Node externs, Node root) {\n NodeUtil.createSynthesizedExternsSymbol(compiler, GOOG_LOCALE_REPLACEMENT);\n ProtectCurrentLocale protectLocaleCallback = new ProtectCurrentLocale(compiler);\n NodeTraversal.traverse(compiler, root, protectLocaleCallback);\n localeData = new LocaleDataImpl(null);\n }",
"@Override\n public void storeParsedText() {\n parsedHtmlPages.parallelStream().forEach(parsedHtmlPage -> {\n FileUtility.writeToFile(parsedHtmlPage, FILE_DIRECTORY_NAME + FILE_SEPARATOR + parsedHtmlPage.getTitle());\n });\n }",
"@Override\n protected void processPages(PDPageTree pages) throws IOException {\n\n List<ObjectRef> pageRefs = new ArrayList<>();\n //STEP 1: get the page refs\n findPages(pdDocument.getPages().getCOSObject().getItem(COSName.KIDS), pageRefs);\n //confirm the right number of pages was found\n if (pageRefs.size() != pdDocument.getNumberOfPages()) {\n throw new IOException(new TikaException(\n \"Couldn't find the right number of page refs (\" + pageRefs.size() +\n \") for pages (\" + pdDocument.getNumberOfPages() + \")\"));\n }\n\n PDStructureTreeRoot structureTreeRoot =\n pdDocument.getDocumentCatalog().getStructureTreeRoot();\n\n //STEP 2: load the roleMap\n Map<String, HtmlTag> roleMap = loadRoleMap(structureTreeRoot.getRoleMap());\n\n //STEP 3: load all of the text, mapped to MCIDs\n Map<MCID, String> paragraphs = loadTextByMCID(pageRefs);\n\n //STEP 4: now recurse the the structure tree root and output the structure\n //and the text bits from paragraphs\n\n try {\n recurse(structureTreeRoot.getK(), null, 0, paragraphs, roleMap);\n } catch (SAXException e) {\n throw new IOException(e);\n }\n\n //STEP 5: handle all the potentially unprocessed bits\n try {\n if (state.hrefAnchorBuilder.length() > 0) {\n xhtml.startElement(\"p\");\n writeString(state.hrefAnchorBuilder.toString());\n xhtml.endElement(\"p\");\n }\n for (MCID mcid : paragraphs.keySet()) {\n if (!state.processedMCIDs.contains(mcid)) {\n if (mcid.mcid > -1) {\n //TODO: LOG! piece of text that wasn't referenced in the marked content\n // tree\n // but should have been. If mcid == -1, this was a known item not part of\n // content tree.\n }\n\n xhtml.startElement(\"p\");\n writeString(paragraphs.get(mcid));\n xhtml.endElement(\"p\");\n }\n }\n } catch (SAXException e) {\n throw new IOException(e);\n }\n //Step 6: for now, iterate through the pages again and do all the other handling\n //TODO: figure out when we're crossing page boundaries during the recursion\n // step above and do the page by page processing then...rather than dumping this\n // all here.\n for (PDPage page : pdDocument.getPages()) {\n startPage(page);\n endPage(page);\n }\n\n }",
"public final void run() {\t\n\t\tlong timeStamp = file.lastModified();\n\t if( this.timeStamp != timeStamp ) {\n\t \tthis.timeStamp = timeStamp;\n\t \tonChange(file);\n\t }\n\t}",
"void currentDocumentChanged(SingleDocumentModel previousModel, SingleDocumentModel currentModel);",
"private void loadDescribedTemplateData() {\r\n if (connect == null) {\r\n System.out.println(\"<internal> DescribedTemplateCore.loadDescribedTemplateData() finds no database connection and exits\");\r\n return;\r\n }\r\n\r\n Statement statement = null;\r\n ResultSet resultSet = null;\r\n try {\r\n String strDTNum = String.valueOf(pk_described_template);\r\n statement = connect.createStatement();\r\n\r\n // acquire described template info; note: template to described_template is 1 to many, so from described_template to template is 1:1\r\n resultSet = statement.executeQuery( \"SELECT fk_version_set, fk_template, description_hash, synchronized, hash, enabled, steps \" +\r\n \"FROM described_template \" +\r\n \"JOIN template ON fk_template = pk_template \" +\r\n \"WHERE pk_described_template = \" + strDTNum );\r\n\r\n if ( resultSet.next() ) {\r\n dbDescribedTemplate.fk_version_set = resultSet.getBytes(\"fk_version_set\");\r\n dbDescribedTemplate.fk_template = resultSet.getLong(\"fk_template\");\r\n dbDescribedTemplate.description_hash = resultSet.getBytes(\"description_hash\");\r\n dbDescribedTemplate.dtSynchronized = resultSet.getBoolean(\"synchronized\");\r\n dbDescribedTemplate.template_hash = resultSet.getBytes(\"hash\");\r\n dbDescribedTemplate.enabled = resultSet.getBoolean(\"enabled\");\r\n dbDescribedTemplate.steps = resultSet.getString(\"steps\");\r\n System.out.println(\" <internal> DescribedTemplateCore.loadDescribedTemplateData() loads data from described template record \" + pk_described_template);\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n } else {\r\n throw new Exception(\"described template data not present\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n\r\n // acquire matching run info\r\n try {\r\n String strTemplateNum = String.valueOf(dbDescribedTemplate.fk_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_run, artifacts, start_time, ready_time, end_time, passed \" +\r\n \"FROM run \" +\r\n \"WHERE fk_template = \" + strTemplateNum );\r\n while ( resultSet.next() ) {\r\n DBRun dbRun = new DBRun(resultSet.getLong(\"pk_run\"));\r\n dbRun.artifacts = resultSet.getBytes(\"artifacts\");\r\n dbRun.start_time = resultSet.getDate(\"start_time\");\r\n dbRun.ready_time = resultSet.getDate(\"ready_time\");\r\n dbRun.end_time = resultSet.getDate(\"end_time\");\r\n dbRun.passed = resultSet.getBoolean(\"passed\");\r\n dbDescribedTemplate.pkdtToDBRun.put(pk_described_template, dbRun);\r\n System.out.println(\" <internal> TemplateCore.loadTemplateData() loads data from described_template-matched run record \" + dbRun.pk_run);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n } \r\n \r\n // acquire matching test_instance info; note: described_template to test_instance is 1:1\r\n try {\r\n String strDescribedTemplateNum = String.valueOf(pk_described_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_test_instance, fk_run, due_date, phase, synchronized \" +\r\n \"FROM test_instance \" +\r\n \"WHERE fk_described_template = \" + strDescribedTemplateNum);\r\n while ( resultSet.next() ) {\r\n DBTestInstance dbTestInstance = new DBTestInstance(resultSet.getLong(\"pk_test_instance\"));\r\n dbTestInstance.fk_run = resultSet.getLong(\"fk_run\"); // null entry returns 0\r\n dbTestInstance.due_date = resultSet.getDate(\"due_date\");\r\n dbTestInstance.phase = resultSet.getInt(\"phase\");\r\n dbTestInstance.iSynchronized = resultSet.getBoolean(\"synchronized\");\r\n dbDescribedTemplate.pkdtToDBTestInstance.put(pk_described_template, dbTestInstance);\r\n System.out.println(\" <internal> TemplateCore.loadDescribedTemplateData() loads data from described_template-matched test_instance record \" + dbTestInstance.pk_test_instance);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n } \r\n\r\n // acquire corresponding multiple lines of data\r\n try {\r\n String strPKDT = String.valueOf(dbDescribedTemplate.pk_described_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_dt_line, line, description \" +\r\n \"FROM dt_line \" +\r\n \"WHERE fk_described_template = \" + strPKDT );\r\n while ( resultSet.next() ) {\r\n DBDTLine dtLine = new DBDTLine();\r\n dtLine.pk_dt_line = resultSet.getLong(\"pk_dt_line\"); // null entry returns 0\r\n dtLine.line = resultSet.getInt(\"line\");\r\n dtLine.dtLineDescription = resultSet.getString(\"description\");\r\n System.out.println(\" <internal> DescribedTemplateCore.loadDescribedTemplateData() loads line data from dt_line \" + dtLine.pk_dt_line);\r\n\r\n dbDescribedTemplate.pkdtToDTLine.put(dtLine.pk_dt_line, dtLine);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n\r\n // get corresponding artifact information; not every dtLine has corresponding artifact information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT is_primary, reason, pk_artifact, fk_version, fk_content, synchronized, platform, internal_build, name \" +\r\n \"FROM artifact_to_dt_line \" +\r\n \"JOIN artifact ON fk_artifact = pk_artifact \" +\r\n \"WHERE fk_dt_line = \" + strPKDTLine );\r\n if ( resultSet.next() ) {\r\n dtLine.is_primary = resultSet.getBoolean(\"is_primary\");\r\n dtLine.reason = resultSet.getString(\"reason\");\r\n dtLine.pk_artifact = resultSet.getLong(\"pk_artifact\");\r\n dtLine.pk_version = resultSet.getLong(\"fk_version\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads artifact data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding version information; not every dtLine has corresponding version information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKVersion = String.valueOf(dtLine.pk_version);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT version, scheduled_release, actual_release, sort_order \" +\r\n \"FROM version \" +\r\n \"WHERE pk_version = \" + strPKVersion );\r\n if ( resultSet.next() ) {\r\n dtLine.version = resultSet.getString(\"version\");\r\n dtLine.scheduled_release = resultSet.getDate(\"scheduled_release\");\r\n dtLine.actual_release = resultSet.getDate(\"actual_release\");\r\n dtLine.sort_order = resultSet.getInt(\"sort_order\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads version data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding content information; not every dtLine has corresponding content information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKArtifact = String.valueOf(dtLine.pk_artifact);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_content, is_generated \" +\r\n \"FROM content \" +\r\n \"JOIN artifact ON fk_content = pk_content \" +\r\n \"WHERE pk_artifact = \" + strPKArtifact );\r\n if ( resultSet.next() ) {\r\n dtLine.pk_content = resultSet.getBytes(\"pk_content\");\r\n dtLine.is_generated = resultSet.getBoolean(\"is_generated\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads content data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding component information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKVersion = String.valueOf(dtLine.pk_version);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT name \" +\r\n \"FROM component \" +\r\n \"JOIN version ON fk_component = pk_component \" +\r\n \"WHERE pk_version = \" + strPKVersion );\r\n if ( resultSet.next() ) {\r\n dtLine.componentName = resultSet.getString(\"name\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads component data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n }\r\n\r\n // get corresponding resource information; not every dtLine has corresponding resource information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT hash, name, resource.description \" +\r\n \"FROM dt_line \" +\r\n \"JOIN resource ON fk_resource = pk_resource \" +\r\n \"WHERE pk_dt_line = \" + strPKDTLine );\r\n if ( resultSet.next() ) {\r\n dtLine.resourceHash = resultSet.getBytes(\"hash\");\r\n dtLine.resourceName = resultSet.getString(\"name\");\r\n dtLine.resourceDescription = resultSet.getString(\"description\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads resource data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n }",
"@Override\n public void run() {\n String whichFiles = \"'\" + languageFolder.getId() + \"' in parents and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET;\n List<File> files = getContents(whichFiles);\n \n prune(localLanguageFolder, files);\n processFolders(files, localLanguageFolder);\n }",
"void localizationChaneged();",
"private void importLanguage(JTFFile file) {\n if (file.getLanguage() != null) {\n if (languagesService.exist(file.getLanguage())) {\n file.setLanguage(languagesService.getSimpleData(file.getLanguage().getName()));\n } else {\n languagesService.create(file.getLanguage());\n }\n\n file.getFilm().setTheLanguage(file.getLanguage());\n }\n }",
"public void doSaveAs() {\n\t\tif (activePage == 0 && introEditor.isUpdated() || introEditor.isDirty())\n\t\t\tupdateIntroEditor();\n\t\tif (activePage == 1 && (pageMainEditor.isUpdated() || pageMainEditor.isDirty()))\n\t\t\tupdateFile();\n\t\tIEditorPart editor = getTextEditor();\n\t\teditor.doSaveAs();\n\t\tsetPageText(getTextEditorIndex(), editor.getTitle());\n\t\tsetInput(editor.getEditorInput());\n\t}",
"protected void processTemplate(Map<String,?> attributes, Writer out, Template template, String encoding) throws IOException {\n long startTime = System.currentTimeMillis();\n\n Context context = buildContext(attributes);\n template.setEncoding(encoding);\n\n try {\n template.merge(context, out);\n log.debug(\"Velocity template transform processed in \" + \n (System.currentTimeMillis() - startTime) + \" ms\");\n } catch (ResourceNotFoundException errAny) {\n throw new RuntimeException(\"Error merging the velocity template\", errAny);\n } catch (ParseErrorException errAny) {\n throw new RuntimeException(\"Error merging the velocity template\", errAny);\n } catch (Exception errAny) {\n throw new RuntimeException(\"Error merging the velocity template\", errAny);\n }\n }",
"protected void updateDisplay() {\n\t\t\t// this is called when upload is completed\n\n\t\t\tString filename = getLastFileName();\n\t\t\tfor (SetupMapViewListener listener : listeners)\n\t\t\t\tlistener.shapeFileUploadedEvent(filename, new ByteArrayInputStream((byte[]) getValue()));\n\t\t}",
"public void ardublockLocalize(Document doc) {\n if (langResourceBundle != null) {\n // \t//System.out.println(\"in localize :\"+doc.toString());\n \tNodeList nodes = doc.getElementsByTagName(\"BlockGenus\");\n \tfor (int i = 0 ; i < nodes.getLength(); i++) {\n \t\tElement elm = (Element)nodes.item(i);\n \t\tString name = elm.getAttribute(\"name\");\n \t\tString initlabel = elm.getAttribute(\"initlabel\");\n\t\t\t\t\n \t\t// //System.out.println(\"Translating BlockGenu:\" + name);\n\t\t\t\t\n \t\tString altName;\n\t\t\t\ttry {\n\t\t\t\t\taltName = langResourceBundle.getString(\"bg.\" + name);\n\t\t\t\t\tif (altName != null) {\n\t\t\t\t\t\telm.setAttribute(\"initlabel\", altName);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t//tix\n\t\t\t\t\telm.setAttribute(\"initlabel\", initlabel);\n\t\t\t\t}\n\t\t\t\tNodeList descriptions = elm.getElementsByTagName(\"description\");\n\t\t\t\tElement description = (Element)descriptions.item(0);\n\t\t\t\tif (description != null) {\n\t\t\t\t\tNodeList texts = description.getElementsByTagName(\"text\");\n\t\t\t\t\tElement text = (Element)texts.item(0);\n\t\t\t\t\tif (text != null) {\n\t\t\t\t\t\tString pname = \"bg.\" + name + \".description\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\taltName = langResourceBundle.getString(pname);\n\t\t\t\t\t\t\tif (altName != null) {\n\t\t\t\t\t\t\t\ttext.setTextContent(altName);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (java.util.MissingResourceException mre) {\n\t\t\t\t\t\t\ttext.setTextContent(text.getTextContent());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tNodeList arg_descs = elm.getElementsByTagName(\"arg-description\");\n\t\t\t\tfor (int j = 0 ; j < arg_descs.getLength(); j++) {\n\t\t\t\t\tElement arg_desc = (Element)arg_descs.item(j);\n\t\t\t\t\tString arg_name = arg_desc.getAttribute(\"name\");\n\t\t\t\t\t// //System.out.println(\"bg.\" + name + \".arg_desc.\" + arg_name);\n\t\t\t\t}\n\t\t\t}\n \tnodes = doc.getElementsByTagName(\"BlockDrawer\");\n \tfor (int i = 0 ; i < nodes.getLength(); i++) {\n \t\tElement elm = (Element)nodes.item(i);\n \t\tString name = elm.getAttribute(\"name\");\n \t\ttry {\n\t\t\t\t\tString altName = langResourceBundle.getString(name);\n\t\t\t\t\tif (altName != null) {\n\t\t\t\t\t\telm.setAttribute(\"name\", altName);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t//tix\n\t\t\t\t\telm.setAttribute(\"name\", name);\n\t\t\t\t}\n \t}\n \tnodes = doc.getElementsByTagName(\"BlockConnector\");\n \tfor (int i = 0 ; i < nodes.getLength(); i++) {\n \t\tElement elm = (Element)nodes.item(i);\n \t\tString name = elm.getAttribute(\"label\");\n \t\tif (name.startsWith(\"bc.\")) {\n\t\t\t\t\tString altName = langResourceBundle.getString(name);\n\t\t\t\t\tif (altName != null) {\n\t\t\t\t\t\telm.setAttribute(\"label\", altName);\n\t\t\t\t\t}\n\t\t\t\t}\n \t}\n }\n }",
"public void putDocumentAfterEdit() {\r\n\t\tif(pointer < strategy.getEntireHistory().size()-1) {\r\n\t\t\tstrategy.putVersion(currentDocument);\r\n\t\t}\r\n\t}",
"public void updateContent() {\n\t\t\n\t\tupdateResidencias();\n\t\tupdateUniversidades();\n\t\t\n\t}",
"public void languageChanged(LanguageChangedEvent evt) {\n this.applyI18n();\n }",
"@Override\r\n public void changedUpdate(DocumentEvent e) {\n ActivoTimer();\r\n }",
"protected void postProcessVelocityEngine(VelocityEngine velocityEngine) throws IOException,\n\t\t\tVelocityException {\n\t\tvelocityEngine.setApplicationAttribute(ServletContext.class.getName(),\n\t\t\t\tthis.config.getConfig(FinderConfig.SPRING_MVC_SERVLET));\n\t\tvelocityEngine.setProperty(LOST_MACRO_RESOURCE_LOADER_CLASS,\n\t\t\t\tClasspathResourceLoader.class.getName());\n\t\tvelocityEngine.addProperty(VelocityEngine.RESOURCE_LOADER, LOST_MACRO_RESOURCE_LOADER_NAME);\n\t\tvelocityEngine.setProperty(VelocityEngine.VM_LIBRARY,\n\t\t\t\t\"velocity/macro.vm,velocity/macro_default.vm\");\n\n\t}",
"public void fireDocumentInit() {\n\t\tsuper.fireDocumentInit();\n\t\ttheStructures.fireDocumentInit();\n\t}",
"@Override\n\tpublic void unReplace(String fileUploadPath) {\n\t\tbianLiTemplateFile(fileUploadPath);\n\t}",
"@Override\n\t\tpublic void setEditedContent(CGFile file) {\n\n\t\t}",
"public void run() {\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tif(_lastpresentation != null) {\r\n \t\t\t\t\t viewer.changeTextPresentation(_lastpresentation, true);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcatch(NullPointerException exc) {\r\n \t\t\t\t\t}\r\n \t\t\t\t}",
"@Override\r\n public String createSubTranlatedDocument(List<FirstElement> partElement, String filePath, boolean checked) {\n return null;\r\n }",
"private void syncContent() {\n \tdocument.setContent(textArea.getText());\n }",
"@Override\n\tpublic void refresh() {\n\t\tif (selectedModule != null) {\n\t\t\tselectedModule = batchClass.getModuleByWorkflowName(selectedModule.getWorkflowName());\n\t\t}\n\t\tif (selectedPlugin != null) {\n\t\t\tselectedPlugin = selectedModule.getPluginByName(selectedPlugin.getPlugin().getPluginName());\n\t\t}\n\n\t\tif (pluginConfigDTO != null) {\n\t\t\tif (pluginConfigDTO.getQualifier() != null) {\n\t\t\t\tpluginConfigDTO = selectedPlugin.getBatchClassPluginConfigDTOByQualifier(pluginConfigDTO.getQualifier());\n\t\t\t} else {\n\t\t\t\tpluginConfigDTO = selectedPlugin.getBatchClassPluginConfigDTOByName(pluginConfigDTO.getName());\n\t\t\t}\n\t\t}\n\n\t\tif (selectedDocument != null) {\n\t\t\tselectedDocument = batchClass.getDocTypeByName(selectedDocument.getName());\n\t\t}\n\n\t\tif (selectedWebScannerConfiguration != null) {\n\t\t\tselectedWebScannerConfiguration = batchClass.getScannerConfigurationByProfileName(selectedWebScannerConfiguration\n\t\t\t\t\t.getValue());\n\t\t}\n\n\t\tif (selectedEmailConfiguration != null) {\n\t\t\tselectedEmailConfiguration = batchClass.getEmailConfigurationByFields(selectedEmailConfiguration.getUserName(),\n\t\t\t\t\tselectedEmailConfiguration.getPassword(), selectedEmailConfiguration.getServerName(), selectedEmailConfiguration\n\t\t\t\t\t\t\t.getServerType(), selectedEmailConfiguration.getFolderName());\n\t\t}\n\n\t\tif (selectedField != null && selectedDocument != null) {\n\t\t\tselectedField = selectedDocument.getFieldTypeByName(selectedField.getName());\n\t\t}\n\n\t\tif (tableInfoSelectedField != null && selectedDocument != null) {\n\t\t\ttableInfoSelectedField = selectedDocument.getTableInfoByName(tableInfoSelectedField.getName());\n\t\t}\n\n\t\tif (selectedFunctionKeyDTO != null && selectedDocument != null) {\n\t\t\tselectedFunctionKeyDTO = selectedDocument.getFunctionKeyDTOByShorcutKeyName(selectedFunctionKeyDTO.getShortcutKeyName());\n\t\t}\n\n\t\tif (selectedTableColumnInfoField != null && tableInfoSelectedField != null) {\n\t\t\tselectedTableColumnInfoField = tableInfoSelectedField.getTCInfoDTOByNameAndPattern(selectedTableColumnInfoField\n\t\t\t\t\t.getColumnName(), selectedTableColumnInfoField.getColumnPattern());\n\t\t}\n\n\t\tif (kvExtractionDTO != null && kvExtractionDTO.isSimpleKVExtraction() && selectedField != null) {\n\t\t\tkvExtractionDTO = selectedField.getKVExtractionByKeyAndDataTypeAndLocation(kvExtractionDTO.getKeyPattern(),\n\t\t\t\t\tkvExtractionDTO.getValuePattern(), kvExtractionDTO.getLocationType());\n\t\t}\n\n\t\tif (regexDTO != null && selectedField != null) {\n\t\t\tregexDTO = selectedField.getRegexDTOByPattern(regexDTO.getPattern());\n\t\t}\n\n\t\tif (kvPageProcessDTO != null && pluginConfigDTO != null) {\n\t\t\tkvPageProcessDTO = pluginConfigDTO.getKVPageProcessByKeyAndDataTypeAndLocation(kvPageProcessDTO.getKeyPattern(),\n\t\t\t\t\tkvPageProcessDTO.getValuePattern(), kvPageProcessDTO.getLocationType());\n\t\t}\n\n\t\tif (batchClassDynamicPluginConfigDTO != null && selectedPlugin != null) {\n\t\t\tbatchClassDynamicPluginConfigDTO = selectedPlugin\n\t\t\t\t\t.getBatchClassPluginConfigDTOByDescription(batchClassDynamicPluginConfigDTO.getDescription());\n\t\t}\n\t\tif (selectedBatchClassField != null) {\n\t\t\tselectedBatchClassField = batchClass.getBatchClassFieldByName(selectedBatchClassField.getName());\n\t\t}\n\n\t\teventBus.fireEvent(new BindEvent());\n\t}",
"private void upgradeDictionary() throws IOException {\n File fileAnnotation = new File(filePathAnnSource);\n FileReader fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n if (fileAnnotation.exists()) {\n while ((line = br.readLine()) != null) {\n String[] annotations = line.split(\"[ \\t]\");\n String word = line.substring(line.lastIndexOf(\"\\t\") + 1);\n\n if (!nonDictionaryTerms.contains(word.toLowerCase())) {\n if (dictionaryTerms.containsKey(word.toLowerCase())) {\n if (!dictionaryTerms.get(word.toLowerCase()).equalsIgnoreCase(annotations[1])) {\n System.out.println(\"Conflict: word:: \" + word + \" Dictionary Tag: \" + dictionaryTerms.get(word.toLowerCase()) + \" New Tag: \" + annotations[1]);\n nonDictionaryTerms.add(word.toLowerCase());\n// removeLineFile(dictionaryTerms.get(word.toLowerCase())+\" \"+word.toLowerCase(),filePathDictionaryAuto);\n dictionaryTerms.remove(word.toLowerCase());\n writePrintStream(word, filePathNonDictionaryAuto);\n }\n } else {\n System.out.println(\"Updating Dictionary:: Word: \" + word + \"\\tTag: \" + annotations[1]);\n dictionaryTerms.put(word.toLowerCase(), annotations[1]);\n writePrintStream(annotations[1] + \" \" + word.toLowerCase(), filePathDictionaryAuto);\n }\n }\n\n// if (dictionaryTerms.containsKey(word.toLowerCase())) {\n// if (!dictionaryTerms.get(word.toLowerCase()).equalsIgnoreCase(annotations[1])) {\n// System.out.println(\"Conflict: word: \" + word + \" Dictionary Tag: \" + dictionaryTerms.get(word.toLowerCase()) + \" New Tag: \" + annotations[1]);\n// nonDictionaryTerms.add(word.toLowerCase());\n//\n// }\n// } else {\n// dictionary.add(word.toLowerCase());\n// dictionaryTerms.put(word.toLowerCase(), annotations[1]);\n// System.out.println(\"Updating Dictionary: Word: \" + word + \"\\tTag: \" + annotations[1]);\n// }\n }\n }\n\n\n br.close();\n fr.close();\n }",
"public void updateI18N() {\n\t\t/* Update I18N in the menuStructure */\n\t\tappMenu.updateI18N();\n\t\t/* Pack all */\n\t\tLayoutShop.packAll(shell);\n\t}",
"public void ProcessFiles() {\n LOG.info(\"Processing SrcML files ...\");\n final Collection<File> allFiles = ctx.files.AllFiles();\n int processed = 0;\n final int numAllFiles = allFiles.size();\n final int logDiv = Math.max(1, Math.round(numAllFiles / 100f));\n\n for (File file : allFiles) {\n final String filePath = file.filePath;\n final FilePath fp = ctx.internFilePath(filePath);\n\n Document document = readSrcmlFile(filePath);\n DocWithFileAndCppDirectives extDoc = new DocWithFileAndCppDirectives(file, fp, document, ctx);\n\n internAllFunctionsInFile(file, document);\n processFeatureLocationsInFile(extDoc);\n\n if ((++processed) % logDiv == 0) {\n int percent = Math.round((100f * processed) / numAllFiles);\n LOG.info(\"Parsed SrcML file \" + processed + \"/\" + numAllFiles\n + \" (\" + percent + \"%) (\" + (numAllFiles - processed) + \" to go)\");\n }\n }\n\n LOG.info(\"Parsed all \" + processed + \" SrcML file(s).\");\n }",
"public void removeAllTranslations()\n\t{\n\t\tfor (int k = 0; k < this.xliffEditorWindow.getIOverallSegmentNumber(); k++)\n\t\t{\n\t\t\tthis.xliffEditorWindow.gotoSegment(k, true);\n\t\t\tint iRes = this.xliffEditorWindow.setTranslation(k, \"\", false);\n\t\t\tif (iRes == SWT.YES)\n\t\t\t\tthis.xliffEditorWindow.getBTranslatedSegments()[k] = false;\n\t\t}\n\t\tthis.showAltTrans(this.xliffEditorWindow.getIOverallSegmentNumber() - 1, 0, 0);\n\t\tsegmentNumber.setText(message.getString(\"_Segmentnumber\") + \" \" + (this.xliffEditorWindow.getIOverallSegmentNumber() - 1) + \"/\"\n\t\t\t\t+ this.getXliffEditorWindow().getIOverallSegmentNumber() + \" (\" + this.getXliffEditorWindow().countApprovedSegments() + \"/\"\n\t\t\t\t+ this.getXliffEditorWindow().countTranslatedSegments() + \")\");\n\n\t}",
"@Override\n protected void registerCustomListeners(@NotNull MessageBusConnection connection) {\n connection.subscribe(EncodingManagerListener.ENCODING_MANAGER_CHANGES, (document, propertyName, oldValue, newValue) -> {\n if (propertyName.equals(EncodingManagerImpl.PROP_CACHED_ENCODING_CHANGED)) {\n updateForDocument(document);\n }\n });\n\n connection.subscribe(VirtualFileManager.VFS_CHANGES, new BulkVirtualFileListenerAdapter(new VirtualFileListener() {\n @Override\n public void propertyChanged(@NotNull VirtualFilePropertyEvent event) {\n if (VirtualFile.PROP_ENCODING.equals(event.getPropertyName())) {\n updateForFile(event.getFile());\n }\n }\n }));\n }",
"@FxThread\n private void onFinishLoading() {\n pluginSystem.getPlugins().stream()\n .filter(EditorPlugin.class::isInstance)\n .map(EditorPlugin.class::cast)\n .forEach(editorPlugin -> editorPlugin.onFinishLoading(pluginSystem));\n }"
] | [
"0.54912853",
"0.53390205",
"0.52517396",
"0.5250903",
"0.5194793",
"0.5194793",
"0.5172563",
"0.5165318",
"0.51557523",
"0.5126497",
"0.5126226",
"0.51095635",
"0.5097766",
"0.5097152",
"0.5062575",
"0.50567746",
"0.50512475",
"0.50442207",
"0.5024048",
"0.50045484",
"0.4966753",
"0.49498066",
"0.49383524",
"0.4928115",
"0.49242973",
"0.4923197",
"0.4923197",
"0.49213743",
"0.49157876",
"0.49003422",
"0.48942676",
"0.4889506",
"0.48886415",
"0.48829782",
"0.4877844",
"0.48648605",
"0.48637784",
"0.4862483",
"0.48575655",
"0.48564506",
"0.4841349",
"0.48383123",
"0.4834366",
"0.48305035",
"0.4827997",
"0.48243704",
"0.48211938",
"0.48197588",
"0.4806298",
"0.47969496",
"0.47969496",
"0.47969496",
"0.4796931",
"0.47950983",
"0.47927132",
"0.47927132",
"0.4768714",
"0.47668093",
"0.47656995",
"0.47644424",
"0.47530416",
"0.47487667",
"0.47422272",
"0.4740518",
"0.4738599",
"0.4731636",
"0.4721012",
"0.47184077",
"0.47128817",
"0.46977738",
"0.46943018",
"0.468488",
"0.46820444",
"0.46818528",
"0.46767798",
"0.46713597",
"0.46626687",
"0.46623245",
"0.46602538",
"0.4653876",
"0.46528897",
"0.46482146",
"0.4645031",
"0.46434477",
"0.46405315",
"0.46356857",
"0.46258882",
"0.4625259",
"0.46208274",
"0.4619086",
"0.4617538",
"0.46141958",
"0.46107543",
"0.46087074",
"0.46046382",
"0.4599433",
"0.45884928",
"0.45825416",
"0.45788872",
"0.45742115",
"0.45724425"
] | 0.0 | -1 |
Creates a copy of this view provider linked with the given (typically light) file. The result provider is required to be NOT eventsystemenabled. | @NotNull
FileViewProvider createCopy(@NotNull VirtualFile copy); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PsiFile createFile(FileViewProvider viewProvider) {\n return new BytemanFileImpl(viewProvider);\n }",
"public void takePreviewSnapshot(String file);",
"public IFile createGraphicalView(IProject project) {\n \tif(versionName == null || versionName.equals(\"\"))\n \t\tthrow new NullPointerException(\"AViewCreatorForExternal Design Version Name: The name cannot be null\");\n\n \tif(rootFactId == null || rootFactId.equals(\"\"))\n \t\tthrow new NullPointerException(\"AViewCreatorForExternal Design Module FactID: The factid cannot be null\");\n\n \tif(selectedViewType == null || selectedViewType.equals(\"\"))\n \t\tthrow new NullPointerException(\"AViewCreatorForExternal Design View Type: The view type cannot be null\");\n\n \tif(selectedLayoutType == null || selectedLayoutType.equals(\"\"))\n \t\tthrow new NullPointerException(\"AViewCreatorForExternal Design Layout Type: The layout type cannot be null\"); \t\n\n \tif(project == null)\n \t\tthrow new NullPointerException(\"AViewCreatorForExternal Project: The project cannot be null\"); \t\n \t\n\t\t// if the cache file exists,\n \t// replace its contents with a new graphical view derived from ArchE design elements. \t\n// if (fileCache != null && fileCache.getProject().getName().equals(project.getName()) ){ \t\n// \tif(!replaceGraphicalViewInExistingCache())\n// \t\treturn null;\n// } \n// else {\n\n \tIPath newFilePath = project.getFullPath().append(DesignViewCreatorForExternal.DEFAULT_FILE_CACHE);\n \tif(!createCacheWithGraphicalView(newFilePath))\n \t\treturn null; \t\t\t\n// } \t\n \t \n return fileCache;\n }",
"public void viewOriginalWithExternalViewer()\n\t{\n\t\tif (CheckFileOperationEnable()) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//Bug Id 67336, end\n\n\t\ttransferToEdmMacro(\"ORIGINAL\",\"VIEWWITHEXTVIEWER\");\n\t}",
"FileReference createFile(String fileName, String toolId);",
"private void createView(Tab tab, VMFile file, PostProcessHandler handler) {\n editResourceService.getFileContent(file.getId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n AbstractRootElement root = null;\n try {\n if (file.getExtension() != Extension.TXT && file.getExtension() != Extension.LSC && file.getExtension() != Extension.CSC) {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n root = (AbstractRootElement) r.getContents().get(0);\n }\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n Editor editor;\n if (file.getExtension() == null) {\n editor = new TextEditor(tab, file, editResourceService);\n editor.create();\n } else\n switch (file.getExtension()) {\n\n case ARC:\n editor = new ARCEditor((ARCRoot) root, projectId, editResourceService);\n editor.create();\n clickNewStateMachine((ARCEditor) editor, file);\n clickOpenFile((ARCEditor) editor);\n break;\n case FM:\n editor = new FMEditor((FMRoot) root, projectId, file.getId(), editResourceService);\n editor.create();\n clickOpenFile((FMEditor) editor);\n clickCreateChildModel((FMEditor) editor, file);\n setFileNameToReferenceNode((FMEditor) editor);\n break;\n case FMC:\n editor = new FMCEditor((FMCRoot) root, file.getId(), projectId, editResourceService);\n editor.create();\n break;\n case FSM:\n editor = new FSMEditor((FSMDStateMachine) root, file.getId());\n editor.create();\n break;\n case SCD:\n editor = new SCDEditor((SCDRoot) root, tab, projectId, ModelingProjectView.this, editResourceService);\n editor.create();\n clickOpenFile((SCDEditor) editor);\n break;\n case SPQL:\n editor = new SPQLEditor((SPQLRoot) root, tab, projectId, editResourceService);\n editor.create();\n clickOpenFile((SPQLEditor) editor);\n break;\n case TC:\n editor = new TCEditor((TCRoot) root, projectId, file.getName(), editResourceService);\n editor.create();\n break;\n case BPS:\n editor = new BPSEditor((BPSRoot) root, ModelingProjectView.this, projectId, file.getId(), editResourceService);\n editor.create();\n break;\n case BP:\n editor = new BPEditor((BPRoot) root, projectId, file, editResourceService);\n editor.create();\n break;\n case FPS:\n editor = new TPSEditor((TPSRoot) root, ModelingProjectView.this, projectId, file.getId(), editResourceService);\n editor.create();\n break;\n case FP:\n editor = new TPViewer((TPRoot) root, projectId, file, editResourceService);\n editor.create();\n break;\n case CSC:\n editor = new CSCEditor(tab, file, editResourceService);\n editor.create();\n break;\n case SCSS:\n editor = new CBEditor((CBRoot) root, ModelingProjectView.this, projectId, file.getId(), editResourceService);\n editor.create();\n break;\n case SCS:\n editor = new SCSEditor((SCSRoot) root, ModelingProjectView.this, projectId, file, editResourceService);\n editor.create();\n break;\n case CSCS:\n editor = new CSCSEditor((CSCSRoot) root, projectId, file);\n editor.create();\n break;\n default:\n editor = new TextEditor(tab, file, editResourceService);\n editor.create();\n }\n createTabMenu(tab, editor.getSaveItem());\n clickSaveFile(editor, tab);\n\n if (editor instanceof NodeArrangeInterface) {\n NodeArrange.add((NodeArrangeInterface) editor);\n }\n tab.setPane(editor.getLayout());\n tab.setAttribute(EDITOR, editor);\n editorTabSet.addTab(tab);\n editorTabSet.selectTab(tab.getAttributeAsString(\"UniqueId\"));\n if (handler != null) {\n handler.execute();\n }\n }\n });\n }",
"@Override\r\n protected XarSource createXarSource(File file)\r\n {\n return xarSourceWrapper.getXarSource(this);\r\n }",
"public void onClickFileView(View view) {\n Intent i = new Intent(this, TestActivity.class);\n i.putExtra(\"providerType\", ProviderType.FILE_MANAGEMENT);\n startActivity(i);\n }",
"@Override\r\n\tpublic Viewer create(String name) {\n\t\tif(this.isAllDataPresent())\r\n\t\t{\r\n\t\t\treturn new StressViewer(name);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public abstract SoftwareLight copy();",
"private void clickNewStateMachine(ARCEditor arcEditor, VMFile file) {\n ClickHandler clickHandler = new ClickHandler() {\n @Override\n public void onClick(MenuItemClickEvent event) {\n editResourceService.getDirId(file.getId(), new AsyncCallback<Long>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Long dirID) {\n VMFile newFile = new VMFile();\n newFile.setExtension(Extension.FSM);\n String fileName = \"StateMachine\";\n\n editResourceService.getResources(dirID, new AsyncCallback<List<VMResource>>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(List<VMResource> result) {\n // check duplicate file name under same directory and set file name\n newFile.setName(checkDuplicateName(result, fileName, newFile.getExtension(), 0));\n ZGCreateFileCommand createFileCommand = new ZGCreateFileCommand(editResourceService, viewHandler, dirID, newFile, null);\n createFileCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createFileCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n editResourceService.getFileContent(createFileCommand.getFileId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n EPackage.Registry.INSTANCE.put(FSMPackage.eNS_URI, FSMPackage.eINSTANCE);\n\n FSMDStateMachine machine = null;\n try {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n machine = (FSMDStateMachine) r.getContents().get(0);\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n ARCState newState = ARCFactory.eINSTANCE.createARCState();\n newState.setFileId(machine.getId());\n newState.setTop(arcEditor.getStateTop());\n newState.setLeft(arcEditor.getStateLeft());\n newState.setHeight(40);\n newState.setWidth(80);\n newState.setEvalPriority(arcEditor.getMaxEvalPriority());\n\n CompoundCommand cmd = ARCEditorCommandProvider.getInstance().addState(arcEditor.getARCRoot(), newState,\n arcEditor.getARCRoot().getStates().size());\n arcEditor.getEditManager().execute(cmd.unwrap());\n arcEditor.refresh();\n }\n });\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(createFileCommand);\n manager.execute(c.unwrap());\n }\n });\n }\n });\n }\n };\n arcEditor.addNewStateMachineHandler(clickHandler);\n }",
"@RequiredUIAccess\n private void fileOpenedImpl(@Nonnull final VirtualFile file, @Nullable final FileEditor fallbackEditor, @Nullable FileEditorProvider fallbackProvider) {\n myProject.getApplication().assertIsDispatchThread();\n // don't add files that cannot be found via VFM (light & etc.)\n if (VirtualFileManager.getInstance().findFileByUrl(file.getUrl()) == null) return;\n\n final FileEditorManagerEx editorManager = FileEditorManagerEx.getInstanceEx(myProject);\n\n final Pair<FileEditor[], FileEditorProvider[]> editorsWithProviders = editorManager.getEditorsWithProviders(file);\n FileEditor[] editors = editorsWithProviders.getFirst();\n FileEditorProvider[] oldProviders = editorsWithProviders.getSecond();\n if (editors.length <= 0 && fallbackEditor != null) {\n editors = new FileEditor[]{fallbackEditor};\n }\n if (oldProviders.length <= 0 && fallbackProvider != null) {\n oldProviders = new FileEditorProvider[]{fallbackProvider};\n }\n if (editors.length <= 0) {\n LOG.error(\"No editors for file \" + file.getPresentableUrl());\n }\n FileEditor selectedEditor = editorManager.getSelectedEditor(file);\n if (selectedEditor == null) {\n selectedEditor = fallbackEditor;\n }\n LOG.assertTrue(selectedEditor != null);\n final int selectedProviderIndex = ArrayUtil.find(editors, selectedEditor);\n LOG.assertTrue(selectedProviderIndex != -1, \"Can't find \" + selectedEditor + \" among \" + Arrays.asList(editors));\n\n final HistoryEntry entry = getEntry(file);\n if (entry != null) {\n moveOnTop(entry);\n }\n else {\n final FileEditorState[] states = new FileEditorState[editors.length];\n final FileEditorProvider[] providers = new FileEditorProvider[editors.length];\n for (int i = states.length - 1; i >= 0; i--) {\n FileEditorProvider provider = oldProviders[i];\n LOG.assertTrue(provider != null);\n providers[i] = provider;\n FileEditor editor = editors[i];\n if (editor.isValid()) {\n states[i] = editor.getState(FileEditorStateLevel.FULL);\n }\n }\n addEntry(HistoryEntry.createHeavy(myProject, file, providers, states, providers[selectedProviderIndex]));\n trimToSize(UISettings.getInstance());\n }\n }",
"@Override\n protected AbstractUrlBasedView buildView(String viewName) throws Exception {\n try (InputStream stream = getServletContext().getResourceAsStream(getPrefix() + \"/custom/jsp/\" + viewName + getSuffix())) {\n return super.buildView(\"/\" + (stream == null ? \"common\" : \"custom\") + \"/jsp/\" + viewName);\n }\n }",
"void callTreeCreateService(final FileViewer viewer, File file) {\n simpleContainer.mask(appearance.retrieveTreeUrlsMask());\n IsMaskable maskable = new IsMaskable() {\n @Override\n public void mask(String loadingMask) {\n simpleContainer.mask(loadingMask);\n }\n\n @Override\n public void unmask() {\n simpleContainer.unmask();\n }\n };\n fileEditorService.getTreeUrl(file.getPath(),\n false,\n new TreeUrlCallback(file,\n maskable,\n viewer));\n }",
"private File createRefFile( File f )\n {\n \tfinal String refExtension = \".ref\";\n \n \tString origFileName = f.getName();\n \tint dotPos = origFileName.lastIndexOf( \".\" );\n \tString strippedFileName = origFileName.substring( 0, dotPos ); // filename without extension, and without the dot!\n \n \treturn FileHandler.getFile( new String( harvesterDirName + File.separator + strippedFileName + refExtension ) );\n }",
"@Override\n\tpublic ByteProvider getByteProvider(GFile file, TaskMonitor monitor)\n\t\t\tthrows IOException, CancelledException {\n\t\tYAFFS2Entry entry = map2.get(file);\n\n\t\t// exit if selection is a directory\n\t\tif (entry.isDirectory()) {\n\t\t\tthrow new IOException(file.getName() + \" is a directory\");\n\t\t}\n\n\t\t// recall size of file and offset into the file system image\n\t\tlong fileOffset = entry.getFileOffset();\n\t\tlong size = entry.getSize();\n\n\t\t// return bytes for the selected file\n\t\ttry (YAFFS2InputStream YAFFS2Input = new YAFFS2InputStream(provider.getInputStream(0))) {\n\t\t\tbyte[] entryData = YAFFS2Input.getEntryData(fileOffset, size);\n\t\t\treturn new ByteArrayProvider(entryData, file.getFSRL());\n\t\t}\n\t}",
"public static IView createView(String viewName, Readable file) throws IllegalArgumentException {\r\n IView<IReadOnlyModel<IMusicNote, IMusicPiece>> outputView = null;\r\n MusicalOperations<IMusicNote, IMusicPiece> mutableModel = MusicReader.parseFile(file, new\r\n MusicModel.ModelBuilder());\r\n IReadOnlyModel<IMusicNote, IMusicPiece> inputModel = new ReadOnlyModel(mutableModel);\r\n\r\n switch (viewName.toLowerCase()) {\r\n case \"midi\":\r\n try {\r\n outputView = new MidiViewer(inputModel, MidiSystem.getSequencer());\r\n } catch (MidiUnavailableException e) {\r\n e.getMessage();\r\n }\r\n break;\r\n\r\n case \"visual\":\r\n outputView = new GUIView(inputModel);\r\n break;\r\n\r\n case \"console\":\r\n outputView = new ConsoleViewer(inputModel);\r\n break;\r\n\r\n case \"composite\":\r\n try {\r\n outputView = new CompositeView(inputModel, MidiSystem.getSequencer());\r\n } catch (MidiUnavailableException e) {\r\n e.getMessage();\r\n }\r\n break;\r\n\r\n default:\r\n throw new IllegalArgumentException(\"Invalid type of view specified!\");\r\n }\r\n\r\n return outputView;\r\n }",
"protected SlotFile copyAndOpen(String fileName) throws IOException {\r\n\t\t\r\n\t\tURL deltaFileUrl = getClass().getResource(fileName);\t\t\r\n\t\tFile tempDeltaFile = File.createTempFile(\"test\", \".dlt\");\r\n\t\t\r\n\t\t_tempFiles.add(tempDeltaFile);\r\n\t\t\r\n\t\tFileUtils.copyURLToFile(deltaFileUrl, tempDeltaFile);\r\n\t\tSlotFile slotFile = new SlotFile(tempDeltaFile.getAbsolutePath(), BinFileMode.FM_EXISTING);\r\n\t\t\r\n\t\treturn slotFile;\r\n\t}",
"protected SourceViewer createViewer(Composite parent) {\n \t\t\tSourceViewer viewer= new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);\n \t\t\tSourceViewerConfiguration configuration= new SourceViewerConfiguration() {\n \t\t\t\tpublic IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {\n \n \t\t\t\t\tContentAssistant assistant= new ContentAssistant();\n \t\t\t\t\tassistant.enableAutoActivation(true);\n \t\t\t\t\tassistant.enableAutoInsert(true);\n \t\t\t\t\tassistant.setContentAssistProcessor(fTemplateProcessor, IDocument.DEFAULT_CONTENT_TYPE);\n \t\t\t\t\treturn assistant;\n \t\t\t\t}\n \t\t\t};\n \t\t\tviewer.configure(configuration);\n \t\t\treturn viewer;\n \t\t}",
"public void createFile(View view) {\n // start the background file creation task\n CreateFileTask task = new CreateFileTask();\n task.execute();\n }",
"public FilePane(DownloadProvider provider) {\n super();\n this.provider = provider;\n }",
"@Override\n\tpublic ViewingObjectHolder getHolderFromFiles(String path) {\n\t\treturn new ViewingObjectHolder();\n\t}",
"public static MyFileContext create() {\n\t\treturn new MyContextImpl();\n\t}",
"private void createRecipeFromFile() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a\n // file (as opposed to a list of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers,\n // it would be \"*/*\".\n intent.setType(\"*/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n }",
"protected IContentProvider createContentProvider() {\r\n\t\treturn new ProjectAndSourceFolderContentProvider(this);\r\n\t}",
"@Override\n public AlgorithmProcess createProcess() {\n return new FileLoaderProcess(file);\n }",
"private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }",
"private void createCallbackFile(TreeNode selectedNode, VMResource resource, Long result, boolean windowOpen) {\n resource.setId(result);\n long parentId;\n if (selectedNode == null ? true : \"/\".equals(tree.getPath(selectedNode))) {\n fileTreeNodeFactory.getFileTreeNode(tree, rootId, resource);\n parentId = rootId;\n } else {\n parentId = ((FileTreeNode) selectedNode).getResource().getId();\n fileTreeNodeFactory.getFileTreeNode(tree, parentId, resource);\n }\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n treeGrid.deselectAllRecords();\n if (selectedNode != null && tree.isOpen(selectedNode) && resource instanceof VMFile) {\n treeGrid.selectRecord(fileTreeNodeFactory.findTreeNode(tree, resource.getId()));\n updateFileResource(result);\n if (windowOpen) {\n openEditor((FileTreeNode) fileTreeNodeFactory.findTreeNode(tree, resource.getId()), resource, new PostProcessHandler() {\n\n @Override\n public void execute() {\n Editor editor = (Editor) editorTabSet.getSelectedTab().getAttributeAsObject(EDITOR);\n if (editor != null && editor instanceof BPSEditor) {\n ((BPSEditor) editor).setIsReDrawEditor(false);\n }\n }\n });\n }\n }\n }",
"protected File copyURLToFile(String filename) throws IOException {\r\n\t\tURL deltaFileUrl = getClass().getResource(filename);\t\t\r\n\t\tFile tempFile = File.createTempFile(\"test\", \".dlt\");\r\n\t\t_tempFiles.add(tempFile);\r\n\t\tFileUtils.copyURLToFile(deltaFileUrl, tempFile);\t\t\r\n\t\treturn tempFile;\t\r\n\t}",
"@Override\r\n\tprotected Control createContents(Composite parent) {\n\t\tIProject project = (IProject) getElement().getAdapter(IProject.class);\r\n\t\tdfc = new DeepFileChanger(project.getLocation()\t+ \"/\" + project.getName() + \".deep\");\r\n\r\n\t\tlibPath = dfc.getContent(\"libpath\");\r\n\t\tif (!libPath.equals(\"not available\")) libPath = libPath.substring(1, libPath.length()-1);\r\n\t\tboard = dfc.getContent(\"boardtype\");\r\n\t\tprogrammer = dfc.getContent(\"programmertype\");\r\n\t\tos = dfc.getContent(\"ostype\");\r\n\t\trootclasses = dfc.getContent(\"rootclasses\");\r\n\t\timglocation = dfc.getContent(\"imgfile\");\r\n\t\timgformat = dfc.getContent(\"imgformat\");\r\n\t\tif(imglocation.equalsIgnoreCase(\"not available\") && imgformat.equalsIgnoreCase(\"not available\")){\r\n\t\t\tcreateImgFile = false;\r\n\t\t\tlastImgPathChoice = project.getLocation().toString();\r\n\t\t\tlastImgPathChoice = lastImgPathChoice.replace('/', '\\\\');\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcreateImgFile = true;\r\n\t\t\tlastImgPathChoice = imglocation.replace('/', '\\\\');\r\n\t\t\tlastImgPathChoice = lastImgPathChoice.substring(1,lastImgPathChoice.length() -1 );\r\n\t\t\tint indexOfProjectName = lastImgPathChoice.lastIndexOf(\"\\\\\");\r\n\t\t\tlastImgPathChoice = lastImgPathChoice.substring(0, indexOfProjectName);\r\n\t\t\tlastImgFormatChoice = imgformat;\r\n\t\t}\r\n\t\t\r\n//\t\tSystem.out.println(dfc.fileContent.toString());\t\t\r\n//\t\tSystem.out.println(libPath);\r\n//\t\tSystem.out.println(board);\r\n//\t\tSystem.out.println(programmer);\r\n//\t\tSystem.out.println(os);\r\n//\t\tSystem.out.println(rootclasses);\r\n//\t\tSystem.out.println(lastImgPathChoice);\r\n//\t\tSystem.out.println(lastImgFormatChoice);\r\n//\t\tSystem.out.println(\"\");\r\n\r\n\t\t// read project preferences\r\n\t\tpref = getPref();\r\n\t\t\r\n\t\t// build control\r\n\t\tComposite composite = new Composite(parent, SWT.NONE);\r\n\t\tcomposite.setLayout(new GridLayout(2, false));\r\n\t\r\n\t\tGroup groupLib = new Group(composite, SWT.NONE);\r\n\t\tgroupLib.setText(\"Target Library\");\r\n\t\tGridLayout gridLayout2 = new GridLayout(2, false);\r\n\t\tgroupLib.setLayout(gridLayout2);\r\n\t\tGridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);\r\n\t\tgridData.horizontalSpan = 2;\r\n\t\tgroupLib.setLayoutData(gridData);\r\n\t\tLabel label1 = new Label(groupLib,SWT.NONE);\r\n\t\tlabel1.setText(\"Pleace specify the target library you want to use for this project.\");\r\n\t\tlabel1.setLayoutData(gridData);\r\n\t\tLabel dummy = new Label(groupLib, SWT.NONE);\r\n\t\tdummy.setLayoutData(gridData);\r\n\t\tcheck = new Button(groupLib, SWT.CHECK);\r\n\t\tcheck.setText(\"Use default library path\");\r\n\t\tcheck.setSelection(libPath.equals(defaultPath));\r\n\t\tcheck.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tif (e.widget.equals(check)) {\r\n\t\t\t\t\tif (check.getSelection()) {\r\n\t\t\t\t\t\tpath.setEnabled(false);\r\n\t\t\t\t\t\tpath.setText(defaultPath);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tpath.setEnabled(true);\r\n\t\t\t\t\t\tpath.setText(lastChoice);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlibPath = path.getText();\r\n\t\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tcheck.setLayoutData(gridData);\r\n\t\tpath = new Text(groupLib, SWT.SINGLE | SWT.BORDER);\r\n\t\tGridData gridData2 = new GridData();\r\n\t\tgridData2.horizontalAlignment = SWT.FILL;\r\n\t\tgridData2.grabExcessHorizontalSpace = true;\r\n\t\tpath.setLayoutData(gridData2);\r\n\t\tpath.setText(libPath);\r\n\t\tpath.setEnabled(!libPath.equals(defaultPath));\r\n\t\tpath.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\tlibPath = path.getText();\r\n\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbrowse = new Button(groupLib, SWT.PUSH);\r\n\t\tbrowse.setText(\"Browse...\");\r\n\t\tbrowse.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tif (!check.getSelection()){\t\r\n\t\t\t\t\topenDirectoryDialog();\r\n\t\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tlibState = new Label(groupLib,SWT.NONE);\r\n\t\tlibState.setLayoutData(gridData);\r\n\r\n//\t\tGroup groupBoard = new Group(composite, SWT.BOTTOM);\r\n\t\tGroup groupBoard = new Group(composite, SWT.NONE);\r\n\t\tgroupBoard.setText(\"Board configuration\");\r\n\t\tGridLayout groupLayout1 = new GridLayout(2, false);\r\n\t\tgroupBoard.setLayout(groupLayout1);\r\n\t\tGridData gridData3 = new GridData();\r\n\t\tgridData3.horizontalAlignment = SWT.FILL;\r\n\t\tgridData3.grabExcessHorizontalSpace = true;\r\n\t\tgridData3.horizontalSpan = 2;\r\n\t\tgroupBoard.setLayoutData(gridData3);\r\n\t\tLabel boardLabel = new Label(groupBoard, SWT.NONE);\r\n\t\tboardLabel.setText(\"Select a board\");\r\n\t\tboardCombo = new Combo(groupBoard, SWT.VERTICAL | SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);\r\n\t\tboardCombo.addSelectionListener(listener);\r\n\t\tLabel progLabel = new Label(groupBoard, SWT.NONE);\r\n\t\tprogLabel.setText(\"Select a programmer\");\r\n\t\tprogrammerCombo = new Combo(groupBoard, SWT.VERTICAL | SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);\r\n\t\tprogrammerCombo.addSelectionListener(listener);\r\n\r\n//\t\tGroup groupOS = new Group(composite, SWT.BOTTOM);\r\n\t\tGroup groupOS = new Group(composite, SWT.NONE);\r\n\t\tgroupOS.setText(\"Runtime system\");\r\n\t\tGridLayout groupLayout2 = new GridLayout(2, false);\r\n\t\tgroupOS.setLayout(groupLayout2);\r\n\t\tGridData gridData4 = new GridData();\r\n\t\tgridData4.horizontalAlignment = SWT.FILL;\r\n\t\tgridData4.grabExcessHorizontalSpace = true;\r\n\t\tgridData4.horizontalSpan = 2;\r\n\t\tgroupOS.setLayoutData(gridData4);\r\n\t\tLabel osLabel = new Label(groupOS,SWT.NONE);\r\n\t\tosLabel.setText(\"Select a operating system\");\r\n\t\tosCombo = new Combo(groupOS, SWT.VERTICAL | SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);\r\n\t\tosCombo.addSelectionListener(listener);\r\n\r\n\t\tGroup groupImg = new Group(composite, SWT.NONE);\r\n\t\tgroupImg.setText(\"Image file creation\");\r\n\t\tGridLayout gridLayoutImg = new GridLayout(2,false);\r\n\t\tgroupImg.setLayout(gridLayoutImg);\r\n\t\tGridData gridDataImg = new GridData(SWT.FILL, SWT.CENTER, true, false);\r\n\t\tgridDataImg.horizontalSpan = 2;\t\t\r\n\t\tcheckImg = new Button(groupImg, SWT.CHECK);\r\n\t\tcheckImg.setText(\"Create image file\");\r\n\t\tcheckImg.setSelection(false);\r\n\t\tcheckImg.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tif(e.widget.equals(checkImg)) {\r\n\t\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t\t\tif(checkImg.getSelection()) {\r\n\t\t\t\t\t\tpathImg.setEnabled(true);\r\n\t\t\t\t\t\tpathImg.setText(lastImgPathChoice);\r\n\t\t\t\t\t\tbrowseImg.setEnabled(true);\r\n\t\t\t\t\t\timgFormatCombo.setEnabled(true);\r\n\t\t\t\t\t\tindexImgFormat = 0;\r\n\t\t\t\t\t\tfor (int i = 0; i < Configuration.formatMnemonics.length; i++) {\r\n\t\t\t\t\t\t\tif (lastImgFormatChoice.equalsIgnoreCase(Configuration.formatMnemonics[i])) indexImgFormat = i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\timgFormatCombo.select(indexImgFormat);\r\n\t\t\t\t\t\tcreateImgFile = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpathImg.setEnabled(false);\r\n\t\t\t\t\t\tpathImg.setText(lastImgPathChoice);\r\n\t\t\t\t\t\tbrowseImg.setEnabled(false);\r\n\t\t\t\t\t\timgFormatCombo.setEnabled(false);\r\n\t\t\t\t\t\tindexImgFormat = 0;\r\n\t\t\t\t\t\tfor (int i = 0; i < Configuration.formatMnemonics.length; i++) {\r\n\t\t\t\t\t\t\tif (lastImgFormatChoice.equalsIgnoreCase(Configuration.formatMnemonics[i])) indexImgFormat = i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\timgFormatCombo.select(indexImgFormat);\r\n\t\t\t\t\t\tcreateImgFile = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tcheckImg.setLayoutData(gridDataImg);\r\n\t\t\r\n\t\tGridData gridDataImg2 = new GridData(SWT.FILL, SWT.FILL, true, false);\r\n\t\tpathImg = new Text(groupImg, SWT.SINGLE | SWT.BORDER);\r\n\t\tpathImg.setLayoutData(gridDataImg2);\r\n\t\tpathImg.setEnabled(false);\r\n\t\tpathImg.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\timglocation = pathImg.getText();\r\n\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbrowseImg = new Button(groupImg, SWT.PUSH);\r\n\t\tbrowseImg.setText(\"Browse...\");\r\n\t\tbrowseImg.setEnabled(false);\r\n\t\tbrowseImg.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e){\r\n\t\t\t\tif (checkImg.getSelection()) {\t\r\n\t\t\t\t\topenImgDirectoryDialog();\r\n\t\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\t\r\n\t\tGridData gridDataImg3 = new GridData(SWT.FILL, SWT.FILL, true, false);\r\n\t\tgridDataImg3.horizontalSpan = 2;\r\n\t\tLabel imgFormatLabel = new Label(groupImg,SWT.NONE);\r\n\t\timgFormatLabel.setText(\"Select image file format\");\r\n\t\timgFormatCombo = new Combo(groupImg, SWT.VERTICAL | SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);\r\n\t\timgFormatCombo.setEnabled(false);\r\n\t\timgFormatCombo.setLayoutData(gridDataImg3);\r\n\t\timgFormatCombo.addSelectionListener(listener);\r\n\t\tindexImgFormat = 0;\r\n\t\tfor (int i = 0; i < Configuration.formatMnemonics.length; i++) {\r\n\t\t\tif (lastImgFormatChoice.equalsIgnoreCase(Configuration.formatMnemonics[i])) indexImgFormat = i;\r\n\t\t}\r\n\t\timgFormatCombo.select(indexImgFormat);\r\n\t\t\r\n\t\t//initial values of Image file creation\r\n\t\tif(createImgFile){\r\n\t\t\tcheckImg.setSelection(true);\r\n\t\t\tpathImg.setEnabled(true);\r\n\t\t\tpathImg.setText(lastImgPathChoice);\r\n\t\t\tbrowseImg.setEnabled(true);\r\n\t\t\timgFormatCombo.setEnabled(true);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcheckImg.setSelection(false);\r\n\t\t\tpathImg.setEnabled(false);\r\n\t\t\tpathImg.setText(lastImgPathChoice);\r\n\t\t\tbrowseImg.setEnabled(false);\r\n\t\t\timgFormatCombo.setEnabled(false);\r\n\t\t}\r\n\t\t\r\n\t\tif (checkLibPath()) readLib(); else libPath = \"not available\";\r\n\t\treturn composite;\r\n\t}",
"protected abstract T createRessource();",
"@Override\n \t\t\t\tpublic void doCreatePointLight() {\n \n \t\t\t\t}",
"private void previewFile(File file) {\n Preview preview = previewFactory.createPreview(view, file, this);\n preview.show();\n view.getFilePreview().repaint();\n view.getFileProperties().setOkFileStatus();\n }",
"@FXML\n void newFilePressed(ActionEvent event) {\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open New File\");\n\t\tFile f = fileChooser.showSaveDialog(stage);\n\t\tif (f != null) {\n\t\t\tsetFile(f);\n\t\t\tviewState.set(ViewState.NEW);\n\t\t}\n\n }",
"protected SourceViewer createViewer(Composite parent) {\n \t\tSourceViewer viewer= new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);\n \t\tSourceViewerConfiguration configuration= new SourceViewerConfiguration();\n \t\tviewer.configure(configuration);\n \t\tIDocument document= new Document();\n \t\tviewer.setDocument(document);\n \t\treturn viewer;\n \t}",
"public static Reference create(IFile file) {\n return new Reference(file.getProject(), getMapKey(file));\n }",
"private void updateView(File selectedFile) {\n\n if (selectedFile != null && selectedFile != currentFile) {\n currentFile = selectedFile;\n setFileDetails(currentFile);\n previewFile(currentFile);\n }\n\n if (currentFile.isDirectory()) {\n view.getFileOperations().disableFileOperations();\n } else {\n enableFileOperations();\n }\n }",
"@Override\n protected synchronized void generateEntry(File file, boolean prefetch) {\n if (file == null) {\n throw new NullPointerException(\"file == null\");\n }\n ThumbnailCacheIndirection ci = new ThumbnailCacheIndirection(file);\n updateUsageTime(ci);\n fileCache.put(file, ci);\n if (prefetch) {\n workQueue.append(ci);\n } else {\n workQueue.push(ci);\n }\n }",
"public FileNode getLink(){return super.getVirtualSource();}",
"@Override\n public StorageOutputStream create(File file) throws IOException {\n\treturn null;\n }",
"public synchronized Buffer pinNew(String filename, PageFormatter fmtr) {\n //=====================================CS4432-Project1=====================\n //get an empty buffer or buffer that is okay for replacement\n Buffer buff = chooseUnpinnedBuffer();\n //if we returned null, there was no available buffers, so just return null\n if (buff == null)\n return null;\n //add block to that buffer and pin it\n buff.assignToNew(filename, fmtr);\n numAvailable--;\n buff.pin();\n //associate the block with the frame number for easy access\n buffers.put(buff.block(), buff.getFrameNumber());\n return buff;\n }",
"private View create(PersistedView pView) {\n DsmSorting sorting = nameToSorting.get(pView.dsmSortingName);\n if (null == sorting) {\n sorting = DsmSorting.values()[0];\n }\n\n View view = new View();\n view.setName(decodeString(pView.name));\n view.setSorting(sorting);\n\n return view;\n }",
"@Override\n \t\t\t\tpublic void doCreateSpotLight() {\n \n \t\t\t\t}",
"private void createResultFilePart() {\n\t\t//------------------------------------------------\n\t\t// Result File Label\n\t\t//------------------------------------------------\n\t\tLabel resultFileLabel = new Label(generalSettingsGroup, SWT.NONE);\n\t\tresultFileLabel.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1));\n\t\tresultFileLabel.setText(\"Result File:\");\n\t\t\n\t\tresultFileDeco = new ControlDecoration(resultFileLabel, SWT.LEFT | SWT.TOP);\n\t\tresultFileDeco.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tresultFileDeco.setDescriptionText(\"Choose a file to store the compare results.\");\n\t\t\n\t\t//------------------------------------------------\n\t\t// \"Choose...\" Button\n\t\t//------------------------------------------------\n\t\tButton fileChooserButton = new Button(generalSettingsGroup, SWT.NONE);\n\t\tfileChooserButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));\n\t\tfileChooserButton.setText(\"Choose...\");\n\t\t\n\t\tfileChooserButton.addSelectionListener(\n\t\t\t\tnew SelectionAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\t\tFileDialog fileDialog = new FileDialog(getShell());\n\t\t\t\t\t\tString filePath = fileDialog.open();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(filePath != null){\n\t\t\t\t\t\t\tsetSelectedFile(filePath);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t//------------------------------------------------\n\t\t// FilePath Field\n\t\t//------------------------------------------------\n\t\tresultFilepathField = new Text(generalSettingsGroup, SWT.BORDER);\n\t\tresultFilepathField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));\n\t\t\n\t\tNotNullStringValidator filepathValidator = new NotNullStringValidator(resultFileLabel, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tresultFilepathField.addModifyListener(filepathValidator);\n\t\t\n\t\tfilepathValidator.setTag(\"ALWAYS\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathValidator);\n\t\t\n\t\t//------------------------------------------------\n\t\t// Create file writeable Validator\n\t\t//------------------------------------------------\n\n\t\tFileCanWriteValidator filepathWritableValidator = new FileCanWriteValidator(null, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tfilepathWritableValidator.setTag(\"PRECHECK\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathWritableValidator);\n\t}",
"public void loadFile(View view) {\n // start the background file loading task\n LoadFileTask task = new LoadFileTask();\n task.execute();\n }",
"public Object clone() {\n FileTransfer ft = new FileTransfer();\n ft.mLogicalFile = new String(this.mLogicalFile);\n ft.mFlags = (BitSet) this.mFlags.clone();\n ft.mTransferFlag = this.mTransferFlag;\n ft.mSize = this.mSize;\n ft.mType = this.mType;\n ft.mJob = new String(this.mJob);\n ft.mPriority = this.mPriority;\n ft.mURLForRegistrationOnDestination = this.mURLForRegistrationOnDestination;\n ft.mMetadata = (Metadata) this.mMetadata.clone();\n ft.mVerifySymlinkSource = this.mVerifySymlinkSource;\n // the maps are not cloned underneath\n\n return ft;\n }",
"public static GoldenCopy create(\n final String snapshotName,\n final String viewName,\n final Instant valuationTime,\n final CalculationResults calculationResults) {\n return new GoldenCopy(snapshotName, viewName, valuationTime, calculationResults);\n }",
"public PolylineManipulatorStrategy(View view) {\n\t\tsuper(view);\n\t}",
"@Override\n public void onSuccess(List<VMResource> result) {\n newFile.setName(checkDuplicateName(result, fileName, newFile.getExtension(), 0));\n ZGCreateFileCommand createFileCommand = new ZGCreateFileCommand(editResourceService, viewHandler, dirID, newFile, null);\n createFileCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createFileCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n editResourceService.getFileContent(createFileCommand.getFileId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n EPackage.Registry.INSTANCE.put(FSMPackage.eNS_URI, FSMPackage.eINSTANCE);\n\n FSMDStateMachine machine = null;\n try {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n machine = (FSMDStateMachine) r.getContents().get(0);\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n ARCState newState = ARCFactory.eINSTANCE.createARCState();\n newState.setFileId(machine.getId());\n newState.setTop(arcEditor.getStateTop());\n newState.setLeft(arcEditor.getStateLeft());\n newState.setHeight(40);\n newState.setWidth(80);\n newState.setEvalPriority(arcEditor.getMaxEvalPriority());\n\n CompoundCommand cmd = ARCEditorCommandProvider.getInstance().addState(arcEditor.getARCRoot(), newState,\n arcEditor.getARCRoot().getStates().size());\n arcEditor.getEditManager().execute(cmd.unwrap());\n arcEditor.refresh();\n }\n });\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(createFileCommand);\n manager.execute(c.unwrap());\n }",
"String createProvider(ConnectedVim connectedVim, boolean enable);",
"public void copyFrom(IExportView orig)\n {\n this.copyFrom((SRSLF04S_OA) orig);\n }",
"@Override\n protected File getDataFile(String relFilePath) {\n return new File(getDataDir(), relFilePath);\n }",
"@Override\n\tpublic ViewingObjectHolder getHolderFromFormattedFile(String path) {\n\t\tViewingObjectHolder holder = new ViewingObjectHolder();\n\t\tViewingObject obj = null;\n\t\tFile file = new File(path);\n\t\tString line = null;\n\t\tPattern pat = Pattern.compile(ViewingObjectHolder.fileRegex);\n\t\tMatcher matcher;\n\n\t\tif (!file.exists()) {\n\t\t\t// TODO\n\t\t\treturn holder;\n\t\t}\n\n\t\ttry (FileReader reader = new FileReader(file); BufferedReader buf = new BufferedReader(reader);) {\n\t\t\twhile ((line = buf.readLine()) != null) {\n\t\t\t\tmatcher = pat.matcher(line);\n\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\tobj = new ViewingObject(matcher.group(2), matcher.group(1));\n\t\t\t\t\tobj.addTagsFromString(matcher.group(4));\n\t\t\t\t\tholder.addObject(obj);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn holder;\n\t}",
"public void newDemo() {\r\n \t\t\r\n \t\tString date = new SimpleDateFormat(\"yyyy-MM-dd_HH-mm-ss\").format(new Date());\r\n \t\tthis.fileName = this.demoFolder + this.map.replace(\".xml\", \"\") + \"_\" + date + \".r2d\";\r\n \t\ttry {\r\n \t\t\tthis.fos = (FileOutputStream)this.fileIO.writeFile(this.fileName);\r\n \t\t} catch (IOException e) {\r\n \t\t}\r\n \t\t\r\n \t\ttry {\r\n \t\t\tthis.demoParts.put(this.map + \"/\");\r\n \t\t} catch (InterruptedException e) {\r\n \t\t}\r\n \t}",
"@Override\n public ChainMetaData onChain(ChainMetaData source) {\n if (USER_TEMPLATE.equals(source.getTemplate())) {\n return new ChainMetaData(source);\n }\n ChainMetaData oldChain = findChainsByTemplate(source.getTemplate());\n if (oldChain == null) {\n throw new RuntimeException(\n \"Fail to build binary provider config. Reason couldn't find chain with id: \" + source.getTemplate());\n } else {\n oldChain.setTemplate(source.getTemplate());\n }\n return null;\n }",
"Ressource createRessource();",
"static Sbpayment newInstance(String filePath) {\n return new DefaultSbpayment(filePath);\n }",
"default Pair<T, U> build(File file) throws IOException, ConfigurationException {\n return build(new FileConfigurationSourceProvider(), file.toString());\n }",
"public void launchWithCustomReferrer(View view) {\n // The ergonomics will be improved here, since we're basically replicating the work of\n // TwaLauncher, see https://github.com/GoogleChrome/android-browser-helper/issues/13.\n\n TwaProviderPicker.Action action = TwaProviderPicker.pickProvider(getPackageManager());\n if (!serviceBound) {\n CustomTabsClient\n .bindCustomTabsService(this, action.provider, customTabsServiceConnection);\n serviceBound = true;\n }\n }",
"protected EclipseFile(IFile file) {\n \t\tsuper(file);\n \t}",
"private void createSource(String sourceName, String content) {\n\t\t\n\t}",
"@Override\r\n\tpublic Viewer create(String name) {\n\t\tif(this.isAllDataPresent())\r\n\t\t{\r\n\t\t\treturn new ShapeViewer(name);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\t\r\n\t}",
"@Override\n\tpublic CreditrepayplanFile getFileLogInstance() {\n\t\treturn new CreditrepayplanFile();\n\t}",
"Provider createProvider();",
"public void copyFrom(IExportView orig)\n {\n this.copyFrom((SAUAL50S_OA) orig);\n }",
"private void buildMovementData(File crinkleViewerFile) {\n\t\t// read from a file\n\t\tScanner sc;\n\t\ttry {\n\t\t\tsc = new Scanner(crinkleViewerFile);\n\t\t\twhile (sc.hasNextLine()) {\n\t\t\t\trecieve(sc.nextLine());\n\t\t\t}\n\t\t\tsc.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"Source createDatasourceZ3950IdFile(Source ds, Provider prov) throws RepoxException;",
"public PrimaryFile clonePrimaryFile()\n {\n ExtractedTargetFile pf = new ExtractedTargetFile();\n pf.setInternalBaseHref(getInternalBaseHref());\n pf.setExternalBaseHref(getExternalBaseHref());\n return pf;\n }",
"public void onPressAddPhoto(View view) {\r\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\r\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\r\n File imageFile = FileUtil.createUniqueJPGFile(this);\r\n\r\n lastPhotoUri = FileProvider.getUriForFile(\r\n this,\r\n \"com.example.a31taochvisakort.fileprovider\",\r\n imageFile\r\n );\r\n\r\n takePictureIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\r\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, lastPhotoUri);\r\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\r\n }\r\n }",
"public void regenView() {\r\n\t\ttry { \r\n\r\n\t\t\tFileInputStream fis = new FileInputStream(Preferences.cacheDataFile);\r\n\t\t\tLoadModelTask task = new LoadModelTask(timeRange.getMinTs(), timeRange.getMaxTs(), timeRange.getIniTs(), timeRange.getEndTs(), true, fis, Preferences.RecursivityLevel, this);\r\n\t\t\ttask.execute();\r\n\t\t\tthis.setEnabled(false);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tCommonForms.showError(this, \"Error reading cache\");\r\n\t\t}\r\n\t}",
"@Nonnull\n public Pair<FileEditor[], FileEditorProvider[]> openFileImpl4(@Nonnull UIAccess uiAccess,\n @Nonnull final FileEditorWindow window,\n @Nonnull final VirtualFile file,\n @Nullable final HistoryEntry entry,\n FileEditorOpenOptions options) {\n assert UIAccess.isUIThread() || !ApplicationManager.getApplication()\n .isReadAccessAllowed() : \"must not open files under read action since we are doing a lot of invokeAndWaits here\";\n\n int index = options.getIndex();\n boolean current = options.isCurrentTab();\n boolean focusEditor = options.isFocusEditor();\n Boolean pin = options.getPin();\n\n final Ref<FileEditorWithProviderComposite> compositeRef = new Ref<>();\n if (!options.isReopeningEditorsOnStartup()) {\n uiAccess.giveAndWaitIfNeed(() -> compositeRef.set(window.findFileComposite(file)));\n }\n\n final FileEditorProvider[] newProviders;\n final AsyncFileEditorProvider.Builder[] builders;\n if (compositeRef.isNull()) {\n // File is not opened yet. In this case we have to create editors\n // and select the created EditorComposite.\n newProviders = FileEditorProviderManager.getInstance().getProviders(myProject, file);\n if (newProviders.length == 0) {\n return Pair.create(EMPTY_EDITOR_ARRAY, EMPTY_PROVIDER_ARRAY);\n }\n\n builders = new AsyncFileEditorProvider.Builder[newProviders.length];\n for (int i = 0; i < newProviders.length; i++) {\n try {\n final FileEditorProvider provider = newProviders[i];\n LOG.assertTrue(provider != null, \"Provider for file \" + file + \" is null. All providers: \" + Arrays.asList(newProviders));\n ThrowableComputable<AsyncFileEditorProvider.Builder, RuntimeException> action = () -> {\n if (myProject.isDisposed() || !file.isValid()) {\n return null;\n }\n LOG.assertTrue(provider.accept(myProject, file), \"Provider \" + provider + \" doesn't accept file \" + file);\n return provider instanceof AsyncFileEditorProvider ? ((AsyncFileEditorProvider)provider).createEditorAsync(myProject,\n file) : null;\n };\n builders[i] = AccessRule.read(action);\n }\n catch (ProcessCanceledException e) {\n throw e;\n }\n catch (Exception | AssertionError e) {\n LOG.error(e);\n }\n }\n }\n else {\n newProviders = null;\n builders = null;\n }\n Runnable runnable = () -> {\n if (myProject.isDisposed() || !file.isValid()) {\n return;\n }\n\n compositeRef.set(window.findFileComposite(file));\n boolean newEditor = compositeRef.isNull();\n if (newEditor) {\n getProject().getMessageBus().syncPublisher(FileEditorManagerBeforeListener.class).beforeFileOpened(this, file);\n\n FileEditor[] newEditors = new FileEditor[newProviders.length];\n for (int i = 0; i < newProviders.length; i++) {\n try {\n final FileEditorProvider provider = newProviders[i];\n final FileEditor editor = builders[i] == null ? provider.createEditor(myProject, file) : builders[i].build();\n LOG.assertTrue(editor.isValid(),\n \"Invalid editor created by provider \" + (provider == null ? null : provider.getClass().getName()));\n newEditors[i] = editor;\n // Register PropertyChangeListener into editor\n editor.addPropertyChangeListener(myEditorPropertyChangeListener);\n editor.putUserData(DUMB_AWARE, DumbService.isDumbAware(provider));\n }\n catch (ProcessCanceledException e) {\n throw e;\n }\n catch (Exception | AssertionError e) {\n LOG.error(e);\n }\n }\n\n // Now we have to create EditorComposite and insert it into the TabbedEditorComponent.\n // After that we have to select opened editor.\n FileEditorWithProviderComposite composite = createComposite(file, newEditors, newProviders);\n if (composite == null) return;\n\n if (index >= 0) {\n composite.getFile().putUserData(FileEditorWindow.INITIAL_INDEX_KEY, index);\n }\n\n compositeRef.set(composite);\n }\n\n final FileEditorWithProviderComposite composite = compositeRef.get();\n FileEditor[] editors = composite.getEditors();\n FileEditorProvider[] providers = composite.getProviders();\n\n window.setEditor(composite, current, focusEditor);\n\n for (int i = 0; i < editors.length; i++) {\n restoreEditorState(file, providers[i], editors[i], entry, newEditor);\n }\n\n // Restore selected editor\n final FileEditorProvider selectedProvider;\n if (entry == null) {\n selectedProvider =\n ((FileEditorProviderManagerImpl)FileEditorProviderManager.getInstance()).getSelectedFileEditorProvider(EditorHistoryManagerImpl.getInstance(\n myProject), file, providers);\n }\n else {\n selectedProvider = entry.getSelectedProvider();\n }\n if (selectedProvider != null) {\n for (int i = editors.length - 1; i >= 0; i--) {\n final FileEditorProvider provider = providers[i];\n if (provider.equals(selectedProvider)) {\n composite.setSelectedEditor(i);\n break;\n }\n }\n }\n\n // Notify editors about selection changes\n window.getOwner().setCurrentWindow(window, focusEditor);\n if (window.getOwner() instanceof FileEditorsSplittersBase) {\n ((FileEditorsSplittersBase)window.getOwner()).afterFileOpen(file);\n }\n addSelectionRecord(file, window);\n\n composite.getSelectedEditor().selectNotify();\n\n // Transfer focus into editor\n if (!Application.get().isUnitTestMode()) {\n if (focusEditor) {\n //myFirstIsActive = myTabbedContainer1.equals(tabbedContainer);\n window.setAsCurrentWindow(true);\n ToolWindowManager.getInstance(myProject).activateEditorComponent();\n\n window.getOwner().toFront();\n }\n }\n\n if (newEditor) {\n notifyPublisher(() -> {\n if (isFileOpen(file)) {\n getProject().getMessageBus().syncPublisher(FileEditorManagerListener.class).fileOpened(this, file);\n }\n });\n ourOpenFilesSetModificationCount.incrementAndGet();\n }\n\n //[jeka] this is a hack to support back-forward navigation\n // previously here was incorrect call to fireSelectionChanged() with a side-effect\n ((IdeDocumentHistoryImpl)IdeDocumentHistory.getInstance(myProject)).onSelectionChanged();\n\n // Update frame and tab title\n updateFileName(file);\n\n // Make back/forward work\n IdeDocumentHistory.getInstance(myProject).includeCurrentCommandAsNavigation();\n\n if (pin != null) {\n window.setFilePinned(file, pin);\n }\n };\n\n uiAccess.giveAndWaitIfNeed(runnable);\n\n FileEditorWithProviderComposite composite = compositeRef.get();\n return Pair.create(composite == null ? EMPTY_EDITOR_ARRAY : composite.getEditors(),\n composite == null ? EMPTY_PROVIDER_ARRAY : composite.getProviders());\n }",
"public static Uri m39031a(File file) {\n return Uri.fromFile(file);\n }",
"public static android.net.Uri getUriFromFile(Context context, String applicationId, File file) {\n return FileProvider.getUriForFile(context, applicationId + \".provider\", file);\n }",
"public void installView(View new_view, Digest digest) {\n if(digest != null)\n mergeDigest(digest);\n installView(new_view);\n }",
"public PBXBuildFile getStandalone(FileReference file) {\n for (PBXBuildFile cached : Mapping.of(standaloneBuildFiles, file).asSet()) {\n return cached;\n }\n PBXBuildFile buildFile = new PBXBuildFile(pbxReferences.get(file));\n mainGroupReferences.add(pbxReferences.get(file));\n standaloneBuildFiles.put(file, buildFile);\n return buildFile;\n }",
"protected abstract StructuredViewer createViewer(Shell shell);",
"public File getLocalBitmapFileFromView(ImageView imageView) {\n Drawable drawable = imageView.getDrawable();\n Bitmap bmp;\n\n if (drawable instanceof BitmapDrawable) {\n bmp = ((BitmapDrawable) imageView.getDrawable()).getBitmap();\n } else {\n return null;\n }\n\n // Store image to default external storage directory\n File file;\n try {\n file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),\n \"share_image_\" + System.currentTimeMillis() + \".png\");\n file.getParentFile().mkdirs();\n FileOutputStream out = new FileOutputStream(file);\n bmp.compress(Bitmap.CompressFormat.PNG, 90, out);\n out.close();\n\n } catch (IOException e) {\n file = null;\n e.printStackTrace();\n }\n return file;\n }",
"public void onLaunchCamera(View view) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference to access to future access\n /*photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(this, \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);*/\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n\n }\n\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.example.android.fileprovider\",\n photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }\n }",
"protected ListView<T> createSourceListView() {\n/* 436 */ return createListView();\n/* */ }",
"synchronized ExerciseBuffer pinNew(String filename, PageFormatter fmtr) {\n\t ExerciseBuffer buff = chooseUnpinnedBuffer();\n if (buff == null)\n return null;\n Block blk=buff.assignToNew(filename, fmtr); // return the newly created block\n numAvailable--;\n buff.pin();\n \n if(bufferHashTable.containsValue(buff)){ //if value (buffer) is already exist then remove that key (blk) \n bufferHashTable.remove(blk); \n \n }\n bufferHashTable.put(blk, buff); // adding new key (blk) to HashTable\n \n return buff;\n }",
"@Provides\r\n @Named(\"source\")\r\n public BackendInstanceWrapper provideSourceWrapper() {\r\n return backendInstanceWrapper(sourceDB);\r\n }",
"@Override\n public CompilationSource createCompilationSource(String name) {\n File sourceFile = getSourceFile(name);\n if (sourceFile == null || !sourceFile.exists()) {\n return null;\n }\n\n return new FileSource(name, sourceFile);\n }",
"public abstract T create(T file, boolean doPersist) throws IOException;",
"protected Tool createDragTracker(DrawingView view, Figure f) {\n return new DragTracker(view, f);\n }",
"public FSLockWithShared(File baseFile) {\n file = baseFile;\n }",
"protected void processOpen(@NotNull final Path file) {\n\n final AbstractNodeTree<ModelChangeConsumer> nodeTree = getNodeTree();\n final ModelChangeConsumer changeConsumer = requireNonNull(nodeTree.getChangeConsumer());\n\n final Path assetFile = requireNonNull(getAssetFile(file), \"Not found asset file for \" + file);\n final String assetPath = toAssetPath(assetFile);\n\n final ModelKey modelKey = new ModelKey(assetPath);\n\n final AssetManager assetManager = EDITOR.getAssetManager();\n final Spatial loadedModel = assetManager.loadModel(assetPath);\n final Geometry geometry = NodeUtils.findGeometry(loadedModel);\n\n if (geometry == null) {\n LOGGER.warning(this, \"not found a geometry in the model \" + assetPath);\n return;\n }\n\n final ModelNode<?> modelNode = getNode();\n final ParticleEmitterNode element = (ParticleEmitterNode) modelNode.getElement();\n\n changeConsumer.execute(new ChangeEmitterShapeOperation(geometry.getMesh(), element));\n }",
"public ResultPresenter(ResultsView view, ArrayList<Integer> amountCorrect, int deckIndex, String mode, String filePath) {\n this.view = view;\n this.amountCorrect = amountCorrect;\n MemorizationTrainingTool mtt = MemorizationTrainingTool.getInstance();\n deckTitle = mtt.getActiveUser().getDeck(deckIndex).getTitle();\n mtt.getActiveUser().addNewStatistics(deckIndex, mode, amountCorrect.get(0));\n UserStorageFactory.createLocalUserStorage(filePath).storeState(mtt);\n }",
"@Override\n public void onSuccess(List<VMResource> result) {\n childModelFile.setName(checkDuplicateName(result, fileName, childModelFile.getExtension(), 0));\n ZGCreateFileCommand createFileCommand = new ZGCreateFileCommand(editResourceService, viewHandler, dirID, childModelFile, null);\n createFileCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createFileCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n // set node reference\n editResourceService.getFileContent(createFileCommand.getFileId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n EPackage.Registry.INSTANCE.put(FMPackage.eNS_URI, FMPackage.eINSTANCE);\n\n FMRoot root = null;\n try {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n root = (FMRoot) r.getContents().get(0);\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n String refFileName = childModelFile.getName() + \".\" + childModelFile.getExtensionStr();\n CompoundCommand cmd = FMEditorCommandProvider.getInstance().setReferenceNode(node, createFileCommand.getFileId(),\n root.getNode().getName(), refFileName, root.getId());\n fmEditor.getEditManager().execute(cmd.unwrap());\n drawNode.getDrawRect().setTitle(node.getName() + \":\" + node.getRefName() + \"\\n(\" + refFileName + \")\");\n\n selectRootNode(editorTabSet.getSelectedTab());\n }\n });\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(createFileCommand);\n manager.execute(c.unwrap());\n }",
"private void importRealizer(JTFFile file) {\n if (file.getRealizer() != null) {\n file.getRealizer().setNote(daoNotes.getNote(NoteType.getEnum(file.getRealizer().getTemporaryContext().getIntNote())));\n file.getRealizer().setTheCountry(DataUtils.getDataByTemporaryId(\n file.getRealizer().getTemporaryContext().getCountry(), file.getCountries()));\n\n if (realizersService.exists(file.getRealizer())) {\n file.getRealizer().setId(realizersService.getRealizer(file.getRealizer().getFirstName(), file.getRealizer().getName()).getId());\n } else {\n realizersService.create(file.getRealizer());\n }\n\n file.getFilm().setTheRealizer(file.getRealizer());\n }\n }",
"private StreamSource getFileSource(final File requestedFile) {\n StreamSource fileSource = new StreamSource() {\n private static final long serialVersionUID = 3275933556191707490L;\n public InputStream getStream() {\n try {\n return new org.xtreemfs.portlet.util.BufferedFileInputStream(requestedFile);\n } catch (IOException e) {\n showNotification(\"Error\", e.getMessage(), Notification.TYPE_ERROR_MESSAGE, e);\n }\n return null;\n }\n };\n return fileSource;\n }",
"public void onCameraPressed(View view) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\r\n\r\n // create a file handle for the phoot that will be taken\r\n this.photoFile = getFileForPhoto(this.filename);\r\n Uri fileProvider = FileProvider.getUriForFile(PersonDetailsActivity.this, \"com.example.labtest1\", this.photoFile);\r\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\r\n\r\n // Try to open the camera app\r\n if (intent.resolveActivity(getPackageManager()) != null) {\r\n startActivityForResult(intent, TAKE_PHOTO_ACTIVITY_REQUEST_CODE);\r\n }\r\n }",
"public abstract ArchECoreView newView(ArchECoreArchitecture architecture) throws ArchEException;",
"public void newFile() {\r\n \t\tcurFile = null;\r\n \t}",
"public VPlexStorageViewInfo createStorageView(String viewName,\n List<PortInfo> targetPortInfo, List<PortInfo> initiatorPortInfo,\n Map<String, Integer> virtualVolumeMap) throws VPlexApiException {\n\n s_logger.info(\"Request for storage view creation on VPlex at {}\", _baseURI);\n\n // A storage view name is required. It must be unique across all\n // clusters of the VPlex. We could do a check here, but it would\n // require an additional request, or perhaps 2 in a Metro/Geo\n // configuration.\n if ((viewName == null) || (viewName.trim().length() == 0)) {\n throw new VPlexApiException(\n \"A name for the storage view must be specified.\");\n }\n\n // Targets are required to create a storage view.\n if (targetPortInfo.isEmpty()) {\n throw new VPlexApiException(\n \"Target ports are required to create a storage view\");\n }\n\n return _exportMgr.createStorageView(viewName, targetPortInfo, initiatorPortInfo,\n virtualVolumeMap);\n }",
"void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }",
"public Resource addFileGeneration(Resource activity, Resource agent, Resource file) {\n generated(activity, file);\n wasAssociatedWith(activity, agent);\n return file;\n }",
"private void loadDefaultViewpointsFile() throws IOException, JDOMException {\n // Load localised file from bundle\n URL url = FileLocator.find(Platform.getBundle(BUNDLE_ID), new Path(\"$nl$/\" + VIEWPOINTS_FILE)); //$NON-NLS-1$\n url = FileLocator.resolve(url);\n \n Document doc = new SAXBuilder().build(url);\n Element rootElement = doc.getRootElement();\n \n for(Element xmlViewpoint : rootElement.getChildren(\"viewpoint\")) { //$NON-NLS-1$\n \n String id = xmlViewpoint.getAttributeValue(\"id\"); //$NON-NLS-1$\n if(id == null || \"\".equals(id)) { //$NON-NLS-1$\n System.err.println(\"Blank id for viewpoint\"); //$NON-NLS-1$\n continue;\n }\n \n Element xmlName = xmlViewpoint.getChild(\"name\"); //$NON-NLS-1$\n if(xmlName == null) {\n System.err.println(\"No name element for viewpoint\"); //$NON-NLS-1$\n continue;\n }\n \n String name = xmlName.getText();\n if(name == null || \"\".equals(name)) { //$NON-NLS-1$\n System.err.println(\"Blank name for viewpoint\"); //$NON-NLS-1$\n continue;\n }\n \n Viewpoint vp = new Viewpoint(id, name);\n \n for(Element xmlConcept : xmlViewpoint.getChildren(\"concept\")) { //$NON-NLS-1$\n String conceptName = xmlConcept.getText();\n if(conceptName == null || \"\".equals(conceptName)) { //$NON-NLS-1$\n System.err.println(\"Blank concept name for viewpoint\"); //$NON-NLS-1$\n continue;\n }\n \n if(CONCEPTS_MAP.containsKey(conceptName)) {\n addCollection(vp, conceptName);\n }\n else {\n EClass eClass = (EClass)IArchimatePackage.eINSTANCE.getEClassifier(conceptName);\n if(eClass != null) {\n addConcept(vp, eClass);\n }\n else {\n System.err.println(\"Couldn't get eClass: \" + conceptName); //$NON-NLS-1$\n }\n \n }\n }\n \n VIEWPOINTS.put(id, vp);\n }\n }",
"public void setFileRef() { this.fileRef = fileRef; }",
"public void loadShow(File f) {\n \n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n switch (requestCode) {\n case FILE_SELECT_CODE:\n if (resultCode == Activity.RESULT_OK) {\n // Get the Uri of the selected file\n Uri uri = data.getData();\n //Log.i(TAG, \"File Uri: \" + uri.toString());\n final FragmentTransaction ft = getFragmentManager().beginTransaction();\n WatchSetImportFragment importFragment = new WatchSetImportFragment();\n importFragment.setUri(uri);\n importFragment.setWatchsetType(type);\n ft.replace(R.id.fragment_container, importFragment).addToBackStack(null);\n ft.commit();\n }\n break;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }"
] | [
"0.60061175",
"0.53149474",
"0.5200093",
"0.5174419",
"0.50654835",
"0.50582004",
"0.50431406",
"0.49754474",
"0.48828435",
"0.48291597",
"0.48225218",
"0.4799569",
"0.4757864",
"0.47291932",
"0.4720632",
"0.46896157",
"0.46858126",
"0.4663156",
"0.46383396",
"0.46203023",
"0.4589947",
"0.45760122",
"0.45649332",
"0.4564481",
"0.45566177",
"0.45505857",
"0.45295662",
"0.45233497",
"0.45185745",
"0.45054597",
"0.4496265",
"0.44926572",
"0.44864398",
"0.44817105",
"0.44726747",
"0.44659743",
"0.44503933",
"0.44478017",
"0.44444937",
"0.44353795",
"0.44259164",
"0.4424651",
"0.44163272",
"0.43988842",
"0.4383272",
"0.43767825",
"0.43648916",
"0.43358847",
"0.43334302",
"0.4327859",
"0.4322469",
"0.4314301",
"0.4301543",
"0.4294325",
"0.42912653",
"0.4289087",
"0.42862195",
"0.42797658",
"0.4273822",
"0.42623353",
"0.424665",
"0.42346364",
"0.4233036",
"0.42244062",
"0.42241547",
"0.42206872",
"0.4219733",
"0.4215454",
"0.42151925",
"0.42128024",
"0.4208054",
"0.41889295",
"0.4184627",
"0.41839826",
"0.4182049",
"0.41808537",
"0.4179605",
"0.41758528",
"0.41729864",
"0.41691583",
"0.4167068",
"0.41639602",
"0.4162857",
"0.41626236",
"0.41470385",
"0.41469002",
"0.4143426",
"0.41422284",
"0.41393417",
"0.4138079",
"0.41369602",
"0.41344845",
"0.4131823",
"0.41299853",
"0.4123572",
"0.41209805",
"0.4119495",
"0.41176984",
"0.41145337",
"0.4113913"
] | 0.6181012 | 0 |
Interface to handle system's environment variables. | public interface IRemoteEnvProxyManager extends IRemoteProxyManager {
/**
* Method to get system's environment variables.
*
* @param Project
* IProject
* @return Mapping of environment variables
* @since 2.1
*/
public Map<String, String> getEnv(IProject project) throws CoreException;
/**
* Method to get system's environment variables.
*
* @param Resource URI
* URI
* @return Mapping of environment variables
* @since 2.1
*/
public Map<String, String> getEnv(URI uri) throws CoreException;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized Map<String, String> getenv() {\n return System.getenv();\n }",
"Properties getEnvironment();",
"Properties getEnvironment();",
"private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }",
"public native void getenv(java.lang.String key);",
"String getEnvironment();",
"protected String getenv(String varname) {\n\t\t//return System.getProperty(varname);\n\t\treturn \"\"; //TODO allow virtual system variables for each computer, that are remembered on restart\n\t}",
"public String getEnvironment(){\n\n String env = null;\n try {\n env = System.getProperty(\"env\");\n if(env !=null)\n return env;\n else\n return prop.getProperty(ENVIRONMENT_KEY);\n\n }catch(Exception e)\n {\n return prop.getProperty(ENVIRONMENT_KEY);\n }\n }",
"private static Map<String,String> getEnvVars() {\n return new TreeMap<>(System.getenv());\n }",
"public Map<String, String> getEnvironment();",
"public String getSystemEnv() {\n return \"\";\n }",
"Environment createEnvironment();",
"Environment createEnvironment();",
"EnvVarType createEnvVarType();",
"String getEnvironmentProperty(String key);",
"public static String getEnvironmentVariable(String name) {\n return System.getenv(name);\n }",
"public static Properties getEnvVars() throws Throwable {\n Process p = null;\n Properties envVars = new Properties();\n Runtime r = Runtime.getRuntime();\n String OS = System.getProperty(\"os.name\").toLowerCase();\n if (OS.indexOf(\"windows 9\") > -1) {\n p = r.exec(\"command.com /c set\");\n } else if ((OS.indexOf(\"nt\") > -1) || (OS.indexOf(\"windows 2000\") > -1)\n || (OS.indexOf(\"windows xp\") > -1)) {\n p = r.exec(\"cmd.exe /c set\");\n } else {\n // our last hope, we assume Unix\n p = r.exec(\"env\");\n }\n try (BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()))) {\n String line;\n while ((line = br.readLine()) != null) {\n int idx = line.indexOf('=');\n if (idx < 0)\n continue;\n String key = line.substring(0, idx);\n String value = (idx < line.length() - 1) ? line.substring(idx + 1) : \"\";\n envVars.setProperty(key, value);\n }\n }\n // do nothing\n return envVars;\n }",
"java.lang.String getEnv(int index);",
"public String getEnv() {\n\n return env;\n }",
"@Override\n\tpublic String getEnvironmentVars() {\n\t\treturn model.getEnvironmentVars();\n\t}",
"public static String getenv(String key, String consumer) {\n String value = System.getenv(key);\n envVariableQueried(key, value, consumer);\n return value;\n }",
"String setEnvironmentProperty(String key, String value);",
"public static void printSystemVariables() {\n\t\tMap<String, String> env = System.getenv();\n\t\tfor (Map.Entry<String, String> entry : env.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey() + \" : \" + entry.getValue());\n\t\t}\n\t}",
"private static void setEnvironmentVariable(String key, String value) throws NoSuchFieldException, IllegalAccessException {\n\n Map<String, String> env = System.getenv();\n Class<?> cl = env.getClass();\n\n Field field = cl.getDeclaredField(\"m\");\n field.setAccessible(true);\n\n Object obj = field.get(env);\n @SuppressWarnings(\"unchecked\")\n Map<String, String> map = (Map<String, String>) obj;\n map.put(key, value);\n\n }",
"protected static Optional<String> env(String name) {\n return Optional.ofNullable(System.getenv(name));\n }",
"public static Map<String, String> getenv(String consumer) {\n return new AccessTrackingEnvMap((key, value) -> envVariableQueried(convertToString(key), value, consumer));\n }",
"public interface Environment {\n\tpublic Object resolveVariable(String name);\n\tpublic List<String> getRegisteredVariableNames();\n}",
"File prepareEnvironment();",
"EnvVariablesType createEnvVariablesType();",
"public Map<String, String> getEnv()\n {\n return env;\n }",
"public static void main(String[] args) {\n if(args.length == 0) {\n System.out.println(\"Unable to access specific env var, retrieving all env vars\");\n Map<String, String> envValues = getenv();\n for(String s : envValues.keySet()) {\n System.out.println(s + \"=\" + envValues.get(s));\n }\n\n } else {\n\n String envValue = System.getenv(args[0]);\n System.out.println(args[0] + \"=\" + envValue);\n }\n }",
"private void setEnv(final String value) {\n\n env = StringUtils.trim(value);\n }",
"private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }",
"void setEnvironment(Properties properties);",
"EnvEntry createEnvEntry();",
"private static void env (final String outFileName) throws IOException {\r\n\t\tstdout.print (\"Recoding: set\\t\");\r\n\t\tvar env = System.getenv ();\r\n\t\tvar out = new StringBuilder ();\r\n\t\tvar path = Paths.get (DIR.toString (), outFileName);\r\n\t\tenv.forEach ((key, value) -> out.append (String.format (\"%s=%s%n\", key, value)));\r\n\t\tFiles.writeString (path, out.toString ());\r\n\t\tstdout.println (\"(Done)\");\r\n\t}",
"public void setEnvironment(Map<String, String> environment);",
"public interface EnvironmentProvider {\n\n /**\n * Query if user provided input stream (e.g. stdin) has queued input.\n *\n * @return True if input has queued input.\n * @throws JVMIOException Thrown in case of IO errors.\n */\n public abstract boolean inReady() throws JVMIOException;\n\n /**\n * Read a single line without termination character(s) from user provided\n * input stream (e.g. stdin).\n *\n * @return Contents of the line read.\n * @throws JVMIOException Thrown in case of IO errors.\n */\n public abstract String inReadLine() throws JVMIOException;\n\n /**\n * Write to standard output.\n *\n * @param msg Message to write.\n */\n public abstract void outWrite(final String msg);\n\n /**\n * Write to standard error.\n *\n * @param msg Message to write.\n */\n public abstract void errWrite(final String msg);\n\n /**\n * Display a message to the user, before querying for input.\n *\n * @param msg Message to display.\n */\n public abstract void promptForInput(final String msg);\n\n /**\n * Display a question to the user, before forcing to select one of the\n * provided answers.\n *\n * @param question Question to display.\n * @param answers Non-empty list of questions to select from.\n * @return Answer selected by the user.\n * @throws JVMIOException Thrown in case of IO errors.\n */\n public abstract String promptSelectionFromAnswers(final String question, final List<String> answers) throws JVMIOException;\n\n /**\n * Get the tabulator character to use.\n *\n * @return Tabulator character.\n */\n public abstract String getTab();\n\n /**\n * Get system dependent newline character sequence.\n *\n * @return Newline character sequence.\n */\n public abstract String getEndl();\n\n /**\n * Get identifier for the operating system that setlX runs on.\n *\n * @return Identifier for the operating system executing setlX.\n */\n public abstract String getOsID();\n\n /**\n * Allows modification of filename/path when reading files from within setlX.\n *\n * @param fileName Filename as passed to setlX via input/source code.\n * @return Filename to use when opening for read/write.\n */\n public abstract String filterFileName(final String fileName);\n\n /**\n * Allows modification of library-path when loading libraries from within setlX.\n *\n * @param name Filename as expected by setlX.\n * @return Filename to use when opening for read/write.\n */\n public abstract String filterLibraryName(final String name);\n\n /**\n * Get the stack size in kb to request from the VM for each new thread.\n *\n * @return Stack size in kb to request from the VM.\n */\n public abstract int getStackSizeWishInKb();\n\n /**\n * Get the stack size in kb to request from the VM for each new 'medium' thread.\n *\n * @return Stack size in kb to request from the VM.\n */\n public abstract int getMediumStackSizeWishInKb();\n\n /**\n * Get the stack size in kb to request from the VM for each new 'small' thread.\n *\n * @return Stack size in kb to request from the VM.\n */\n public abstract int getSmallStackSizeWishInKb();\n}",
"private Map<String, String> getTestProcessEnvironment() {\n Map<String, String> env = new HashMap<>();\n env.put(\"TESTSERVICE_AUTH_TYPE\", \"noAuth\");\n return env;\n }",
"public String getEnvironment() {\n return environment;\n }",
"public MyEnvironment() {\n\t\t\t\tscan = new Scanner(System.in);\n\t\t\t\tscanClosed = false;\n\t\t\t\tmultilineSymbol = '|';\n\t\t\t\tpromptSymbol = '>';\n\t\t\t\tmorelinesSymbol = '\\\\';\n\t\t\t\tcommands = new TreeMap<>();\n\t\t\t\tcommands.put(\"cat\", new CatShellCommand());\n\t\t\t\tcommands.put(\"charsets\", new CharsetsShellCommand());\n\t\t\t\tcommands.put(\"copy\", new CopyShellCommand());\n\t\t\t\tcommands.put(\"exit\", new ExitShellCommand());\n\t\t\t\tcommands.put(\"hexdump\", new HexdumpShellCommand());\n\t\t\t\tcommands.put(\"ls\", new LsShellCommand());\n\t\t\t\tcommands.put(\"mkdir\", new MkdirShellCommand());\n\t\t\t\tcommands.put(\"tree\", new TreeShellCommand());\n\t\t\t\tcommands.put(\"symbol\", new SymbolShellCommand());\n\t\t\t\tcommands.put(\"help\", new HelpShellCommand());\n\t\t\t\tcommands.put(\"cd\", new CdShellCommand());\n\t\t\t\tcommands.put(\"pwd\", new PwdShellCommand());\n\t\t\t\tcommands.put(\"dropd\", new DropdShellCommand());\n\t\t\t\tcommands.put(\"pushd\", new PushdShellCommand());\n\t\t\t\tcommands.put(\"listd\", new ListdShellCommand());\n\t\t\t\tcommands.put(\"popd\", new PopdShellCommand());\n\t\t\t\tcommands.put(\"massrename\", new MassrenameShellCommand());\n\t\t\t\tcurrentDirectory = Paths.get(\".\");\n\t\t\t\tsharedData = new HashMap<>();\n\t\t\t}",
"public static String getProperty(String key, String defaultValue, String text)\n/* */ {\n/* */ try\n/* */ {\n/* 181 */ String propVal = System.getProperty(key);\n/* 182 */ if (propVal == null)\n/* */ {\n/* 184 */ propVal = System.getenv(key);\n/* */ }\n/* 186 */ if (propVal == null)\n/* */ {\n/* 188 */ propVal = System.getenv(key.replace(\".\", \"_\"));\n/* */ }\n/* 190 */ if (propVal == null)\n/* */ {\n/* 192 */ propVal = System.getenv(key.toUpperCase().replace(\".\", \"_\"));\n/* */ }\n/* 194 */ if (propVal != null) {\n/* 195 */ return propVal;\n/* */ }\n/* */ }\n/* */ catch (Throwable ex) {\n/* 199 */ System.err.println(\"Could not resolve key '\" + key + \"' in '\" + text + \"' as system property or in environment: \" + ex);\n/* */ }\n/* */ \n/* 202 */ return defaultValue;\n/* */ }",
"private static String mode() {\n return System.getProperty(SYSTEM_PROPERTY_NAME, System.getenv(ENV_VARIABLE_NAME));\n }",
"public Map<String, String> getEnv(IProject project) throws CoreException;",
"public SetEnvCommand() {\n }",
"public java.lang.String getEnv(int index) {\n return env_.get(index);\n }",
"public Map<String, String> getEnv(URI uri) throws CoreException;",
"public String getEnvironment(String env) {\n\t\treturn environment.get(env);\n\t}",
"public java.lang.String getEnv(int index) {\n return env_.get(index);\n }",
"public static final String getSystemString(String key) {\n\t\tString value = null;\n\t\ttry {\n\t\t\tvalue = System.getProperty(key);\n\t\t} catch (NullPointerException e) {\n\n\t\t\tif (THROW_ON_LOAD_FAILURE)\n\t\t\t\tthrow e;\n\t\t}\n\t\treturn value;\n\t}",
"private static String getProperty(String property) {\n\t\tString value = System.getProperty(property);\r\n\t\tif (value == null) {\r\n\t\t\tvalue = System.getenv(property);\r\n\t\t}\r\n\t\treturn value;\r\n\t}",
"public void setEnv(final String value) {\n\n env = StringUtils.trim(value);\n }",
"public static void main(String[] args){\n\n System.setProperty(\"myKey\",\"myValue\");\n\n String value = System.getProperty(\"os.name\");\n sop(value);\n// for(Object obj : prop.keySet()){\n// String value = (String)prop.get(obj);\n// sop(value);\n// }\n\n }",
"public IEnvVarBuildPath[] getEnvVarBuildPaths();",
"@Test\n public void testResolveWithEnvVarResolver() {\n assumeTrue(\"Environment variable not set as required\", System.getenv().containsKey(TEST_ENV_VARIABLE_NAME));\n assumeFalse(\"Environment variable unexpectedly set\", System.getenv().containsKey(TEST_ENV_VARIABLE_NAME_NOT_SET));\n\n assertEquals(\"Environment variable value not as expected\", TEST_ENV_VARIABLE_VALUE, System.getenv(TEST_ENV_VARIABLE_NAME));\n\n final Resolver envVarResolver = VariableExpansion.ENV_VAR_RESOLVER;\n\n assertNull(\"Expected resolve to return null as property not set\", envVarResolver.resolve(TEST_ENV_VARIABLE_NAME_NOT_SET));\n\n assertEquals(\"Resolved variable not as expected\", TEST_ENV_VARIABLE_VALUE, envVarResolver.resolve(TEST_ENV_VARIABLE_NAME));\n }",
"@Override\n\tpublic void prepare(Map<String, String> mapping) {\n\t\t\n\t\tfor (Entry<String, String> en : mapping.entrySet()) {\n\t\t\tString key = en.getKey();\n\t\t\tString value = System.getenv(en.getValue());\n\t\t\tif (value != null) {\n\t\t\t\tLOG.debug(\"Env {}: {}\", en.getValue(), redactValue(key, value));\n\t\t\t\tputParameter(key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Override with system properties\n\t\t\n\t\tfor (Entry<String, String> en : mapping.entrySet()) {\n\t\t\tString key = en.getKey();\n\t\t\tString value = System.getProperty(key);\n\t\t\tif (value != null) {\n\t\t\t\tLOG.debug(\"Sys {}: {}\", key, redactValue(key, value));\n\t\t\t\tputParameter(key, value);\n\t\t\t}\n\t\t}\n }",
"static boolean env_var_value(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"env_var_value\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, \"env\");\n r = r && consumeTokens(b, 0, L_PAREN, STRING, R_PAREN);\n exit_section_(b, m, null, r);\n return r;\n }",
"private static String stringValue(String key) {\n String value = context.envString(toEnvvar(key));\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n value = System.getProperty(key);\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n value = context.configString(key);\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n return null;\n }",
"@Override\n\tpublic Environment<String, V> getEnvironment() {\n\t\treturn null;\n\t}",
"public void intServerEnv() {\n\t\tServerUtils serverUtils = new ServerUtils();\n\t\tTouchstoneParsers parsers = new TouchstoneParsers();\n\n\t\tString CONFIGFILE = psoResourcePkg + \"/configs/server.properties\";\n\t\tString testConfigFile = ServerUtils.class.getResource(CONFIGFILE).getFile();\n\n\t\tHashMap<String, HashMap<String, String>> configPropsMap = parsers.readPropsFile(new File(testConfigFile));\n\t\thostIP = (configPropsMap.get(\"URL_PARAMS\").get(\"LOCAL_ENV\").equalsIgnoreCase(\"yes\") ? \"localhost\" : serverUtils.getHostIp());\n\n\t\t// JDBC driver name and database URL\n\t\tJDBC_DRIVER=\"com.mysql.jdbc.Driver\";\n\t\tDB_URL=\"jdbc:mysql://\" + hostIP + \"/psotest\";\n\n\t\t// Database credentials\n\t\tUSERID = configPropsMap.get(\"SERVER_ENV\").get(\"USERID\");\n\t\tPASSWORD = configPropsMap.get(\"SERVER_ENV\").get(\"PASSWORD\");\n\n\t\t// Database tables:\n\t\tCLICKS_TABLE = configPropsMap.get(\"SERVER_ENV\").get(\"CLICKS_TABLE\");\n\t\tBEACON_TABLE = configPropsMap.get(\"SERVER_ENV\").get(\"BEACON_TABLE\");\n\n\t}",
"public Map<String, String> environmentVariables() {\n return this.environmentVariables;\n }",
"public static void main(String[] args) {\n\t\tString osArch = SystemUtils.OS_ARCH;\n\n\t\tboolean is64 = SystemUtils.OS_ARCH.contains(\"64\");\n\t\tboolean is32 = SystemUtils.OS_ARCH.contains(\"32\");\n\n\t\tSystem.out.printf(\"osArch: '%s'\\n\", osArch);\n\t\tSystem.out.printf(\"is64: '%s'\\n\", is64);\n\t\tSystem.out.printf(\"is32: '%s'\\n\", is32);\n\n\t\tSystem.out.printf(\"Java 170 pelo menos. '%s'\\n\",\n\t\t\t\tSystemUtils.isJavaVersionAtLeast(170));\n\n\t\tString javaHome = SystemUtils.JAVA_HOME;\n\n\t\tSystem.out.printf(\"java home: '%s'\\n\", javaHome);\n\n\t\tSystem.out.println(\"==========================================================================\");\n\t\tSystem.out.println(\"env:\");\n\t\tSystem.out.println(Arrays\n\t\t\t\t.toString(System.getenv().entrySet().toArray()));\n\t\tSystem.out.println(\"--------------------------------------------------------------------------\");\n\t\tSystem.out.println(System.getenv(\"JAVA_HOME\"));\n\t\tSystem.out.println(\"==========================================================================\");\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"==========================================================================\");\n\t\tSystem.out.println(\"===================== SET RAGNA_HOME='aaaaaa' ==========================\");\n\t\tSystem.out.println(\"==========================================================================\");\n\t\tProcessBuilder pb1 = new ProcessBuilder(\"CMD.exe\", \"/C\", \"SET RAGNA_HOME='aaaaaa'\");\n\t\t\n\t\ttry {\n\t\t\tpb1.start();\n\t\t\tSystem.out.println(\"----------------------------------env--------------------------------\");\n\t\t\tSystem.out.println(Arrays\n\t\t\t\t\t.toString(pb1.environment().entrySet().toArray()));\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\n\t\tSystem.out.println(\"==========================================================================\");\n\t\tSystem.out.println(\"=========================== SET =====================================\");\n\t\tSystem.out.println(\"==========================================================================\");\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(\"CMD.exe\", \"/C\", \"SET\");\n\n\t\ttry {\n\t\t\tpb.redirectErrorStream(true);\n\t\t\tMap<String, String> env = pb.environment();\n\t\t\tString path = env.get(\"Path\") + \";C:\\\\naved\\\\bin\";\n\t\t\tenv.put(\"Path\", path);\n\t\t\tProcess process;\n\t\t\tprocess = pb.start();\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tprocess.getInputStream()));\n\t\t\tString line;\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tSystem.out.println(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"==========================================================================\");\n\n\t\t\n\t\t\n\t\t\n\t}",
"public static void read_Environment_Variable_for_Web() {\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\n\t\ttry {\n\n\t\t\tinput = new FileInputStream(\"/Environment File/environmentVariableForWebProduction2.properties\");\n\n\t\t\t// load a properties file\n\t\t\tprop.load(input);\n\n\t\t\t// get the property value and print it out\n\t\t Map<String, Object> map = new HashMap<>();\n\t\t\tfor (Entry<Object, Object> entry : prop.entrySet()) {\n\t\t\t\tmap.put((String) entry.getKey(), entry.getValue());\n\t\t\t}\n\t\t\tEnvironmentVariablesForWeb.setEnvironmentPropertyMap(map);\n\t\t\t/*EnvironmentVariables.PLATFORM_NAME = prop.getProperty(\"PLATFORM_NAME\");\n\t\t\tEnvironmentVariables.VERSION_NAME = prop.getProperty(\"VERSION_NAME\");\n\t\t\tEnvironmentVariables.DEVICE_NAME = prop.getProperty(\"DEVICE_NAME\");\n\t\t\tSystem.out.println(EnvironmentVariables.PLATFORM_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.VERSION_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.DEVICE_NAME);*/\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (input != null) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t }",
"public String[] getEnvironmentParams()\r\n\t{\r\n\t\treturn environmentParams;\r\n\t}",
"public void addEnvEntry (String name, Object value)\n {\n if (_envMap == null)\n _envMap = new HashMap();\n\n if (name == null)\n log.warn (\"Name for java:comp/env is null. Ignoring.\");\n if (value == null)\n log.warn (\"Value for java:comp/env is null. Ignoring.\");\n\n _envMap.put (name, value);\n }",
"public void addEnvironmentBindings(NSMutableDictionary<String, String> env)\n {\n // JAVA_HOME\n String userSetting = Application.configurationProperties()\n .getProperty(SUBSYSTEM_PREFIX + JAVA_HOME_KEY);\n if (userSetting != null)\n {\n env.takeValueForKey(userSetting, JAVA_HOME_KEY);\n }\n\n // ANT_HOME\n addFileBinding(\n env,\n ANT_HOME_KEY,\n SUBSYSTEM_PREFIX + ANT_HOME_KEY,\n \"ant\");\n\n // Add JAVA_HOME/bin to path\n Object javaHomeObj = env.valueForKey(JAVA_HOME_KEY);\n if (javaHomeObj != null)\n {\n String path = javaHomeObj.toString()\n + System.getProperty(\"file.separator\") + \"bin\";\n File javaBinDir = new File(path);\n if (javaBinDir.exists())\n {\n path = javaBinDir.getAbsolutePath();\n // Handle the fact that Windows variants often use \"Path\"\n // instead of \"PATH\"\n String pathKey = PATH_KEY2;\n Object valueObj = env.valueForKey(pathKey);\n if (valueObj == null)\n {\n pathKey = PATH_KEY1;\n valueObj = env.valueForKey(pathKey);\n }\n if (valueObj != null)\n {\n path = path + System.getProperty(\"path.separator\")\n + valueObj.toString();\n }\n env.takeValueForKey(path, pathKey);\n }\n else\n {\n log.error(\n \"no bin directory found in JAVA_HOME: \" + javaHomeObj);\n }\n }\n\n\n // Add ANT_HOME/bin to path\n Object antHomeObj = env.valueForKey(ANT_HOME_KEY);\n if (antHomeObj != null)\n {\n String path = antHomeObj.toString()\n + System.getProperty(\"file.separator\") + \"bin\";\n File antBinDir = new File(path);\n if (antBinDir.exists())\n {\n path = antBinDir.getAbsolutePath();\n // Handle the fact that Windows variants often use \"Path\"\n // instead of \"PATH\"\n String pathKey = PATH_KEY2;\n Object valueObj = env.valueForKey(pathKey);\n if (valueObj == null)\n {\n pathKey = PATH_KEY1;\n valueObj = env.valueForKey(pathKey);\n }\n if (valueObj != null)\n {\n path = path + System.getProperty(\"path.separator\")\n + valueObj.toString();\n }\n env.takeValueForKey(path, pathKey);\n }\n else\n {\n log.error(\"no bin directory found in ANT_HOME: \" + antHomeObj);\n }\n }\n }",
"private void setupEnvironment(Execute exe) {\r\n String[] environment = env.getVariables();\r\n if (environment != null) {\r\n for (int i = 0; i < environment.length; i++) {\r\n log(\"Setting environment variable: \" + environment[i], Project.MSG_VERBOSE);\r\n }\r\n }\r\n exe.setNewenvironment(newEnvironment);\r\n exe.setEnvironment(environment);\r\n }",
"protected void setEnvironment(Map<String, String> env) {\n\t\tthis.environment = env;\n\t}",
"public TreeMap<String,String> \n getEnvironment()\n {\n return pEnvironment;\n }",
"public interface EnvironmentAware extends Aware{\n void setEnvironment(Environment ev);\n}",
"public static void main(String[] args) {\n\t\t\n\t\t/**\n\t\t * Implementation of Environment. Used for communication with user.\n\t\t * Implements Closeable because needs to close Scanner.\n\t\t * */\n\t\tclass MyEnvironment implements Environment, Closeable {\n\t\t\t\n\t\t\t/**\n\t\t\t * Used for scanning input of user.\n\t\t\t * */\n\t\t\tprivate Scanner scan;\n\t\t\t/**\n\t\t\t * Used for security check if scan closes.\n\t\t\t * */\n\t\t\tprivate boolean scanClosed;\n\t\t\t/**\n\t\t\t * multilineSymbol used for marking multilines\n\t\t\t * */\n\t\t\tprivate Character multilineSymbol;\n\t\t\t/**\n\t\t\t * promptSymbol is used for marking input line.\n\t\t\t * */\n\t\t\tprivate Character promptSymbol;\n\t\t\t/**\n\t\t\t * morelinesSymbol is used for marking more lines by user.\n\t\t\t * */\n\t\t\tprivate Character morelinesSymbol;\n\t\t\t/**\n\t\t\t * commands is used to pair commands' name with commands' object\n\t\t\t * */\n\t\t\tprivate SortedMap<String, ShellCommand> commands;\n\t\t\t/**\n\t\t\t * Contains current directory\n\t\t\t * */\n\t\t\tprivate Path currentDirectory;\n\t\t\t/**\n\t\t\t * Used for sharing data between commands\n\t\t\t * */\n\t\t\tprivate Map<String, Object> sharedData;\n\t\t\t\n\t\t\t/**\n\t\t\t * Default constructor. Sets all private variables to default.\n\t\t\t * */\n\t\t\tpublic MyEnvironment() {\n\t\t\t\tscan = new Scanner(System.in);\n\t\t\t\tscanClosed = false;\n\t\t\t\tmultilineSymbol = '|';\n\t\t\t\tpromptSymbol = '>';\n\t\t\t\tmorelinesSymbol = '\\\\';\n\t\t\t\tcommands = new TreeMap<>();\n\t\t\t\tcommands.put(\"cat\", new CatShellCommand());\n\t\t\t\tcommands.put(\"charsets\", new CharsetsShellCommand());\n\t\t\t\tcommands.put(\"copy\", new CopyShellCommand());\n\t\t\t\tcommands.put(\"exit\", new ExitShellCommand());\n\t\t\t\tcommands.put(\"hexdump\", new HexdumpShellCommand());\n\t\t\t\tcommands.put(\"ls\", new LsShellCommand());\n\t\t\t\tcommands.put(\"mkdir\", new MkdirShellCommand());\n\t\t\t\tcommands.put(\"tree\", new TreeShellCommand());\n\t\t\t\tcommands.put(\"symbol\", new SymbolShellCommand());\n\t\t\t\tcommands.put(\"help\", new HelpShellCommand());\n\t\t\t\tcommands.put(\"cd\", new CdShellCommand());\n\t\t\t\tcommands.put(\"pwd\", new PwdShellCommand());\n\t\t\t\tcommands.put(\"dropd\", new DropdShellCommand());\n\t\t\t\tcommands.put(\"pushd\", new PushdShellCommand());\n\t\t\t\tcommands.put(\"listd\", new ListdShellCommand());\n\t\t\t\tcommands.put(\"popd\", new PopdShellCommand());\n\t\t\t\tcommands.put(\"massrename\", new MassrenameShellCommand());\n\t\t\t\tcurrentDirectory = Paths.get(\".\");\n\t\t\t\tsharedData = new HashMap<>();\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t * Used for closing Scanner scan.\n\t\t\t * */\n\t\t\tpublic void close() {\n\t\t\t\tif(scanClosed == false) {\n\t\t\t\t\tscan.close();\n\t\t\t\t\tscanClosed = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String readLine() throws ShellIOException {\n\t\t\t\tString line;\n\t\t\t\ttry {\n\t\t\t\t\tline = scan.nextLine();\n\t\t\t\t} catch (NoSuchElementException | IllegalStateException e) {\n\t\t\t\t\tthrow new ShellIOException(e.getMessage());\n\t\t\t\t}\n\t\t\t\treturn line;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void write(String text) throws ShellIOException {\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.print(text);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new ShellIOException(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void writeln(String text) throws ShellIOException {\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(text);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new ShellIOException(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic SortedMap<String, ShellCommand> commands() {\n\t\t\t\treturn Collections.unmodifiableSortedMap(commands);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic Character getMultilineSymbol() {\n\t\t\t\treturn multilineSymbol;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void setMultilineSymbol(Character symbol) {\n\t\t\t\tmultilineSymbol = symbol;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic Character getPromptSymbol() {\n\t\t\t\treturn promptSymbol;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void setPromptSymbol(Character symbol) {\n\t\t\t\tpromptSymbol = symbol;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic Character getMorelinesSymbol() {\n\t\t\t\treturn morelinesSymbol;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void setMorelinesSymbol(Character symbol) {\n\t\t\t\tmorelinesSymbol = symbol;\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic Path getCurrentDirectory() {\n\t\t\t\treturn currentDirectory.toAbsolutePath().normalize();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void setCurrentDirectory(Path path) throws IOException{\n\t\t\t\tif(!path.toFile().isDirectory()) {\n\t\t\t\t\tthrow new IOException(\"No such directory.\");\n\t\t\t\t}\n\t\t\t\tcurrentDirectory = path.toAbsolutePath().normalize();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic Object getSharedData(String key) {\n\t\t\t\tif (key == null) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn sharedData.get(key);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void setSharedData(String key, Object value) {\n\t\t\t\tif(key == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsharedData.put(key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\ttry(MyEnvironment env = new MyEnvironment()) {\n\t\t\tShellStatus status = ShellStatus.CONTINUE;\n\t\t\tenv.writeln(\"Welcome to MyShell v 1.0\");\n\t\t\t\n\t\t\twhile(status != ShellStatus.TERMINATE) {\n\t\t\t\tenv.write(env.getPromptSymbol() + \" \");\n\t\t\t\tString l = readLineOrLines(env);\n\t\t\t\tint boundaryIndex = l.indexOf(' ') == -1 ? l.length() : l.indexOf(' ');\n\t\t\t\tString commandName = l.substring(0, boundaryIndex);\n\t\t\t\tString arguments = l.substring(boundaryIndex);\n\t\t\t\tShellCommand command = env.commands().get(commandName);\n\t\t\t\tif(command == null) {\n\t\t\t\t\tenv.writeln(\"Wrong command. Use 'help'.\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstatus = command.executeCommand(env, arguments);\n\t\t\t} \n\t\t} catch(ShellIOException e) {\n\t\t\t// Terminates shell.\n\t\t}\n\t\t\n\t}",
"java.util.List<java.lang.String>\n getEnvList();",
"public String getContainerEnv() {\n return containerEnv;\n }",
"public Map<String, String> getEnvironmentVariables(\n ExecutionContext context,\n ExecutionScript script) throws InterruptedException, IOException {\n return environmentVariables;\n }",
"public abstract Map<String, String> getEnvironment(NIOWorker nw);",
"public void addEnvEntry (String name, String value)\n {\n _plusWebAppContext.addEnvEntry(name, value);\n }",
"private static void loadTestEnv() {\n\n\t\tPropertyReader reader = new PropertyReader(GlobalContext.getAppDir(), Constants.FILENAME_TESTENV);\n\n\t\tTestEnv env = new TestEnv();\n\t\tenv.setDefaultHostName(reader.getProperty(Constants.DEFAULT_HOST_NAME));\n\t\tenv.setDefaultHostOS(reader.getProperty(Constants.DEFAULT_HOST_OS));\n\t\tenv.setDefaultCredentials(reader.getProperty(Constants.DEFAULT_CREDENTIALS));\n\t\tenv.setDefaultBrowser(reader.getProperty(Constants.DEFAULT_BROWSER));\n\t\tenv.setAppServer(reader.getProperty(Constants.APP_SERVER));\n\t\tenv.setDatabaseServer(reader.getProperty(Constants.DATABASE_SERVER));\n\t\tenv.setEmailReceipients(reader.getProperty(Constants.EMAIL_RECEIPIENTS));\n\t\tenv.setEmailSender(reader.getProperty(Constants.EMAIL_SENDER));\n\n\t\t// sets to global context.\n\t\tGlobalContext.setTestEnv(env);\n\t}",
"protected static String subtitute(String str) {\n String[] tokens = str.split(\"\\\\s*\\\\|\\\\s*\");\n for (String token : tokens) {\n String replacement = System.getenv(token);\n if (replacement != null) {\n return replacement;\n }\n }\n return str;\n }",
"private void cmdInfoVars() throws NoSystemException {\n MSystem system = system();\n \n System.out.print(system.getVariableEnvironment());\n }",
"public PythonInterpreter getEnvironment(String name) {return environments.get(name);}",
"@Override\n\tpublic Environment getEnvironment() {\n\t\tif (environment == null) {\n\t\t\tenvironment = new StandardEnvironment();\n\t\t}\n\t\treturn environment;\n\t}",
"public void setEnv(byte[] name, byte[] value){\n synchronized(this){\n getEnv().put(name, value);\n }\n }",
"public static ApplicationEnvironment getEnvironment (){\n\t\treturn _applicationEnvironment;\n\t}",
"@Test\n public void testExpandWithEnvVarResolver() {\n assumeTrue(\"Environment variable not set as required\", System.getenv().containsKey(TEST_ENV_VARIABLE_NAME));\n\n assertEquals(\"Environment variable value not as expected\", TEST_ENV_VARIABLE_VALUE, System.getenv(TEST_ENV_VARIABLE_NAME));\n\n final Resolver resolver = VariableExpansion.ENV_VAR_RESOLVER;\n\n try {\n VariableExpansion.expand(\"${\" + TEST_ENV_VARIABLE_NAME + \"_NOT_SET\" + \"}\", resolver);\n fail(\"Should have failed to expand unset env variable\");\n } catch (IllegalArgumentException iae) {\n // Expected\n }\n\n String expanded = VariableExpansion.expand(\"${\" + TEST_ENV_VARIABLE_NAME + \"}\", resolver);\n\n assertEquals(\"Expanded variable not as expected\", TEST_ENV_VARIABLE_VALUE, expanded);\n }",
"public static void checkEnvironmentVars() throws Exception {\n String apiBaseUrl = System.getenv(\"DIRECTUS_API_HOST\");\n String token = System.getenv(\"DIRECTUS_ADMIN_TOKEN\");\n if (apiBaseUrl == null || token == null) {\n if (apiBaseUrl == null) {\n System.out.println(\"environment variable DIRECTUS_ADMIN_TOKEN must be set\");\n }\n\n if (token == null) {\n System.out.println(\"environment variable DIRECTUS_API_HOST must be set\");\n }\n System.exit(-2);\n }\n }",
"private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }",
"public synchronized Map<String, String> getEnvironment() throws Fault {\n if (env == null) {\n // reconstitute environment\n // this may result in a Fault, which is okay\n reload();\n }\n return PropertyArray.getProperties(env);\n }",
"public Env getEnv() {\n\t\treturn _env;\n\t}",
"void envVariableQueried(String key, @Nullable String value, String consumer);",
"private void getEnvironment(Environment env, FileProcess file) {\n\t\tint t = 0;\n\t\tboolean setReg = false, setFlag = false, setMem = false;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn;\n\t\t\t} else if (temp.contains(\"Register\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\n\t\t\t\t\tenv.getRegister().setRegisterValue(r[0], new LongValue(Long.parseLong(r[1], 16)));\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tsetReg = true;\n\t\t\t} else if (temp.contains(\"Flag\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\n\t\t\t\t\tif (r[1].toLowerCase().contains(\"true\")) {\n\t\t\t\t\t\tenv.getFlag().setFlagValue(r[0], new BooleanValue(true));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tenv.getFlag().setFlagValue(r[0], new BooleanValue(false));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetFlag = true;\n\t\t\t} else if (temp.contains(\"Memory\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\t\t\t\t\tString addr = r[0].replace(\"0x\", \"\");\n\t\t\t\t\tlong x = Long.parseLong(addr, 16);\n\t\t\t\t\tbyte y = (byte) Long.parseLong(reduce(r[1], 8), 16);\n\t\t\t\t\tenv.getMemory().setByteMemoryValue(x, new LongValue(y));\n\t\t\t\t}\n\t\t\t\tsetMem = true;\n\t\t\t} \n\t\t\tt++;\n\t\t\t\n\t\t\tif (setReg && setFlag && setMem) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"public String getEnvironmentName() {\n return this.environmentName;\n }",
"public void set(String name, String value)\n {\n envMap.put(name,name+\"=\"+StringUtil.nonNull(value));\n }",
"@ApiModelProperty(example = \"node main.js\", required = true, value = \"Process for watchdog to fork\")\n public String getEnvProcess() {\n return envProcess;\n }",
"T setSystemProperty(String key, String value);",
"private String getEncryptedEnvironmentVariable(String keyName) {\n return decryptKey(System.getenv(keyName));\n }",
"public org.eclipse.stardust.engine.api.runtime.RuntimeEnvironmentInfo\n getRuntimeEnvironmentInfo()\n throws org.eclipse.stardust.common.error.WorkflowException;",
"EnvironmentLoader getEnvironmentLoader();",
"public static String getEnvironmentVariableValue(String strVariable) {\r\n return System.getenv(strVariable);\r\n }",
"protected HashSet<String> getEnvironmentDependentSystems() {\r\n\t\tif (environmentDependentSystems==null) {\r\n\t\t\tenvironmentDependentSystems = new HashSet<String>();\r\n\t\t}\r\n\t\treturn environmentDependentSystems;\r\n\t}",
"public String[] getEnvArray()\n {\n return (String[])envMap.values().toArray(new String[envMap.size()]);\n }"
] | [
"0.74652064",
"0.74623144",
"0.74623144",
"0.7447767",
"0.7418955",
"0.73948056",
"0.7254105",
"0.7161894",
"0.7096779",
"0.6922995",
"0.6920296",
"0.6678654",
"0.6678654",
"0.666277",
"0.6600449",
"0.6544498",
"0.65391034",
"0.64702255",
"0.6457815",
"0.6442718",
"0.6440107",
"0.64385986",
"0.64363205",
"0.6404646",
"0.640146",
"0.6353688",
"0.63299054",
"0.6295045",
"0.62693185",
"0.6258347",
"0.6249636",
"0.6239413",
"0.62330264",
"0.62248284",
"0.6221759",
"0.6164953",
"0.61539626",
"0.61417866",
"0.6104157",
"0.6091527",
"0.6061213",
"0.6030076",
"0.5982773",
"0.5981534",
"0.59751445",
"0.59510565",
"0.59371215",
"0.59150124",
"0.5902555",
"0.5898839",
"0.58814776",
"0.58797705",
"0.58780366",
"0.585419",
"0.5847159",
"0.58404815",
"0.5830639",
"0.58216584",
"0.5811054",
"0.58070564",
"0.58045506",
"0.58004683",
"0.5794671",
"0.57629865",
"0.5735233",
"0.573042",
"0.5708801",
"0.57006127",
"0.5695405",
"0.56646746",
"0.5656318",
"0.5643539",
"0.5639621",
"0.5622488",
"0.56184554",
"0.5614806",
"0.5614643",
"0.5591751",
"0.55902094",
"0.5581439",
"0.558104",
"0.5564029",
"0.556133",
"0.55597997",
"0.5556316",
"0.55451286",
"0.5539602",
"0.5515171",
"0.5505318",
"0.55010295",
"0.5494609",
"0.54835874",
"0.54712963",
"0.5469719",
"0.5469396",
"0.54627687",
"0.54348207",
"0.54273283",
"0.5414636",
"0.5414415"
] | 0.59650576 | 45 |
Method to get system's environment variables. | public Map<String, String> getEnv(IProject project) throws CoreException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized Map<String, String> getenv() {\n return System.getenv();\n }",
"Properties getEnvironment();",
"Properties getEnvironment();",
"public String getEnvironment(){\n\n String env = null;\n try {\n env = System.getProperty(\"env\");\n if(env !=null)\n return env;\n else\n return prop.getProperty(ENVIRONMENT_KEY);\n\n }catch(Exception e)\n {\n return prop.getProperty(ENVIRONMENT_KEY);\n }\n }",
"private static Map<String,String> getEnvVars() {\n return new TreeMap<>(System.getenv());\n }",
"String getEnvironment();",
"@Override\n\tpublic String getEnvironmentVars() {\n\t\treturn model.getEnvironmentVars();\n\t}",
"public static Properties getEnvVars() throws Throwable {\n Process p = null;\n Properties envVars = new Properties();\n Runtime r = Runtime.getRuntime();\n String OS = System.getProperty(\"os.name\").toLowerCase();\n if (OS.indexOf(\"windows 9\") > -1) {\n p = r.exec(\"command.com /c set\");\n } else if ((OS.indexOf(\"nt\") > -1) || (OS.indexOf(\"windows 2000\") > -1)\n || (OS.indexOf(\"windows xp\") > -1)) {\n p = r.exec(\"cmd.exe /c set\");\n } else {\n // our last hope, we assume Unix\n p = r.exec(\"env\");\n }\n try (BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()))) {\n String line;\n while ((line = br.readLine()) != null) {\n int idx = line.indexOf('=');\n if (idx < 0)\n continue;\n String key = line.substring(0, idx);\n String value = (idx < line.length() - 1) ? line.substring(idx + 1) : \"\";\n envVars.setProperty(key, value);\n }\n }\n // do nothing\n return envVars;\n }",
"public Map<String, String> getEnvironment();",
"public String getSystemEnv() {\n return \"\";\n }",
"public static void printSystemVariables() {\n\t\tMap<String, String> env = System.getenv();\n\t\tfor (Map.Entry<String, String> entry : env.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey() + \" : \" + entry.getValue());\n\t\t}\n\t}",
"public Map<String, String> getEnv()\n {\n return env;\n }",
"private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }",
"public String getEnv() {\n\n return env;\n }",
"public static String getEnvironmentVariable(String name) {\n return System.getenv(name);\n }",
"public Map<String, String> environmentVariables() {\n return this.environmentVariables;\n }",
"protected String getenv(String varname) {\n\t\t//return System.getProperty(varname);\n\t\treturn \"\"; //TODO allow virtual system variables for each computer, that are remembered on restart\n\t}",
"public Map<String, String> getEnvironmentVariables(\n ExecutionContext context,\n ExecutionScript script) throws InterruptedException, IOException {\n return environmentVariables;\n }",
"public synchronized Map<String, String> getEnvironment() throws Fault {\n if (env == null) {\n // reconstitute environment\n // this may result in a Fault, which is okay\n reload();\n }\n return PropertyArray.getProperties(env);\n }",
"java.util.List<java.lang.String>\n getEnvList();",
"private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }",
"public String[] getEnvironmentParams()\r\n\t{\r\n\t\treturn environmentParams;\r\n\t}",
"public org.eclipse.stardust.engine.api.runtime.RuntimeEnvironmentInfo\n getRuntimeEnvironmentInfo()\n throws org.eclipse.stardust.common.error.WorkflowException;",
"public String getEnvironment() {\n return environment;\n }",
"public TreeMap<String,String> \n getEnvironment()\n {\n return pEnvironment;\n }",
"java.lang.String getEnv(int index);",
"public IEnvVarBuildPath[] getEnvVarBuildPaths();",
"public CommandlineJava.SysProperties getSysProperties() {\r\n return getCommandLine().getSystemProperties();\r\n }",
"public native void getenv(java.lang.String key);",
"String getEnvironmentProperty(String key);",
"public java.lang.String getEnv(int index) {\n return env_.get(index);\n }",
"public String[] getEnvArray()\n {\n return (String[])envMap.values().toArray(new String[envMap.size()]);\n }",
"private Map<String, String> getTestProcessEnvironment() {\n Map<String, String> env = new HashMap<>();\n env.put(\"TESTSERVICE_AUTH_TYPE\", \"noAuth\");\n return env;\n }",
"public java.lang.String getEnv(int index) {\n return env_.get(index);\n }",
"public String getEnvironment(String env) {\n\t\treturn environment.get(env);\n\t}",
"private void cmdInfoVars() throws NoSystemException {\n MSystem system = system();\n \n System.out.print(system.getVariableEnvironment());\n }",
"public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_;\n }",
"public Env getEnv() {\n\t\treturn _env;\n\t}",
"public Map<String, String> getEnv(URI uri) throws CoreException;",
"protected HashSet<String> getEnvironmentDependentSystems() {\r\n\t\tif (environmentDependentSystems==null) {\r\n\t\t\tenvironmentDependentSystems = new HashSet<String>();\r\n\t\t}\r\n\t\treturn environmentDependentSystems;\r\n\t}",
"public static ApplicationEnvironment getEnvironment (){\n\t\treturn _applicationEnvironment;\n\t}",
"public String getContainerEnv() {\n return containerEnv;\n }",
"public int getEnvCount() {\n return env_.size();\n }",
"public int getEnvCount() {\n return env_.size();\n }",
"public String getSystemProperties() {\n return systemProperties;\n }",
"public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_.getUnmodifiableView();\n }",
"private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }",
"public static String getenv(String key, String consumer) {\n String value = System.getenv(key);\n envVariableQueried(key, value, consumer);\n return value;\n }",
"public PythonInterpreter getEnvironment(String name) {return environments.get(name);}",
"public FxEnvironment getEnvironment() {\n return CacheAdmin.getFilteredEnvironment();\n }",
"public Environment getEnvironment() {\n \n \t\treturn this.environment;\n \t}",
"public static void read_Environment_Variable_for_Web() {\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\n\t\ttry {\n\n\t\t\tinput = new FileInputStream(\"/Environment File/environmentVariableForWebProduction2.properties\");\n\n\t\t\t// load a properties file\n\t\t\tprop.load(input);\n\n\t\t\t// get the property value and print it out\n\t\t Map<String, Object> map = new HashMap<>();\n\t\t\tfor (Entry<Object, Object> entry : prop.entrySet()) {\n\t\t\t\tmap.put((String) entry.getKey(), entry.getValue());\n\t\t\t}\n\t\t\tEnvironmentVariablesForWeb.setEnvironmentPropertyMap(map);\n\t\t\t/*EnvironmentVariables.PLATFORM_NAME = prop.getProperty(\"PLATFORM_NAME\");\n\t\t\tEnvironmentVariables.VERSION_NAME = prop.getProperty(\"VERSION_NAME\");\n\t\t\tEnvironmentVariables.DEVICE_NAME = prop.getProperty(\"DEVICE_NAME\");\n\t\t\tSystem.out.println(EnvironmentVariables.PLATFORM_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.VERSION_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.DEVICE_NAME);*/\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (input != null) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t }",
"public static Map<String, String> getenv(String consumer) {\n return new AccessTrackingEnvMap((key, value) -> envVariableQueried(convertToString(key), value, consumer));\n }",
"protected static Optional<String> env(String name) {\n return Optional.ofNullable(System.getenv(name));\n }",
"public Environment getEnvironment()\n\t{\n\t\treturn environment;\n\t}",
"public static void main(String[] args) {\n if(args.length == 0) {\n System.out.println(\"Unable to access specific env var, retrieving all env vars\");\n Map<String, String> envValues = getenv();\n for(String s : envValues.keySet()) {\n System.out.println(s + \"=\" + envValues.get(s));\n }\n\n } else {\n\n String envValue = System.getenv(args[0]);\n System.out.println(args[0] + \"=\" + envValue);\n }\n }",
"private static String mode() {\n return System.getProperty(SYSTEM_PROPERTY_NAME, System.getenv(ENV_VARIABLE_NAME));\n }",
"Environment createEnvironment();",
"Environment createEnvironment();",
"@Override\n\tpublic Environment getEnvironment() {\n\t\tif (environment == null) {\n\t\t\tenvironment = new StandardEnvironment();\n\t\t}\n\t\treturn environment;\n\t}",
"public Environment environment()\n {\n return theEnv;\n }",
"public int[][] getEnvironment() {\n return this.environment;\n }",
"public EnvironmentType getEnvTypes() {\n return envTypes;\n }",
"int getEnvCount();",
"public com.google.protobuf.ByteString\n getEnvBytes(int index) {\n return env_.getByteString(index);\n }",
"com.google.protobuf.ByteString\n getEnvBytes(int index);",
"public com.google.protobuf.ByteString\n getEnvBytes(int index) {\n return env_.getByteString(index);\n }",
"public String getEnvironmentName() {\n return this.environmentName;\n }",
"public String getSystemProperties(String key) {\n // Whether EDGE, UMTS, etc...\n return SystemProperties.get(key);\n }",
"public abstract Map<String, String> getEnvironment(NIOWorker nw);",
"public static LinkedHashMap<String, String> getServerEnvi() {\n return _m_server_envi;\n }",
"private static Properties setup() {\n Properties props = System.getProperties();\n try {\n props.load(new FileInputStream(new File(\"src/config.properties\")));\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(-1);\n }\n return props;\n }",
"public static String traceCpuEnvironment() {\r\n\r\n StringWriter sw = new StringWriter();\r\n PrintWriter pw = new PrintWriter(sw);\r\n pw.println(\"General information: \");\r\n\r\n Properties p = System.getProperties();\r\n\r\n String[] split = p.toString().split(\",\");\r\n\r\n for (String string : split) {\r\n pw.println(string);\r\n }\r\n\r\n return sw.toString();\r\n }",
"private String getEncryptedEnvironmentVariable(String keyName) {\n return decryptKey(System.getenv(keyName));\n }",
"private static void env (final String outFileName) throws IOException {\r\n\t\tstdout.print (\"Recoding: set\\t\");\r\n\t\tvar env = System.getenv ();\r\n\t\tvar out = new StringBuilder ();\r\n\t\tvar path = Paths.get (DIR.toString (), outFileName);\r\n\t\tenv.forEach ((key, value) -> out.append (String.format (\"%s=%s%n\", key, value)));\r\n\t\tFiles.writeString (path, out.toString ());\r\n\t\tstdout.println (\"(Done)\");\r\n\t}",
"private static String getProperty(String property) {\n\t\tString value = System.getProperty(property);\r\n\t\tif (value == null) {\r\n\t\t\tvalue = System.getenv(property);\r\n\t\t}\r\n\t\treturn value;\r\n\t}",
"public Properties getSystemProperties() {\r\n\t\tInputStream in = null;\r\n\t\tProperties p = new Properties();\r\n\t\ttry {\r\n\t\t\tExternalContext ext = FacesContext.getCurrentInstance().getExternalContext();\r\n\t\t\tURL resource = ext.getResource(\"/WEB-INF/classes/system.properties\");\r\n\t\t\tif (resource == null) {\r\n\t\t\t\tlogger.warn(\"No system.properties file found in classpath\");\r\n\t\t\t\treturn p;\r\n\t\t\t}\r\n\t\t\tin = resource.openStream();\r\n\t\t\tp.load(in);\r\n\t\t\treturn p;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Failed to read system properties\", ex);\r\n\t\t\treturn p;\r\n\t\t} finally {\r\n\t\t\tIOUtils.closeQuietly(in);\r\n\t\t}\r\n\t}",
"public static final String getSystemString(String key) {\n\t\tString value = null;\n\t\ttry {\n\t\t\tvalue = System.getProperty(key);\n\t\t} catch (NullPointerException e) {\n\n\t\t\tif (THROW_ON_LOAD_FAILURE)\n\t\t\t\tthrow e;\n\t\t}\n\t\treturn value;\n\t}",
"@Override\n\tpublic Environment<String, V> getEnvironment() {\n\t\treturn null;\n\t}",
"public static void systemPropertyTest() {\n\n Properties properties = System.getProperties();\n properties.list(System.out);\n }",
"public static java.util.List<it.vmt.gh.sb.model.Environment>\n\t\tgetEnvironments(int start, int end) {\n\n\t\treturn getService().getEnvironments(start, end);\n\t}",
"public String getDefaultEnvironmentVariableName() {\n\t\t\tlogger.debug(\"### DescriptorImpl::getDefaultEnvironmentVariableName\");\n\t\t\treturn SemanticVersionBuildWrapper.DEFAULT_ENVIRONMENT_VARIABLE_NAME;\n\t\t}",
"public static TestEnvironment getEnvironment(String name) {\n return (TestEnvironment) envMap.get(name);\n }",
"public interface IRemoteEnvProxyManager extends IRemoteProxyManager {\n \t/**\n \t * Method to get system's environment variables.\n \t *\n\t * @param Project\n\t * IProject\n \t * @return Mapping of environment variables\n \t * @since 2.1\n\t*/\t\n \tpublic Map<String, String> getEnv(IProject project) throws CoreException;\n /**\n * Method to get system's environment variables.\n * \n * @param Resource URI\n * URI\n * @return Mapping of environment variables\n * @since 2.1\n */\n \tpublic Map<String, String> getEnv(URI uri) throws CoreException;\n }",
"public static int getEnvironmentsCount() {\n\t\treturn getService().getEnvironmentsCount();\n\t}",
"File prepareEnvironment();",
"public interface Environment {\n\tpublic Object resolveVariable(String name);\n\tpublic List<String> getRegisteredVariableNames();\n}",
"private String getSystemProperties() {\n\t\tStringWriter swriter = new StringWriter();\n\t\tPrintWriter writer = new PrintWriter(swriter);\n\t\twriter.println(\"<html>\");\n\t\twriter.println(\"<head><title>Java Properties</title></head>\");\n\t\twriter.println(\"<body>\");\n\t\twriter.println(\"<pre>\");\n\t\tProperties properties = System.getProperties();\n\t\tproperties.list(writer);\n\t\twriter.println(\"</pre>\");\n\t\twriter.println(\"</body>\");\n\t\twriter.println(\"</html>\");\n\t\twriter.flush();\n\t\treturn swriter.toString();\n\t}",
"public EnvironmentFrame getEnvironmentFrame() {\n\t\treturn myEnvFrame;\n\t}",
"EnvVarType createEnvVarType();",
"private static void loadTestEnv() {\n\n\t\tPropertyReader reader = new PropertyReader(GlobalContext.getAppDir(), Constants.FILENAME_TESTENV);\n\n\t\tTestEnv env = new TestEnv();\n\t\tenv.setDefaultHostName(reader.getProperty(Constants.DEFAULT_HOST_NAME));\n\t\tenv.setDefaultHostOS(reader.getProperty(Constants.DEFAULT_HOST_OS));\n\t\tenv.setDefaultCredentials(reader.getProperty(Constants.DEFAULT_CREDENTIALS));\n\t\tenv.setDefaultBrowser(reader.getProperty(Constants.DEFAULT_BROWSER));\n\t\tenv.setAppServer(reader.getProperty(Constants.APP_SERVER));\n\t\tenv.setDatabaseServer(reader.getProperty(Constants.DATABASE_SERVER));\n\t\tenv.setEmailReceipients(reader.getProperty(Constants.EMAIL_RECEIPIENTS));\n\t\tenv.setEmailSender(reader.getProperty(Constants.EMAIL_SENDER));\n\n\t\t// sets to global context.\n\t\tGlobalContext.setTestEnv(env);\n\t}",
"public static String systemRoot() throws RuntimeException, java.io.IOException\n {\n\n if (isWindows())\n {\n if (systemRoot == null)\n {\n //See if we set it as a property using TestLauncher.\n //This means we are likely in the DirectLauncher\n systemRoot = System.getProperty (\"jacorb.SystemRoot\");\n\n if (systemRoot == null)\n {\n //We are likely in the TestLauncher, see if we can\n //get it from the system environment.\n Properties env = new Properties();\n try\n {\n String setCmd = getSetCommand();\n Process proc = Runtime.getRuntime().exec(setCmd);\n InputStream ioStream = proc.getInputStream();\n env.load(ioStream);\n systemRoot = env.getProperty(\"SystemRoot\");\n ioStream.close();\n proc.destroy();\n }\n catch(java.io.IOException e)\n {\n throw e;\n }\n if (systemRoot == null)\n {\n throw new RuntimeException(\"Could not find SystemRoot, make sure SystemRoot env var is set\");\n }\n //The '\\' character gets interpeted as an escape\n if (systemRoot.charAt(1) == ':' && systemRoot.charAt(2) != '\\\\')\n {\n String prefix = systemRoot.substring(0, 2);\n String suffix = systemRoot.substring(2, systemRoot.length());\n systemRoot = prefix + \"\\\\\" + suffix;\n }\n }\n }\n }\n else\n {\n throw new RuntimeException(\"TestUtils.systemRoot() was called on a non-Windows OS\");\n }\n return systemRoot;\n }",
"public static String getProperty(String key, String defaultValue, String text)\n/* */ {\n/* */ try\n/* */ {\n/* 181 */ String propVal = System.getProperty(key);\n/* 182 */ if (propVal == null)\n/* */ {\n/* 184 */ propVal = System.getenv(key);\n/* */ }\n/* 186 */ if (propVal == null)\n/* */ {\n/* 188 */ propVal = System.getenv(key.replace(\".\", \"_\"));\n/* */ }\n/* 190 */ if (propVal == null)\n/* */ {\n/* 192 */ propVal = System.getenv(key.toUpperCase().replace(\".\", \"_\"));\n/* */ }\n/* 194 */ if (propVal != null) {\n/* 195 */ return propVal;\n/* */ }\n/* */ }\n/* */ catch (Throwable ex) {\n/* 199 */ System.err.println(\"Could not resolve key '\" + key + \"' in '\" + text + \"' as system property or in environment: \" + ex);\n/* */ }\n/* */ \n/* 202 */ return defaultValue;\n/* */ }",
"@Override\n public List<EnvironmentVariable> findAll() throws Exception {\n return null;\n }",
"public String getWebEnv(int i){\n return this.webEnvs.get(i);\n }",
"public static String getEnvironmentVariableValue(String strVariable) {\r\n return System.getenv(strVariable);\r\n }",
"public static String getKylinHome() {\n String kylinHome = System.getenv(\"KYLIN_HOME\");\n if (StringUtils.isEmpty(kylinHome)) {\n logger.warn(\"KYLIN_HOME was not set\");\n }\n return kylinHome;\n }",
"@Override\n public Environment getEnvironment(int w, int h)\n {\n return master.getEnvironment(w, h);\n }",
"public Properties getJndiEnvironment() {\n return this.jndiEnvironment;\n }",
"EnvironmentLoader getEnvironmentLoader();"
] | [
"0.845362",
"0.78570974",
"0.78570974",
"0.7784093",
"0.7771992",
"0.7639326",
"0.7396401",
"0.72944915",
"0.7279917",
"0.7275332",
"0.7180335",
"0.7129768",
"0.7108948",
"0.7105521",
"0.69708383",
"0.6947205",
"0.6852748",
"0.67872375",
"0.67326146",
"0.6690911",
"0.6641197",
"0.6540671",
"0.6483067",
"0.64808184",
"0.64597034",
"0.6450602",
"0.64430743",
"0.64345896",
"0.6412598",
"0.635597",
"0.6351739",
"0.6344414",
"0.6338008",
"0.63219875",
"0.6291188",
"0.62874436",
"0.6267002",
"0.62355494",
"0.62210625",
"0.6197889",
"0.61691797",
"0.6128308",
"0.6058921",
"0.6056078",
"0.60429794",
"0.6036115",
"0.6034756",
"0.6030228",
"0.6029243",
"0.601948",
"0.5965457",
"0.5929282",
"0.5912596",
"0.58690417",
"0.5867218",
"0.5865214",
"0.5846548",
"0.5841094",
"0.5841094",
"0.581458",
"0.5813657",
"0.5811361",
"0.5778266",
"0.575743",
"0.5726076",
"0.5720492",
"0.5715038",
"0.5713402",
"0.56860495",
"0.5667389",
"0.5593439",
"0.5574659",
"0.556882",
"0.5545725",
"0.5522679",
"0.54897803",
"0.548676",
"0.54827565",
"0.5473352",
"0.5469401",
"0.54633254",
"0.5416068",
"0.5412125",
"0.53867644",
"0.53702396",
"0.53679454",
"0.5350916",
"0.5330801",
"0.5327207",
"0.5317044",
"0.5291478",
"0.528234",
"0.52659833",
"0.5234192",
"0.5215654",
"0.5190019",
"0.51871806",
"0.5180563",
"0.51771635",
"0.5165152"
] | 0.6554947 | 21 |
Method to get system's environment variables. | public Map<String, String> getEnv(URI uri) throws CoreException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized Map<String, String> getenv() {\n return System.getenv();\n }",
"Properties getEnvironment();",
"Properties getEnvironment();",
"public String getEnvironment(){\n\n String env = null;\n try {\n env = System.getProperty(\"env\");\n if(env !=null)\n return env;\n else\n return prop.getProperty(ENVIRONMENT_KEY);\n\n }catch(Exception e)\n {\n return prop.getProperty(ENVIRONMENT_KEY);\n }\n }",
"private static Map<String,String> getEnvVars() {\n return new TreeMap<>(System.getenv());\n }",
"String getEnvironment();",
"@Override\n\tpublic String getEnvironmentVars() {\n\t\treturn model.getEnvironmentVars();\n\t}",
"public static Properties getEnvVars() throws Throwable {\n Process p = null;\n Properties envVars = new Properties();\n Runtime r = Runtime.getRuntime();\n String OS = System.getProperty(\"os.name\").toLowerCase();\n if (OS.indexOf(\"windows 9\") > -1) {\n p = r.exec(\"command.com /c set\");\n } else if ((OS.indexOf(\"nt\") > -1) || (OS.indexOf(\"windows 2000\") > -1)\n || (OS.indexOf(\"windows xp\") > -1)) {\n p = r.exec(\"cmd.exe /c set\");\n } else {\n // our last hope, we assume Unix\n p = r.exec(\"env\");\n }\n try (BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()))) {\n String line;\n while ((line = br.readLine()) != null) {\n int idx = line.indexOf('=');\n if (idx < 0)\n continue;\n String key = line.substring(0, idx);\n String value = (idx < line.length() - 1) ? line.substring(idx + 1) : \"\";\n envVars.setProperty(key, value);\n }\n }\n // do nothing\n return envVars;\n }",
"public Map<String, String> getEnvironment();",
"public String getSystemEnv() {\n return \"\";\n }",
"public static void printSystemVariables() {\n\t\tMap<String, String> env = System.getenv();\n\t\tfor (Map.Entry<String, String> entry : env.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey() + \" : \" + entry.getValue());\n\t\t}\n\t}",
"public Map<String, String> getEnv()\n {\n return env;\n }",
"private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }",
"public String getEnv() {\n\n return env;\n }",
"public static String getEnvironmentVariable(String name) {\n return System.getenv(name);\n }",
"public Map<String, String> environmentVariables() {\n return this.environmentVariables;\n }",
"protected String getenv(String varname) {\n\t\t//return System.getProperty(varname);\n\t\treturn \"\"; //TODO allow virtual system variables for each computer, that are remembered on restart\n\t}",
"public Map<String, String> getEnvironmentVariables(\n ExecutionContext context,\n ExecutionScript script) throws InterruptedException, IOException {\n return environmentVariables;\n }",
"public synchronized Map<String, String> getEnvironment() throws Fault {\n if (env == null) {\n // reconstitute environment\n // this may result in a Fault, which is okay\n reload();\n }\n return PropertyArray.getProperties(env);\n }",
"java.util.List<java.lang.String>\n getEnvList();",
"private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }",
"public Map<String, String> getEnv(IProject project) throws CoreException;",
"public String[] getEnvironmentParams()\r\n\t{\r\n\t\treturn environmentParams;\r\n\t}",
"public org.eclipse.stardust.engine.api.runtime.RuntimeEnvironmentInfo\n getRuntimeEnvironmentInfo()\n throws org.eclipse.stardust.common.error.WorkflowException;",
"public String getEnvironment() {\n return environment;\n }",
"public TreeMap<String,String> \n getEnvironment()\n {\n return pEnvironment;\n }",
"java.lang.String getEnv(int index);",
"public IEnvVarBuildPath[] getEnvVarBuildPaths();",
"public CommandlineJava.SysProperties getSysProperties() {\r\n return getCommandLine().getSystemProperties();\r\n }",
"public native void getenv(java.lang.String key);",
"String getEnvironmentProperty(String key);",
"public java.lang.String getEnv(int index) {\n return env_.get(index);\n }",
"public String[] getEnvArray()\n {\n return (String[])envMap.values().toArray(new String[envMap.size()]);\n }",
"private Map<String, String> getTestProcessEnvironment() {\n Map<String, String> env = new HashMap<>();\n env.put(\"TESTSERVICE_AUTH_TYPE\", \"noAuth\");\n return env;\n }",
"public java.lang.String getEnv(int index) {\n return env_.get(index);\n }",
"public String getEnvironment(String env) {\n\t\treturn environment.get(env);\n\t}",
"private void cmdInfoVars() throws NoSystemException {\n MSystem system = system();\n \n System.out.print(system.getVariableEnvironment());\n }",
"public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_;\n }",
"public Env getEnv() {\n\t\treturn _env;\n\t}",
"protected HashSet<String> getEnvironmentDependentSystems() {\r\n\t\tif (environmentDependentSystems==null) {\r\n\t\t\tenvironmentDependentSystems = new HashSet<String>();\r\n\t\t}\r\n\t\treturn environmentDependentSystems;\r\n\t}",
"public static ApplicationEnvironment getEnvironment (){\n\t\treturn _applicationEnvironment;\n\t}",
"public String getContainerEnv() {\n return containerEnv;\n }",
"public int getEnvCount() {\n return env_.size();\n }",
"public int getEnvCount() {\n return env_.size();\n }",
"public String getSystemProperties() {\n return systemProperties;\n }",
"public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_.getUnmodifiableView();\n }",
"private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }",
"public static String getenv(String key, String consumer) {\n String value = System.getenv(key);\n envVariableQueried(key, value, consumer);\n return value;\n }",
"public PythonInterpreter getEnvironment(String name) {return environments.get(name);}",
"public FxEnvironment getEnvironment() {\n return CacheAdmin.getFilteredEnvironment();\n }",
"public Environment getEnvironment() {\n \n \t\treturn this.environment;\n \t}",
"public static void read_Environment_Variable_for_Web() {\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\n\t\ttry {\n\n\t\t\tinput = new FileInputStream(\"/Environment File/environmentVariableForWebProduction2.properties\");\n\n\t\t\t// load a properties file\n\t\t\tprop.load(input);\n\n\t\t\t// get the property value and print it out\n\t\t Map<String, Object> map = new HashMap<>();\n\t\t\tfor (Entry<Object, Object> entry : prop.entrySet()) {\n\t\t\t\tmap.put((String) entry.getKey(), entry.getValue());\n\t\t\t}\n\t\t\tEnvironmentVariablesForWeb.setEnvironmentPropertyMap(map);\n\t\t\t/*EnvironmentVariables.PLATFORM_NAME = prop.getProperty(\"PLATFORM_NAME\");\n\t\t\tEnvironmentVariables.VERSION_NAME = prop.getProperty(\"VERSION_NAME\");\n\t\t\tEnvironmentVariables.DEVICE_NAME = prop.getProperty(\"DEVICE_NAME\");\n\t\t\tSystem.out.println(EnvironmentVariables.PLATFORM_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.VERSION_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.DEVICE_NAME);*/\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (input != null) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t }",
"public static Map<String, String> getenv(String consumer) {\n return new AccessTrackingEnvMap((key, value) -> envVariableQueried(convertToString(key), value, consumer));\n }",
"protected static Optional<String> env(String name) {\n return Optional.ofNullable(System.getenv(name));\n }",
"public Environment getEnvironment()\n\t{\n\t\treturn environment;\n\t}",
"public static void main(String[] args) {\n if(args.length == 0) {\n System.out.println(\"Unable to access specific env var, retrieving all env vars\");\n Map<String, String> envValues = getenv();\n for(String s : envValues.keySet()) {\n System.out.println(s + \"=\" + envValues.get(s));\n }\n\n } else {\n\n String envValue = System.getenv(args[0]);\n System.out.println(args[0] + \"=\" + envValue);\n }\n }",
"private static String mode() {\n return System.getProperty(SYSTEM_PROPERTY_NAME, System.getenv(ENV_VARIABLE_NAME));\n }",
"Environment createEnvironment();",
"Environment createEnvironment();",
"@Override\n\tpublic Environment getEnvironment() {\n\t\tif (environment == null) {\n\t\t\tenvironment = new StandardEnvironment();\n\t\t}\n\t\treturn environment;\n\t}",
"public Environment environment()\n {\n return theEnv;\n }",
"public int[][] getEnvironment() {\n return this.environment;\n }",
"public EnvironmentType getEnvTypes() {\n return envTypes;\n }",
"int getEnvCount();",
"public com.google.protobuf.ByteString\n getEnvBytes(int index) {\n return env_.getByteString(index);\n }",
"com.google.protobuf.ByteString\n getEnvBytes(int index);",
"public com.google.protobuf.ByteString\n getEnvBytes(int index) {\n return env_.getByteString(index);\n }",
"public String getEnvironmentName() {\n return this.environmentName;\n }",
"public String getSystemProperties(String key) {\n // Whether EDGE, UMTS, etc...\n return SystemProperties.get(key);\n }",
"public abstract Map<String, String> getEnvironment(NIOWorker nw);",
"public static LinkedHashMap<String, String> getServerEnvi() {\n return _m_server_envi;\n }",
"private static Properties setup() {\n Properties props = System.getProperties();\n try {\n props.load(new FileInputStream(new File(\"src/config.properties\")));\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(-1);\n }\n return props;\n }",
"public static String traceCpuEnvironment() {\r\n\r\n StringWriter sw = new StringWriter();\r\n PrintWriter pw = new PrintWriter(sw);\r\n pw.println(\"General information: \");\r\n\r\n Properties p = System.getProperties();\r\n\r\n String[] split = p.toString().split(\",\");\r\n\r\n for (String string : split) {\r\n pw.println(string);\r\n }\r\n\r\n return sw.toString();\r\n }",
"private String getEncryptedEnvironmentVariable(String keyName) {\n return decryptKey(System.getenv(keyName));\n }",
"private static void env (final String outFileName) throws IOException {\r\n\t\tstdout.print (\"Recoding: set\\t\");\r\n\t\tvar env = System.getenv ();\r\n\t\tvar out = new StringBuilder ();\r\n\t\tvar path = Paths.get (DIR.toString (), outFileName);\r\n\t\tenv.forEach ((key, value) -> out.append (String.format (\"%s=%s%n\", key, value)));\r\n\t\tFiles.writeString (path, out.toString ());\r\n\t\tstdout.println (\"(Done)\");\r\n\t}",
"private static String getProperty(String property) {\n\t\tString value = System.getProperty(property);\r\n\t\tif (value == null) {\r\n\t\t\tvalue = System.getenv(property);\r\n\t\t}\r\n\t\treturn value;\r\n\t}",
"public Properties getSystemProperties() {\r\n\t\tInputStream in = null;\r\n\t\tProperties p = new Properties();\r\n\t\ttry {\r\n\t\t\tExternalContext ext = FacesContext.getCurrentInstance().getExternalContext();\r\n\t\t\tURL resource = ext.getResource(\"/WEB-INF/classes/system.properties\");\r\n\t\t\tif (resource == null) {\r\n\t\t\t\tlogger.warn(\"No system.properties file found in classpath\");\r\n\t\t\t\treturn p;\r\n\t\t\t}\r\n\t\t\tin = resource.openStream();\r\n\t\t\tp.load(in);\r\n\t\t\treturn p;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Failed to read system properties\", ex);\r\n\t\t\treturn p;\r\n\t\t} finally {\r\n\t\t\tIOUtils.closeQuietly(in);\r\n\t\t}\r\n\t}",
"public static final String getSystemString(String key) {\n\t\tString value = null;\n\t\ttry {\n\t\t\tvalue = System.getProperty(key);\n\t\t} catch (NullPointerException e) {\n\n\t\t\tif (THROW_ON_LOAD_FAILURE)\n\t\t\t\tthrow e;\n\t\t}\n\t\treturn value;\n\t}",
"@Override\n\tpublic Environment<String, V> getEnvironment() {\n\t\treturn null;\n\t}",
"public static void systemPropertyTest() {\n\n Properties properties = System.getProperties();\n properties.list(System.out);\n }",
"public static java.util.List<it.vmt.gh.sb.model.Environment>\n\t\tgetEnvironments(int start, int end) {\n\n\t\treturn getService().getEnvironments(start, end);\n\t}",
"public String getDefaultEnvironmentVariableName() {\n\t\t\tlogger.debug(\"### DescriptorImpl::getDefaultEnvironmentVariableName\");\n\t\t\treturn SemanticVersionBuildWrapper.DEFAULT_ENVIRONMENT_VARIABLE_NAME;\n\t\t}",
"public static TestEnvironment getEnvironment(String name) {\n return (TestEnvironment) envMap.get(name);\n }",
"public interface IRemoteEnvProxyManager extends IRemoteProxyManager {\n \t/**\n \t * Method to get system's environment variables.\n \t *\n\t * @param Project\n\t * IProject\n \t * @return Mapping of environment variables\n \t * @since 2.1\n\t*/\t\n \tpublic Map<String, String> getEnv(IProject project) throws CoreException;\n /**\n * Method to get system's environment variables.\n * \n * @param Resource URI\n * URI\n * @return Mapping of environment variables\n * @since 2.1\n */\n \tpublic Map<String, String> getEnv(URI uri) throws CoreException;\n }",
"public static int getEnvironmentsCount() {\n\t\treturn getService().getEnvironmentsCount();\n\t}",
"File prepareEnvironment();",
"public interface Environment {\n\tpublic Object resolveVariable(String name);\n\tpublic List<String> getRegisteredVariableNames();\n}",
"private String getSystemProperties() {\n\t\tStringWriter swriter = new StringWriter();\n\t\tPrintWriter writer = new PrintWriter(swriter);\n\t\twriter.println(\"<html>\");\n\t\twriter.println(\"<head><title>Java Properties</title></head>\");\n\t\twriter.println(\"<body>\");\n\t\twriter.println(\"<pre>\");\n\t\tProperties properties = System.getProperties();\n\t\tproperties.list(writer);\n\t\twriter.println(\"</pre>\");\n\t\twriter.println(\"</body>\");\n\t\twriter.println(\"</html>\");\n\t\twriter.flush();\n\t\treturn swriter.toString();\n\t}",
"public EnvironmentFrame getEnvironmentFrame() {\n\t\treturn myEnvFrame;\n\t}",
"EnvVarType createEnvVarType();",
"private static void loadTestEnv() {\n\n\t\tPropertyReader reader = new PropertyReader(GlobalContext.getAppDir(), Constants.FILENAME_TESTENV);\n\n\t\tTestEnv env = new TestEnv();\n\t\tenv.setDefaultHostName(reader.getProperty(Constants.DEFAULT_HOST_NAME));\n\t\tenv.setDefaultHostOS(reader.getProperty(Constants.DEFAULT_HOST_OS));\n\t\tenv.setDefaultCredentials(reader.getProperty(Constants.DEFAULT_CREDENTIALS));\n\t\tenv.setDefaultBrowser(reader.getProperty(Constants.DEFAULT_BROWSER));\n\t\tenv.setAppServer(reader.getProperty(Constants.APP_SERVER));\n\t\tenv.setDatabaseServer(reader.getProperty(Constants.DATABASE_SERVER));\n\t\tenv.setEmailReceipients(reader.getProperty(Constants.EMAIL_RECEIPIENTS));\n\t\tenv.setEmailSender(reader.getProperty(Constants.EMAIL_SENDER));\n\n\t\t// sets to global context.\n\t\tGlobalContext.setTestEnv(env);\n\t}",
"public static String systemRoot() throws RuntimeException, java.io.IOException\n {\n\n if (isWindows())\n {\n if (systemRoot == null)\n {\n //See if we set it as a property using TestLauncher.\n //This means we are likely in the DirectLauncher\n systemRoot = System.getProperty (\"jacorb.SystemRoot\");\n\n if (systemRoot == null)\n {\n //We are likely in the TestLauncher, see if we can\n //get it from the system environment.\n Properties env = new Properties();\n try\n {\n String setCmd = getSetCommand();\n Process proc = Runtime.getRuntime().exec(setCmd);\n InputStream ioStream = proc.getInputStream();\n env.load(ioStream);\n systemRoot = env.getProperty(\"SystemRoot\");\n ioStream.close();\n proc.destroy();\n }\n catch(java.io.IOException e)\n {\n throw e;\n }\n if (systemRoot == null)\n {\n throw new RuntimeException(\"Could not find SystemRoot, make sure SystemRoot env var is set\");\n }\n //The '\\' character gets interpeted as an escape\n if (systemRoot.charAt(1) == ':' && systemRoot.charAt(2) != '\\\\')\n {\n String prefix = systemRoot.substring(0, 2);\n String suffix = systemRoot.substring(2, systemRoot.length());\n systemRoot = prefix + \"\\\\\" + suffix;\n }\n }\n }\n }\n else\n {\n throw new RuntimeException(\"TestUtils.systemRoot() was called on a non-Windows OS\");\n }\n return systemRoot;\n }",
"public static String getProperty(String key, String defaultValue, String text)\n/* */ {\n/* */ try\n/* */ {\n/* 181 */ String propVal = System.getProperty(key);\n/* 182 */ if (propVal == null)\n/* */ {\n/* 184 */ propVal = System.getenv(key);\n/* */ }\n/* 186 */ if (propVal == null)\n/* */ {\n/* 188 */ propVal = System.getenv(key.replace(\".\", \"_\"));\n/* */ }\n/* 190 */ if (propVal == null)\n/* */ {\n/* 192 */ propVal = System.getenv(key.toUpperCase().replace(\".\", \"_\"));\n/* */ }\n/* 194 */ if (propVal != null) {\n/* 195 */ return propVal;\n/* */ }\n/* */ }\n/* */ catch (Throwable ex) {\n/* 199 */ System.err.println(\"Could not resolve key '\" + key + \"' in '\" + text + \"' as system property or in environment: \" + ex);\n/* */ }\n/* */ \n/* 202 */ return defaultValue;\n/* */ }",
"@Override\n public List<EnvironmentVariable> findAll() throws Exception {\n return null;\n }",
"public String getWebEnv(int i){\n return this.webEnvs.get(i);\n }",
"public static String getEnvironmentVariableValue(String strVariable) {\r\n return System.getenv(strVariable);\r\n }",
"public static String getKylinHome() {\n String kylinHome = System.getenv(\"KYLIN_HOME\");\n if (StringUtils.isEmpty(kylinHome)) {\n logger.warn(\"KYLIN_HOME was not set\");\n }\n return kylinHome;\n }",
"@Override\n public Environment getEnvironment(int w, int h)\n {\n return master.getEnvironment(w, h);\n }",
"public Properties getJndiEnvironment() {\n return this.jndiEnvironment;\n }",
"EnvironmentLoader getEnvironmentLoader();"
] | [
"0.845362",
"0.78570974",
"0.78570974",
"0.7784093",
"0.7771992",
"0.7639326",
"0.7396401",
"0.72944915",
"0.7279917",
"0.7275332",
"0.7180335",
"0.7129768",
"0.7108948",
"0.7105521",
"0.69708383",
"0.6947205",
"0.6852748",
"0.67872375",
"0.67326146",
"0.6690911",
"0.6641197",
"0.6554947",
"0.6540671",
"0.6483067",
"0.64808184",
"0.64597034",
"0.6450602",
"0.64430743",
"0.64345896",
"0.6412598",
"0.635597",
"0.6351739",
"0.6344414",
"0.6338008",
"0.63219875",
"0.6291188",
"0.62874436",
"0.6267002",
"0.62355494",
"0.6197889",
"0.61691797",
"0.6128308",
"0.6058921",
"0.6056078",
"0.60429794",
"0.6036115",
"0.6034756",
"0.6030228",
"0.6029243",
"0.601948",
"0.5965457",
"0.5929282",
"0.5912596",
"0.58690417",
"0.5867218",
"0.5865214",
"0.5846548",
"0.5841094",
"0.5841094",
"0.581458",
"0.5813657",
"0.5811361",
"0.5778266",
"0.575743",
"0.5726076",
"0.5720492",
"0.5715038",
"0.5713402",
"0.56860495",
"0.5667389",
"0.5593439",
"0.5574659",
"0.556882",
"0.5545725",
"0.5522679",
"0.54897803",
"0.548676",
"0.54827565",
"0.5473352",
"0.5469401",
"0.54633254",
"0.5416068",
"0.5412125",
"0.53867644",
"0.53702396",
"0.53679454",
"0.5350916",
"0.5330801",
"0.5327207",
"0.5317044",
"0.5291478",
"0.528234",
"0.52659833",
"0.5234192",
"0.5215654",
"0.5190019",
"0.51871806",
"0.5180563",
"0.51771635",
"0.5165152"
] | 0.62210625 | 39 |
Created by ASUS on 14/10/2017. | public interface InmunizacionesDAO {
public void insertInmunizacion(Context context, InmunizacionesBean inmunizacionesBean) ;
public ArrayList<InmunizacionesBean> getAllInmunizacion(Context context);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void mo51373a() {\n }",
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"public void mo4359a() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private void m50366E() {\n }",
"protected boolean func_70814_o() { return true; }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public final void mo91715d() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void initialize() \n {\n \n }",
"public void mo6081a() {\n }",
"private TMCourse() {\n\t}",
"public void mo12930a() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"protected void mo6255a() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public Pitonyak_09_02() {\r\n }",
"@Override\n protected void init() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n public void init() {}",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"private void init() {\n\n\t}",
"public void mo1531a() {\n }",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"public void mo12628c() {\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void mo21877s() {\n }",
"private void kk12() {\n\n\t}",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"public void m23075a() {\n }",
"public void mo21779D() {\n }",
"public void mo9848a() {\n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"Petunia() {\r\n\t\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n public void initialize() {\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }"
] | [
"0.6016576",
"0.59506273",
"0.58582544",
"0.5675586",
"0.5660541",
"0.5659567",
"0.5629714",
"0.56277496",
"0.56277496",
"0.5624624",
"0.55965966",
"0.5561108",
"0.55574226",
"0.5532355",
"0.5531409",
"0.5529553",
"0.5474961",
"0.54548407",
"0.54432744",
"0.5439966",
"0.5438404",
"0.5435227",
"0.541993",
"0.541993",
"0.541993",
"0.541993",
"0.541993",
"0.541993",
"0.541993",
"0.5419521",
"0.54195195",
"0.54195195",
"0.54195195",
"0.54195195",
"0.54195195",
"0.54195195",
"0.54160166",
"0.54068494",
"0.54000646",
"0.53960437",
"0.5392002",
"0.5371858",
"0.5369663",
"0.53556645",
"0.53531533",
"0.53531533",
"0.535276",
"0.5352559",
"0.535023",
"0.53480667",
"0.5338396",
"0.5337886",
"0.5335857",
"0.5326115",
"0.5326115",
"0.5326115",
"0.5326115",
"0.5326115",
"0.5311833",
"0.53080213",
"0.52974963",
"0.52974594",
"0.52945644",
"0.52945644",
"0.52926016",
"0.5291301",
"0.52905285",
"0.5287198",
"0.52815676",
"0.527929",
"0.52761006",
"0.5275078",
"0.5269545",
"0.5262834",
"0.52558744",
"0.52543217",
"0.5251042",
"0.5240155",
"0.52358514",
"0.5226029",
"0.5226029",
"0.5226029",
"0.5220738",
"0.5220738",
"0.5220738",
"0.5216885",
"0.5216539",
"0.5215884",
"0.52146685",
"0.5214618",
"0.52112263",
"0.5204189",
"0.52029234",
"0.51952976",
"0.5193892",
"0.51915526",
"0.5183496",
"0.5181351",
"0.5178197",
"0.5178032",
"0.5178032"
] | 0.0 | -1 |
TODO: Remove 1.20 Fixed by mojang | @Inject(at = @At("HEAD"), method = "explosion(Lnet/minecraft/world/level/Explosion;)Lnet/minecraft/world/damagesource/DamageSource;", cancellable = true)
private static void apoth_fixMC_92017(@Nullable Explosion src, CallbackInfoReturnable<DamageSource> cir) {
if (src != null) {
Entity exploder = src.getExploder();
if (exploder instanceof PrimedTnt tnt) {
cir.setReturnValue(new IndirectEntityDamageSource("explosion.player", tnt, tnt.getOwner()).setScalesWithDifficulty().setExplosion());
}
else if (exploder instanceof Projectile proj) {
cir.setReturnValue(new IndirectEntityDamageSource("explosion.player", proj, proj.getOwner()).setScalesWithDifficulty().setExplosion());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void func_104112_b() {\n \n }",
"private stendhal() {\n\t}",
"private void kk12() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"protected boolean func_70814_o() { return true; }",
"public void method_4270() {}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"private void m50366E() {\n }",
"private void strin() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"protected void mo6255a() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"protected boolean func_70041_e_() { return false; }",
"public void mo6081a() {\n }",
"public void mo12628c() {\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public void mo21877s() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public abstract void mo70713b();",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo21825b() {\n }",
"private void init() {\n\n\t}",
"public void mo55254a() {\n }",
"zzang mo29839S() throws RemoteException;",
"static void feladat9() {\n\t}",
"@Override\n protected void init() {\n }",
"public void mo12930a() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void mo115190b() {\n }",
"public void m23075a() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"zzafe mo29840Y() throws RemoteException;",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo3376r() {\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void mo21785J() {\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public abstract void mo56925d();",
"public void mo23813b() {\n }",
"public void gored() {\n\t\t\n\t}",
"public final void mo91715d() {\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void mo21878t() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"public abstract void mo6549b();",
"public void mo1531a() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"public abstract void mo27385c();",
"public void mo9848a() {\n }",
"static void feladat7() {\n\t}",
"public void mo21793R() {\n }",
"public void mo21779D() {\n }",
"static void feladat4() {\n\t}",
"static void feladat6() {\n\t}",
"@Override\n protected void getExras() {\n }"
] | [
"0.59817564",
"0.59629387",
"0.59269416",
"0.58488977",
"0.5842174",
"0.58248353",
"0.58073723",
"0.5794629",
"0.57898754",
"0.57591224",
"0.5758518",
"0.57369405",
"0.5728844",
"0.5692575",
"0.56850845",
"0.56849205",
"0.56817144",
"0.56258595",
"0.56170875",
"0.5602746",
"0.55854124",
"0.55732757",
"0.5571147",
"0.5570723",
"0.55654985",
"0.5557607",
"0.5557607",
"0.5557607",
"0.5557607",
"0.5557607",
"0.5557607",
"0.5557607",
"0.5549336",
"0.5549336",
"0.55483335",
"0.55439985",
"0.5537381",
"0.55336136",
"0.55336136",
"0.553271",
"0.5530255",
"0.5522915",
"0.5519768",
"0.5512211",
"0.55121946",
"0.55043095",
"0.55043095",
"0.5493418",
"0.54850346",
"0.5479989",
"0.5479258",
"0.5477598",
"0.5455093",
"0.54463917",
"0.5441172",
"0.54406667",
"0.5440183",
"0.5440183",
"0.5440183",
"0.5440183",
"0.5440183",
"0.54395133",
"0.5434429",
"0.5433826",
"0.5433228",
"0.5431485",
"0.54228145",
"0.5422462",
"0.5419822",
"0.54181784",
"0.54178894",
"0.5415012",
"0.5412608",
"0.5411228",
"0.54107606",
"0.540678",
"0.5405198",
"0.54050297",
"0.5400594",
"0.53979564",
"0.53979564",
"0.53979564",
"0.53979564",
"0.53979564",
"0.53979564",
"0.53952026",
"0.5392721",
"0.5392448",
"0.5389827",
"0.53897965",
"0.5373624",
"0.5370354",
"0.53637886",
"0.53636307",
"0.5358189",
"0.5357927",
"0.5353941",
"0.5351245",
"0.53487724",
"0.53484124",
"0.5346093"
] | 0.0 | -1 |
This is the WidgetType model data access interface | @PreAuthorize("hasRole('ADMIN')")
public interface WidgetTypeRepository extends PagingAndSortingRepository<WidgetType, String> {
@Override
@PreAuthorize("hasRole('USER')")
Page<WidgetType> findAll(Pageable pageable);
@Override
@PreAuthorize("hasRole('USER')")
Optional<WidgetType> findById(String id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@NonNull\n @WidgetType\n public String getWidgetType() {\n return mWidgetType;\n }",
"public Widget getWidget(){\r\n\t\treturn widget;\r\n\t}",
"public WidgetDescriptor getWidgetDescriptor(final String type)\n {\n return Objects.requireNonNull(descriptor_by_type.get(type));\n }",
"public WidgetModel getModel() {\n return model;\n }",
"protected void addWidgetTypePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Widget_widgetType_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Widget_widgetType_feature\", \"_UI_Widget_type\"),\n\t\t\t\t WavePackage.Literals.WIDGET__WIDGET_TYPE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}",
"default DataType getDataType(DataTypeName id) {return (DataType)this;}",
"@RecentlyNonNull\n/* */ public String getWidgetType() {\n/* 47 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public List<Widget> getWidgets() {\n return widgets;\n }",
"public interface WidgetRepository {\n\n /**\n * Finds widget by it's id.\n *\n * @param id widget identifier.\n * @return found widget or {@link Optional#empty()} if widget with specified id was not found.\n */\n Optional<Widget> findById(final String id);\n\n /**\n * Saves specified widget in repository.\n *\n * @param widget widget to be saved in repository.\n */\n void save(final Widget widget);\n\n /**\n * Deletes widget with specified identifier.\n * If widget with specified id does not exist - do nothing.\n *\n * @param id identifier of a widget to be removed.\n */\n void deleteById(final String id);\n\n /**\n * Gets all widget from repository.\n *\n * @return list of all widgets in repository.\n */\n List<Widget> findAll();\n}",
"public Widget asWidget();",
"@Override\r\n\tpublic Widget getWidget() {\n\t\treturn asWidget();\r\n\t}",
"private String getType(){\r\n return type;\r\n }",
"public String getWidgetId()\r\n\t{\r\n\t\treturn widgetId;\r\n\t}",
"public Widget() {\r\n\t\t\r\n\t\twidgets = new LinkedHashMap<Component, String>();\r\n\t\t\r\n\t}",
"@Override\n public Object getWidget()\n {\n return null;\n }",
"public String getType() {return type;}",
"@Override\n public String getType(){\n return Type;\n }",
"@Override\n public String getType() {\n return this.name; \n }",
"IDataModel getIDataModel();",
"@Override\n\t\t\t public Value visit(UndefinedType type, Void ctx) {\n\t\t\t\t throw new UnsupportedOperationException(\n\t\t\t\t\t\t\t\"Error WidgetInterface: Value type is undefined!\");\n\t\t\t }",
"public String getDataType() ;",
"public String getType(){\n return this.type;\n }",
"ModelData getModel();",
"public ModelObjectType getType() {\n return type;\n }",
"public interface UnitTypeProperties extends PropertyAccess<UnitTypeDTO> {\n @Editor.Path(\"id\")\n ModelKeyProvider<UnitTypeDTO> key();\n ValueProvider<UnitTypeDTO, String> id();\n ValueProvider<UnitTypeDTO, String> name();\n @Editor.Path(\"name\")\n LabelProvider<UnitTypeDTO> nameLabel();\n}",
"public WidgetPanel getWidgets() {\n return _widgetPanel;\n }",
"public interface TimeSelectorIF extends IsWidget {\n /**\n * Sets the ID of the layer which this time selector applies to\n * \n * @param id\n */\n public void setId(String id);\n\n /**\n * Populate the available dates\n * \n * @param availableDates\n * The available dates, as a {@link List} of {@link String}s\n */\n public void populateDates(List<String> availableDates);\n\n /**\n * Return the available dates\n * \n * @return A {@link List} of {@link String}s representing the available\n * dates\n */\n public List<String> getAvailableDates();\n\n /**\n * Populate the available times. This may change as the date changes\n * \n * @param availableTimes\n * The available times, as a {@link List} of {@link String}s\n */\n public void populateTimes(List<String> availableTimes);\n\n /**\n * Return the available times\n * \n * @return A {@link List} of {@link String}s representing the available\n * times for the selected date\n */\n public List<String> getAvailableTimes();\n\n /**\n * @return A {@link String} representation of the currently selected date\n */\n public String getSelectedDate();\n\n /**\n * @return A {@link String} representation of the currently selected\n * datetime\n */\n public String getSelectedDateTime();\n\n /**\n * @return A {@link String} representation of the currently selected time\n */\n public String getSelectedTime();\n\n /**\n * @return A {@link String} representation of the currently selected\n * datetime range. This may be <code>null</code> if isContinous()\n * returns false\n */\n public String getSelectedDateTimeRange();\n\n /**\n * Choose a specified date\n * \n * @param dateString\n * The desired date\n * @return <code>true</code> if the operation was successfull\n */\n public boolean selectDate(String dateString);\n\n /**\n * Choose a specified datetime\n * \n * @param timeString\n * The desired datetime\n * @return <code>true</code> if the operation was successfull\n */\n public boolean selectDateTime(String timeString);\n\n /**\n * Enable/disable the widget\n * \n * @param enabled\n * <code>true</code> to enable the widget, <code>false</code> to\n * disable it\n */\n public void setEnabled(boolean enabled);\n\n /**\n * @return <code>true</code> if this time selector can represent multiple\n * datetimes\n */\n public boolean hasMultipleTimes();\n\n /**\n * Sets whether this {@link TimeSelectorIF} needs to represent discrete or\n * continous time\n * \n * @param continuous\n */\n public void setContinuous(boolean continuous);\n\n /**\n * @return <code>true</code> if this {@link TimeSelectorIF} is currently\n * representing a continuous time range, <code>false</code> if it is\n * a discrete one\n */\n public boolean isContinuous();\n\n /**\n * Sets the range (i.e. +/- how much) for a continuous axis\n * \n * @param currentRange\n */\n public void selectRange(String currentRange);\n\n /**\n * @return The currently selected range (i.e. +/- how much) for a continuous\n * axis\n */\n public String getRange();\n}",
"public String getType() { return type; }",
"public String getName() {\n return this.widgetName;\n }",
"public String getType(){\n \treturn this.type;\n }",
"@JsonIgnore\n @Override\n public Item createDynamoDbItem() {\n return new Item()\n .withPrimaryKey(\"widgetId\", this.getWidgetId())\n .with(\"widgetJSONString\", WidgetSerializer.serialize(this));\n }",
"public int getType() { return type; }",
"public int getType() { return type; }",
"public DataTypeManager getDataTypeManager();",
"public int getType() {\n return type_;\n }",
"public DataType getType() {\n return type;\n }",
"@Override\n public String getType() {\n return this.type;\n }",
"private void updateDataType(){\n\t\tif(propertiesObj == null)\n\t\t\treturn;\n\n\t\tboolean deleteKids = false;\n\t\tint index = cbDataType.getSelectedIndex();\n\t\tQuestionDef questionDef = (QuestionDef)propertiesObj;\n\t\tif((questionDef.getDataType() == QuestionDef.QTN_TYPE_LIST_EXCLUSIVE ||\n\t\t\t\tquestionDef.getDataType() == QuestionDef.QTN_TYPE_LIST_MULTIPLE) &&\n\t\t\t\t!(index == DT_INDEX_SINGLE_SELECT || index == DT_INDEX_MULTIPLE_SELECT)){\n\t\t\tif(questionDef.getOptionCount() > 0 && !Window.confirm(LocaleText.get(\"changeWidgetTypePrompt\"))){\n\t\t\t\tindex = (questionDef.getDataType() == QuestionDef.QTN_TYPE_LIST_EXCLUSIVE) ? DT_INDEX_SINGLE_SELECT : DT_INDEX_MULTIPLE_SELECT;\n\t\t\t\tcbDataType.setSelectedIndex(index);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdeleteKids = true;\n\t\t}\n\t\telse if((questionDef.getDataType() == QuestionDef.QTN_TYPE_REPEAT) &&\n\t\t\t\t!(index == DT_INDEX_REPEAT)){\n\t\t\tif(!Window.confirm(LocaleText.get(\"changeWidgetTypePrompt\"))){\n\t\t\t\tindex = DT_INDEX_REPEAT;\n\t\t\t\tcbDataType.setSelectedIndex(index);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdeleteKids = true;\n\t\t}\n\n\t\t//cbDataType.setSelectedIndex(index);\n\t\tsetQuestionDataType((QuestionDef)propertiesObj);\n\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\tif(deleteKids)\n\t\t\tformChangeListener.onDeleteChildren(propertiesObj);\n\t}",
"public String getType(){\n\treturn type;\n }",
"public abstract String getObjectType();",
"public String getType(){\r\n return type;\r\n }",
"public interface StatisticsTypeDao extends GenericDao<StatisticsType, String> {\n\tpublic JQueryPager getStatisticsTypeCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n}",
"public Object getModel();",
"PersistentDataHolder getDataHolder();",
"@Override\n\t\t\t public Widget visit(AstTextField widget, Void ctx2) {\n\t\t\t\t return type.accept(new TypeVisitor<Widget, Void>() {\n\t\t\t\t\t \n\t\t\t\t\t // type visitor found undefined type, no widget is created\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Widget visit(UndefinedType type, Void ctx2) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Error WidgetInterface: Value type is undefined!\");\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Widget visit(BooleanType type, Void ctx2) {\n\t\t\t\t\t\t//default false, no radio button, text instead\n\t\t\t\t\t\treturn new TextField(question, BooleanValue.FALSE, ctx);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Widget visit(StringType type, Void ctx2) {\n\t\t\t\t\t\t//default empty string\n\t\t\t\t\t\treturn new TextField(question, new StringValue(\"\"), ctx);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Widget visit(MoneyType type, Void ctx2) {\n\t\t\t\t\t\t//default 0.0\n\t\t\t\t\t\treturn new TextField(question, new MoneyValue(BigDecimal.valueOf(0.0)), ctx);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Widget visit(IntegerType type, Void ctx2) {\n\t\t\t\t\t\t//default 0\n\t\t\t\t\t\treturn new TextField(question,new IntegerValue(0), ctx);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Widget visit(DecimalType type, Void ctx2) {\n\t\t\t\t\t\t//default 0.0\n\t\t\t\t\t\treturn new TextField(question, new DecimalValue(0.0), ctx);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Widget visit(DateType type, Void ctx2) {\n\t\t\t\t\t\t//default today\n\t\t\t\t\t\treturn new TextField(question, new DateValue(new Date()), ctx);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tnull);\n\t\t\t }",
"public int getType() { \n return type; \n }",
"@Override\n public Class<?> getObjectType() {\n return this.type;\n }",
"public int getType() {\n return type;\n }",
"public interface InspiringQuotesWidget {\n\t/**\n\t * Returns the current quote {@link Label}.\n\t * \n\t * @return - The current quote {@link Label}.\n\t */\n\tLabel getQuoteLabel();\n\n\t/**\n\t * Returns the current author {@link Label}.\n\t * \n\t * @return - The current author {@link Label}.\n\t */\n\tLabel getAuthorLabel();\n}",
"List<? extends HasListBox> getQDSDataTypeForCategory(String category);",
"private void dataGraphGen_widgetsHandler(Set<Class> widgetList, String uri, RDFRepository _repository, RDFRepository _dataGraph) throws RepositoryException, QueryEvaluationException, IOException, RepositoryConfigException{\n\t\tSet<Object> setWidgetList = new HashSet<Object>();\n\t\tfor (Iterator<Class> iWidgetList = widgetList.iterator(); iWidgetList.hasNext();) {\n\n\t\t\tObject varList = iWidgetList.next();\n\t\t\t\n\t\t\t// Get the next WidgetList\n\t\t\tObject WidgetListObject = varList;\n\t\t\tif (!setWidgetList.contains(varList)) {\n\t\t\t\torg.openrdf.model.URI uriWidgetListObject = c.getValueFactory().createURI(WidgetListObject.toString());\t\t\t\t\t\t\t\t\n\t\t\t\tResource widgetsTypeList = c.getObject(Resource.class, uriWidgetListObject);\n\n\t\t\t\t// Get all widgets in the RDF Seq\n\t\t\t\t\n\t\t\t\tString widgetTypeList = widgetsTypeList.getRdfsMembers().toString().replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\t\tString[] unknownType = widgetTypeList.split(\", \");\n\t\t\t\tSet<Object> setUnknownType = new HashSet<Object>();\n\t\t\t\t\n\t\t\t\t// Iterate through the Widgets and determine\n\t\t\t\t// their type\n\t\t\t\tfor (int iUnknownType = 0; iUnknownType < unknownType.length; iUnknownType++) {\n\t\t\t\t\tObject unknownTypeList = unknownType[iUnknownType];\n\t\t\t\t\tObject varUnknownType = unknownType[iUnknownType];\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif (!setUnknownType.contains(varUnknownType)) {\t\t\t\t\t\t\n\t\t\t\t\t\torg.openrdf.model.URI unknownTypeBox = c.getValueFactory().createURI(unknownTypeList.toString());\n\t\t\t\t\t\t// get Textbox\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTextbox textbox = c.getObject(Textbox.class, unknownTypeBox);\n\t\t\t\t\t\t\tSet<String> textboxValues = textbox.getRaulValues();\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdataGraphGen_Statement(textboxValues, _dataGraph);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// get Listbox\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tListbox listbox = c.getObject(Listbox.class, unknownTypeBox);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSet<String> ListboxValues = listbox.getRaulValues();\n\t\t\t\t\t\t\tdataGraphGen_Statement(ListboxValues, _dataGraph);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\t//added by pcc\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGroup group = c.getObject(Group.class, unknownTypeBox);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSet<Class> GroupWidgetList = group.getRaulLists();\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSet<String> GroupValues = group.getRaulValues();\n\t\t\t\t\t\t\tdataGraphGen_Statement(GroupValues, _dataGraph);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdataGraphGen_widgetsHandler(GroupWidgetList, uri, _repository, _dataGraph);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// get Button\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tButton button = c.getObject(Button.class, unknownTypeBox);\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tURI ButtonType = raulButton;\n\t\t\t\t\t\t\t// Determine if the Button type is\n\t\t\t\t\t\t\t// Checkbox or Radiobutton\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tRadiobutton radiobutton = c.getObject(Radiobutton.class, unknownTypeBox);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tButtonType = raulRadiobutton;\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tCheckbox checkbox = c.getObject(Checkbox.class, unknownTypeBox);\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tButtonType = raulCheckbox;\n\t\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSet<String> ButtonValues = button.getRaulValues();\n\t\t\t\t\t\t\tif(ButtonType != raulButton) dataGraphGen_Statement(ButtonValues, _dataGraph);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// get DynamicGroup added by pcc\n\t\t\t\t\t\ttry {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tDynamicGroup dynamicgroup = c.getObject(DynamicGroup.class, unknownTypeBox);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSet<Class> dynamicWidgetList = dynamicgroup.getRaulLists();\n\t\t\t\t\t\t\tdataGraphGen_widgetsHandler(dynamicWidgetList, uri, _repository, _dataGraph);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tsetUnknownType.add(varUnknownType);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetUnknownType.add(varUnknownType);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tsetWidgetList.add(varList);\n\t\t\t} else {\n\t\t\t\tsetWidgetList.add(varList);\n\t\t\t}\n\n\t\t}\n\t}",
"String getType() {\r\n return this.type;\r\n }",
"public ChartTypes getChartTypes() { return _chartTypes; }",
"protected String getDataType()\n {\n return dataType;\n }",
"public String getType(){\r\n\t\treturn this.type;\r\n\t}",
"@Override\n public Type getType() {\n return type;\n }",
"@Override\n public Type getType() {\n return type;\n }",
"public TYPE getType(){\n return this.type;\n }",
"@Override\n\tpublic String getText(Object object) {\n\t\tString label = ((Widget)object).getElementFormName();\n\t\treturn label == null || label.length() == 0 ?\n\t\t\tgetString(\"_UI_Widget_type\") :\n\t\t\tgetString(\"_UI_Widget_type\") + \" \" + label;\n\t}",
"public interface Currency extends Model {\n String getCode();\n void setCode(String strCode);\n String getCurrencyName();\n void setCurrenyName(String strCurrencyName);\n String getCurrencySymbol();\n void setCurrencySymbol(String strCurrencySymbol);\n String getIsDefault();\n void setIsDefault(String strIsDefault);\n double getCurrencyRate();\n void setCurrencyRate(double dCurrencyRate);\n}",
"public abstract KnockType getKnockType();",
"List<Widget> findAll();",
"public interface Dimension {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the location property: The geo-location where the resource lives.\n *\n * @return the location value.\n */\n String location();\n\n /**\n * Gets the tags property: Resource tags.\n *\n * @return the tags value.\n */\n Map<String, String> tags();\n\n /**\n * Gets the sku property: SKU of the resource.\n *\n * @return the sku value.\n */\n String sku();\n\n /**\n * Gets the etag property: ETag of the resource.\n *\n * @return the etag value.\n */\n String etag();\n\n /**\n * Gets the description property: Dimension description.\n *\n * @return the description value.\n */\n String description();\n\n /**\n * Gets the filterEnabled property: Filter enabled.\n *\n * @return the filterEnabled value.\n */\n Boolean filterEnabled();\n\n /**\n * Gets the groupingEnabled property: Grouping enabled.\n *\n * @return the groupingEnabled value.\n */\n Boolean groupingEnabled();\n\n /**\n * Gets the data property: Dimension data.\n *\n * @return the data value.\n */\n List<String> data();\n\n /**\n * Gets the total property: Total number of data for the dimension.\n *\n * @return the total value.\n */\n Integer total();\n\n /**\n * Gets the category property: Dimension category.\n *\n * @return the category value.\n */\n String category();\n\n /**\n * Gets the usageStart property: Usage start.\n *\n * @return the usageStart value.\n */\n OffsetDateTime usageStart();\n\n /**\n * Gets the usageEnd property: Usage end.\n *\n * @return the usageEnd value.\n */\n OffsetDateTime usageEnd();\n\n /**\n * Gets the nextLink property: The link (url) to the next page of results.\n *\n * @return the nextLink value.\n */\n String nextLink();\n\n /**\n * Gets the inner com.azure.resourcemanager.costmanagement.fluent.models.DimensionInner object.\n *\n * @return the inner object.\n */\n DimensionInner innerModel();\n}",
"DataModel getDataModel ();",
"public String getType() {\n return type;\n }",
"@Override\n\t\t\t\t\tpublic Widget visit(UndefinedType type, Void ctx2) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Error WidgetInterface: Value type is undefined!\");\n\t\t\t\t\t}",
"public DataType getDataType() {\n return this.dataType;\n }",
"public int getWidgetCount() {\n return widgets.size(); \n }",
"public int getType(){\n return type;\n }",
"public interface Widget {\n\n void draw();\n\n}",
"DataTypeInstance getDataInstance();",
"@Override\n public Widget getWidget() {\n if (widget == null) {\n if (Profiler.isEnabled()) {\n Profiler.enter(\"AbstractComponentConnector.createWidget for \"\n + getClass().getSimpleName());\n }\n widget = createWidget();\n if (Profiler.isEnabled()) {\n Profiler.leave(\"AbstractComponentConnector.createWidget for \"\n + getClass().getSimpleName());\n }\n }\n\n return widget;\n }",
"@Override\r\n\tpublic String getType() {\n\t\treturn type;\r\n\t}",
"public WidgetManager()\n {\n fEditingMode = null;\n fPickingEngine = null;\n fPickingRenderer = null;\n fPickingRenderingEngine = null;\n fRenderer = new WidgetJOGLRenderer(new SimpleJOGLRenderer());\n fRenderingEngine = null;\n fScene = null;\n fWidgets = new HashMap<EditingMode, Widget>();\n fWidgetScene = null;\n }",
"public String getType() \n {\n return this.type;\n }",
"public String getType() {\n return this.type;\n }",
"public String getType() {\n return this.type;\n }",
"int getType(){\n return type;\n }",
"@Override\n\tpublic String getType() {\n\t\treturn type;\n\t}",
"@Override\n\tpublic String getType() {\n\t\treturn type;\n\t}",
"@Override\n\tpublic String getType() {\n\t\treturn type;\n\t}",
"@Override\n\tpublic String getType() {\n\t\treturn this.type;\n\t}",
"@Override\n\tpublic String type() {\n\t\treturn type;\n\t}",
"public interface PlaceTypeLinkModel extends BaseModel {\n\n /**\n * Get the {@code place_id} value.\n */\n long getPlaceId();\n\n /**\n * Get the {@code place_type_id} value.\n */\n long getPlaceTypeId();\n}",
"@Override public Type type() {\n return type;\n }",
"public String getType() {\r\n return this.type;\r\n }",
"public static interface DataTypeWithFormat {\r\n \r\n /**\r\n * Format\r\n * \r\n * @return\r\n */\r\n public abstract String getFormat();\r\n \r\n /**\r\n * Locale\r\n * \r\n * @return\r\n */\r\n public abstract Locale getLocale();\r\n }",
"public int getType () {\r\n return type;\r\n }",
"public Class getDataType() {\n return datatype;\n }",
"interface PresenterToModel extends Model<ModelToPresenter> {\n\n\n\n\n String getNameLabel();\n\n\n String getPhotoLabel();\n\n\n String getLabelRadio0();\n\n\n String getLabelRadio1();\n\n\n String getLabelRadio2();\n\n\n String getLabelRadio3();\n\n\n String getButtonAddlabel();\n\n\n String getToastNotifyingAdded();\n\n\n void insertEvent(String Categoryname, String image);\n\n String getImageByIdSelected(int id);\n\n\n String getImage(int i);\n }",
"String getType() {\n return type;\n }",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public interface ActivityCategoryView {\n void getCategory();\n void setCategory(List<Category> categories);\n void saveSuccess(Category category);\n void updateSuccess(Category category);\n void deleteSuccess(Category category);\n void error(String msg);\n}"
] | [
"0.6887154",
"0.6465985",
"0.6229078",
"0.61059433",
"0.58780926",
"0.5840922",
"0.58066595",
"0.57540065",
"0.5681968",
"0.56427294",
"0.5635709",
"0.56243724",
"0.56033283",
"0.5585017",
"0.55507195",
"0.5546525",
"0.55089676",
"0.54824823",
"0.5472555",
"0.5463721",
"0.545537",
"0.54388756",
"0.5421846",
"0.54152924",
"0.54082227",
"0.5399822",
"0.53937703",
"0.53826904",
"0.5379242",
"0.5378977",
"0.534582",
"0.53457004",
"0.53457004",
"0.53384316",
"0.53265595",
"0.5325373",
"0.5312086",
"0.5309606",
"0.52999777",
"0.5297294",
"0.52950835",
"0.5287643",
"0.52815485",
"0.527889",
"0.5278883",
"0.5275044",
"0.5273142",
"0.5272268",
"0.5268295",
"0.5264207",
"0.526174",
"0.524723",
"0.5237558",
"0.52361715",
"0.5228134",
"0.5217493",
"0.5217493",
"0.5211576",
"0.5210349",
"0.52059215",
"0.52049255",
"0.51942635",
"0.51899916",
"0.5188916",
"0.51883215",
"0.5188261",
"0.51859707",
"0.5182494",
"0.51810044",
"0.5180517",
"0.5176543",
"0.51736784",
"0.5172561",
"0.51720387",
"0.517155",
"0.5160475",
"0.5160475",
"0.51537865",
"0.51535064",
"0.51535064",
"0.51535064",
"0.51531595",
"0.5150863",
"0.51454216",
"0.5139211",
"0.5138433",
"0.5126401",
"0.5125613",
"0.5124858",
"0.5108402",
"0.5107731",
"0.5105413",
"0.5105413",
"0.5105413",
"0.5105413",
"0.5105413",
"0.5105413",
"0.5105413",
"0.5105413",
"0.50981534"
] | 0.5168726 | 75 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.724863",
"0.7203384",
"0.7197011",
"0.71784776",
"0.71090055",
"0.7040796",
"0.7039464",
"0.7013998",
"0.70109546",
"0.6982435",
"0.6946134",
"0.6939684",
"0.6935636",
"0.69193685",
"0.69193685",
"0.6892893",
"0.6884914",
"0.68768066",
"0.68763",
"0.68635243",
"0.68635243",
"0.68635243",
"0.68635243",
"0.6854071",
"0.68483156",
"0.6820635",
"0.6818679",
"0.68139905",
"0.68138844",
"0.68138844",
"0.68068254",
"0.68019366",
"0.67988884",
"0.6792257",
"0.6791312",
"0.67894673",
"0.6785093",
"0.67605865",
"0.67587006",
"0.67494637",
"0.6745356",
"0.6745356",
"0.67428446",
"0.6741961",
"0.6726888",
"0.67248803",
"0.67236483",
"0.67236483",
"0.6722583",
"0.6712873",
"0.6707795",
"0.67058164",
"0.67011815",
"0.669981",
"0.66978544",
"0.6695866",
"0.66877913",
"0.66849333",
"0.66849333",
"0.6684108",
"0.66811496",
"0.6680523",
"0.6678561",
"0.6669383",
"0.66685265",
"0.6664329",
"0.6658405",
"0.6658405",
"0.6658405",
"0.66576266",
"0.6655998",
"0.6655998",
"0.6655998",
"0.6653282",
"0.66530126",
"0.6651592",
"0.6650151",
"0.6648575",
"0.6647844",
"0.6647643",
"0.6647611",
"0.66465765",
"0.6646401",
"0.6644694",
"0.6643749",
"0.6643608",
"0.6640089",
"0.66356236",
"0.6634635",
"0.6633641",
"0.6633641",
"0.6633641",
"0.66333216",
"0.6630465",
"0.66291285",
"0.662822",
"0.66277045",
"0.6625648",
"0.6621995",
"0.6620415",
"0.6620415"
] | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] | [
"0.79052806",
"0.7806316",
"0.7767438",
"0.772778",
"0.76324606",
"0.7622031",
"0.758556",
"0.7531728",
"0.7489057",
"0.74576724",
"0.74576724",
"0.743964",
"0.7422121",
"0.74037784",
"0.73926556",
"0.7387903",
"0.73803806",
"0.73715395",
"0.7362778",
"0.7357048",
"0.7346653",
"0.73422706",
"0.7331221",
"0.7329421",
"0.7326524",
"0.73197514",
"0.73175013",
"0.7314632",
"0.7305193",
"0.7305193",
"0.73030055",
"0.72992206",
"0.7294402",
"0.7287853",
"0.7284157",
"0.72821075",
"0.72797185",
"0.7260893",
"0.7260893",
"0.7260893",
"0.7260798",
"0.72604334",
"0.7250995",
"0.72243106",
"0.72205526",
"0.7217967",
"0.72052115",
"0.72008896",
"0.7200226",
"0.71938485",
"0.7186533",
"0.7178549",
"0.71698415",
"0.7168567",
"0.7154602",
"0.7154338",
"0.71365875",
"0.71357495",
"0.71357495",
"0.71302795",
"0.7129606",
"0.7125107",
"0.7124433",
"0.71243066",
"0.7122874",
"0.7118138",
"0.71181303",
"0.71180034",
"0.71180034",
"0.71180034",
"0.71180034",
"0.7117241",
"0.71159554",
"0.7113099",
"0.7110779",
"0.71097904",
"0.71062744",
"0.710078",
"0.7099281",
"0.70957214",
"0.7094494",
"0.7094494",
"0.7087356",
"0.70834076",
"0.7081747",
"0.70809853",
"0.70746684",
"0.70691484",
"0.70627403",
"0.70616937",
"0.7060999",
"0.7052165",
"0.70382303",
"0.70382303",
"0.7036847",
"0.7036218",
"0.7036218",
"0.70333946",
"0.7031289",
"0.7030542",
"0.70198953"
] | 0.0 | -1 |
Create optimization problem minimizing Fv on (l,d,theta) inputs. | public static OptimizationProblem createOptimizationProblemLdMinFv() {
return createOptimizationProblem(From.L_d_theta, To.Fv, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static OptimizationProblem createOptimizationProblemTempMaxFv() {\n return createOptimizationProblem(From.tpac_T_uw_d, To.Fv, true);\n }",
"public Tuple optimize (Tuple theta) {\n\t\t\n\t\t// obtain the dimensionality\n\t\tdimensionality = theta.GetDimension();\n\t\t\n\t\t// check that dimensionality matches with feature dimensions\n\t\t// TODO\n\t\t\n\t\t// scaling constant k = (alpha / m);\n\t\tdouble c = alpha / members;\n\t\t\n\t\t// Start calculating for each theta\n\t\tTuple new_theta = new Tuple(dimensionality);\n\t\t\n\t\t// Below loop of 'j' will iterate over each parameter\n\t\tfor (int j = 0; j < dimensionality; j++) {\n\n\t\t\tdouble weighted_error = 0;\n\t\t\t\n\t\t\t// Below loop of 'i' will iterate over each data points of given training set \n\t\t\tfor (int i = 0; i < members; i++) {\n\t\t\t\tTuple ithFeatureSet = dv.GetFeatureTuple(i);\n\t\t\t\tTuple ithResponse = dv.GetResponse(i);\n\t\t\t\t\n\t\t\t\tdouble hypo = 0;\n\t\t\t\tfor (int k = 0; k < dimensionality; k++)\n\t\t\t\t\thypo += ithFeatureSet.get(k) * theta.get(k);\n\t\t\t\tdouble error = ( hypo - ithResponse.get(0) );\n\t\t\t\tweighted_error += error * ithFeatureSet.get(j);\t\n\t\t\t\tcurrentCost += error * error;\n\t\t\t\t\n\t\t\t\t// TODO LOGGING\n\t\t\t\t// System.out.println(\"[\" + j + \", \" + i + \"] For Theta(\" + j + \"), Row = \" + i + \", Feature: \" + ithFeatureSet + \", Theta: \" + theta + \", Response: \" + ithResponse + \", hypo = \" + hypo + \", err = \" + error + \", weighted_err = \" + weighted_error);\n\t\t\t\t// System.out.println(\"theta = \" + j + \", row = \" + i + \", hypo = \" + hypo + \", error = \" + error + \", weighted err = \" + weighted_error);\n\t\t\t} // end of 'i'\n\t\t\t\n\t\t\tdouble adjustment = c * weighted_error;\n\t\t\tcurrentCost = currentCost / (2 * members);\n\t\t\t\n\t\t\t// TODO LOGGING\n\t\t\t// System.out.println(\"alpha = \" + alpha + \", m = \" + members + \", c = \" + c + \", weighted_err = \" + weighted_error + \", adj = \" + adjustment);\n\t\t\t\n\t\t\tnew_theta.add(theta.get(j) - adjustment );\n\t\t} // end of 'j'\n\t\t\n\t\treturn new_theta;\n\t}",
"public void calculate(double[] theta) {\r\n dvModel.vectorToParams(theta);\r\n\r\n double localValue = 0.0;\r\n double[] localDerivative = new double[theta.length];\r\n\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryW_dfsG,binaryW_dfsB;\r\n binaryW_dfsG = TwoDimensionalMap.treeMap();\r\n binaryW_dfsB = TwoDimensionalMap.treeMap();\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryScoreDerivativesG,binaryScoreDerivativesB ;\r\n binaryScoreDerivativesG = TwoDimensionalMap.treeMap();\r\n binaryScoreDerivativesB = TwoDimensionalMap.treeMap();\r\n Map<String, SimpleMatrix> unaryW_dfsG,unaryW_dfsB ;\r\n unaryW_dfsG = new TreeMap<String, SimpleMatrix>();\r\n unaryW_dfsB = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> unaryScoreDerivativesG,unaryScoreDerivativesB ;\r\n unaryScoreDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n unaryScoreDerivativesB= new TreeMap<String, SimpleMatrix>();\r\n\r\n Map<String, SimpleMatrix> wordVectorDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> wordVectorDerivativesB = new TreeMap<String, SimpleMatrix>();\r\n\r\n for (TwoDimensionalMap.Entry<String, String, SimpleMatrix> entry : dvModel.binaryTransform) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n binaryW_dfsG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryW_dfsB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryScoreDerivativesG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n binaryScoreDerivativesB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n }\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.unaryTransform.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n unaryW_dfsG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryW_dfsB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryScoreDerivativesG.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n unaryScoreDerivativesB.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n }\r\n if (op.trainOptions.trainWordVectors) {\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.wordVectors.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n wordVectorDerivativesG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n wordVectorDerivativesB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n }\r\n }\r\n\r\n // Some optimization methods prints out a line without an end, so our\r\n // debugging statements are misaligned\r\n Timing scoreTiming = new Timing();\r\n scoreTiming.doing(\"Scoring trees\");\r\n int treeNum = 0;\r\n MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>> wrapper = new MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>>(op.trainOptions.trainingThreads, new ScoringProcessor());\r\n for (Tree tree : trainingBatch) {\r\n wrapper.put(tree);\r\n }\r\n wrapper.join();\r\n scoreTiming.done();\r\n while (wrapper.peek()) {\r\n Pair<DeepTree, DeepTree> result = wrapper.poll();\r\n DeepTree goldTree = result.first;\r\n DeepTree bestTree = result.second;\r\n\r\n StringBuilder treeDebugLine = new StringBuilder();\r\n Formatter formatter = new Formatter(treeDebugLine);\r\n boolean isDone = (Math.abs(bestTree.getScore() - goldTree.getScore()) <= 0.00001 || goldTree.getScore() > bestTree.getScore());\r\n String done = isDone ? \"done\" : \"\";\r\n formatter.format(\"Tree %6d Highest tree: %12.4f Correct tree: %12.4f %s\", treeNum, bestTree.getScore(), goldTree.getScore(), done);\r\n System.err.println(treeDebugLine.toString());\r\n if (!isDone){\r\n // if the gold tree is better than the best hypothesis tree by\r\n // a large enough margin, then the score difference will be 0\r\n // and we ignore the tree\r\n\r\n double valueDelta = bestTree.getScore() - goldTree.getScore();\r\n //double valueDelta = Math.max(0.0, - scoreGold + bestScore);\r\n localValue += valueDelta;\r\n\r\n // get the context words for this tree - should be the same\r\n // for either goldTree or bestTree\r\n List<String> words = getContextWords(goldTree.getTree());\r\n\r\n // The derivatives affected by this tree are only based on the\r\n // nodes present in this tree, eg not all matrix derivatives\r\n // will be affected by this tree\r\n backpropDerivative(goldTree.getTree(), words, goldTree.getVectors(),\r\n binaryW_dfsG, unaryW_dfsG,\r\n binaryScoreDerivativesG, unaryScoreDerivativesG,\r\n wordVectorDerivativesG);\r\n\r\n backpropDerivative(bestTree.getTree(), words, bestTree.getVectors(),\r\n binaryW_dfsB, unaryW_dfsB,\r\n binaryScoreDerivativesB, unaryScoreDerivativesB,\r\n wordVectorDerivativesB);\r\n\r\n }\r\n ++treeNum;\r\n }\r\n\r\n double[] localDerivativeGood;\r\n double[] localDerivativeB;\r\n if (op.trainOptions.trainWordVectors) {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator(),\r\n wordVectorDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator(),\r\n wordVectorDerivativesB.values().iterator());\r\n } else {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator());\r\n }\r\n\r\n // correct - highest\r\n for (int i =0 ;i<localDerivativeGood.length;i++){\r\n localDerivative[i] = localDerivativeB[i] - localDerivativeGood[i];\r\n }\r\n\r\n // TODO: this is where we would combine multiple costs if we had parallelized the calculation\r\n value = localValue;\r\n derivative = localDerivative;\r\n\r\n // normalizing by training batch size\r\n value = (1.0/trainingBatch.size()) * value;\r\n ArrayMath.multiplyInPlace(derivative, (1.0/trainingBatch.size()));\r\n\r\n // add regularization to cost:\r\n double[] currentParams = dvModel.paramsToVector();\r\n double regCost = 0;\r\n for (int i = 0 ; i<currentParams.length;i++){\r\n regCost += currentParams[i] * currentParams[i];\r\n }\r\n regCost = op.trainOptions.regCost * 0.5 * regCost;\r\n value += regCost;\r\n // add regularization to gradient\r\n ArrayMath.multiplyInPlace(currentParams, op.trainOptions.regCost);\r\n ArrayMath.pairwiseAddInPlace(derivative, currentParams);\r\n\r\n }",
"public static DoubleVector minimizeFunction(CostFunction f,\n DoubleVector pInput, final int numParticles, double alpha, double beta,\n double phi, final int maxIterations, final int numThreads,\n final boolean verbose) {\n return new ParticleSwarmOptimization(numParticles, alpha, beta, phi,\n numThreads).minimize(f, pInput, maxIterations, verbose);\n }",
"public <V extends DataType<V>> int argmin(\r\n \t\tCostFunction<V> costFunction,\t\tPlanCostFunction<V> localCostFunction,\r\n\t\t\tList<Plan<V>> choices, \t\t\t\tV constant, \r\n\t\t\tdouble alpha,\t\t\t\t\t\tdouble beta,\r\n\t\t\tdouble discomfortSumConstant,\t\tdouble discomfortSumSqrConstant,\t\r\n\t\t\tint numAgents, \t\t\t\t\t\tMultiObjectiveIEPOSAgent agent) {\r\n\r\n\t\tdouble[] costs = new double[choices.size()];\r\n\t\tdouble[] discomfortSums = new double[choices.size()];\r\n\t\tdouble[] discomfortSumSqrs = new double[choices.size()];\r\n\r\n\t\tIntStream.range(0, choices.size()).forEach(i -> {\r\n\t\t\tV combined;\r\n\t\t\tif(constant != null) {\r\n\t\t\t\tcombined = constant.cloneThis();\r\n\t\t\t\tcombined.add(choices.get(i).getValue());\r\n\t\t\t} else {\r\n\t\t\t\tcombined = choices.get(i).getValue();\r\n\t\t\t}\r\n\t\t\tdouble cost = costFunction.calcCost(combined);\r\n\r\n\t\t\tcosts[i] = cost;\r\n\t\t\tdouble score = localCostFunction.calcCost(choices.get(i));\r\n\t\t\tdiscomfortSums[i] = discomfortSumConstant + score;\r\n\t\t\tdiscomfortSumSqrs[i] = discomfortSumSqrConstant + score*score;\r\n\t\t\t//System.out.print(\"agent: \" + agent.getPeer().getIndexNumber() + \", SumConst = \" + discomfortSumConstant + \", Sum2const = \" + discomfortSumSqrConstant);\r\n\t\t\t//System.out.println(\"Sum is \" + discomfortSums[i] + \", sum^2 is \" + discomfortSumSqrs[i] + \", num agents = \" + numAgents);\r\n\t\t});\r\n\r\n\t\treturn this.extendedOptimization(costs, alpha, beta, discomfortSums, discomfortSumSqrs, numAgents);\r\n\r\n }",
"private void createOptimizationFunction() {\n \t\tobjective = \"min:\"; //$NON-NLS-1$\n \t\tSet s = slice.entrySet();\n \t\tfor (Iterator iterator = s.iterator(); iterator.hasNext();) {\n \t\t\tMap.Entry entry = (Map.Entry) iterator.next();\n \t\t\tHashMap conflictingEntries = (HashMap) entry.getValue();\n \t\t\tif (conflictingEntries.size() <= 1) {\n \t\t\t\tobjective += \" 1 \" + getVariable((IInstallableUnit) conflictingEntries.values().iterator().next()); //$NON-NLS-1$\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tList toSort = new ArrayList(conflictingEntries.values());\n \t\t\tCollections.sort(toSort);\n \t\t\tint weight = toSort.size();\n \t\t\tfor (Iterator iterator2 = toSort.iterator(); iterator2.hasNext();) {\n \t\t\t\tobjective += \" \" + weight-- + \" \" + getVariable((IInstallableUnit) iterator2.next()); //$NON-NLS-1$//$NON-NLS-2$\n \t\t\t}\n \t\t}\n \t\tobjective += \" ;\"; //$NON-NLS-1$\n \t}",
"void findFeasible() {\n\n\t\tfor( int u = 0; u < neg.length; u++ ) {\t\n\t\t\tint i = neg[u];\n\t\t\tfor( int v = 0; v < pos.length; v++ ) {\t\n\t\t\t\tint j = pos[v];\n\t\t\t\tf[i][j] = -delta[i] < delta[j]? -delta[i]: delta[j];\n\t\t\t\tdelta[i] += f[i][j];\n\t\t\t\tdelta[j] -= f[i][j];\n\t\t\t}\n\t\t}\n\t}",
"public org.apache.spark.mllib.linalg.Vector optimize (org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, org.apache.spark.mllib.linalg.Vector>> data, org.apache.spark.mllib.linalg.Vector initialWeights) ;",
"Model minimize(Model model);",
"public interface Optimizer extends scala.Serializable {\n /**\n * Solve the provided convex optimization problem.\n * @param data (undocumented)\n * @param initialWeights (undocumented)\n * @return (undocumented)\n */\n public org.apache.spark.mllib.linalg.Vector optimize (org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, org.apache.spark.mllib.linalg.Vector>> data, org.apache.spark.mllib.linalg.Vector initialWeights) ;\n}",
"public float work(float ds, float v);",
"public int perform_LMVM() {\n if (_inequality_width > 0) {\n int nvars = _fb.Size() * 2;\n double[] x = new double[nvars];\n \n // INITIAL POINT\n for (int i = 0; i < nvars / 2; i++) {\n x[i] = _va.get(i);\n x[i + _fb.Size()] = _vb.get(i);\n }\n \n // int info = BLMVMSolve(x, nvars);\n \n for (int i = 0; i < nvars / 2; i++) {\n _va.set(i, x[i]);\n _vb.set(i, x[i + _fb.Size()]);\n _vl.set(i, _va.get(i) - _vb.get(i));\n }\n \n return 0;\n } else {\n \n int nvars = _fb.Size();\n double[] x = new double[nvars];\n \n // INITIAL POINT\n for (int i = 0; i < nvars; i++) {\n x[i] = _vl.get(i);\n }\n \n // int info = BLMVMSolve(x, nvars);\n \n for (int i = 0; i < nvars; i++) {\n _vl.set(i, x[i]);\n }\n \n return 0;\n }\n }",
"List<Model> minimize(Model model, int nMinima);",
"public NonLinear(double[] x, double[] y, RealValuedFunctionVA rf,\n\t\t\t Config config, double[] guess)\n\t{\n\t this.rf = rf;\n\n\t int n = rf.minArgLength() - 1;\n\t extendedParameters = new double[n+1];\n\t double[] ourGuess = new double[n];\n\t if (guess != null) {\n\t\tif (guess.length < ourGuess.length) {\n\t\t throw new IllegalArgumentException\n\t\t\t(errorMsg(\"gTooShort\", guess.length, ourGuess.length));\n\n\t\t}\n\t\tSystem.arraycopy(guess, 0, ourGuess, 0, ourGuess.length);\n\t }\n\t setParameters(ourGuess);\n\n\t if (config == null) config = defaultConfig;\n\n\t // y before x is the LMA convention.\n\t double sumsq = LMA.findMin(rf, LMA.Mode.LEAST_SQUARES,\n\t\t\t\t ourGuess, config.lambda, config.nu,\n\t\t\t\t config.limit,\n\t\t\t\t config.iterationLimit, y, x);\n\t System.arraycopy(ourGuess, 0, extendedParameters, 1, n);\n\n\t double[][] J = new double[x.length][];\n\t double[][] H = new double[n][n];\n\t for (int i = 0; i < x.length; i++) {\n\t\textendedParameters[0] = x[i];\n\t\tJ[i] = rf.jacobian(1,extendedParameters);\n\t }\n\t Adder.Kahan adder = new Adder.Kahan();\n\t Adder.Kahan.State state = adder.getState();\n\t for (int i = 0; i < n; i++) {\n\t\tfor (int j = 0; j < n; j++) {\n\t\t adder.reset();\n\t\t for (int k = 0; k < x.length; k++) {\n\t\t\tdouble term = J[k][i]*J[k][j];\n\t\t\tdouble yy = term - state.c;\n\t\t\tdouble t = state.total + yy;\n\t\t\tstate.c = (t - state.total) - yy;\n\t\t\tstate.total = t;\n\t\t }\n\t\t H[i][j] = state.total;\n\t\t}\n\t }\n\t decomp = new CholeskyDecomp(H, H);\n\t if (x.length == n) {\n\t\tsetChiSquare(0.0);\n\t\tsetDegreesOfFreedom(0);\n\t\tsetReducedChiSquare(Double.POSITIVE_INFINITY);\n\t\tsetVariance(0.0);\n\t\t/*\n\t\tdouble[][] cv = getCovarianceArray();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t for (int j = 0; j < n; j++) {\n\t\t\tcv[i][j] = 0.0;\n\t\t }\n\t\t}\n\t\t*/\n\t } else {\n\t\tsumsq = LeastSquaresFit.sumOfSquares(this, x, y);\n\t\tdouble variance = sumsq / (x.length - n);\n\t\t// Chi-square is sumsq divided by the variance because\n\t\t// the sigmas all have the same value, but that just\n\t\t// gives x.length - n. This happens because we don't have\n\t\t// an independent estimate of the variance, so we are\n\t\t// implicitly assuming we have the right fit.\n\t\tsetChiSquare(x.length - n);\n\t\tsetDegreesOfFreedom(x.length - n);\n\t\t// reducedChiSquare = ChiSquare divided by the degrees\n\t\t// of freedom.\n\t\tsetReducedChiSquare(1.0);\n\t\t// the H matrix used sigma=1, so we should have divided it by\n\t\t// the variance, which we didn't know. The covariance is the\n\t\t// inverse of H, so we should multiply it by the variance to\n\t\t// get the right value.\n\t\tsetVariance(variance);\n\t\t/*\n\t\tdouble[][] cv = getCovarianceArray();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t for (int j = 0; j < n; j++) {\n\t\t\tcv[i][j] *= variance;\n\t\t }\n\t\t}\n\t\t*/\n\t }\n\t}",
"public int objective() {\n\t\tint value = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tvalue += v[i] * x[i];\n\t\treturn value;\n\t}",
"max_values OptimizeCargo(ArrayList<ore_excavation> oe, double wt,\n int index) {\n int i;\n double weight = 0.0;\n max_values mv;\n max_values new_mv = new max_values();\n /*\n \t\t * I am making a subset of the original vector because I\n \t\t * will be taking mined minerals out to test if adding\n \t\t * it to the cargo will maximize my value. I may need to\n \t\t * remove this mineral from the cargo and use another.\n \t\t *\n \t\t * But the beauty of recursion is that if the mineral does\n \t\t * not fit, unwinding the stack frames returns the\n \t\t * algorithm to a previous state to try other combinations of\n \t\t * minerals.\n \t\t *\n \t\t * Making a copy of the input vector allows this to happen.\n */\n ArrayList<ore_excavation> ro = new ArrayList<ore_excavation>(oe);\n\n /* Loop over all remaining minerals in subset */\n for (i = index; i < ro.size(); i++) {\n\n ore_excavation o = ro.get(i);\n\n weight = wt - o.ore_mass;\n\n if (weight >= 0.0) {\n /*\n \t\t\t\t * Weight will work. Now make the working\n \t\t\t\t * set smaller and try more minerals.\n \t\t\t\t * Pass the smaller set of remaining minerals\n \t\t\t\t * to try to add them to the cargo.\n */\n ro.remove(i); // Make set smaller.\n mv = OptimizeCargo(ro, weight, 0);\n mv.value += o.ore_value;\n\n if (mv.value > new_mv.value) {\n new_mv.value = mv.value;\n new_mv.weight = mv.weight + o.ore_mass;\n }\n continue;\n }\n }\n return new_mv;\n }",
"public NonLinear(double[] x, double[] y, double[] sigma,\n\t\t\t RealValuedFunctionVA rf,\n\t\t\t Config config, double[] guess)\n\t{\n\t this.rf = rf;\n\n\t int n = rf.minArgLength() - 1;\n\t extendedParameters = new double[n+1];\n\t double[] ourGuess = new double[n];\n\t setParameters(ourGuess);\n\n\t if (config == null) config = defaultConfig;\n\n\t if (guess != null) {\n\t\tif (guess.length < ourGuess.length) {\n\t\t throw new IllegalArgumentException\n\t\t\t(errorMsg(\"gTooShort\", guess.length, ourGuess.length));\n\n\t\t}\n\t\tSystem.arraycopy(guess, 0, ourGuess, 0, ourGuess.length);\n\t }\n\n\t // y before x is the LMA convention.\n\t double sumsq = LMA.findMin(rf, LMA.Mode.WEIGHTED_LEAST_SQUARES,\n\t\t\t\t ourGuess, config.lambda, config.nu,\n\t\t\t\t config.limit,\n\t\t\t\t config.iterationLimit, y, sigma, x);\n\t System.arraycopy(ourGuess, 0, extendedParameters, 1, n);\n\n\t double[][] J = new double[x.length][];\n\t double[][] H = new double[n][n];\n\t for (int i = 0; i < x.length; i++) {\n\t\textendedParameters[0] = x[i];\n\t\tJ[i] = rf.jacobian(1,extendedParameters);\n\t }\n\t Adder.Kahan adder = new Adder.Kahan();\n\t Adder.Kahan.State state = adder.getState();\n\t for (int i = 0; i < n; i++) {\n\t\tfor (int j = 0; j < n; j++) {\n\t\t adder.reset();\n\t\t for (int k = 0; k < x.length; k++) {\n\t\t\tdouble sk = sigma[k];\n\t\t\tdouble term = J[k][i]*J[k][j] / (sk*sk);\n\t\t\tdouble yy = term - state.c;\n\t\t\tdouble t = state.total + yy;\n\t\t\tstate.c = (t - state.total) - yy;\n\t\t\tstate.total = t;\n\t\t }\n\t\t H[i][j] = state.total;\n\t\t}\n\t }\n\t decomp = new CholeskyDecomp(H, H);\n\t if (x.length == n) {\n\t\tsetChiSquare(0.0);\n\t\tsetDegreesOfFreedom(0);\n\t\tsetReducedChiSquare(Double.POSITIVE_INFINITY);\n\t\tsetVariance(0.0);\n\t } else {\n\t\tdouble chiSq = LeastSquaresFit.chiSquare(this, x, y, sigma);\n\t\tsetChiSquare(chiSq);\n\t\tsetDegreesOfFreedom(x.length - n);\n\t\tsetReducedChiSquare(chiSq/(x.length-n));\n\t }\n\t}",
"private double performPKLStep(ArrayList<Kernel<T>> kernels, ArrayList<Double> weights, List<TrainingSample<T>> l)\n\t{\n\n\t\t//store new as old for the loop\n\t\tdouble objective = oldObjective;\n\t\t\n\t\teprintln(3, \"+++ old weights : \"+weights);\n\t\teprintln(3, \"+++ oldObjective : \"+oldObjective+\" sumAlpha : \"+computeSumAlpha());\n\t\t\n\t\t\n\t\t//compute grad\n\t\tdouble [] grad = gradBeta(kernels, weights, l);\n\t\tdouble [] sgrad = secondGradBeta(kernels, weights, l);\n\t\t\n\t\t\n\t\tdouble newBeta[] = new double[grad.length];\n\n\t\t//update weights in this direction until objective decreases\n\t\td_lambda = 1.0; //reset learning rate\n\t\tdo\n\t\t{\n\t\t\tfor(int i = 0 ; i < grad.length; i++)\n\t\t\t{\n\t\t\t\t//second order update\n\t\t\t\tif(sgrad[i] != 0.)\n\t\t\t\t\tnewBeta[i] = weights.get(i) * (1 - d_lambda*grad[i]/sgrad[i]);\n\t\t\t\tif(newBeta[i] < num_cleaning)\n\t\t\t\t\tnewBeta[i] = 0;\n\n\t\t\t}\n\n\t\t\t//normalize\n\t\t\tdouble norm = 0;\n\t\t\tif(p_norm == 1) // L1-norm\n\t\t\t{\n\t\t\t\tfor(int i = 0 ; i < newBeta.length; i++)\n\t\t\t\t\tnorm += Math.abs(newBeta[i]);\n\t\t\t}\n\t\t\telse //Lp-norm\n\t\t\t{\n\t\t\t\tfor(int i = 0 ; i < newBeta.length; i++)\n\t\t\t\t\tnorm += Math.pow(newBeta[i], p_norm);\n\t\t\t\tnorm = Math.pow(norm, -1/(double)p_norm);\n\t\t\t}\n\t\t\tif(norm < 0)\n\t\t\t{\n\t\t\t\teprintln(1, \"Error normalization, norm < 0\");\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\teprintln(3, \"+++ norm : \"+norm);\n\t\t\t//normalize\n\t\t\tfor(int i = 0 ; i < newBeta.length; i++)\n\t\t\t\tnewBeta[i] /= (double)(norm);\n\t\t\t\n\n\n\t\t\t//compute new objective function\n\t\t\tThreadedProductKernel<T> pk = new ThreadedProductKernel<T>();\n\t\t\tfor( int i = 0 ; i < kernels.size(); i++)\n\t\t\t\tpk.addKernel(kernels.get(i), newBeta[i]);\n\t\t\t//train svm\n\t\t\tsvm.setKernel(pk);\n\t\t\teprintln(3, \"+ retraining svm\");\n\t\t\tsvm.retrain();\n\t\t\tdouble[] a = svm.getAlphas();\n\t\t\t//update lambda\n\t\t\tupdateLambdaMatrix(a, pk, l);\n\t\t\t//new objective\n\t\t\tobjective = computeObj(a, pk, l);\n\n\t\t\tif(objective < oldObjective + num_cleaning) // did the objective at least stay similar\n\t\t\t{\n\t\t\t\t//store new weights\n\t\t\t\tfor(int i = 0 ; i < weights.size(); i++)\n\t\t\t\t\tweights.set(i, newBeta[i]);\n\t\t\t\teprintln(3, \"+++ new weights : \"+weights);\n\t\t\t}\n\t\t\telse //if not, reduce learning rate exponentially\n\t\t\t{\n\t\t\t\tif(d_lambda > num_cleaning)\n\t\t\t\t\td_lambda /= 8.;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\td_lambda = 0.;\n\t\t\t\t\teprint(3, \"+++ d_lambda is zero, stopping.\");\n\t\t\t\t\teprintln(2, \"\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\teprint(2, \"+\");\n\t\t\t\teprintln(3, \"++ new objective (\"+(float)objective+\") did not decrease (\"+(float)oldObjective+\"), reducing step : \"+d_lambda);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\twhile(oldObjective + num_cleaning < objective);\n\t\t\n\t\teprintln(2, \"+ objective : \"+(float)objective+\"\\t+\\t sumAlpha : \"+(float)computeSumAlpha());\n\n\t\tdouble gap = objective/oldObjective;\n\t\t\n\t\t//store objective as oldObjective\n\t\toldObjective = objective;\n\n\t\t//return objective evolution\n\t\treturn gap;\n\t}",
"public NonLinear(double[] x, double[] y, double sigma,\n\t\t\t RealValuedFunctionVA rf,\n\t\t\t Config config,\n\t\t\t double[] guess)\n\t{\n\t this.rf = rf;\n\n\t int n = rf.minArgLength() - 1;\n\t extendedParameters = new double[n+1];\n\t double[] ourGuess = new double[n];\n\t setParameters(ourGuess);\n\n\t if (config == null) config = defaultConfig;\n\n\t if (guess != null) {\n\t\tif (guess.length < ourGuess.length) {\n\t\t throw new IllegalArgumentException\n\t\t\t(errorMsg(\"gTooShort\", guess.length, ourGuess.length));\n\n\t\t}\n\t\tSystem.arraycopy(guess, 0, ourGuess, 0, ourGuess.length);\n\t }\n\n\t // y before x is the LMA convention.\n\t double sumsq = LMA.findMin(rf, LMA.Mode.LEAST_SQUARES,\n\t\t\t\t ourGuess, config.lambda, config.nu,\n\t\t\t\t config.limit,\n\t\t\t\t config.iterationLimit, y, x);\n\t System.arraycopy(ourGuess, 0, extendedParameters, 1, n);\n\n\t double[][] J = new double[x.length][];\n\t double[][] H = new double[n][n];\n\t for (int i = 0; i < x.length; i++) {\n\t\textendedParameters[0] = x[i];\n\t\tJ[i] = rf.jacobian(1,extendedParameters);\n\t }\n\t Adder.Kahan adder = new Adder.Kahan();\n\t Adder.Kahan.State state = adder.getState();\n\t for (int i = 0; i < n; i++) {\n\t\tfor (int j = 0; j < n; j++) {\n\t\t adder.reset();\n\t\t for (int k = 0; k < x.length; k++) {\n\t\t\tdouble term = J[k][i]*J[k][j];\n\t\t\tdouble yy = term - state.c;\n\t\t\tdouble t = state.total + yy;\n\t\t\tstate.c = (t - state.total) - yy;\n\t\t\tstate.total = t;\n\t\t }\n\t\t H[i][j] = state.total;\n\t\t}\n\t }\n\t decomp = new CholeskyDecomp(H, H);\n\t if (x.length == n) {\n\t\tsetChiSquare(0.0);\n\t\tsetDegreesOfFreedom(0);\n\t\tsetReducedChiSquare(Double.POSITIVE_INFINITY);\n\t\tsetVariance(0.0);\n\t\t/*\n\t\tdouble[][] cv = getCovarianceArray();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t for (int j = 0; j < n; j++) {\n\t\t\tcv[i][j] = 0.0;\n\t\t }\n\t\t}\n\t\t*/\n\t } else {\n\t\tdouble sigma2 = sigma*sigma;\n\t\tdouble chiSq = LeastSquaresFit.chiSquare(this, x, y, sigma);\n\t\tsetChiSquare(chiSq);\n\t\tsetDegreesOfFreedom(x.length - n);\n\t\tsetReducedChiSquare(chiSq/(x.length-n));\n\t\t// We didn't include the factor of sigma2 in the previous\n\t\t// matrices, and just fix up the value here, so as to\n\t\t// avoid some additional arithmetic while computing the\n\t\t// parameters.\n\t\tsetVariance(sigma2);\n\t\t/*\n\t\tdouble[][] cv = getCovarianceArray();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t for (int j = 0; j < n; j++) {\n\t\t\tcv[i][j] *= sigma2;\n\t\t }\n\t\t}\n\t\t*/\n\t }\n\t}",
"public VariableUnit solve() {\n LinkedList<VariableUnit> processor = new LinkedList<VariableUnit>();\n\n VariableUnit vu1 = new VariableUnit(250.0, 'x');\n VariableUnit vu2 = new VariableUnit('+');\n VariableUnit vu3 = new VariableUnit(250.0, 'x');\n VariableUnit vu4 = new VariableUnit(501.0, 'x');\n VariableUnit vu5 = new VariableUnit('y');\n VariableUnit vu6 = new VariableUnit('-');\n alpha_arr.get(('x' - 'a')).addLast(vu1);\n alpha_arr.get(('x' - 'a')).addLast(vu2);\n alpha_arr.get(('x' - 'a')).addLast(vu3);\n op_order.add(vu1); op_order.add(vu2); op_order.add(vu3); op_order.add(vu6);\n op_order.add(vu4); op_order.add(vu6); op_order.add(vu5);\n assignValue(2.0, 'x');\n \n System.out.print(vu1); System.out.print(vu2); System.out.print(vu3);\n System.out.print(vu6); System.out.print(vu4); System.out.print(vu6);\n System.out.print(vu5);\n System.out.println();\n System.out.println(\"------------------------------\");\n \n VariableUnit temp, temp1;\n for (int i = 0; i < op_order.size(); i++) {\n \ttemp = op_order.pollFirst();\n \t\n \t\tswitch (temp.getVariable()) {\n \tcase '+':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().add(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tcase '-':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().subtract(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tdefault:\n \t\tprocessor.push(temp);\n \t\t}\n }\n\n /*\n * System.out.println(\"This equation is currently unsolvable.\");\n \tSystem.out.println(\"Try assigning values to some of the variables.\");\n */\n while (!processor.isEmpty()) {\n \top_order.addFirst(processor.pop());\n }\n \n ListIterator<VariableUnit> iter = op_order.listIterator();\n \n while ( iter.hasNext() ) {\n \tVariableUnit iter_temp = iter.next();\n \t//System.out.print(iter_temp.hasValue());\n \tif (iter_temp.hasValue()) {\n \t\tSystem.out.print( Double.toString(iter_temp.subValue()) );\n \t}\n \telse {\n \t\tSystem.out.print(iter_temp);\n \t}\n };\n System.out.println();\n \n return new VariableUnit(Double.NaN, ' ');\n }",
"public S6Solution createNewSolution(S6Fragment n,S6Transform.Memo m)\n{\n double newscore = for_source.getScore() + scoreRandom();\n\n return new SolutionBase(base_node,current_node,n,transform_set,m,for_source,newscore);\n}",
"private double newCost(int v, int w) {\n\t\treturn 0.0;\n\t}",
"public ModelParams optimize() throws Exception {\n\t\tint iterCount = 0;\n\t\tdivergence = KLDivergenceCalculator.calculate(cState, tState);\n\t\tSystem.out.println(\"KL Divergence : \" + divergence);\n\t\t// ((DivergenceChart) BeanFinder\n\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t// iterCount, divergence);\n\t\tdouble delta[] = null;\n\t\tdouble theta[] = data.getParams().getParams();\n\t\tdouble newDivergence = 0.0d;\n\t\tdouble initialStep = data.getInitialStepSize();\n\t\tboolean optimized = false;\n\t\tdo {\n\t\t\tdelta = computeGradient(theta);\n\t\t\tfor (double step = initialStep; iterCount < data.getMaxIterations(); step /= 10) {\n\t\t\t\tSystem.out.println(\"Step size : \" + step);\n\t\t\t\tSystem.out.println(\"KL divergence before taking a step : \"\n\t\t\t\t\t\t+ KLDivergenceCalculator.calculate(cState, tState));\n\t\t\t\tfor (int i = 0; i < delta.length; i++) {\n\t\t\t\t\tif (Double.isNaN(delta[i]))\n\t\t\t\t\t\tSystem.out.print(\"delta is NAN!!\" + delta[i] + \", \");\n\t\t\t\t\ttheta[i] -= step * delta[i];\n\t\t\t\t\tSystem.out.print((theta[i]) + \", \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\tgetNewState(theta);\n\t\t\t\titerCount++;\n\t\t\t\tnewDivergence = KLDivergenceCalculator\n\t\t\t\t\t\t.calculate(cState, tState);\n\t\t\t\tSystem.out.println(\"KL Divergence : \" + newDivergence);\n\t\t\t\t// ((DivergenceChart) BeanFinder\n\t\t\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t\t\t// iterCount, newDivergence);\n\t\t\t\tif (newDivergence < divergence) {\n\t\t\t\t\tdivergence = newDivergence;\n\t\t\t\t\tinitialStep = step;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// before taking the next step size, reset theta to what it was\n\t\t\t\tfor (int i = 0; i < delta.length; i++)\n\t\t\t\t\ttheta[i] += step * delta[i];\n\t\t\t\tgetNewState(theta); // Added for checking. Not required.\n\t\t\t}\n\t\t\toptimized = optimized(theta);\n\t\t} while (!optimized && iterCount < data.getMaxIterations());\n\t\tModelParams optimParams = null;\n\t\tif (optimized) {\n\t\t\toptimParams = new ModelParams();\n\t\t\toptimParams.setParams(theta);\n\t\t}\n\t\treturn optimParams;\n\t}",
"public double[] calcSolution() {\n\t\t\n\t// Call CostFunction object\n\t\tcostFunction.function(position);\n\t\t\n\t\treturn solution;\n\t\t\n\t}",
"public SolutionSet execute() throws JMException, ClassNotFoundException {\n int maxEvaluations ;\n int evaluations ;\n\n SolutionSet population ;\n SolutionSet offspringPopulation ;\n\n Solution betterIndividual ;\n\n Operator mutationOperator ;\n Comparator comparator ;\n Operator localSearchOperator ;\n\n\n comparator = new ObjectiveComparator(0) ; // Single objective comparator\n\n // Read the params\n maxEvaluations = ((Integer)this.getInputParameter(\"maxEvaluations\")).intValue();\n\n // Initialize the variables\n population = new SolutionSet(mu_) ;\n offspringPopulation = new SolutionSet(lambda_) ;\n\n evaluations = 0;\n\n // Read the operators\n mutationOperator = this.operators_.get(\"mutation\");\n localSearchOperator = (LocalSearch) operators_.get(\"improvement\");\n\n System.out.println(\"(\" + mu_ + \" + \" + lambda_+\")ES\") ;\n\n // Create 1-parent population of mu solutions\n Solution newIndividual;\n newIndividual = new Solution(problem_);\n problem_.evaluate(newIndividual);\n evaluations++;\n betterIndividual = new Solution(newIndividual);\n population.add(betterIndividual);\n\n // Main loop\n while (evaluations < maxEvaluations) {\n // STEP 1. Generate the offspring\n Solution offspring = new Solution(population.get(0)) ;\n mutationOperator.execute(offspring);\n /*Solution mutated_solution = (Solution) mutationOperator.execute(offspring);\n if(offspring.getObjective(0) < mutated_solution.getObjective(0))\n offspring = mutated_solution;*/\n problem_.evaluate(offspring);\n Solution local_offspring = (Solution) localSearchOperator.execute(offspring);\n offspring.setObjective(0, local_offspring.getObjective(0));\n offspringPopulation.add(offspring);\n evaluations++;\n\n if(comparator.compare(betterIndividual, offspringPopulation.get(0)) > 0) {\n betterIndividual = new Solution(offspringPopulation.get(0));\n population.clear();\n // STEP 4. Create the new mu population\n population.add(betterIndividual);\n }\n\n System.out.println(population.get(0).getObjective(0)) ;\n\n // STEP 6. Delete the offspring population\n offspringPopulation.clear() ;\n } // while\n\n // Return a population with the best individual\n SolutionSet resultPopulation = new SolutionSet(1) ;\n resultPopulation.add(population.get(0)) ;\n\n return resultPopulation ;\n }",
"public abstract double[] getMinimumValues(List<AbstractObjective> objectives, List<? extends Solution<?>> solutions) ;",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n//\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tint N= Integer.parseInt(st.nextToken());\n\t\tint T= Integer.parseInt(st.nextToken());\n\t\t\n\t\t//for each N, three possible problem sets (P, A, G)\n\t\t//and P (prep time: min), V (value)\n\t\t//P <= A <= G\n\t\t\n\t\t//given limit T\n\t\t//find max profit\n\t\tint[][] v = new int[N+1][3+1];\n\t\tint[][] w = new int[N+1][3+1];\n\t\t\n\t\t//one \n\t\t\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\tfor (int j = 1; j <= 3; j++) {\n\t\t\t\tw[i][j] = Integer.parseInt(st.nextToken());\n\t\t\t\tv[i][j] = Integer.parseInt(st.nextToken());\n\t\t\t}\n\t\t}\n//\t\tfor (int i = 1; i <= N; i++) {\n//\t\t\tfor (int j = 1; j <= 3; j++) {\n//\t\t\t\tSystem.out.println(w[i][j] + \" \"+ v[i][j]);\n//\t\t\t}\n//\t\t}\n\t\tint[][] dp = new int[2][T+1];\n\t\t//where k looks at the kth row of the values/weight array\n\t\tfor (int k = 1; k <= N; k++) {\n\t\t\tfor (int x = 0; x <= T; x++) {\n\t\t\t\t//going through each weight and value\n\t\t\t\tboolean ran = false;\n\t\t\t\tfor (int a = 1; a <= 3; a++) {\t\t\t\t\t\n\t\t\t\t\tif (w[k][a] > x) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tran = true;\n\t\t\t\t\t\tdp[1][x] = Math.max(Math.max(dp[0][x],dp[0][x-w[k][a]] + v[k][a]),dp[1][x]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!ran) {\n\t\t\t\t\tdp[1][x] = dp[0][x];\n\t\t\t\t}\n\t\t\t}\n\t\t\tdp[0] = dp[1].clone();\n//\t\t\tfor (int[] row: dp) {\n//\t\t\t\tfor (int m: row) {\n//\t\t\t\t\tSystem.out.print(m + \" \");\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println();\n//\t\t\t}\n\t\t}\n\t\t\n//\t\tfor (int[] row: dp) {\n//\t\t\tfor (int m: row) {\n//\t\t\t\tSystem.out.print(m + \" \");\n//\t\t\t}\n//\t\t\tSystem.out.println();\n//\t\t}\n\t\tSystem.out.println(dp[1][T]);\n\t}",
"private static double findMinCost(double lemda, Vector finalVector,\r\n Host currentNode,\r\n ArrayList neighbors,\r\n ArrayList destList)\r\n {\n int n = neighbors.size();\r\n int m = destList.size();\r\n int w = n > m ? m : n;\r\n\r\n double [] costFor_r = new double[w];\r\n\r\n double minCost = MaxDistance;\r\n double totalCurToAll = findDistanceCurToAll(currentNode, destList);\r\n for ( int r = 0 ; r < w; r ++ )\r\n {\r\n Vector rSetVector = new Vector();\r\n costFor_r[r] = getMinSetCost_given_r( r+1, rSetVector,\r\n currentNode,\r\n neighbors,\r\n destList);\r\n costFor_r[r] = (1.0 - lemda) * (r + 1) / n + costFor_r[r] / totalCurToAll;\r\n if ( costFor_r[r] < minCost ) {\r\n minCost = costFor_r[r];\r\n finalVector.clear();\r\n for (int k = 0; k < rSetVector.size(); ++k) {\r\n finalVector.add(k, rSetVector.get(k));\r\n }\r\n }\r\n }\r\n\r\n return minCost;\r\n }",
"public boolean LocalImprovementDNF (TableVar Variables, TableDat Examples) {\r\n IndDNF solucion = new IndDNF(Variables.getNVars(), Variables);\r\n QualityMeasures res, new_res;\r\n int mejor, cambio;\r\n int[] indices = new int[Variables.getNVars()];\r\n float[] evalua = new float[Variables.getNVars()];\r\n boolean improvement = true;\r\n boolean retValue = false;\r\n int control;\r\n\r\n // Store the pos of the best guy in \"mejor\"\r\n mejor = poblac.getBestGuy();\r\n\r\n // Copy in \"solucion\" the rule to improve\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n for (int j=0; j<=Variables.getNLabelVar(i); j++)\r\n solucion.setCromElemGene(i, j, poblac.getCromElemGene(mejor,i,j));\r\n\r\n // Evaluate de rule and get the measures\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++; // Increment the number of trials\r\n res = solucion.getMedidas();\r\n\r\n control = 1;\r\n\r\n while ((improvement)&&(control<Variables.getNVars())) {\r\n improvement = false; // By now, there is no improvement\r\n for (int i=0; i<Variables.getNVars(); i++) {\r\n indices[i]=i;\r\n // It does not matter if the variable is discrete or continuous\r\n if (solucion.getCromElemGene(i,Variables.getNLabelVar(i))==0)\r\n // If variable does not actually takes part in the rule\r\n evalua[i] = -1;\r\n else {\r\n // The initial value is not stored cause we know the value is 1\r\n solucion.setCromElemGene(i, Variables.getNLabelVar(i),0);\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++;\r\n new_res = solucion.getMedidas();\r\n\r\n if ((new_res.getCnf() >= res.getCnf())&&(new_res.getSup() >= res.getSup())) {\r\n evalua[i] = new_res.getSup();\r\n improvement = true;\r\n }\r\n else\r\n evalua[i]=-1;\r\n // Restore initial values of \"solucion\"\r\n solucion.setCromElemGene(i, Variables.getNLabelVar(i), 1);\r\n }\r\n }\r\n\r\n if (improvement) {\r\n Utils.OrCrecIndex (evalua,0,Variables.getNVars()-1,indices);\r\n cambio = indices[Variables.getNVars()-1];\r\n for (int j=0; j<=Variables.getNLabelVar(cambio); j++)\r\n solucion.setCromElemGene(cambio, j, 0);\r\n\r\n res.setSup(evalua[Variables.getNVars()-1]);\r\n // Important: take into account not to eliminate all the variables of the rule\r\n\r\n // If there is improvement, set return value to true\r\n retValue = true;\r\n control++;\r\n\r\n }\r\n } // End while \"improvement\"\r\n\r\n // Store the new rule if it was improved\r\n if (retValue==true){\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n for (int j=0; j<=Variables.getNLabelVar(i); j++)\r\n poblac.setCromElemGene(mejor, i, j, solucion.getCromElemGene(i,j));\r\n poblac.setIndivEvaluated(mejor,false);\r\n }\r\n\r\n return retValue;\r\n\r\n }",
"public void estimateParameter(){\r\n int endTime=o.length;\r\n int N=hmm.stateCount;\r\n double p[][][]=new double[endTime][N][N];\r\n for (int t=0;t<endTime;++t){\r\n double count=EPS;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]=fbManipulator.alpha[t][i]*hmm.a[i][j]*hmm.b[i][j][o[t]]*fbManipulator.beta[t+1][j];\r\n count +=p[t][j][j];\r\n }\r\n }\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]/=count;\r\n }\r\n }\r\n }\r\n double pSumThroughTime[][]=new double[N][N];\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]=EPS;\r\n }\r\n }\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n //rebuild gamma\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i) fbManipulator.gamma[t][i]=0;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n fbManipulator.gamma[t][i]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n double gammaCount=EPS;\r\n //maximum parameter\r\n for (int i=0;i<N;++i){\r\n gammaCount+=fbManipulator.gamma[0][i];\r\n hmm.pi[i]=fbManipulator.gamma[0][i];\r\n }\r\n for (int i=0;i<N;++i){\r\n hmm.pi[i]/=gammaCount;\r\n }\r\n\r\n for (int i=0;i<N;++i) {\r\n gammaCount = EPS;\r\n for (int t = 0; t < endTime; ++t) gammaCount += fbManipulator.gamma[t][i];\r\n for (int j = 0; j < N; ++j) {\r\n hmm.a[i][j] = pSumThroughTime[i][j] / gammaCount;\r\n }\r\n }\r\n for (int i=0;i<N;i++){\r\n for (int j=0;j<N;++j){\r\n double tmp[]=new double[hmm.observationCount];\r\n for (int t=0;t<endTime;++t){\r\n tmp[o[t]]+=p[t][i][j];\r\n }\r\n for (int k=0;k<hmm.observationCount;++k){\r\n hmm.b[i][j][k]=(tmp[k]+1e-8)/pSumThroughTime[i][j];\r\n }\r\n }\r\n }\r\n //rebuild fbManipulator\r\n fbManipulator=new HMMForwardBackwardManipulator(hmm,o);\r\n }",
"@Override\n public Solution solve(ISearchable domain) {\n if(domain==null)\n return null;\n Solution s2=domain.checkIfIsSmall();\n if(s2!=null){\n domain.isClear();\n return s2;\n }\n Solution sol = new Solution();\n temp.add(domain.getStartState());\n numOfNude++;\n domain.isVisit(domain.getStartState());\n ArrayList<AState> neighbors=new ArrayList<AState>();\n while(!temp.isEmpty()){\n AState curr=temp.poll();\n if(domain.isEqual(domain.getGoalState(),curr)){\n numOfNude++;\n sol =solutionPath(curr,sol);\n\n break;\n }\n neighbors=domain.getAllPossibleState(curr);\n for(int i=0;i<neighbors.size();i++){\n if(domain.isEqual(domain.getGoalState(),neighbors.get(i))){\n neighbors.get(i).pervState=curr;\n neighbors.get(i).setPrice(neighbors.get(i).getPrice()+curr.getPrice());\n numOfNude++;\n sol =solutionPath(neighbors.get(i),sol);\n break;\n }\n neighbors.get(i).pervState=curr;\n neighbors.get(i).setPrice(neighbors.get(i).getPrice()+curr.getPrice());\n temp.add(neighbors.get(i));\n numOfNude++;\n }\n }\n\n domain.isClear();\n return sol;\n }",
"@Override\n public void updateIndividualObjectivesAndConstraints(\n OptimizationProblem problem,\n Individual individual) {\n double[] x = individual.real;\n // Number of design variables\n int n = x.length;\n // number of objectives\n int m = problem.objectives.length;\n // (g) calculations\n double summation = 0;\n for (int i = m - 1; i < n; i++) {\n summation += Math.pow(x[i] - 0.5, 2);\n }\n double g = summation;\n // Create objective functions\n for (int i = 0; i < m; i++) {\n double objValue = 1 + g;\n for (int j = 0; j < m - i - 1; j++) {\n objValue *= Math.cos(Math.pow(x[j], ALPHA) * Math.PI / 2);\n }\n if (i != 0) {\n objValue *= Math.sin(Math.pow(x[m - i - 1], ALPHA)\n * Math.PI / 2);\n }\n individual.setObjective(i, objValue);\n }\n // Announce that objective function values are valid\n individual.validObjectiveFunctionsValues = true;\n // Update constraint violations if constraints exist\n if (problem.constraints != null) {\n // In C3-DTLZ4, the number of constraints is equal to the number of\n // objectives\n double[] constraints = new double[problem.objectives.length];\n for (int j = 0; j < constraints.length; j++) {\n constraints[j] = Math.pow(individual.getObjective(j), 2)\n / 4 - 1;\n for (int i = 0; i < problem.objectives.length; i++) {\n if (i != j) {\n constraints[j]\n += Math.pow(individual.getObjective(i), 2);\n }\n }\n }\n // Set constraints vilations\n for (int i = 0; i < constraints.length; i++) {\n if (constraints[i] < 0) {\n individual.setConstraintViolation(i, constraints[i]);\n } else {\n individual.setConstraintViolation(i, 0);\n }\n }\n // Announce that objective function values are valid\n individual.validConstraintsViolationValues = true;\n }\n // Increase Evaluations Count by One (counted per individual)\n funEvaCount++;\n }",
"public void FVA( ArrayList< Double > objCoefs, Double objVal, ArrayList< Double > fbasoln, ArrayList< Double > min, ArrayList< Double > max, SolverComponent component ) throws Exception;",
"public abstract OptimisationSolution getBestSolution();",
"public void solveUsingVogelApproximationMethod() {\n this.solution = new Solution();\n\n Source[] proxySources = Arrays.copyOf(sources, sources.length);\n Destination[] proxyDestinations = Arrays.copyOf(destinations, destinations.length);\n int[][] matrix = new int[costs.length][costs[0].length];\n\n List<Integer> rows = new ArrayList<Integer>();\n List<Integer> columns = new ArrayList<Integer>();\n\n while ( rows.size() != proxySources.length && columns.size() != proxyDestinations.length ) {\n int[] penaltyRow = new int[proxyDestinations.length];\n int[] penaltyColumn = new int[proxySources.length];\n\n int firstTwo = 2;\n int firstValue = 0, secondValue = 0;\n for (int i = 0; i < proxySources.length; i++) {\n if (!rows.contains(i)) {\n for (int j = 0; j < proxyDestinations.length; j++) {\n if (!columns.contains(j)) {\n if (firstTwo == 2) {\n firstValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 1) {\n secondValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 0) {\n if (costs[i][j] < firstValue || costs[i][j] < secondValue) {\n if (firstValue < secondValue) secondValue = costs[i][j];\n else firstValue = costs[i][j];\n }\n }\n }\n }\n penaltyColumn[i] = Math.abs(firstValue - secondValue);\n firstTwo = 2;\n }\n }\n\n firstTwo = 2;\n\n for (int j = 0; j < proxySources.length; j++) {\n if (!columns.contains(j)) {\n for (int i = 0; i < proxyDestinations.length; i++) {\n if (!rows.contains(i)) {\n if (firstTwo == 2) {\n firstValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 1) {\n secondValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 0) {\n if (costs[i][j] < firstValue || costs[i][j] < secondValue) {\n if (firstValue < secondValue) secondValue = costs[i][j];\n else firstValue = costs[i][j];\n }\n }\n }\n\n }\n penaltyRow[j] = Math.abs(firstValue - secondValue);\n firstTwo = 2;\n }\n }\n\n int maxI = 0;\n for(int j=0;j<proxyDestinations.length;j++) {\n if(penaltyRow[j] > penaltyRow[maxI]) maxI = j;\n }\n\n int maxJ = 0;\n for(int i=0;i<proxySources.length;i++) {\n if(penaltyColumn[i] > penaltyColumn[maxJ]) maxJ = i;\n }\n\n if( penaltyRow[maxI] > penaltyColumn[maxJ] )\n {\n int indexJ = maxI;\n\n int finalIndexI = 0;\n int finalIndexJ = 0;\n int value = 100000;\n for(int i=0;i<proxySources.length;i++) {\n if(!rows.contains(i)) {\n if(costs[i][indexJ] < value) {\n value = costs[i][indexJ];\n finalIndexI = i;\n finalIndexJ = indexJ;\n }\n else if( costs[i][indexJ] == value ) {\n if( Math.min(proxySources[i].getSupply(),proxyDestinations[indexJ].getDemand()) > Math.min(proxySources[finalIndexI].getSupply(),proxyDestinations[finalIndexJ].getDemand()) ) {\n value = costs[i][indexJ];\n finalIndexI = i;\n finalIndexJ = indexJ;\n }\n }\n }\n }\n\n int supply = proxySources[finalIndexI].getSupply();\n int demand = proxyDestinations[finalIndexJ].getDemand();\n\n\n this.solution.add(sources[finalIndexI], destinations[finalIndexJ], Math.min(supply,demand), costs[finalIndexI][finalIndexJ]);\n\n if ( supply < demand ) {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(demand - supply);\n rows.add(finalIndexI);\n }\n else if( supply > demand ) {\n proxySources[finalIndexI].setSupply(supply-demand);\n proxyDestinations[finalIndexJ].setDemand(0);\n columns.add(finalIndexJ);\n }\n else {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(0);\n rows.add(finalIndexI);\n columns.add(finalIndexJ);\n }\n }\n else {\n int indexI = maxJ;\n\n int finalIndexI = 0;\n int finalIndexJ = 0;\n int value = 100000;\n for(int j=0;j<proxyDestinations.length;j++) {\n if(!columns.contains(j)) {\n if(costs[indexI][j] < value) {\n value = costs[indexI][j];\n finalIndexI = indexI;\n finalIndexJ = j;\n }\n else if( costs[indexI][j] == value ) {\n if( Math.min(proxySources[indexI].getSupply(),proxyDestinations[j].getDemand()) > Math.min(proxySources[finalIndexI].getSupply(),proxyDestinations[finalIndexJ].getDemand()) ) {\n value = costs[indexI][j];\n finalIndexI = indexI;\n finalIndexJ = j;\n }\n }\n }\n }\n\n int supply = proxySources[finalIndexI].getSupply();\n int demand = proxyDestinations[finalIndexJ].getDemand();\n\n\n this.solution.add(sources[finalIndexI], destinations[finalIndexJ], Math.min(supply,demand), costs[finalIndexI][finalIndexJ]);\n\n if ( supply < demand ) {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(demand - supply);\n rows.add(finalIndexI);\n }\n else if( supply > demand ) {\n proxySources[finalIndexI].setSupply(supply-demand);\n proxyDestinations[finalIndexJ].setDemand(0);\n columns.add(finalIndexJ);\n }\n else {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(0);\n rows.add(finalIndexI);\n columns.add(finalIndexJ);\n }\n }\n }\n this.solution.showSolution();\n }",
"public interface Solver {\n public ArrayList<ArrayList<Double>> solve(double step, List<Pair<Double, Double>> init, int numberOfIterations);\n public ArrayList<ArrayList<Double>> solve(double step, List<Pair<Double, Double>> init, double max);\n}",
"public static void modifiedNussinov() {\r\n // Declare j\r\n int j;\r\n\r\n // Fill in DPMatrix\r\n for (int k = 0; k < sequence.length(); k++) {\r\n for (int i = 0; i < sequence.length()-1; i++) {\r\n // If bigger than allowed loop size\r\n if (k > minimumLoop - 1) {\r\n // Index is in bounds\r\n if ((i + k + 1) <= sequence.length()-1) {\r\n // Set j to i + k + 1\r\n j = i + k + 1;\r\n\r\n // Set min to max value\r\n double minimum = Double.MAX_VALUE;\r\n\r\n // Check for minimum\r\n minimum = Math.min(minimum, Math.min((DPMatrix[i + 1][j] ), (DPMatrix[i][j - 1] )) );\r\n\r\n // Adjust for pair scores\r\n if (checkPair(sequence.charAt(i), sequence.charAt(j)) == 1) {\r\n // Check for minimum\r\n minimum = Math.min(minimum, DPMatrix[i + 1][j - 1] - 2);\r\n } else if (checkPair(sequence.charAt(i), sequence.charAt(j)) == 2) {\r\n // Check for minimum\r\n minimum = Math.min(minimum, DPMatrix[i + 1][j - 1] - 3);\r\n }\r\n for (int l = i + 1; l < j; l++) {\r\n // Check for minimum\r\n minimum = Math.min(minimum, (DPMatrix[i][l]) + (DPMatrix[l + 1][j]));\r\n }\r\n\r\n // Set the matrix value\r\n DPMatrix[i][j] = minimum;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Run the traceback\r\n String structure = structureTraceback();\r\n\r\n // Create file for writer\r\n File file = new File(\"5.o1\");\r\n\r\n // Create writer\r\n try {\r\n // Writer\r\n BufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\r\n // Write sequence\r\n writer.write(sequence);\r\n writer.write('\\n');\r\n\r\n // Write MFE\r\n writer.write(Double.toString(DPMatrix[0][sequenceLength - 1]));\r\n writer.write('\\n');\r\n\r\n // Write structure\r\n writer.write(structure);\r\n\r\n // Close writer\r\n writer.close();\r\n\r\n } catch (IOException e) {\r\n // Print error\r\n System.out.println(\"Error opening file 5.o1\");\r\n }\r\n\r\n }",
"@Override\n public void evaluate(Solution solution) throws JMException {\n\n int[] tour = new int[numberOfNodes + 1];\n int firstCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[0];\n int lastCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[numberOfNodes - 1];\n\n double fitness1_td = 0.0;\n\n // Calculate fitness 1 - total distance\n for (int i = 0; i < numberOfNodes - 1; i++) {\n int x = ((Permutation) solution.getDecisionVariables()[0]).vector_[i];\n int y = ((Permutation) solution.getDecisionVariables()[0]).vector_[i+1];\n\n tour[i] = x;\n tour[i+1] = y;\n\n fitness1_td += calDistances(x, y);\n }\n // generate tour with same start city and end city\n tour[numberOfNodes] = tour[0];\n\n fitness1_td += calDistances(firstCity, lastCity);\n\n\n // Correctness check: does the tour start and end in the same city\n if(tour[0] != tour[tour.length - 1]) {\n System.err.println(\"ERROR: The last city must be the same as the first city\");\n System.exit(1);\n }\n\n /*for (int i = 0; i < tour.length; i++) {\n System.out.print(tour[i] + \" \");\n }*/\n //System.out.println(\"\\n\" + tour.length);\n\n // Calculate fitness 2 - objective value of a given tour\n ArrayInt z = (ArrayInt) solution.getDecisionVariables()[1];\n //System.out.println(z.getLength());\n\n double fitness2_ob;\n double wc = 0.0;\n double ft = 0.0;\n double fp = 0.0;\n\n //the following is used for a different interpretation of \"packingPlan\"\n int itemsPerCity = z.getLength() / (tour.length - 2);\n //System.out.println(itemsPerCity);\n\n for (int i = 0; i < tour.length - 1; i++) {\n\n int currentCityTEMP = tour[i];\n // what's the current city? --> but the items start at city 2 in the TTP file, so I have to take another 1 off!\n int currentCity = currentCityTEMP - 1;\n\n if (i > 0) {\n\n if (currentCity == -1) {\n // No items in city 1\n wc += 0.0;\n fp += 0.0;\n\n } else {\n\n for (int itemNumber = 0; itemNumber < itemsPerCity; itemNumber++) {\n\n int indexOfPackingPlan = (i-1) * itemsPerCity + itemNumber;\n // what is the next item's index in items-array?\n int itemIndex = currentCity + itemNumber * (numberOfNodes - 1);\n //System.out.println(\"i: \" + i);\n\n if (z.getValue(indexOfPackingPlan) == 1) {\n // pack item\n //System.out.println(itemIndex);\n int currentWC = items[itemIndex][2];\n wc += currentWC;\n\n int currentFP = items[itemIndex][1];\n fp += currentFP;\n }\n }\n\n }\n\n int h = (i+1) % (tour.length-1); //h: next tour city index\n //System.out.println(\"h: \" + h);\n long distance = calDistances(i, h);\n // compute the adjusted (effective) distance\n ft += (distance / (1 - wc * (maxSpeed - minSpeed) / capacityOfKnapsack));\n }\n }\n\n wendUsed = wc;\n wend = capacityOfKnapsack - wc;\n fitness2_ob = fp - ft * rentingRatio;\n\n solution.setObjective(0, fitness1_td);\n solution.setObjective(1, -fitness2_ob); // Convert from maximum objective value to minimum objective value\n }",
"public void train() {\n\n\t\tint D = Os.length;\n\t\tint T_n = 0;\n\t\tdouble log_likelihood = 0;\n\t\tdouble log_likelihood_new = 0;\n\t\tdouble epsilon = this.epsilon;\n\t\tint maxIter = this.maxIter;\n\n\t\t// Initialization\n\n\t\tclearVector(pi);\n\t\tclearMatrix(A);\n\t\tclearMatrix(B);\n\n\t\tdouble[] a = allocateVector(N);\n\t\tdouble[] b = allocateVector(N);\n\n\t\tint[] Q_n = null;\n\t\tint[] O_n = null;\n\t\t\n\t\tif (Qs == null) {\n\t\t\t\n\t\t\tpi = initializePi();\n\t\t\tA = initializeA();\n\t\t\tB = initializeB();\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tfor (int n = 0; n < D; n++) {\n\t\t\t\tQ_n = Qs[n];\n\t\t\t\tO_n = Os[n];\n\t\t\t\tT_n = Os[n].length;\n\t\t\t\tfor (int t = 0; t < T_n; t++) {\n\t\t\t\t\tif (t < T_n - 1) {\n\t\t\t\t\t\tA[Q_n[t]][Q_n[t + 1]] += 1;\n\t\t\t\t\t\ta[Q_n[t]] += 1;\n\t\t\t\t\t\tif (t == 0) {\n\t\t\t\t\t\t\tpi[Q_n[0]] += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tB[Q_n[t]][O_n[t]] += 1;\n\t\t\t\t\tb[Q_n[t]] += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdivideAssign(pi, D);\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tdivideAssign(A[i], a[i]);\n\t\t\t\tdivideAssign(B[i], b[i]);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tint s = 0;\n\t\tdouble[] pi_new = allocateVector(N);\n\t\tdouble[][] A_new = allocateMatrix(N, N);\n\t\tdouble[][] B_new = allocateMatrix(N, M);\n\t\tdouble[] temp_pi = null;\n\t\tdouble[][] temp_A = null;\n\t\tdouble[][] temp_B = null;\n\t\tdouble[][] alpha_hat = null;\n\t\tdouble[][] beta_hat = null;\n\t\tdouble[] c_n = null;\n\t\tdouble[][] xi = allocateMatrix(N, N);\n\t\tdouble[] gamma = allocateVector(N);\n\t\tdo {\n\n\t\t\t// Clearance\n\t\t\tclearVector(pi_new);\n\t\t\tclearMatrix(A_new);\n\t\t\tclearMatrix(B_new);\n\t\t\tclearVector(a);\n\t\t\tclearVector(b);\n\t\t\t/*clearMatrix(xi);\n\t\t\tclearVector(gamma);*/\n\t\t\tlog_likelihood_new = 0;\n\n\t\t\tfor (int n = 0; n < D; n++) {\n\n\t\t\t\t// Q_n = Qs[n];\n\t\t\t\tO_n = Os[n];\n\t\t\t\tT_n = Os[n].length;\n\t\t\t\tc_n = allocateVector(T_n);\n\t\t\t\talpha_hat = allocateMatrix(T_n, N);\n\t\t\t\tbeta_hat = allocateMatrix(T_n, N);\n\n\t\t\t\t// Forward Recursion with Scaling\t\t\t\n\n\t\t\t\tfor (int t = 0; t <= T_n - 1; t++) {\n\t\t\t\t\tif (t == 0) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\talpha_hat[0][i] = pi[i] * B[i][O_n[0]];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\t\talpha_hat[t][j] += alpha_hat[t - 1][i] * A[i][j] * B[j][O_n[t]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tc_n[t] = 1.0 / sum(alpha_hat[t]);\n\t\t\t\t\ttimesAssign(alpha_hat[t], c_n[t]);\n\t\t\t\t}\n\n\t\t\t\t// Backward Recursion with Scaling\n\n\t\t\t\tfor (int t = T_n + 1; t >= 2; t--) {\n\t\t\t\t\tif (t == T_n + 1) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\tbeta_hat[t - 2][i] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (t <= T_n) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\t\t\tbeta_hat[t - 2][i] += A[i][j] * B[j][O_n[t - 1]] * beta_hat[t - 1][j];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttimesAssign(beta_hat[t - 2], c_n[t - 2]);\n\t\t\t\t}\n\n\t\t\t\t// Expectation Variables and Updating Model Parameters\n\n\t\t\t\tfor (int t = 0; t <= T_n - 1; t++) {\n\t\t\t\t\tif (t < T_n - 1) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\t\t\txi[i][j] = alpha_hat[t][i] * A[i][j] * B[j][O_n[t + 1]] * beta_hat[t + 1][j];\n\t\t\t\t\t\t\t\t// A_new[i][j] += xi[i][j];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplusAssign(A_new[i], xi[i]);\n\t\t\t\t\t\t\tgamma[i] = sum(xi[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (t == 0) {\n\t\t\t\t\t\t\tplusAssign(pi_new, gamma);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplusAssign(a, gamma);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassignVector(gamma, alpha_hat[t]);\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\tB_new[j][O_n[t]] += gamma[j];\n\t\t\t\t\t}\n\t\t\t\t\tplusAssign(b, gamma);\n\t\t\t\t\tlog_likelihood_new += -Math.log(c_n[t]);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Normalization (Sum to One)\n\n\t\t\tsum2one(pi_new);\n\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tdivideAssign(A_new[i], a[i]);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\tdivideAssign(B_new[j], b[j]);\n\t\t\t}\n\n\t\t\ttemp_pi = pi;\n\t\t\tpi = pi_new;\n\t\t\tpi_new = temp_pi;\n\n\t\t\ttemp_A = A;\n\t\t\tA = A_new;\n\t\t\tA_new = temp_A;\n\n\t\t\ttemp_B = B;\n\t\t\tB = B_new;\n\t\t\tB_new = temp_B;\n\t\t\t// display(B);\n\n\t\t\ts = s + 1;\n\n\t\t\tif (s > 1) {\n\t\t\t\tif (Math.abs((log_likelihood_new - log_likelihood) / log_likelihood) < epsilon) {\n\t\t\t\t\tfprintf(\"log[P(O|Theta)] does not increase.\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlog_likelihood = log_likelihood_new;\n\t\t\tfprintf(\"Iter: %d, log[P(O|Theta)]: %f\\n\", s, log_likelihood);\n\n\t\t} while (s < maxIter);\n\n\t}",
"private ASSPSolution floydWarshall(Double[][] aMatrix, Integer[][] pMatrix)\n {\n Double best[][][] = new Double[2][this.numIntxns][this.numIntxns];\n Integer pred[][][] = new Integer[2][this.numIntxns][this.numIntxns];\n\n best[0] = aMatrix;\n best[1] = aMatrix;\n\n pred[0] = pMatrix;\n pred[1] = pMatrix;\n\n int solnIndex = 0;\n\n for (int k = 0; k < this.numIntxns; k++)\n {\n for (int u = 0; u < this.numIntxns; u++)\n {\n for (int v = 0; v < this.numIntxns; v++)\n {\n // we only need to keep two matrices in memory and swap\n // between them. i and j alternate.\n int i = k % 2;\n int j = (i == 0) ? 1 : 0;\n\n best[i][u][v] = best[j][u][v];\n\n // note that null represents infinity\n if (best[i][u][k] != null && best[i][k][v] != null)\n {\n // if this spot is infinite, anything is better\n if (best[i][u][v] == null)\n {\n best[i][u][v] = best[j][u][k] + best[j][k][v];\n pred[i][u][v] = k;\n }\n else if \n ((best[j][u][k] + best[j][k][v]) < best[i][u][v])\n {\n best[i][u][v] = best[j][u][k] + best[j][k][v];\n pred[i][u][v] = k;\n }\n\n // Stores the last i value so that the correct answers \n // can be sent back to the user.\n if (v == this.numIntxns - 1)\n {\n solnIndex = i;\n }\n }\n }\n }\n }\n\n return new ASSPSolution(best[solnIndex], pred[solnIndex]);\n }",
"Solver (double aoa_degr, double thickness_pst, double camber_pst) { \n this.getFreeStream(); // thsi grabs globals such as velocity, height, planet\n this.getCirculation(aoa_degr, thickness_pst, camber_pst);\n // solver.compute_foil_geometry(aoa_degr);\n }",
"public void minimize() {\n MinimizationOperations.minimizeHopcroft(model);\n }",
"public static void main(String[] args) {\n double[] vArr = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75};\n double[] tempArr = {-40, -30, -20, -10, 0, 10, 20, 30, 40, 50};\n //1. utwórz tablice 2-wymiarowa\n //2. potrzebuje: typprzechowanej wartosci i rozmiar, czyli\n //typ: double\n //rozm w kierunku temp.: -40, -30, -20, ... 50 -> 10 elementow\n //rozm w kierunku v: 5, 10, 15, 20, 25, -> 15 elelmentow\n double[][] resultMatrix = new double[vArr.length][tempArr.length];\n\n //3. rM(1, 3) = f(10, -10) = -7,5;\n //Odczytac wartosc v i temp do obliczen i podstawic do wzoru - wynik umiescic w odp miejscu tab rM\n for (int v = 0; v < vArr.length; v++){\n for (int t = 0; t < tempArr.length; t++){\n resultMatrix[v][t] = 35.74 + 0.6215 * tempArr[t] + (0.4275 * tempArr[t] - 35.75) * Math.pow(vArr[v], 0.16);\n }\n }\n\n //mam juz uzupelniona cala tab wartosci - wyswietlic\n for (int v = 0; v < vArr.length; v++){\n for (int t = 0; t < tempArr.length; t++){\n System.out.println(String.format(\"f(%d, %d) = %f\", (int) vArr[v], (int) tempArr[t], resultMatrix[v][t]));\n }\n }\n System.out.println(\"Tabela wartosci: \");\n for (int v = 0; v < vArr.length; v++) {\n for (int t = 0; t < tempArr.length; t++){\n System.out.println(resultMatrix[v][t] + \"\\t\");\n }\n System.out.println();\n }\n System.out.println(\"Podaj v: <5, 10, 15... 75>\");\n //5 -> vArr[0]\n //75 -> vArr[14]\n //userInput/5 - 1\n Scanner sc = new Scanner(System.in);\n int userInput = sc.nextInt();\n int vIdx = userInput / 5 - 1;\n System.out.println(\"Podaj temp: <-40, -30... 50>\");\n userInput = sc.nextByte();\n int tempIdx = (userInput + 40) / 10;\n\n System.out.println(String.format(\"f(%d, %d) = %f\", (int) vArr[vIdx], (int) tempArr[tempIdx], resultMatrix[vIdx][tempIdx]));\n }",
"public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }",
"public ArrayList execute() {//(MultivariateFunction func, double[] xvec, double tolfx, double tolx) \n num_Function_Evaluation = 0;\n double[] stat = {0.0, 0.0};\n double[] storeBest = null;\n double[] storeMean = null;\n double[] storeStd = null;\n if (isOptimization) {\n storeBest = new double[101];\n storeMean = new double[101];\n storeStd = new double[101];\n //System.out.println(\"Initialization Done\");\n }\n int storeIndex = 0;\n\n //f = func;\n //bestSolution = xvec;\n // Create first generation\n firstGeneration();\n //System.out.println(iRet+\" \"+returnResult[iRet]);\n //stopCondition(fx, bestSolution, tolfx, tolx, true);\n\n //main iteration loop\n while (true) {\n boolean xHasChanged;\n do {\n //printing steps\n if (isPrintSteps) {\n if (currGen % printStep == 0) {\n if (isOptimization) {\n if (storeIndex < 101) {\n storeBest[storeIndex] = fx;\n stat = computFitnessStat();\n storeMean[storeIndex] = stat[0];\n storeStd[storeIndex] = stat[1];\n storeIndex++;\n }\n }\n System.out.printf(\" MH algo It: %5d Best: %.9f Mean: %.9f Std: %.9f \\n\", currGen, fx, stat[0], stat[1]);\n }//printsteps\n }//isPrintSteps\n\n xHasChanged = nextGeneration();\n if (currGen >= maxIter) {//if (maxFun > 0 && numFun > maxFun)\n break;\n }\n //if (prin > 1 && currGen % 20 == 0)\n //printStatistics();\n } while (!xHasChanged);\n //if (stopCondition(fx, bestSolution, tolfx, tolx, false) || (maxFun > 0 && numFun > maxFun))\n if (currGen >= maxIter) {\n break;\n }\n if (fx < 0.0000001) {\n //System.out.println(\"treshold\" + fx);\n //break;\n }\n }//while\n //printing final step\n if (isPrintFinal) {\n if (isOptimization) {\n if (storeIndex < 101) {\n storeBest[storeIndex] = fx;\n stat = computFitnessStat();\n storeMean[storeIndex] = stat[0];\n storeStd[storeIndex] = stat[1];\n storeIndex++;\n }\n }\n System.out.printf(\" MH algo It: %5d Best: %.9f Mean: %.9f Std: %.9f \\nTotal Fun Evaluations: %d\\n\", currGen, fx, stat[0], stat[1], num_Function_Evaluation);\n }\n ArrayList array = new ArrayList();\n array.add(storeBest);\n array.add(storeMean);\n array.add(storeStd);\n return array;\n }",
"public abstract SolutionColumn solveGC(double[] pi, int team, int theta);",
"@Override\r\n public void computeDensityEstimator() {\r\n // Compute scalarization values\r\n this.scalWrapper.execute(solutions());\r\n scaleToPositive();\r\n\r\n // Distance matrix\r\n double[][] distanceMatrix;\r\n if (normalizeObjectives) {\r\n FrontNormalizer normalizer = new FrontNormalizer(solutions());\r\n distanceMatrix = SolutionListUtils.distanceMatrix(normalizer.normalize(solutions()));\r\n } else\r\n distanceMatrix = SolutionListUtils.distanceMatrix(solutions());\r\n\r\n // Set fitness based on replacement strategy\r\n double[] energyVector = energyVector(distanceMatrix);\r\n double[] replacementVector = replacementVector(distanceMatrix);\r\n // Flag for memorizing whether solution can improve archive\r\n boolean eligible = false;\r\n for (int i = 0; i < replacementVector.length; i++) {\r\n // New solution is better than incumbent\r\n if (replacementVector[i] < energyVector[i]) {\r\n eligible = true;\r\n switch (replacementStrategy) {\r\n case BEST_FEASIBLE_POSITION:\r\n // Energy decrease is maximal if replacement energy is\r\n // minimized. This is why the the negated entry in\r\n // replacementVector is the corresponding fitness.\r\n fitness.setAttribute(archive.get(i), -replacementVector[i]);\r\n break;\r\n case LARGEST_DIFFERENCE:\r\n fitness.setAttribute(archive.get(i), energyVector[i]);\r\n break;\r\n case WORST_IN_ARCHIVE:\r\n fitness.setAttribute(archive.get(i), energyVector[i] - replacementVector[i]);\r\n break;\r\n }\r\n } else {\r\n // If archive member is not eligible for replacement, make sure\r\n // it is retained in any case.\r\n archive.get(i).attributes().put(fitness.getAttributeIdentifier(), -Double.MAX_VALUE);\r\n }\r\n if (eligible) {\r\n // New solution is always retained\r\n fitness.setAttribute(archive.get(maxSize), -Double.MAX_VALUE);\r\n } else {\r\n // New solution is rejected in any case\r\n fitness.setAttribute(archive.get(maxSize), Double.MAX_VALUE);\r\n }\r\n }\r\n }",
"@Override\n\tpublic Object solvePart2(List<Technique> input) {\n\t\tvar m = BigInteger.valueOf(119315717514047L);\n\n\t\tvar a = BigInteger.ONE;\n\t\tvar b = BigInteger.ZERO;\n\t\tfor (var technique : input) {\n\t\t\tvar techniqueA = BigInteger.valueOf(technique.getA());\n\t\t\tvar techniqueB = BigInteger.valueOf(technique.getB());\n\n\t\t\ta = techniqueA.multiply(a).mod(m);\n\t\t\tb = techniqueA.multiply(b).add(techniqueB).mod(m);\n\t\t}\n\n\t\t// We re-arrange our combined f(x) to get x in terms of f(x), so we can\n\t\t// run the function in reverse:\n\t\t//\n\t\t// x = (f(x) - b) * a^(-1) (mod m)\n\t\t// x = f(x) * a^(-1) - b * a^(-1) (mod m)\n\t\t//\n\t\t// Call this new function g(x). Note that g(x) is the same as f(x), but\n\t\t// with:\n\t\t//\n\t\t// a' = a^(-1) (mod m)\n\t\t// b' = -b * a^(-1) (mod m)\n\t\t//\n\t\t// We adjust our a/b below for use with g(x).\n\t\ta = a.modInverse(m);\n\t\tb = b.negate().multiply(a).mod(m);\n\n\t\t// We need to run g(x) several times.\n\t\t//\n\t\t// g^1(x) = a * x + b\n\t\t//\n\t\t// g^2(x) = a * g^1(x) + b\n\t\t// = a * (a * x + b) + b\n\t\t// = a^2 * x + a * b + b\n\t\t//\n\t\t// g^3(x) = a^3 * x + a^2 * b + a * b + b\n\t\t// ...\n\t\t// g^n(x) = a^n * x + a^(n-1) * b + a^(n-2) * b + ... + b\n\t\t//\n\t\t// (mod m omitted for brevity.)\n\t\t//\n\t\t// The latter terms are a geometric series with first term b and common\n\t\t// ratio a.\n\t\t//\n\t\t// We can therefore simplify it to:\n\t\t//\n\t\t// g^n(x) = a^n * x + (1 - a^n) * (1 - a)^-1 * b (mod m)\n\t\tvar n = BigInteger.valueOf(101741582076661L);\n\t\tvar x = BigInteger.valueOf(2020L);\n\n\t\t// Java really needs operator overloading...\n\t\tvar aToN = a.modPow(n, m);\n\t\tvar aToNTimesX = aToN.multiply(x);\n\n\t\tvar geometricSum = BigInteger.ONE.subtract(aToN)\n\t\t\t.multiply(BigInteger.ONE.subtract(a).modInverse(m))\n\t\t\t.multiply(b);\n\n\t\treturn aToNTimesX.add(geometricSum).mod(m).longValue();\n\t}",
"public static void main(String[] args) throws Exception {\n\n Scanner sc = new Scanner(new File(\"floyd_warshall_in.txt\"));\n int V = sc.nextInt(), E = sc.nextInt();\n \n int[][] AM = new int[V][];\n for (int u = 0; u < V; ++u) {\n AM[u] = new int[V];\n for (int v = 0; v < V; ++v)\n AM[u][v] = 1000000000; // 1e9 to avoid overflow\n AM[u][u] = 0;\n }\n\n for (int i = 0; i < E; ++i) {\n int u = sc.nextInt(), v = sc.nextInt(), w = sc.nextInt();\n AM[u][v] = w; // directed graph\n }\n\n for (int k = 0; k < V; ++k) // O(v^3) Floyd Warshall's\n for (int u = 0; u < V; ++u)\n for (int v = 0; v < V; ++v)\n AM[u][v] = Math.min(AM[u][v], AM[u][k]+AM[k][v]);\n\n for (int u = 0; u < V; ++u)\n for (int v = 0; v < V; ++v)\n System.out.printf(\"APSP(%d, %d) = %d\\n\", u, v, AM[u][v]);\n }",
"public void sample_V() {\n\t\t//Note, sumV and sumVVT are update in the update function itself. Hence, when\n\t\t//sample_V is called after the 1 iteration of all vertices, we already have the sum.\n\t\t\n\t\t//meanV = (SUM V_j)/N\n\t\tRealVector meanV = params.sumV.mapMultiply(1.0/datasetDesc.getNumItems());\n\t\t//meanS = (SUM (V_j*V_j')/N)\n\t\tRealMatrix meanS = params.sumVVT.scalarMultiply(1.0/datasetDesc.getNumItems());\n\t\t\n\t\t//mu0 = (beta0*mu0 + meanV)/(beta0 + N)\n\t\tRealVector mu0_ = (params.mu0_V.mapMultiply(params.beta0_V).add(meanV)).mapDivide((params.beta0_V + datasetDesc.getNumItems()));\n\t\t\n\t\tdouble beta0_ = params.beta0_V + datasetDesc.getNumItems();\n\t\tint nu0_ = params.nu0_V + datasetDesc.getNumItems();\n\t\t\n\t\t//W0 = inv( inv(W0) + N*meanS + (beta0*N/(beta0 + N))(mu0 - meanU)*(mu0 - meanU)'\n\t\tRealVector tmp = params.mu0_V.subtract(meanV);\n\t\tRealMatrix mu0_d_meanV_T = tmp.outerProduct(tmp); \n\t\tmu0_d_meanV_T = mu0_d_meanV_T.scalarMultiply((params.beta0_V*datasetDesc.getNumItems()/(params.beta0_V + datasetDesc.getNumItems())));\n\t\tRealMatrix invW0_ = params.invW0_V.add(params.sumVVT).add(mu0_d_meanV_T);\n\n\t\t//Update all the values.\n\t\tparams.mu0_V = mu0_;\n\t\tparams.beta0_V = beta0_;\n\t\tparams.nu0_V = nu0_;\n\t\tparams.invW0_V = invW0_;\n\t\tparams.W0_V = (new LUDecompositionImpl(invW0_)).getSolver().getInverse();\n\t\t\n\t\t//Sample lambda_V and mu_V from the Gaussian Wishart distribution\n\t\t// http://en.wikipedia.org/wiki/Normal-Wishart_distribution#Generating_normal-Wishart_random_variates\n\t\t//Draw lambda_V from Wishart distribution with scale matrix w0_U.\n\t\tparams.lambda_V = sampleWishart(params.invW0_V, params.nu0_V);\n\t\t//Compute cov = inv(beta0*lambda) \n\t\tRealMatrix cov = (new LUDecompositionImpl(params.lambda_V.scalarMultiply(params.beta0_V))).getSolver().getInverse();\n\t\t//Draw mu_V from multivariate normal dist with mean mu0_V and covariance inv(beta0_V*lambda)\n\t\tMultivariateNormalDistribution dist = new MultivariateNormalDistribution(params.mu0_V.toArray(), \n\t\t\t\tcov.getData());\n\t\tparams.mu_V = new ArrayRealVector(dist.sample());\n\t\t\n\t\t//Reset the sum of latent factors.\n\t\tparams.sumV.mapMultiply(0);\n\t\tparams.sumVVT.scalarMultiply(0);\n\t}",
"public void calcInc(int np)\n\t{\n \n findSpecEq();\n int nofc=numberOfComponents;\n fvec.timesEquals(0.0);\n fvec.set(nofc+1,0,1.0);\n Matrix dxds=Jac.solve(fvec);\n if (np<5)\n {\n double dp=0.01;\n ds=dp/dxds.get(nofc+1,0);\n Xgij.setMatrix(0,nofc+1,np-1,np-1,u);\n dxds.timesEquals(ds);\n // dxds.print(0,10);\n u.plusEquals(dxds);\n // Xgij.print(0,10);\n// u.print(0,10);\n }\n else\n {\n //System.out.println(\"iter \" +iter + \" np \" + np);\n if (iter>6)\n { \n ds *= 0.5;\n System.out.println(\"ds > 6\");\n }\n \n else\n {\n if (iter<3) {\n ds *= 1.5;\n }\n if (iter==3) {\n ds *= 1.1;\n }\n if (iter==4) {\n ds *= 1.0;\n }\n if (iter>4) {\n ds *= 0.5;\n }\n \n// Now we check wheater this ds is greater than dTmax and dPmax.\n if(Math.abs(system.getTemperature()*dxds.get(nofc,0)*ds)>dTmax){\n // System.out.println(\"true T\");\n ds=sign(dTmax/system.getTemperature()/Math.abs(dxds.get(nofc,0)),ds);\n }\n \n if(Math.abs(system.getPressure()*dxds.get(nofc+1,0)*ds)>dPmax)\n {\n ds=sign(dPmax/system.getPressure()/Math.abs(dxds.get(nofc+1,0)),ds);\n // System.out.println(\"true P\");\n }\n if (etterCP2) {\n etterCP2=false;\n ds = 0.5*ds;\n }\n \n Xgij.setMatrix(0,nofc+1,0,2,Xgij.getMatrix(0,nofc+1,1,3)); \n Xgij.setMatrix(0,nofc+1,3,3,u);\n s.setMatrix(0,0,0,3,Xgij.getMatrix(speceq,speceq,0,3));\n // s.print(0,10);\n // System.out.println(\"ds1 : \" + ds);\n calcInc2(np);\n // System.out.println(\"ds2 : \" + ds);\n \n// Here we find the next point from the polynomial.\n \n }\n }\n }",
"@Override\n\tpublic FTrend execute(Problem problem, int maxEvaluations) throws Exception\n\t{\n\t\tFTrend FT = new FTrend(); // Create a fitness trend instance\n\t\tint problemDimension = problem.getDimension(); // Store the dimensionality of the problem domain\n\t\tdouble[][] bounds = problem.getBounds(); // Store the bounds of each variable in the problem domain\n\t\t\n\t\tdouble[] best = new double[problemDimension]; // Initialise the best known solution variable\n\t\tdouble fBest = Double.NaN; // Initialise the fitness value, i.e. \"f(x)\", of the best solution known\n\t\tint k = 0; // Initialise the incremental counter variable\n\t\t\n\t\t// Self-Adaptive Differential Evolution (jDE - jitterDE) variables\n\t\tint populationSize \t \t\t\t= getParameter(\"p0\").intValue(); // Initialise the population size \n\t\t//double scalingFactor \t\t\t= getParameter(\"p1\").doubleValue(); // Initialise the scaling factor of the mutation operator\n\t\t//double crossoverRate \t\t\t= getParameter(\"p2\").doubleValue(); // Initialise the crossover rate of the binomial crossover operator\n\t\tdouble scalingFactorLowerBound \t= getParameter(\"p3\").doubleValue(); // Initialise the upper bound value of the scaling factor of the mutation operator\n\t\tdouble scalingFactorUpperBound \t= getParameter(\"p4\").doubleValue(); // Initialise the lower bound value of the scaling factor of the mutation operator\n\t\tdouble tauOne \t\t\t\t\t= getParameter(\"p5\").doubleValue(); // Initialise the first random probability controlling the scaling factor of the mutation operator\n\t\tdouble tauTwo \t\t\t\t\t= getParameter(\"p6\").doubleValue(); // Initialise the second random probability controlling the binomial crossover rate of the crossover operator\n\t\t\n\t\tdouble[] scalingFactor = new double[populationSize]; // Initialise the scaling factor of the mutation operator\n\t\tdouble[] crossoverRate = new double[populationSize]; // Initialise the crossover rate of the binomial crossover operator\n\t\t\n\t\tdouble[][] population = new double[populationSize][problemDimension]; // Initialise the population of individuals (solutions) variable\n\t\tdouble[] solutionFitness = new double[populationSize]; // Initialise the fitness of a solution (individual) variable\n\t\t\n\t\t// Short Distance Exploration (SDE) variables\n\t\tdouble alpha \t\t\t\t= getParameter(\"p7\"); // Initialise the alpha cut value of the length of the problems decision space\n\t\tdouble proceduralIterations = getParameter(\"p8\").intValue(); // Initialise the procedural iteration budget variable\n\t\t\n\t\tdouble fShort = fBest; // Initialise the fitness value, i.e. \"f(x)\", of the trial solution\n\t\tdouble[] xShort = best; // Initialise the trial solution variable\n\t\tdouble[] exploratoryRadius = new double[problemDimension]; // Initialise the exploratory radius variable for the Short Distance Exploration (S) algorithm\n\t\t\n\t\t// Evaluate initial population of individuals\n\t\tfor (int i = 0; i < populationSize; i++) // For the size of the population of individuals (solutions), do the following\n\t\t{\n\t\t\tdouble[] initialSolution = generateRandomSolution(bounds, problemDimension); // Generate the initial solution (guess)\n\t\t\t\n\t\t\tfor (int j = 0; j < problemDimension; j++) // For the dimensionality of the problem, do the following\n\t\t\t{\n\t\t\t\tpopulation[i][j] = initialSolution[j]; // Initialise the iterated solution (individual) that comprises the population, to the initial solution randomly generated \n\t\t\t}\n\t\t\t\n\t\t\tsolutionFitness[i] = problem.f(population[i]); // Calculate and store the fitness (value) of the iterated solution (individual)\n\t\t\tk++; // Increment the counter to near the computational budget\t\t\n\n\t\t\tif (i == 0 || solutionFitness[i] < fBest) // If the solution generated is the first solution in the population or the fitness of the solution is better than the fitness of the best known solution, do the following\n\t\t\t{\n\t\t\t\tfBest = solutionFitness[i]; // Store the iterated solutions (individuals) fitness (value) as the best known solution\n\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\n\t\t\t\tfor (int j = 0; j < problemDimension; j++) // For the dimensionality of the problem, do the following\n\t\t\t\t{\n\t\t\t\t\tbest[j] = population[i][j]; // Update the best solution to the points comprising the iterated solution (individual) in the population\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (i == 0 || k % 100 == 0) // If the iterated individual in the population is first individual in the population or the current iteration is divisible by '100' and has no remainder, do the following\n\t\t\t{\n\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Main loop\n\t\twhile (k < maxEvaluations) // While the computational budget has not been met, do the following\n\t\t{\n\t\t\tdouble[][] nextGeneration = new double[populationSize][problemDimension]; // Reinitialise the next generation of individuals representing the population variable\n\t\t\t\n\t\t\tfor (int j = 0; j < populationSize && k < maxEvaluations; j++) // For the size of the population of individuals (solutions) and whilst within the computational budget, do the following\n\t\t\t{\n\t\t\t\tint fitnessTrendPopulated = 0; // Initialise the fitness trend populated variable\n\t\t\t\t\n\t\t\t\tdouble[] mutantIndividual \t = new double[problemDimension]; // Reinitialise the mutated individuals variable\n\t\t\t\tdouble[] crossoverIndividual = new double[problemDimension]; // Reinitialise the offspring variable\n\t\t\t\tdouble[] populationIndividual = new double[problemDimension]; // Reinitialise the individual (solution) comprising the population variable \n\t\t\t\t\n\t\t\t\tdouble currentFitness \t= Double.NaN; // Reinitialise the fitness of the current solution (individual)\n\t\t\t\tdouble crossoverFitness = Double.NaN; // Reinitialise the fitness of the offspring solution (individual)\n\t\t\t\t\n\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t{\n\t\t\t\t\tpopulationIndividual[l] = population[j][l]; // Initialise the individual (solution) in the population to the iterated individual in the population\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrentFitness = solutionFitness[j]; // Set the current fitness (value) to the fitness of the current individual (solution)\n\t\t\t\n\t\t\t\t// Update the scaling factor (F)\n\t\t\t\tif (RandUtils.random() < tauOne) // If the randomly generated number is smaller than the probability of controlling the scaling factor of the mutation operator, do the following\n\t\t\t\t{\n\t\t\t\t\tscalingFactor[j] = scalingFactorLowerBound + RandUtils.random() * scalingFactorUpperBound; // Resample the scaling factor for the iterated individual of the population\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// DE/rand/1 mutation operator\n\t\t\t\tmutantIndividual = originalMutation(population, scalingFactor[j], problemDimension); // Function call, mutate the population of individuals to obtain a new mutated individual\n\t\t\t\t//mutantIndividual = toro(mutantIndividual, bounds); // Correct the mutated individual (solution) that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\n\t\t\t\t// Update the crossover rate (CR)\n\t\t\t\tif (RandUtils.random() < tauTwo) // If the randomly generated number is smaller than the probability of controlling the crossover rate of the binomial crossover operator, do the following\n\t\t\t\t{\n\t\t \tcrossoverRate[j] = RandUtils.random(); // Resample the crossover rate for the iterated individual of the population\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Binomial crossover operator\n\t\t\t\tcrossoverIndividual = binomialCrossover(populationIndividual, mutantIndividual, crossoverRate[j], problemDimension); // Function call, crossover the current individual and the mutated individual, binomially (recombination)\n\t\t\t\tcrossoverIndividual = toro(crossoverIndividual, bounds); // Correct the offspring individual (solution) that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\n\t\t\t\tcrossoverFitness = problem.f(crossoverIndividual); // Calculate and store the fitness (value) of the offspring solution (individual)\n\t\t\t\tk++; // Increment the counter to near the computational budget\n\t\t\t\t\n\t\t\t\t// Replace the original individual in the population\n\t\t\t\tif (crossoverFitness < currentFitness) // If the offspring individual is fitter than the original individual in the population, do the following\n\t\t\t\t{\n\t\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t{\n\t\t\t\t\t\t// Survivor selection (1-to-1 spawning)\n\t\t\t\t\t\tnextGeneration[j][l] = crossoverIndividual[l]; // Replace the original individual (solution) in the population with the offspring individual (solution)\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tsolutionFitness[j] = crossoverFitness; // Update the fitness of the individual (solution) to the fitness of the offspring individual (solution)\n\t\t\t\t\t\n\t\t\t\t\t// Update the best known solution\n\t\t\t\t\tif (crossoverFitness < fBest) // If the offspring individual (solution) is fitter than the best known individual (solution), do the following\n\t\t\t\t\t{\n\t\t\t\t\t\tfBest = crossoverFitness; // Update the fitness (value) of the best known solution to the fitness (value) of the offspring individual (solution)\n\t\t\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tbest[l] = crossoverIndividual[l]; // Update the best known individual (solution) to the offspring individual (solution)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Reset exploratory radius\n\t\t\t\t\t\tfor (int i = 0; i < problemDimension; i++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\texploratoryRadius[i] = alpha * (bounds[i][1] - bounds[i][0]); // Calculate and the exploratory radius for each variable in the problem domain\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Main loop\n\t\t\t\t\t\tfor (int l = 0; l < proceduralIterations && k < maxEvaluations; l++) // For the size of the procedural iteration budget and whilst within the computational budget, do the following\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboolean improved = false; // Initialise the improved variable (reinitialise every iteration)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int i = 0; i < problemDimension && k < maxEvaluations; i++) // For the dimensionality of the problem and whilst within the computational budget, do the following\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\txShort[i] = best[i] - exploratoryRadius[i]; // Perturb the currently iterated variable in the problem domain, negatively, along the corresponding axis (exclusively) \n\t\t\t\t\t\t\t\txShort = toro(xShort, bounds); // Correct the trial solution that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfShort = problem.f(xShort); // Calculate the new fitness value of the trial solution\n\t\t\t\t\t\t\t\tk++; // Increment the counter to near the computational budget\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (fShort <= fBest) // If the trial solution is an improvement or equivalent to the best known solution, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tbest[i] = xShort[i]; // Update the best known solution to the current trial solution (one variable perturbed at each iteration)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfBest = fShort; // Store the fitness value of the improved trial solution\n\t\t\t\t\t\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\timproved = true; // The trial solution is an improvement or equivalent to the best known solution\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (k < maxEvaluations) // Else if the trial solution is not an improvement to the best solution found and its within the computational budget, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\txShort[i] = best[i] + (exploratoryRadius[i] / 2); // Perturb the currently iterated variable in the problem domain, positively (half-step), along the corresponding axis (exclusively) \n\t\t\t\t\t\t\t\t\txShort = toro(xShort, bounds); // Correct the trial solution that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfShort = problem.f(xShort); // Calculate the new fitness value of the trial solution\n\t\t\t\t\t\t\t\t\tk++; // Increment the counter to near the computational budget\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (fShort <= fBest) // If the trial solution is an improvement or equivalent to the best known solution, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbest[i] = xShort[i]; // Update the best known solution to the current trial solution (one variable perturbed at each iteration)\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tfBest = fShort; // Store the fitness value of the improved trial solution\n\t\t\t\t\t\t\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\timproved = true; // The trial solution is an improvement or equivalent to the best known solution\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse // Else if the trial solution is not an improvement to the best solution found, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\txShort[i] = best[i]; // Return to the original point after the perturbations, as an improvement could not be recognised\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (improved == false) // If the current best solution has never improved from the initial best solution, do the following\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor (int i = 0; i < exploratoryRadius.length; i++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\texploratoryRadius[i] = exploratoryRadius[i] / 2; // Store the exploratory radius for each variable in the problem domain to itself, halved (closer search from initial solution in case the initial guess is the optimum)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse // Else if the current best solution has improved from the initial best solution, do the following\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor (int i = 0; i < problemDimension; i++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextGeneration[j][i] = best[i]; // Replace the original individual (solution) in the population with the best known solution (individual)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tsolutionFitness[j] = fBest; // Update the fitness of the individual (solution) to the fitness of the best known solution (individual)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse // Else if the offspring individual is not fitter than the original individual in the population, do the following\n\t\t\t\t{\n\t\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t{\n\t\t\t\t\t\tnextGeneration[j][l] = populationIndividual[l]; // Restore the design variables (genes) of the original individual (solution) as the updated individual (solution)\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tsolutionFitness[j] = currentFitness; // Restore the fitness (value) of the solution to the fitness (value) of the iterated individual (solution)\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t{\n\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Survivor selection (1-to-1 spawning)\n\t\t\tpopulation = nextGeneration; // Update the current population of individuals to the next generation of fitter individuals\n\t\t}\n\t\t\n\t\tfinalBest = best; // Store the final iteration of the best known solution\n\t\tFT.add(k, fBest); // Add the final iteration of the best known solution to the fitness trend (saved to a .txt file)\n\n\t\treturn FT; // Return the fitness trend\n\t}",
"public abstract double evaluer(SolutionPartielle s);",
"protected void addObjective() throws IloException {\n IloLinearNumExpr objective = model.linearNumExpr();\n\n for (int i = 0; i < m; ++i) {\n for (int j = 0; j < n; j++) {\n objective.addTerm(x[i][j], costs[i][j]);\n\n }\n }\n\n IloObjective Obj = model.addObjective(IloObjectiveSense.Minimize, objective);\n }",
"public void setObjective(Variable v) {\r\n\t\tobjective = v;\r\n\t\tif (v != null) {\r\n\t\t\tadd(v);\r\n\t\t}\r\n\t}",
"public Solution solve(KnapsackData data);",
"public abstract Vector4fc min(IVector4f v);",
"private void promote(int lpos, List<Integer> fv, double alpha){\n int fvisize = fv.size();\n // learner predicted 0, correct is 1 -> promotion\n for(int fvi=0; fvi < fvisize; fvi++){\n int fi = fv.get(fvi);\n weights[lpos][fi] *= alpha;\n }\n }",
"@Override\r\n public LocalSearchOutput2 extremePointLocalSearch(\r\n int objIndex, // Index of the extreme point corresponding objective\r\n double[] x, // The design spcae of the staring point\r\n double[] ideal, // Last known intercepts\r\n double[] intercepts, // Last known intercepts\r\n double augmentedPercent, // Weight of the corressponding objective in the weighted sum\r\n int maxFunEval // The maximum number of allowed function evaluations\r\n ) throws MWException {\n MWNumericArray startingPoint = new MWNumericArray(x, MWClassID.DOUBLE);\r\n MWNumericArray idealPoint = new MWNumericArray(intercepts, MWClassID.DOUBLE);\r\n MWNumericArray intrcpts = new MWNumericArray(intercepts, MWClassID.DOUBLE);\r\n // Call Matlab\r\n Object[] result = extremeOptimizer.general_extreme_point_opt(\r\n 4, // Number of return values\r\n startingPoint,\r\n objIndex+1, // Incremented because Matlab indexing starts from 1\r\n intercepts.length, // Number of objectives\r\n idealPoint,\r\n intrcpts, \r\n augmentedPercent, \r\n maxFunEval);\r\n // Collect outputs\r\n double[] xSpace = ((double[][]) ((MWNumericArray) result[0]).toDoubleArray())[0];\r\n double[] fSpace = ((double[][]) ((MWNumericArray) result[1]).toDoubleArray())[0];\r\n int evalCount = Integer.parseInt(result[2].toString());\r\n int exitFlag = Integer.parseInt(result[3].toString());\r\n // Return LS result\r\n return new LocalSearchOutput2(xSpace,fSpace,evalCount,exitFlag);\r\n }",
"private void findSmallestCost() {\n int best = 0;\n fx = funFitness[0];\n for (int i = 1; i < population; i++) {\n if (funFitness[i] < fx) {\n fx = funFitness[i];\n best = i;\n }\n }\n //System.arraycopy(currentPopulation[best], 0, bestSolution, 0, dimension);\n copy(bestSolution, currentPopulation[best]);\n }",
"public abstract TrajectoryInfo solve();",
"public void calculate(List<Double> x){\n\n for(int j=1;j<=m;j++){\n th[1][j] = wdotF(-1,j,x,1);\n }\n for(int i=2;i<=n;i++){\n for(int l=1;l<=m;l++){\n double max = Double.MIN_VALUE;\n for(int j=1;j<=m;j++){\n double value = th[i-1][j]+ wdotF(j,l,x,i);\n if(value> max){\n max = value;\n path[i][l] = j;\n }\n }\n th[i][l] = max;\n }\n }\n double maxValue = Double.MIN_VALUE;\n int pathValue = 0;\n List<Integer> goodPath = new ArrayList<>();\n for(int j=1;j<=m;j++){\n double value = th[n][j];\n if(value> maxValue){\n maxValue = value;\n pathValue = j;\n }\n }\n goodPath.add(pathValue);\n for(int i=n-1;i>0;i--){\n int value = path[i+1][pathValue];\n pathValue = value;\n goodPath.add(0,pathValue);\n }\n System.out.print(\"path is :\");\n for(Integer path : goodPath){\n System.out.print(path+\" \");\n }\n }",
"void MemorizeBestSource() \n\t{\n\t int i,j;\n\t \n\t\tfor(i=0;i<FoodNumber;i++)\n\t\t{\n\t\tif (f[i]<GlobalMin)\n\t\t\t{\n\t GlobalMin=f[i];\n\t for(j=0;j<D;j++)\n\t GlobalParams[j]=Foods[i][j];\n\t }\n\t\t}\n\t }",
"public static void main(String args[]) {\n int input[] = {10, 12, 20, 35, 46};\n int freq[] = {34, 8, 50, 21, 16};\n OptimalTreeSearch ots = new OptimalTreeSearch();\n System.out.println(ots.minCost(input, freq));\n System.out.println(ots.minCostRec(input, freq));\n }",
"public void c(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2)\r\n/* 77: */ {\r\n/* 78: 89 */ float f1 = uv.a(paramDouble1 * paramDouble1 + paramDouble2 * paramDouble2 + paramDouble3 * paramDouble3);\r\n/* 79: */ \r\n/* 80: 91 */ paramDouble1 /= f1;\r\n/* 81: 92 */ paramDouble2 /= f1;\r\n/* 82: 93 */ paramDouble3 /= f1;\r\n/* 83: */ \r\n/* 84: 95 */ paramDouble1 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 85: 96 */ paramDouble2 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 86: 97 */ paramDouble3 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 87: */ \r\n/* 88: 99 */ paramDouble1 *= paramFloat1;\r\n/* 89:100 */ paramDouble2 *= paramFloat1;\r\n/* 90:101 */ paramDouble3 *= paramFloat1;\r\n/* 91: */ \r\n/* 92:103 */ this.v = paramDouble1;\r\n/* 93:104 */ this.w = paramDouble2;\r\n/* 94:105 */ this.x = paramDouble3;\r\n/* 95: */ \r\n/* 96:107 */ float f2 = uv.a(paramDouble1 * paramDouble1 + paramDouble3 * paramDouble3);\r\n/* 97: */ \r\n/* 98:109 */ this.A = (this.y = (float)(Math.atan2(paramDouble1, paramDouble3) * 180.0D / 3.141592741012573D));\r\n/* 99:110 */ this.B = (this.z = (float)(Math.atan2(paramDouble2, f2) * 180.0D / 3.141592741012573D));\r\n/* 100:111 */ this.i = 0;\r\n/* 101: */ }",
"public FireflyOptimization(){\n this(25, 1000);\n }",
"public abstract void assign(ParameterVector pv) throws SolverException;",
"public Solver(WorldState initial) {\n solution = new ArrayList<>();\n\n // create a priority queue of search nodes\n MinPQ<SNode> pq = new MinPQ<>();\n\n // insert an “initial search node” into the priority queue\n SNode start = new SNode(initial, 0, null);\n pq.insert(start);\n\n // If the search node with minimum priority is the goal node, then we’re done.\n while (!pq.min().ws.isGoal()) {\n\n // Remove the search node with minimum priority.\n SNode X = pq.delMin();\n\n // for each neighbor of X’s world state, create a new search node and\n // insert it into the priority queue.\n for (WorldState nb: X.ws.neighbors()) {\n\n // critical optimization\n if (X.prev == null || !(nb.equals(X.prev.ws))) {\n SNode nbNode = new SNode(nb, X.numberOfMove + 1, X);\n pq.insert(nbNode);\n }\n }\n }\n\n // generate the solution\n SNode goal = pq.min();\n while (goal != null) {\n solution.add(0, goal.ws);\n goal = goal.prev;\n }\n }",
"public void solve() {\n// BruteForceSolver bfs = new BruteForceSolver(pointList);\n// bfs.solve(); // prints the best polygon, its area, and time needed\n// System.out.println(\"-------------\");\n\n// StarshapedSolver ss = new StarshapedSolver(pointList);\n// foundPolygons = ss.solve();\n// System.out.println(\"-------------\");\n\n// RandomAddPointHeuristic ra = new RandomAddPointHeuristic(pointList);\n// foundPolygons = ra.solve(750);\n// System.out.println(\"-------------\");\n\n// GreedyAddPointHeuristic ga = new GreedyAddPointHeuristic(pointList,false);\n// foundPolygons = ga.solve(750);\n// System.out.println(\"-------------\");\n\n// long time = 4000;\n// GreedyAddPointHeuristic gaInit = new GreedyAddPointHeuristic(pointList,false);\n// Polygon2D initSolution = gaInit.solve(time*1/4).get(0);\n// System.out.println(initSolution.area);\n// System.out.println(initSolution);\n//\n// SimulatedAnnealing sa = new SimulatedAnnealing(pointList,initSolution,3);\n// foundPolygons.addAll(sa.solve(time-gaInit.timeInit,2,0.005,0.95));\n// System.out.println(sa.maxPolygon);\n// System.out.println(\"-------------\");\n\n// foundPolygons.addAll(findMultiplePolygonsStarshaped(8,0.6));\n\n }",
"public void update(ChiVertex<Integer, RatingEdge> vertex, GraphChiContext context) {\n\t\tboolean isUser = vertex.numOutEdges() > 0;\n\t\tdouble[] nbrPVec = new double[params.numFactors];\n\t\t\n\t\tdouble[] vData = new double[params.numFactors];\n\t\tint sourceId = context.getVertexIdTranslate().backward(vertex.getId());\n\t\tparams.latentFactors.getRow(sourceId, vData);\n\t\t\n\t\t//Will be updated to store SUM(V_j*R_ij)\n\t\tRealVector Xty = new ArrayRealVector(params.numFactors);\n\t\t//Will be updated to store SUM(V_j*V_j')\n\t\tRealMatrix XtX = new BlockRealMatrix(params.numFactors, params.numFactors);\n\t\t\n\t\t//Gather data to update the mean and the covariance for the hidden features.\t\n\t\tfor(int i = 0; i < vertex.numEdges(); i++) {\n\t\t\tRatingEdge edge = vertex.edge(i).getValue(); \n\t\t\tdouble observation = edge.observation;\n\t\t\t\n\t\t\tint nbrId = context.getVertexIdTranslate().backward(vertex.edge(i).getVertexId());\n\t\t\tparams.latentFactors.getRow(nbrId, nbrPVec);\n\t\t\t////VertexDataType nbrVertex = params.latentFactors.get(nbrId);\n\t\t\t\n\t\t\t//Add V_j*R_ij for this observation.\n\t\t\t////Xty = Xty.add(nbrVertex.pVec.mapMultiply(observation));\n\t\t\tfor(int f = 0; f < params.numFactors; f++) {\n\t\t\t\tdouble value = Xty.getEntry(f) + nbrPVec[f]*observation;\n\t\t\t\tXty.setEntry(f, value);\n\t\t\t\t\n\t\t\t\t//Add V_j*V_j' for this\n\t\t\t\tfor(int f2 = 0; f2 < params.numFactors; f2++) {\n\t\t\t\t\tvalue = XtX.getEntry(f, f2) + nbrPVec[f]*nbrPVec[f2];\n\t\t\t\t\tXtX.setEntry(f, f2, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Add V_j*V_j' for this \n\t\t\t////XtX = XtX.add(nbrVertex.pVec.outerProduct(nbrVertex.pVec));\n\t\t\t\n\t\t}\n\t\t\n\t\tRealMatrix lambda_prior = isUser ? params.lambda_U : params.lambda_V;\n\t\tRealVector mu_prior = isUser ? params.mu_U : params.mu_V;\n\t\t\n\t\tRealMatrix precision = lambda_prior.add(XtX.scalarMultiply(params.alpha)); \n\t\tRealMatrix covariance = (new LUDecompositionImpl(precision).getSolver().getInverse());\n\t\t\n\t\tRealVector tmp = lambda_prior.operate(mu_prior);\n\t\tRealVector mean = covariance.operate(Xty.mapMultiply(params.alpha).add(tmp));\n\t\t\n\t\t//We have the covariance and mean. We can grab a sample from this multivariate\n\t\t//normal distribution according to: \n\t\t// http://en.wikipedia.org/wiki/Multivariate_normal_distribution#Drawing_values_from_the_distribution\n\t\t//Javadoc:\n\t\tMultivariateNormalDistribution dist = new MultivariateNormalDistribution(mean.toArray(), covariance.getData());\n\t\t////vData.pVec = new ArrayRealVector(dist.sample());\n\t\tvData = dist.sample();\n\t\tparams.latentFactors.setRow(sourceId, vData);\n\t\t\n\t\t//Compute contribution of all ratings for this vertex to RMSE.\n\t\tif(isUser) {\n\t\t\tfor(int i = 0; i < vertex.numEdges(); i++) {\n\t\t\t\tChiEdge<RatingEdge> edge = vertex.edge(i);\n\t\t\t\tRatingEdge pmfRatingEdge = edge.getValue();\n\t\t\t\tfloat observation = pmfRatingEdge.observation;\n\t\t\t\tint nbrId = context.getVertexIdTranslate().backward(vertex.edge(i).getVertexId());\n\t\t\t\tparams.latentFactors.getRow(nbrId, nbrPVec);\n\t\t\t\t\n\t\t\t\t//Aggregate the sample and compute rmse if greater than burn_in period\n\t\t\t\tdouble prediction = this.params.predict(vData, nbrPVec, datasetDesc);\n\t\t\t\tdouble squaredError = (observation - prediction)*(observation - prediction);\n\t\t\t\tsynchronized (this) {\n\t\t\t\t this.train_rmse += squaredError;\n\t }\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Update Sum of U_i / V_j\n\t\t//Should be synchronized? Or Atomic add of vectors?\n\t\tRealVector vDataVec = new ArrayRealVector(vData);\n\t\tRealMatrix vDataOuterProd = vDataVec.outerProduct(vDataVec);\n\t\tsynchronized (params) {\n\t\t\tif(isUser) {\n\t\t\t\t\tparams.sumU = params.sumU.add(vDataVec);\n\t\t\t\t\tparams.sumUUT = params.sumUUT.add(vDataOuterProd);\n\t\t\t} else {\n\t\t\t\tparams.sumV = params.sumV.add(vDataVec);\n\t\t\t\tparams.sumVVT = params.sumVVT.add(vDataOuterProd);\n\t\t\t}\n\t\t}\n\t}",
"public static void apply_SPV(String from,double x[],int order[]){\n\r\n\t\tif (temp_full_list == null || temp_full_list.length != x.length){\r\n\t\t\ttemp_full_list = new boolean[x.length];\r\n\t\t}\r\n\t\tfor (int i = 0; i < temp_full_list.length; i++) {\r\n\t\t\ttemp_full_list[i] = false;\r\n\t\t}\r\n\t\t\r\n\t\tboolean min_set;\r\n\t\tfor (int i = 0; i < order.length; i++) {\r\n\t\t\tdouble min = 1000;\r\n\t\t\tint target=0;\r\n\t\t\tmin_set = false;\r\n\t\t\tfor (int j = 0; j < x.length; j++) {\r\n\t\t\t\tif (!temp_full_list[j] && (!min_set || x[j] < min)){\r\n\t\t\t\t\tmin_set = true;\r\n\t\t\t\t\ttarget = j;\r\n\t\t\t\t\tmin = x[j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\torder[i] = target;\r\n\t\t\ttemp_full_list[target] = true;\r\n\t\t}\r\n\t}",
"Long[] searchSolution(int timeLimit, Graph g);",
"private double evalG(DoubleSolution solution) {\n double g = 0.0;\n for (int i = 1; i < solution.getNumberOfVariables(); i++) {\n g += solution.getVariableValue(i);\n }\n double constant = 9.0 / (solution.getNumberOfVariables() - 1.0);\n g = constant * g;\n g = g + 1.0;\n return g;\n }",
"private double func(double v){\n double pi = Math.PI;\n return 4.0 * pi\n * Math.pow((M / (2.0 * pi * R * T)) , (3.0/2.0))\n * Math.pow( v , 2.0 )\n * Math.exp((-M * Math.pow( v , 2.0 )) / (2.0 * R * T));\n }",
"public static void main(String[] args) \n\t{\n\t\tinitialize(\"\");\n\t\t\n\t\t//making instance from file name\n\n\t\tString str = \"A-n32-k5.vrp\";\n\t\tString fileName = \"input//\" + str;\n\t\t\n\t\t\n\t\tInstance problem = new VRPInstance(fileName);\n\t\tSystem.out.println(problem.comment);\n\t\t//solve problem\n\n\t\t//Solver solver2 = new SimpleGreedySolver(problem);\n\t\t//Solver solver2 = new NearestNeighborGreedySolver(problem);\n\t\t//Solver solver = new ClarkeWrightGreedySolver(problem);\n\t\t//Solver solver = new EHSBASolver(problem);\n\t\t//solver2.solve();\n\t\t//solver2.printResult();\n\t\t\n\t\t//solver = new ClarkeWrightGreedySolver(problem);\n\t\tSolver solver3 = new EHSBASolver(problem);\n\t\tsolver3.solve();\n\t\tsolver3.printResult();\n\t\t\n\t\tSystem.out.println(\"finished.\");\n\t\t\n\t\t\n\t\t/*File folder = new File(\"input\");\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\n\t\tfor(int i = 0; i < listOfFiles.length; i++)\n\t\t{\n\t\t\n\t\t\tString str = listOfFiles[i].getName();\n\t\t\tSystem.out.println(str);\n\t\t\tif(listOfFiles[i].isFile() && str.substring(0, 1).equalsIgnoreCase(\"A\"))\n\t\t\t\tfileName = \"input\\\\\" + str;\n\t\t\telse\n\t\t\t\tcontinue;\n\n\t\t\t//fileName = \"input\\\\\" + fileName;\n\t\t\tInstance problem = new VRPInstance(fileName);\n\t\t\tSystem.out.println(problem.comment);\n\t\t\t//solve problem\n\t\n\t\t\t//Solver solver = new SimpleGreedySolver(problem);\n\t\t\t//Solver solver = new NearestNeighborGreedySolver(problem);\n\t\t\tSolver solver = new ClarkeWrightGreedySolver(problem);\n\t\t\t//Solver solver = new EHSBASolver(problem);\n\t\t\tsolver.solve();\n\t\t\tsolver.printResult();\t\n\n\t\t}*/\n\n\t\t\n\t}",
"private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}",
"public static void main(String[] args) {\n\t\tfloat[][] m = {\n\t\t\t\t{1,2,3},{4,5,6},{7,8,2}\n\t\t};\n\t\t\n\t\tnew Solver(m);\n\t}",
"public double[] runOptimizer() {\n List<Integer> sents = new ArrayList<Integer>();\n for(int i=0; i<sentNum; i++)\n sents.add(i);\n \n if(needShuffle)\n Collections.shuffle(sents);\n \n double oraMetric, oraScore, predMetric, predScore;\n double[] oraPredScore = new double[4];\n double eta = 1.0; //learning rate, will not be changed if run percep\n double avgEta = 0; //average eta, just for analysis\n double loss = 0;\n double featNorm = 0;\n double featDiffVal;\n double sumMetricScore = 0;\n double sumModelScore = 0;\n String oraFeat = \"\";\n String predFeat = \"\";\n String[] oraPredFeat = new String[2];\n String[] vecOraFeat;\n String[] vecPredFeat;\n String[] featInfo;\n boolean first = true;\n //int processedSent = 0;\n Iterator it;\n Integer diffFeatId;\n double[] avgLambda = new double[initialLambda.length]; //only needed if averaging is required\n for(int i=0; i<initialLambda.length; i++)\n avgLambda[i] = 0.0;\n\n //update weights\n for(Integer s : sents) {\n //find out oracle and prediction\n if(first)\n findOraPred(s, oraPredScore, oraPredFeat, initialLambda, featScale);\n else\n findOraPred(s, oraPredScore, oraPredFeat, finalLambda, featScale);\n \n //the model scores here are already scaled in findOraPred\n oraMetric = oraPredScore[0];\n oraScore = oraPredScore[1];\n predMetric = oraPredScore[2];\n predScore = oraPredScore[3];\n oraFeat = oraPredFeat[0];\n predFeat = oraPredFeat[1];\n \n //update the scale\n if(needScale) { //otherwise featscale remains 1.0\n sumMetricScore += java.lang.Math.abs(oraMetric+predMetric);\n sumModelScore += java.lang.Math.abs(oraScore+predScore)/featScale; //restore the original model score\n \n if(sumModelScore/sumMetricScore > scoreRatio)\n featScale = sumMetricScore/sumModelScore;\n\n /* a different scaling strategy \n if( (1.0*processedSent/sentNum) < sentForScale ) { //still need to scale\n double newFeatScale = java.lang.Math.abs(scoreRatio*sumMetricDiff / sumModelDiff); //to make sure modelScore*featScale/metricScore = scoreRatio\n \n //update the scale only when difference is significant\n if( java.lang.Math.abs(newFeatScale-featScale)/featScale > 0.2 )\n featScale = newFeatScale;\n }*/\n }\n// processedSent++;\n\n HashMap<Integer, Double> allOraFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> allPredFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> featDiff = new HashMap<Integer, Double>();\n\n vecOraFeat = oraFeat.split(\"\\\\s+\");\n vecPredFeat = predFeat.split(\"\\\\s+\");\n \n for (int i = 0; i < vecOraFeat.length; i++) {\n featInfo = vecOraFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allOraFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n featDiff.put(diffFeatId, Double.parseDouble(featInfo[1]));\n }\n\n for (int i = 0; i < vecPredFeat.length; i++) {\n featInfo = vecPredFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allPredFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n\n if (featDiff.containsKey(diffFeatId)) //overlapping features\n featDiff.put(diffFeatId, featDiff.get(diffFeatId)-Double.parseDouble(featInfo[1]));\n else //features only firing in the 2nd feature vector\n featDiff.put(diffFeatId, -1.0*Double.parseDouble(featInfo[1]));\n }\n\n if(!runPercep) { //otherwise eta=1.0\n featNorm = 0;\n\n Collection<Double> allDiff = featDiff.values();\n for(it =allDiff.iterator(); it.hasNext();) {\n featDiffVal = (Double) it.next();\n featNorm += featDiffVal*featDiffVal;\n }\n \n //a few sanity checks\n if(! evalMetric.getToBeMinimized()) {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score+ora_metric > pred_score+pred_metric\n * pred_score-pred_metric > ora_score-ora_metric\n * => ora_metric > pred_metric */\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be greater than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for max-metric oracle selection or min-metric prediction selection, the oracle metric \" +\n \t\t\"score must be greater than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n } else {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score-ora_metric > pred_score-pred_metric\n * pred_score+pred_metric > ora_score+ora_metric\n * => ora_metric < pred_metric */\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be smaller than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for min-metric oracle selection or max-metric prediction selection, the oracle metric \" +\n \"score must be smaller than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n }\n \n if(predSelectMode==2) {\n if(predScore+1e-10 < oraScore) {\n System.err.println(\"WARNING: for max-model prediction selection, the prediction model score must be greater than oracle model score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n //cost - margin\n //remember the model scores here are already scaled\n loss = evalMetric.getToBeMinimized() ? //cost should always be non-negative \n (predMetric-oraMetric) - (oraScore-predScore)/featScale: \n (oraMetric-predMetric) - (oraScore-predScore)/featScale;\n \n if(loss<0)\n loss = 0;\n\n if(loss == 0)\n eta = 0;\n else\n //eta = C < loss/(featNorm*featScale*featScale) ? C : loss/(featNorm*featScale*featScale); //feat vector not scaled before\n eta = C < loss/(featNorm) ? C : loss/(featNorm); //feat vector not scaled before\n }\n \n avgEta += eta;\n\n Set<Integer> diffFeatSet = featDiff.keySet();\n it = diffFeatSet.iterator();\n\n if(first) {\n first = false;\n \n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = initialLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n else {\n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = finalLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n \n if(needAvg) {\n for(int i=0; i<avgLambda.length; i++)\n avgLambda[i] += finalLambda[i];\n }\n }\n \n if(needAvg) {\n for(int i=0; i<finalLambda.length; i++)\n finalLambda[i] = avgLambda[i]/sentNum;\n }\n \n avgEta /= sentNum;\n System.out.println(\"Average learning rate: \"+avgEta);\n\n // the intitialLambda & finalLambda are all trainable parameters\n //if (!trainMode.equals(\"3\")) // for mode 3, no need to normalize sparse\n // feature weights\n //normalizeLambda(finalLambda);\n //else\n //normalizeLambda_mode3(finalLambda);\n\n /*\n * for( int i=0; i<finalLambda.length; i++ ) System.out.print(finalLambda[i]+\" \");\n * System.out.println(); System.exit(0);\n */ \n\n double initMetricScore = computeCorpusMetricScore(initialLambda); // compute the initial corpus-level metric score\n double finalMetricScore = computeCorpusMetricScore(finalLambda); // compute final corpus-level metric score // the\n\n // prepare the printing info\n int numParamToPrint = 0;\n String result = \"\";\n\n if (trainMode.equals(\"1\") || trainMode.equals(\"4\")) {\n numParamToPrint = paramDim > 10 ? 10 : paramDim; // how many parameters\n // to print\n result = paramDim > 10 ? \"Final lambda(first 10): {\" : \"Final lambda: {\";\n\n for (int i = 1; i < numParamToPrint; i++)\n // in ZMERT finalLambda[0] is not used\n result += finalLambda[i] + \" \";\n } else {\n int sparseNumToPrint = 0;\n if (trainMode.equals(\"2\")) {\n result = \"Final lambda(regular feats + first 5 sparse feats): {\";\n for (int i = 1; i <= regParamDim; ++i)\n result += finalLambda[i] + \" \";\n\n result += \"||| \";\n\n sparseNumToPrint = 5 < (paramDim - regParamDim) ? 5 : (paramDim - regParamDim);\n\n for (int i = 1; i <= sparseNumToPrint; i++)\n result += finalLambda[regParamDim + i] + \" \";\n } else {\n result = \"Final lambda(first 10 sparse feats): {\";\n sparseNumToPrint = 10 < paramDim ? 10 : paramDim;\n\n for (int i = 1; i < sparseNumToPrint; i++)\n result += finalLambda[i] + \" \";\n }\n }\n\n output.add(result + finalLambda[numParamToPrint] + \"}\\n\" + \"Initial \"\n + evalMetric.get_metricName() + \": \" + initMetricScore + \"\\nFinal \"\n + evalMetric.get_metricName() + \": \" + finalMetricScore);\n\n // System.out.println(output);\n\n if (trainMode.equals(\"3\")) {\n // finalLambda = baseline(unchanged)+disc\n for (int i = 0; i < paramDim; i++)\n copyLambda[i + regParamDim + 1] = finalLambda[i];\n\n finalLambda = copyLambda;\n }\n\n return finalLambda;\n }",
"public static void model1() {\n try {\n IloCplex cplex = new IloCplex();\n \n //variables\n IloNumVar x = cplex.numVar(0, Double.MAX_VALUE, \"x\"); //x >= 0\n IloNumVar y = cplex.numVar(0, Double.MAX_VALUE, \"y\"); //y >= 0\n \n //expressions\n IloLinearNumExpr objective = cplex.linearNumExpr();\n objective.addTerm(0.12, x);\n objective.addTerm(0.15, y);\n \n //define objective\n cplex.addMinimize(objective);\n \n //define constraints\n cplex.addGe(cplex.sum(cplex.prod(60, x), cplex.prod(60, y)), 300);\n cplex.addGe(cplex.sum(cplex.prod(12, x), cplex.prod(6, y)), 36);\n cplex.addGe(cplex.sum(cplex.prod(10, x), cplex.prod(30, y)), 90);\n \n //solve\n if (cplex.solve()) {\n System.out.println(\"Obj = \" + cplex.getObjValue());\n System.out.println(\"Obj = \" + cplex.getValue(objective));\n System.out.println(\"x = \" + cplex.getValue(x));\n System.out.println(\"y = \" + cplex.getValue(y));\n } else {\n System.out.println(\"Solution not found.\");\n }\n } catch (IloException ex) {\n ex.printStackTrace();\n }\n }",
"public interface OptimizationService {\r\n\t/**\r\n\t * Returns a mapping specifying the solver capabilities:\r\n\t * \r\n\t * Problem class -> Solution classes.\r\n\t * \r\n\t * Hence, a service could provide different types of solutions for the same problem instance.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic Map<Class<?>, Class<?>[]> getCapabilities();\r\n\t/**\r\n\t * For quick capability checking\r\n\t * \r\n\t * @param problem\r\n\t * @param solution\r\n\t * @return\r\n\t */\r\n\tpublic boolean canSolve(Class<? extends Problem> problem, Class<? extends Solution> solution);\r\n\t/**\r\n\t * Solves the problem and returns the \r\n\t * \r\n\t * @param problem\r\n\t * @param problemClass\r\n\t * @param solutionClass\r\n\t * @return\r\n\t */\r\n\tpublic<P extends Problem, S extends Solution> S solve(P problem, Class<P> problemClass, Class<S> solutionClass); \r\n}",
"double getSolutionCost();",
"public TTPSolution SH2() {\n \n // get TTP data\n long[][] D = ttp.getDist();\n int[] A = ttp.getAvailability();\n double maxSpeed = ttp.getMaxSpeed();\n double minSpeed = ttp.getMinSpeed();\n long capacity = ttp.getCapacity();\n double C = (maxSpeed - minSpeed) / capacity;\n double R = ttp.getRent();\n int m = ttp.getNbCities(),\n n = ttp.getNbItems();\n TTPSolution s = new TTPSolution(m, n);\n int[] x = s.getTour(),\n z = s.getPickingPlan();\n \n /*\n * the tour\n * generated using greedy algorithm\n */\n x = linkernTour();\n z = zerosPickingPlan();\n Deb.echo(x);\n Deb.echo(z);\n \n /*\n * the picking plan\n * generated so that the TTP objective value is maximized\n */\n ttp.objective(s);\n \n // partial distance from city x_i\n long di;\n \n // partial time with item k collected from city x_i\n double tik;\n \n // item scores\n Double[] score = new Double[n];\n \n // total time with no items collected\n double t_ = s.ft;\n \n // total time with only item k collected\n double tik_;\n \n // fitness value\n double u[] = new double[n];\n \n for (int k=0; k<n; k++) {\n \n int i;\n for (i=0; i<m; i++) {\n if (A[k]==x[i]) break;\n }\n //P.echo2(\"[\"+k+\"]\"+(i+1)+\"~\");\n \n // time to start with\n tik = i==0 ? .0 : s.timeAcc[i-1];\n int iw = ttp.weightOf(k),\n ip = ttp.profitOf(k);\n \n // recalculate velocities from start\n di = 0;\n for (int r=i; r<m; r++) {\n \n int c1 = x[r]-1;\n int c2 = x[(r+1)%m]-1;\n \n di += D[c1][c2];\n tik += D[c1][c2] / (maxSpeed-iw*C);\n }\n \n score[k] = ip - R*tik;\n tik_ = t_ - di + tik;\n u[k] = R*t_ + ttp.profitOf(k) - R*tik_;\n //P.echo(k+\" : \"+u[k]);\n }\n \n Quicksort<Double> qs = new Quicksort<Double>(score);\n qs.sort();\n int[] si = qs.getIndices();\n int wc = 0;\n for (int k=0; k<n; k++) {\n int i = si[k];\n int wi = ttp.weightOf(i);\n // eliminate useless\n if (wi+wc <= capacity && u[i] > 0) {\n z[i] = A[i];\n wc += wi;\n }\n }\n \n ttp.objective(s);\n \n return s;\n }",
"public abstract double evaluateSolution(Solution solution) throws JMException, SimulationException;",
"void query(int u, int v) {\n int lca = lca2(u, v, spar, dep);\n// out.println(query_up(u, lca) + \" dv\");\n// out.println(query_up(v, lca) + \" ds\");\n int ans = query_up(u, lca) + query_up(v, lca); // One part of path\n out.println(ans);\n// if (temp > ans) ans = temp; // take the maximum of both paths\n// printf(\"%d\\n\", ans);\n }",
"private void setProblem() throws IOException, InvalidInputException{\r\n String finalInputFileName;\r\n if(scale){\r\n finalInputFileName = inputFileName + \".scaled\";\r\n }\r\n else{\r\n finalInputFileName = inputFileName;\r\n }\r\n \r\n // Read data from the input file\r\n BufferedReader reader = new BufferedReader(new FileReader(finalInputFileName));\r\n if(reader.toString().length() == 0){\r\n throw new InvalidInputException(\"Invalid input file! File is empty!\");\r\n }\r\n\r\n // Prepare holders for dataset D=(X,y)\r\n Vector<svm_node[]> X = new Vector<svm_node[]>();\r\n Vector<Double> y = new Vector<Double>();\r\n int maxIndex = 0;\r\n\r\n // Load data from file to holders\r\n while(true){\r\n String line = reader.readLine();\r\n\r\n if(line == null){\r\n break;\r\n }\r\n\r\n StringTokenizer st = new StringTokenizer(line,\" \\t\\n\\r\\f:\");\r\n\r\n y.addElement(Utils.toDouble(st.nextToken()));\r\n int m = st.countTokens()/2;\r\n svm_node[] x = new svm_node[m];\r\n for(int i = 0; i < m; i++) {\r\n x[i] = new svm_node();\r\n x[i].index = Utils.toInt(st.nextToken());\r\n x[i].value = Utils.toDouble(st.nextToken());\r\n }\r\n if(m > 0){\r\n maxIndex = Math.max(maxIndex, x[m-1].index);\r\n }\r\n X.addElement(x);\r\n }\r\n\r\n this.problem = new svm_problem();\r\n this.problem.l = y.size();\r\n this.inputDime = maxIndex + 1;\r\n\r\n // Wrap up multi-dimensional input vector X\r\n this.problem.x = new svm_node[this.problem.l][];\r\n for(int i=0;i<this.problem.l;i++)\r\n this.problem.x[i] = X.elementAt(i);\r\n\r\n // Wrap up 1-dimensional input vector y\r\n this.problem.y = new double[this.problem.l];\r\n for(int i=0;i<this.problem.l;i++)\r\n this.problem.y[i] = y.elementAt(i);\r\n \r\n////////////////////???\r\n // Verify the gamma setting according to the maxIndex\r\n if(param.gamma == 0 && maxIndex > 0)\r\n param.gamma = 1.0/maxIndex;\r\n\r\n // Dealing with pre-computed kernel\r\n if(param.kernel_type == svm_parameter.PRECOMPUTED){\r\n for(int i = 0; i < this.problem.l; i++) {\r\n if (this.problem.x[i][0].index != 0) {\r\n String msg = \"Invalid kernel matrix! First column must be 0:sample_serial_number.\";\r\n throw new InvalidInputException(msg);\r\n }\r\n if ((int)this.problem.x[i][0].value <= 0 || (int)this.problem.x[i][0].value > maxIndex){\r\n String msg = \"Invalid kernel matrix! Sample_serial_number out of range.\";\r\n throw new InvalidInputException(msg);\r\n }\r\n }\r\n }\r\n\r\n reader.close();\r\n }",
"public<P extends Problem, S extends Solution> S solve(P problem, Class<P> problemClass, Class<S> solutionClass);",
"private Double fitness(Term $f) {\n\t\t// Using a lambda to transform a formula to a function.\n\t\tFx g = x -> {this.x=x; return (Double)$abs.apply($sub.apply($f,$target)).evaluate();};\n\t\treturn integral(LOWER_BOUND, UPPER_BOUND, Fx.$f.bind(g));\n\t}",
"private void generateSolution() {\n\t\t// TODO\n\n\t}",
"private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}",
"private void addFrindge(int v, int w) {\n\t\tgetEdge(v, w).setSelected(true);\n\t\tdouble cost = newCost(v, w);\n\t\tGreedyVertex vertex = getVertex(w);\n\t\tvertex.setFringe(true);\n\t\tvertex.setParent(v);\n\t\tvertex.setCost(cost);\n\t\tp.add(vertex);\n\t}",
"public static void gbpusdDEbest(String dir) {\n \n /**\n * Settings of the evolutionary algorithm - Differential Evolution\n */\n \n Algorithm de;\n int dimension = dim; //Length of an individual - when using functions in GFS with maximum number of required arguments max_arg = 2, 2/3 are designated for program, 1/3 for constant values - for 60 it is 40 and 20\n int NP = 75; //Size of the population - number of competitive solutions\n int generations = gen; //Stopping criterion - number of generations in evolution\n int MAXFES = generations * NP; //Number of fitness function evaluations\n double f = 0.5, cr = 0.8; //Scaling factor f and crossover rate cr\n AP.util.random.Random generator = new AP.util.random.UniformRandom(); //Random number generator\n \n /**\n * Symbolic regression part\n * \n * Settings of the dataset which is regressed\n * Example: Sextic problem\n */\n \n // 50 points from range <-1, 1>, another type of data providing is possible\n double[][] dataset_points = dataset;\n ArrayList<AP_object> GFS = new ArrayList<>();\n GFS.add(new AP_Plus()); //Addition\n GFS.add(new AP_Sub()); //Subtraction\n GFS.add(new AP_Multiply()); //Mulitplication\n GFS.add(new AP_Div()); //Divison\n GFS.add(new AP_Abs());\n GFS.add(new AP_Cos());\n GFS.add(new AP_Cubic());\n GFS.add(new AP_Exp());\n GFS.add(new AP_Ln());\n GFS.add(new AP_Log10());\n GFS.add(new AP_Mod());\n GFS.add(new AP_Quad());\n GFS.add(new AP_Sin());\n GFS.add(new AP_Sigmoid());\n GFS.add(new AP_Sqrt());\n GFS.add(new AP_Tan());\n GFS.add(new AP_aTOb());\n GFS.add(new AP_x1()); //Independent variable x1\n// GFS.add(new AP_Const_static()); //Constant object - value is evolved in the extension of the individuals\n //More functions and terminals for GFS can be found or added to model.ap.objects\n \n double const_min = -10; //Minimum value of constants\n double const_max = 10; //Maximum value of constants\n \n APtf tf = new APdataset(dataset_points, GFS, const_min, const_max); //Dataset constructor\n\n /**\n * Additional variables\n */\n \n int runs = run_count; //Number of runs of the regression\n \n double min; //Helping variable for best individual in terms of fitness function value\n double[] bestArray = new double[runs]; //Array for statistics\n int i, best; //Additional helping variables\n\n /**\n * Runs of the algorithm with statistical analysis\n */\n for (int k = 0; k < runs; k++) {\n\n best = 0;\n i = 0;\n min = Double.MAX_VALUE;\n \n de = new AP_DEbest(dimension, NP, MAXFES, tf, generator, f, cr, null);\n\n de.run();\n\n PrintWriter writer;\n\n try {\n writer = new PrintWriter(dir + tf.name() + \"-DEbest\" + k + \".txt\", \"UTF-8\");\n\n writer.print(\"{\");\n \n for (int ii = 0; ii < ((AP_DEbest)de).getBestHistory().size(); ii++) {\n\n writer.print(String.format(Locale.US, \"%.10f\", ((AP_DEbest)de).getBestHistory().get(ii).fitness));\n\n if (ii != ((AP_DEbest)de).getBestHistory().size() - 1) {\n writer.print(\",\");\n }\n\n }\n\n writer.print(\"}\");\n\n writer.close();\n\n } catch (FileNotFoundException | UnsupportedEncodingException ex) {\n Logger.getLogger(AP_LSHADE.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n bestArray[k] = de.getBest().fitness - tf.optimum();\n\n /**\n * AP best result value and equation.\n */\n\n System.out.println(\"=================================\");\n System.out.println(\"Best obtained fitness function value: \\n\" + (de.getBest().fitness - tf.optimum()));\n System.out.println(\"Equation: \\n\" + ((AP_Individual) de.getBest()).equation);\n System.out.println(\"Vector: \\n\" + Arrays.toString(((AP_Individual) de.getBest()).vector));\n System.out.println(\"=================================\");\n \n for(AP_Individual ind : ((AP_DEbest)de).getBestHistory()){\n i++;\n if(ind.fitness < min){\n min = ind.fitness;\n best = i;\n }\n if(ind.fitness == 0){\n System.out.println(\"Solution found in \" + i + \" CFE\");\n break;\n }\n }\n System.out.println(\"Best solution found in \" + best + \" CFE\");\n \n System.out.println(\"\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\n\");\n \n \n }\n\n System.out.println(\"=================================\");\n System.out.println(\"Min: \" + DoubleStream.of(bestArray).min().getAsDouble());\n System.out.println(\"Max: \" + DoubleStream.of(bestArray).max().getAsDouble());\n System.out.println(\"Mean: \" + new Mean().evaluate(bestArray));\n System.out.println(\"Median: \" + new Median().evaluate(bestArray));\n System.out.println(\"Std. Dev.: \" + new StandardDeviation().evaluate(bestArray));\n System.out.println(\"=================================\");\n \n }",
"public Solution solve(Instance instance) {\n printSettings();\n\n generateInitialSolution(instance);\n\n int lastImprovement = 0, size = instance.getSize();\n long start = System.currentTimeMillis();\n\n for (int index = 0; !stop(index, lastImprovement, start); index++) {\n Solution next = getNeighbourSolution(size);\n if (generator.nextDouble() < Math.min(1.0, bound(index, next))) {\n currentSol = next;\n if (currentSol.getValue() > bestSol.getValue()) {\n bestSol = new Solution(currentSol);\n lastImprovement = 0;\n } else {\n lastImprovement++;\n }\n }\n }\n\n return bestSol;\n }",
"public float solveEqun(float[][] values, int uf, int eq) {\n float sol=0;\n float v=0,u=0,a=0,t=0,s=0;\n for (int i=0;i<3;i++) {\n for (int j=0;j<2;j++) {\n if (values[i][1] == 1)\n v = values[i][0];\n else if (values[i][1] == 2)\n u = values[i][0];\n else if (values[i][1] == 3)\n a = values[i][0];\n else if (values[i][1] == 4)\n t = values[i][0];\n else if (values[i][1] == 5)\n s = values[i][0];\n }\n }\n\n if (eq == 1) {\n if (uf == 1) {\n sol = u+(a*t);\n //System.out.println(\"u:\"+u);\n }\n else if (uf == 2) {\n sol = v - (a*t);\n //System.out.println(\"V:\"+v);\n }\n\n else if (uf == 3)\n sol = (v-u)/t;\n else if (uf == 4)\n sol = (v-u)/a;\n }\n\n else if (eq == 2) {\n if (uf == 5)\n sol = (float) ((u*t) + (0.5*a*t*t));\n else if (uf == 2)\n sol = (float) ((s-(0.5*a*t*t))/t);\n else if (uf == 3)\n sol = (float) ((s-(u*t))/(0.5*t*t));\n else if (uf == 4) {\n float sol1 = (float) ((-u+Math.sqrt(u*u+(4*0.5*a*t*t*s)))/(2*u));\n float sol2 = (float) ((-u-Math.sqrt(u*u+(4*0.5*a*t*t*s)))/(2*u));\n if (sol1<0)\n sol = sol2;\n else\n sol = sol1;\n }\n }\n\n else if (eq == 3) {\n if (uf == 1)\n sol = (float) Math.sqrt((2*a*s)-(u*u));\n else if (uf == 2)\n sol = (float) Math.sqrt((v*v)-(2*a*s));\n else if (uf == 3)\n sol = ((v*v)-(u*u))/(2*s);\n else if (uf == 5)\n sol = ((v*v)-(u*u))/(2*a);\n }\n\n return sol;\n }",
"private static void vel_step ( int N, double[] u, double[] v, double[] u0, double[] v0,\r\n\t\tfloat visc, float dt )\r\n\t\t{\r\n\t\tadd_source ( N, u, u0, dt ); add_source ( N, v, v0, dt );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\t//SWAP ( u0, u ); \r\n\t\t\r\n\t\tdouble[] temp;\r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t//draw_dens ( N, u );\r\n\t\tdiffuse ( N, 1, u, u0, visc, dt );\r\n\t\t//draw_dens ( N, u );\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t//SWAP ( v0, v ); \r\n\t\t//double[] temp;\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//draw_dens ( N, v );\r\n\t\t//draw_dens ( N, v0 );\r\n\t\tdiffuse ( N, 2, v, v0, visc, dt );\r\n\t\t//draw_dens ( N, v );\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t//SWAP ( u0, u ); \r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t\r\n\t\t//SWAP ( v0, v );\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\tadvect ( N, 1, u, u0, u0, v0, dt ); \r\n\t\tadvect ( N, 2, v, v0, u0, v0, dt );\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t}",
"public int run(Point xS, Point xE)\n throws OptimizerException, Exception\n {\n boolean terminate = false;\n boolean f1eqf2 = false;\n // Vector of points, used for parallel computation\n Point[] x = new Point[2];\n x[0] = new Point(xS.getDimensionContinuous(), xS.getDimensionDiscrete(), xS.getDimensionF());\n x[1] = (Point)x0.clone();\n \n x0 = (Point)xS.clone();\n x3 = (Point)xE.clone();\n \n dx = LinAlg.subtract(x3.getX(), x0.getX());\n double I = 1.; // interval length (in terms of alpha, which is normalized)\n nIntRed = 0; // zero-based step of interval division\n I *= getReductionFactor();\n x[1].setX( LinAlg.add(x0.getX(), LinAlg.multiply(I, dx)) );\n nIntRed++;\n I *= getReductionFactor();\n x[0].setX( LinAlg.add(x0.getX(), LinAlg.multiply(I, dx)) );\n // initial function evaluation\n\n x = getF(x);\n \tx1 = (Point)x[0].clone();\n x2 = (Point)x[1].clone();\n\n do\n {\n nIntRed++;\n I *=getReductionFactor();\n\n if (x2.getF(0) < x1.getF(0))\n { // data management\n fLowBor = x1.getF(0); // we need that for one of the stopping criteria\n x0 = (Point)x1.clone();\n x1 = (Point)x2.clone();\n // new point\n x2.setX( LinAlg.subtract(x3.getX(), LinAlg.multiply(I, dx)) );\n x2 = getF(x2);\n }\n else\n { // data management\n fLowBor = x2.getF(0); // we need that for one of the stopping criteria\n x3 = (Point)x2.clone();\n x2 = (Point)x1.clone();\n // new point\n x1.setX( LinAlg.add(x0.getX(), LinAlg.multiply(I, dx)) );\n x1 = getF(x1);\n }\n\n // check for null space of objective function, unless\n // stoCri is equal to one\n if (stoCri != 1 && x1.getF(0) == x2.getF(0))\n {\n if (f1eqf2) // the last two were also equal, so the\n terminate = true; // current three are equal\n f1eqf2 = true;\n }\n else // reset flag\n f1eqf2 = false;\n } while (iterate() && !terminate);\n\n // tolerance achieved or maximum number of iteration exceeded\n // store minimum value\n if (x1.getF(0) < x2.getF(0))\n {\n xLow = (Point)x0.clone();\n xMin = (Point)x1.clone();\n xUpp = (Point)x2.clone(); \n }\n else\n {\n xLow = (Point)x1.clone();\n xMin = (Point)x2.clone();\n xUpp = (Point)x3.clone(); \n }\n // if we got a null space\n if (terminate) return -2;\n // check whether the maximum number of iteration is exceeded\n if (stoCri == 1)\n if (!isDFltdFMin()) return -1;\n // if search has been successful\n return +1;\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tfloat a, b, c;\r\n\t\tSystem.out.println(\"Fill a, b, c: \");\r\n\t\ta = sc.nextFloat();\r\n\t\tb = sc.nextFloat();\r\n\t\tc = sc.nextFloat();\r\n\t\tfloat delta = (float) (Math.pow(b, 2) - 4 * a * c);\r\n\t\tif (delta < 0) {\r\n\t\t\tSystem.out.println(\"The equation has no solution!\");\r\n\t\t} else {\r\n\t\t\tif (delta == 0) {\r\n\t\t\t\tfloat x = -b / 2 * a;\r\n\t\t\t\tSystem.out.println(\"Solution x = \" + x);\r\n\t\t\t} else {\r\n\t\t\t\tdouble x1 = (-b - Math.sqrt(delta)) / 2 * a;\r\n\t\t\t\tdouble x2 = (-b + Math.sqrt(delta)) / 2 * a;\r\n\t\t\t\tSystem.out.println(\"Solution X1 = \" + x1);\r\n\t\t\t\tSystem.out.println(\"Solution X2 = \" + x2);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"private double f(double v, double s) {\n\t\treturn equation(v) - s;\r\n\t}",
"public LPSolution solve(double[][] xResults, double[][] yResults) throws GRBException {\n\t\tdouble intFeasTol = mSettings.getIntegralityTolerance();\n\t\tdouble feasTol = mSettings.getFeasibilityTolerance();\n\n\t\tGRBEnv env = new GRBEnv();\n\t\tGRBModel model = new GRBModel(env);\n\n\t\tGRBSolverUtils.configureToleranceParameters(model, intFeasTol, feasTol);\n\n\t\tint n = mExplicitMDP.getNumStates();\n\t\tint m = mExplicitMDP.getNumActions();\n\n\t\t// Initial state distribution\n\t\tdouble[] alpha = new double[n];\n\t\tArrays.fill(alpha, 1.0 / n);\n\n\t\t// Create variables: x_ia\n\t\t// Lower bound on variables: x_ia >= 0\n\t\tGRBVar[][] xVars = GRBSolverUtils.createOptimizationVars(\"x\", GRB.CONTINUOUS, n, m, 0.0,\n\t\t\t\tDouble.POSITIVE_INFINITY, model);\n\n\t\t// Create variables: y_ia\n\t\t// Lower bound on variables: y_ia >= 0\n\t\tGRBVar[][] yVars = GRBSolverUtils.createOptimizationVars(\"y\", GRB.CONTINUOUS, n, m, 0.0,\n\t\t\t\tDouble.POSITIVE_INFINITY, model);\n\n\t\t// Create variables: Deltax_ia (binary)\n\t\tString deltaxVarName = \"Deltax\";\n\t\tGRBVar[][] deltaxVars = GRBSolverUtils.createOptimizationVars(deltaxVarName, GRB.BINARY, n, m, 0.0, 1.0, model);\n\n\t\t// Create variables: Deltay_ia (binary)\n\t\tString deltayVarName = \"Deltay\";\n\t\tGRBVar[][] deltayVars = GRBSolverUtils.createOptimizationVars(deltayVarName, GRB.BINARY, n, m, 0.0, 1.0, model);\n\n\t\t// Set optimization objective\n\t\tGRBSolverUtils.setOptimizationObjective(mExplicitMDP, xVars, model);\n\n\t\t// Add constraints\n\t\taddC1Constraints(xVars, model);\n\t\taddC2Constraints(alpha, xVars, yVars, model);\n\n\t\t// Add constraints to ensure deterministic solution policy\n\t\tGRBSolverUtils.addDeltaConstraints(mExplicitMDP, deltaxVarName, deltaxVars, model);\n\t\tGRBSolverUtils.addDeltaConstraints(mExplicitMDP, deltayVarName, deltayVars, model);\n\n\t\t// For average-cost MDP, sum_i,a (x_ia) = 1; therefore, we can use X = 1\n\t\tGRBSolverUtils.addVarDeltaConstraints(1.0, mExplicitMDP, \"x\", xVars, deltaxVarName, deltaxVars, model);\n\n\t\t// Similarly, we use Y = 1\n\t\tGRBSolverUtils.addVarDeltaConstraints(1.0, mExplicitMDP, \"y\", yVars, deltayVarName, deltayVars, model);\n\n\t\t// Add (upper/lower bound) cost constraints, if any\n\t\tif (mSoftConstraints != null) {\n\t\t\t// Soft constraints\n\t\t\tCostConstraintUtils.addSoftCostConstraints(mSoftConstraints, mHardConstraints, mExplicitMDP, xVars, model);\n\t\t} else if (mHardConstraints != null) {\n\t\t\t// Hard constraints\n\t\t\tCostConstraintUtils.addHardCostConstraints(mHardConstraints, mExplicitMDP, xVars, model);\n\t\t}\n\n\t\t// Solve optimization problem for x_ia, y_ia, and Delta_ia\n\t\tmodel.optimize();\n\n\t\tint numSolutions = model.get(GRB.IntAttr.SolCount);\n\t\tdouble objectiveValue = -1;\n\n\t\tif (numSolutions > 0) {\n\t\t\t// Solution found\n\n\t\t\t// Objective value: sum_i,a (c_ia * x_ia)\n\t\t\tobjectiveValue = model.get(GRB.DoubleAttr.ObjVal);\n\n\t\t\t// Query results: optimal values of x_ia, y_ia, and Delta_ia\n\t\t\tdouble[][] grbXResults = model.get(GRB.DoubleAttr.X, xVars);\n\t\t\tdouble[][] grbYResults = model.get(GRB.DoubleAttr.X, yVars);\n\t\t\tdouble[][] grbDeltaxResults = model.get(GRB.DoubleAttr.X, deltaxVars);\n\t\t\tdouble[][] grbDeltayResults = model.get(GRB.DoubleAttr.X, deltayVars);\n\n\t\t\t// Copy x_ia and y_ia results to the return parameters\n\t\t\tSystem.arraycopy(grbXResults, 0, xResults, 0, grbXResults.length);\n\t\t\tSystem.arraycopy(grbYResults, 0, yResults, 0, grbYResults.length);\n\n\t\t\t// Consistency checks\n\t\t\tverifyAllConstraints(grbXResults, grbYResults, grbDeltaxResults, grbDeltayResults, alpha);\n\t\t\tassert GRBSolverUtils.consistencyCheckResults(grbXResults, grbDeltaxResults, mExplicitMDP, feasTol);\n\t\t\tassert GRBSolverUtils.consistencyCheckResults(grbYResults, grbDeltayResults, mExplicitMDP, feasTol);\n\t\t}\n\n\t\t// Dispose of model and environment\n\t\tmodel.dispose();\n\t\tenv.dispose();\n\n\t\t// LP solution\n\t\tLPSolution solution = new LPSolution(numSolutions > 0, objectiveValue);\n\t\tsolution.addSolution(\"x\", xResults);\n\t\tsolution.addSolution(\"y\", yResults);\n\t\treturn solution;\n\t}",
"public Solution solve(ISearchable domain) {\n if (domain == null)\n return null;\n ArrayList<AState> neighbors;\n Solution solution;\n domain.ResetVisit();\n pathSteps.add(domain.getStartState());\n domain.changeVisitTrue(domain.getStartState());\n numberOfNodes++;\n while (pathSteps.size() > 0) {\n AState temp = pathSteps.poll();\n if (domain.getGoalState().equals(temp)) {\n domain.setGoalState(temp);\n solution = finalSolution(temp);\n return solution;\n }\n neighbors = domain.getAllPossibleStates(temp);\n for (int i=0;i<neighbors.size();i++) {\n if (domain.isVisited(neighbors.get(i))==false) {\n numberOfNodes++;\n domain.changeVisitTrue(neighbors.get(i));\n neighbors.get(i).predecessor = temp;\n pathSteps.add(neighbors.get(i));\n }\n if (neighbors.get(i).equals(domain.getGoalState())) {\n neighbors.get(i).predecessor = temp;\n solution = finalSolution(neighbors.get(i));\n return solution;\n }\n }\n }\n return null;\n }",
"public MPolygon computeVertex_xyz(FOV f) {\r\n\r\n\t\tMPolygon mpolygon = new MPolygon();\r\n\r\n\t\tdouble radian1 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 2));\r\n\t\tdouble radian2 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 4));\r\n\t\tdouble radian3 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 4));\r\n\t\tdouble radian4 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 2));\r\n\t\tdouble radianD = MPolygon.toRadian(450 - f.getDirection());\r\n\r\n\t\tMPoint p1 = new MPoint();\r\n\t\tp1.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian1 * Math.PI / 180));\r\n\t\tp1.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian1 * Math.PI / 180));\r\n\r\n\t\tMPoint p2 = new MPoint();\r\n\t\tp2.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian2 * Math.PI / 180));\r\n\t\tp2.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian2 * Math.PI / 180));\r\n\r\n\t\tMPoint p3 = new MPoint();\r\n\t\tp3.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian3 * Math.PI / 180));\r\n\t\tp3.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian3 * Math.PI / 180));\r\n\r\n\t\tMPoint p4 = new MPoint();\r\n\t\tp4.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian4 * Math.PI / 180));\r\n\t\tp4.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian4 * Math.PI / 180));\r\n\r\n\t\tMPoint D = new MPoint();\r\n\t\tD.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radianD * Math.PI / 180));\r\n\t\tD.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radianD * Math.PI / 180));\r\n\r\n\t\tMPoint location = new MPoint();\r\n\t\tlocation.x = f.getLatitude();\r\n\t\tlocation.y = f.getLongitude();\r\n\t\tmpolygon.setP1(p1);\r\n\t\tmpolygon.setP2(p2);\r\n\t\tmpolygon.setP3(p2);\r\n\t\tmpolygon.setP4(p4);\r\n\t\tmpolygon.setD(D);\r\n\t\tmpolygon.setLocation(location);\r\n\r\n\t\treturn mpolygon;\r\n\r\n\t}"
] | [
"0.54548687",
"0.53475225",
"0.5335986",
"0.53311",
"0.52587265",
"0.51900876",
"0.5097988",
"0.5014909",
"0.5001854",
"0.49471658",
"0.49265844",
"0.4897458",
"0.48604444",
"0.47874138",
"0.47814336",
"0.47783303",
"0.47782648",
"0.47523785",
"0.47429347",
"0.47293398",
"0.47189394",
"0.4695428",
"0.46911946",
"0.46878153",
"0.46792096",
"0.46783993",
"0.46575165",
"0.4649517",
"0.4641013",
"0.46327642",
"0.46202523",
"0.46161947",
"0.46023193",
"0.45872548",
"0.45753202",
"0.4559853",
"0.4558436",
"0.4531035",
"0.4510137",
"0.45100582",
"0.4505437",
"0.4498898",
"0.44755995",
"0.44686893",
"0.44512966",
"0.4443273",
"0.44419587",
"0.44355708",
"0.44300586",
"0.44246414",
"0.4416707",
"0.4412352",
"0.4409771",
"0.4409175",
"0.44013172",
"0.4397959",
"0.43915144",
"0.43845746",
"0.4382224",
"0.4371374",
"0.43581146",
"0.43545833",
"0.43401396",
"0.4336372",
"0.43354732",
"0.43313614",
"0.43281707",
"0.43253294",
"0.43156",
"0.43094102",
"0.42976725",
"0.42871594",
"0.42863253",
"0.42685336",
"0.42626688",
"0.42626247",
"0.4257131",
"0.4256964",
"0.42565793",
"0.42560264",
"0.42534202",
"0.4246304",
"0.42364377",
"0.42359692",
"0.42355427",
"0.42341182",
"0.4233636",
"0.4232847",
"0.4209146",
"0.42088914",
"0.4195433",
"0.41948083",
"0.41911498",
"0.4182397",
"0.41821426",
"0.4177375",
"0.41765797",
"0.41748345",
"0.4171569",
"0.41682783"
] | 0.6790716 | 0 |
Create optimization problem maximizing Fv on (tpac,T,uw,d) inputs. | public static OptimizationProblem createOptimizationProblemTempMaxFv() {
return createOptimizationProblem(From.tpac_T_uw_d, To.Fv, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n//\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tint N= Integer.parseInt(st.nextToken());\n\t\tint T= Integer.parseInt(st.nextToken());\n\t\t\n\t\t//for each N, three possible problem sets (P, A, G)\n\t\t//and P (prep time: min), V (value)\n\t\t//P <= A <= G\n\t\t\n\t\t//given limit T\n\t\t//find max profit\n\t\tint[][] v = new int[N+1][3+1];\n\t\tint[][] w = new int[N+1][3+1];\n\t\t\n\t\t//one \n\t\t\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\tfor (int j = 1; j <= 3; j++) {\n\t\t\t\tw[i][j] = Integer.parseInt(st.nextToken());\n\t\t\t\tv[i][j] = Integer.parseInt(st.nextToken());\n\t\t\t}\n\t\t}\n//\t\tfor (int i = 1; i <= N; i++) {\n//\t\t\tfor (int j = 1; j <= 3; j++) {\n//\t\t\t\tSystem.out.println(w[i][j] + \" \"+ v[i][j]);\n//\t\t\t}\n//\t\t}\n\t\tint[][] dp = new int[2][T+1];\n\t\t//where k looks at the kth row of the values/weight array\n\t\tfor (int k = 1; k <= N; k++) {\n\t\t\tfor (int x = 0; x <= T; x++) {\n\t\t\t\t//going through each weight and value\n\t\t\t\tboolean ran = false;\n\t\t\t\tfor (int a = 1; a <= 3; a++) {\t\t\t\t\t\n\t\t\t\t\tif (w[k][a] > x) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tran = true;\n\t\t\t\t\t\tdp[1][x] = Math.max(Math.max(dp[0][x],dp[0][x-w[k][a]] + v[k][a]),dp[1][x]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!ran) {\n\t\t\t\t\tdp[1][x] = dp[0][x];\n\t\t\t\t}\n\t\t\t}\n\t\t\tdp[0] = dp[1].clone();\n//\t\t\tfor (int[] row: dp) {\n//\t\t\t\tfor (int m: row) {\n//\t\t\t\t\tSystem.out.print(m + \" \");\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println();\n//\t\t\t}\n\t\t}\n\t\t\n//\t\tfor (int[] row: dp) {\n//\t\t\tfor (int m: row) {\n//\t\t\t\tSystem.out.print(m + \" \");\n//\t\t\t}\n//\t\t\tSystem.out.println();\n//\t\t}\n\t\tSystem.out.println(dp[1][T]);\n\t}",
"private <T extends TType> void createAdamaxSlot(Output<T> v) {\n Operand<T> firstMomentInitializer =\n tf.fill(tf.shape(v), tf.dtypes.cast(tf.constant(0.0f), v.type()));\n createSlot(v.asOutput(), FIRST_MOMENT, firstMomentInitializer);\n Operand<T> secondMomentInitializer =\n tf.fill(tf.shape(v), tf.dtypes.cast(tf.constant(0.0f), v.type()));\n createSlot(v.asOutput(), SECOND_MOMENT, secondMomentInitializer);\n }",
"public TTPSolution SH2() {\n \n // get TTP data\n long[][] D = ttp.getDist();\n int[] A = ttp.getAvailability();\n double maxSpeed = ttp.getMaxSpeed();\n double minSpeed = ttp.getMinSpeed();\n long capacity = ttp.getCapacity();\n double C = (maxSpeed - minSpeed) / capacity;\n double R = ttp.getRent();\n int m = ttp.getNbCities(),\n n = ttp.getNbItems();\n TTPSolution s = new TTPSolution(m, n);\n int[] x = s.getTour(),\n z = s.getPickingPlan();\n \n /*\n * the tour\n * generated using greedy algorithm\n */\n x = linkernTour();\n z = zerosPickingPlan();\n Deb.echo(x);\n Deb.echo(z);\n \n /*\n * the picking plan\n * generated so that the TTP objective value is maximized\n */\n ttp.objective(s);\n \n // partial distance from city x_i\n long di;\n \n // partial time with item k collected from city x_i\n double tik;\n \n // item scores\n Double[] score = new Double[n];\n \n // total time with no items collected\n double t_ = s.ft;\n \n // total time with only item k collected\n double tik_;\n \n // fitness value\n double u[] = new double[n];\n \n for (int k=0; k<n; k++) {\n \n int i;\n for (i=0; i<m; i++) {\n if (A[k]==x[i]) break;\n }\n //P.echo2(\"[\"+k+\"]\"+(i+1)+\"~\");\n \n // time to start with\n tik = i==0 ? .0 : s.timeAcc[i-1];\n int iw = ttp.weightOf(k),\n ip = ttp.profitOf(k);\n \n // recalculate velocities from start\n di = 0;\n for (int r=i; r<m; r++) {\n \n int c1 = x[r]-1;\n int c2 = x[(r+1)%m]-1;\n \n di += D[c1][c2];\n tik += D[c1][c2] / (maxSpeed-iw*C);\n }\n \n score[k] = ip - R*tik;\n tik_ = t_ - di + tik;\n u[k] = R*t_ + ttp.profitOf(k) - R*tik_;\n //P.echo(k+\" : \"+u[k]);\n }\n \n Quicksort<Double> qs = new Quicksort<Double>(score);\n qs.sort();\n int[] si = qs.getIndices();\n int wc = 0;\n for (int k=0; k<n; k++) {\n int i = si[k];\n int wi = ttp.weightOf(i);\n // eliminate useless\n if (wi+wc <= capacity && u[i] > 0) {\n z[i] = A[i];\n wc += wi;\n }\n }\n \n ttp.objective(s);\n \n return s;\n }",
"public void estimateParameter(){\r\n int endTime=o.length;\r\n int N=hmm.stateCount;\r\n double p[][][]=new double[endTime][N][N];\r\n for (int t=0;t<endTime;++t){\r\n double count=EPS;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]=fbManipulator.alpha[t][i]*hmm.a[i][j]*hmm.b[i][j][o[t]]*fbManipulator.beta[t+1][j];\r\n count +=p[t][j][j];\r\n }\r\n }\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]/=count;\r\n }\r\n }\r\n }\r\n double pSumThroughTime[][]=new double[N][N];\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]=EPS;\r\n }\r\n }\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n //rebuild gamma\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i) fbManipulator.gamma[t][i]=0;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n fbManipulator.gamma[t][i]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n double gammaCount=EPS;\r\n //maximum parameter\r\n for (int i=0;i<N;++i){\r\n gammaCount+=fbManipulator.gamma[0][i];\r\n hmm.pi[i]=fbManipulator.gamma[0][i];\r\n }\r\n for (int i=0;i<N;++i){\r\n hmm.pi[i]/=gammaCount;\r\n }\r\n\r\n for (int i=0;i<N;++i) {\r\n gammaCount = EPS;\r\n for (int t = 0; t < endTime; ++t) gammaCount += fbManipulator.gamma[t][i];\r\n for (int j = 0; j < N; ++j) {\r\n hmm.a[i][j] = pSumThroughTime[i][j] / gammaCount;\r\n }\r\n }\r\n for (int i=0;i<N;i++){\r\n for (int j=0;j<N;++j){\r\n double tmp[]=new double[hmm.observationCount];\r\n for (int t=0;t<endTime;++t){\r\n tmp[o[t]]+=p[t][i][j];\r\n }\r\n for (int k=0;k<hmm.observationCount;++k){\r\n hmm.b[i][j][k]=(tmp[k]+1e-8)/pSumThroughTime[i][j];\r\n }\r\n }\r\n }\r\n //rebuild fbManipulator\r\n fbManipulator=new HMMForwardBackwardManipulator(hmm,o);\r\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tint T = sc.nextInt();\r\n\t\t\r\n\t\tfor (int z = 1; z <= T; z++) {\r\n\t\t\tint N = sc.nextInt();\r\n\t\t\tint[] input = new int[N+1];\r\n\t\t\t\r\n\t\t\tfor (int j = 1; j <= N; j++) {\r\n\t\t\t\tinput[j] = sc.nextInt();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint[] weight = new int[N+1];\r\n\t\t\tint[] memWeight = new int[N+1];\r\n\t\t\t\r\n\t\t\tint cnt = 1;\r\n\t\t\tweight[1] = 1;\r\n\t\t\tmemWeight[1] = input[1]; \r\n\t\t\tfor (int j = 2; j <= N; j++) {\r\n\t\t\t\tfor (int k = cnt; k >= 1 ; k--) {\r\n\t\t\t\t\tif(input[j] > memWeight[k] && k == cnt) {\r\n\t\t\t\t\t\tmemWeight[++cnt] = input[j];\r\n\t\t\t\t\t\tweight[j] = cnt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(input[j] > memWeight[k] && k < cnt) {\r\n\t\t\t\t\t\tmemWeight[k+1] = input[j];\r\n\t\t\t\t\t\tweight[j] = cnt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(k == 1) {\r\n\t\t\t\t\t\tmemWeight[k] = input[j] < memWeight[k] ? input[j] : memWeight[k];\r\n\t\t\t\t\t\tweight[j] = cnt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// result\r\n\t\t\tint maxV = -1;\r\n\t\t\tfor (int i = 1; i <= N; i++) {\r\n\t\t\t\tif(maxV < weight[i]) {\r\n\t\t\t\t\tmaxV = weight[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"#\"+z+\" \"+maxV);\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\t}",
"public void maximize()\n\t{\n\t\tint i,j,max=cost[0][0];\n\t\t\n\t\tfor(i=0;i<n;i++)\n\t\t{\n\t\t\tfor(j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]>max)\n\t\t\t\t{\n\t\t\t\t\tmax=cost[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(i=0;i<n;i++)\n\t\t{\n\t\t\tfor(j=0;j<n;j++)\n\t\t\t{\t\t\n\t\t\t\tcost[i][j]=max-cost[i][j];\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic FTrend execute(Problem problem, int maxEvaluations) throws Exception\n\t{\n\t\tFTrend FT = new FTrend(); // Create a fitness trend instance\n\t\tint problemDimension = problem.getDimension(); // Store the dimensionality of the problem domain\n\t\tdouble[][] bounds = problem.getBounds(); // Store the bounds of each variable in the problem domain\n\t\t\n\t\tdouble[] best = new double[problemDimension]; // Initialise the best known solution variable\n\t\tdouble fBest = Double.NaN; // Initialise the fitness value, i.e. \"f(x)\", of the best solution known\n\t\tint k = 0; // Initialise the incremental counter variable\n\t\t\n\t\t// Self-Adaptive Differential Evolution (jDE - jitterDE) variables\n\t\tint populationSize \t \t\t\t= getParameter(\"p0\").intValue(); // Initialise the population size \n\t\t//double scalingFactor \t\t\t= getParameter(\"p1\").doubleValue(); // Initialise the scaling factor of the mutation operator\n\t\t//double crossoverRate \t\t\t= getParameter(\"p2\").doubleValue(); // Initialise the crossover rate of the binomial crossover operator\n\t\tdouble scalingFactorLowerBound \t= getParameter(\"p3\").doubleValue(); // Initialise the upper bound value of the scaling factor of the mutation operator\n\t\tdouble scalingFactorUpperBound \t= getParameter(\"p4\").doubleValue(); // Initialise the lower bound value of the scaling factor of the mutation operator\n\t\tdouble tauOne \t\t\t\t\t= getParameter(\"p5\").doubleValue(); // Initialise the first random probability controlling the scaling factor of the mutation operator\n\t\tdouble tauTwo \t\t\t\t\t= getParameter(\"p6\").doubleValue(); // Initialise the second random probability controlling the binomial crossover rate of the crossover operator\n\t\t\n\t\tdouble[] scalingFactor = new double[populationSize]; // Initialise the scaling factor of the mutation operator\n\t\tdouble[] crossoverRate = new double[populationSize]; // Initialise the crossover rate of the binomial crossover operator\n\t\t\n\t\tdouble[][] population = new double[populationSize][problemDimension]; // Initialise the population of individuals (solutions) variable\n\t\tdouble[] solutionFitness = new double[populationSize]; // Initialise the fitness of a solution (individual) variable\n\t\t\n\t\t// Short Distance Exploration (SDE) variables\n\t\tdouble alpha \t\t\t\t= getParameter(\"p7\"); // Initialise the alpha cut value of the length of the problems decision space\n\t\tdouble proceduralIterations = getParameter(\"p8\").intValue(); // Initialise the procedural iteration budget variable\n\t\t\n\t\tdouble fShort = fBest; // Initialise the fitness value, i.e. \"f(x)\", of the trial solution\n\t\tdouble[] xShort = best; // Initialise the trial solution variable\n\t\tdouble[] exploratoryRadius = new double[problemDimension]; // Initialise the exploratory radius variable for the Short Distance Exploration (S) algorithm\n\t\t\n\t\t// Evaluate initial population of individuals\n\t\tfor (int i = 0; i < populationSize; i++) // For the size of the population of individuals (solutions), do the following\n\t\t{\n\t\t\tdouble[] initialSolution = generateRandomSolution(bounds, problemDimension); // Generate the initial solution (guess)\n\t\t\t\n\t\t\tfor (int j = 0; j < problemDimension; j++) // For the dimensionality of the problem, do the following\n\t\t\t{\n\t\t\t\tpopulation[i][j] = initialSolution[j]; // Initialise the iterated solution (individual) that comprises the population, to the initial solution randomly generated \n\t\t\t}\n\t\t\t\n\t\t\tsolutionFitness[i] = problem.f(population[i]); // Calculate and store the fitness (value) of the iterated solution (individual)\n\t\t\tk++; // Increment the counter to near the computational budget\t\t\n\n\t\t\tif (i == 0 || solutionFitness[i] < fBest) // If the solution generated is the first solution in the population or the fitness of the solution is better than the fitness of the best known solution, do the following\n\t\t\t{\n\t\t\t\tfBest = solutionFitness[i]; // Store the iterated solutions (individuals) fitness (value) as the best known solution\n\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\n\t\t\t\tfor (int j = 0; j < problemDimension; j++) // For the dimensionality of the problem, do the following\n\t\t\t\t{\n\t\t\t\t\tbest[j] = population[i][j]; // Update the best solution to the points comprising the iterated solution (individual) in the population\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (i == 0 || k % 100 == 0) // If the iterated individual in the population is first individual in the population or the current iteration is divisible by '100' and has no remainder, do the following\n\t\t\t{\n\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Main loop\n\t\twhile (k < maxEvaluations) // While the computational budget has not been met, do the following\n\t\t{\n\t\t\tdouble[][] nextGeneration = new double[populationSize][problemDimension]; // Reinitialise the next generation of individuals representing the population variable\n\t\t\t\n\t\t\tfor (int j = 0; j < populationSize && k < maxEvaluations; j++) // For the size of the population of individuals (solutions) and whilst within the computational budget, do the following\n\t\t\t{\n\t\t\t\tint fitnessTrendPopulated = 0; // Initialise the fitness trend populated variable\n\t\t\t\t\n\t\t\t\tdouble[] mutantIndividual \t = new double[problemDimension]; // Reinitialise the mutated individuals variable\n\t\t\t\tdouble[] crossoverIndividual = new double[problemDimension]; // Reinitialise the offspring variable\n\t\t\t\tdouble[] populationIndividual = new double[problemDimension]; // Reinitialise the individual (solution) comprising the population variable \n\t\t\t\t\n\t\t\t\tdouble currentFitness \t= Double.NaN; // Reinitialise the fitness of the current solution (individual)\n\t\t\t\tdouble crossoverFitness = Double.NaN; // Reinitialise the fitness of the offspring solution (individual)\n\t\t\t\t\n\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t{\n\t\t\t\t\tpopulationIndividual[l] = population[j][l]; // Initialise the individual (solution) in the population to the iterated individual in the population\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrentFitness = solutionFitness[j]; // Set the current fitness (value) to the fitness of the current individual (solution)\n\t\t\t\n\t\t\t\t// Update the scaling factor (F)\n\t\t\t\tif (RandUtils.random() < tauOne) // If the randomly generated number is smaller than the probability of controlling the scaling factor of the mutation operator, do the following\n\t\t\t\t{\n\t\t\t\t\tscalingFactor[j] = scalingFactorLowerBound + RandUtils.random() * scalingFactorUpperBound; // Resample the scaling factor for the iterated individual of the population\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// DE/rand/1 mutation operator\n\t\t\t\tmutantIndividual = originalMutation(population, scalingFactor[j], problemDimension); // Function call, mutate the population of individuals to obtain a new mutated individual\n\t\t\t\t//mutantIndividual = toro(mutantIndividual, bounds); // Correct the mutated individual (solution) that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\n\t\t\t\t// Update the crossover rate (CR)\n\t\t\t\tif (RandUtils.random() < tauTwo) // If the randomly generated number is smaller than the probability of controlling the crossover rate of the binomial crossover operator, do the following\n\t\t\t\t{\n\t\t \tcrossoverRate[j] = RandUtils.random(); // Resample the crossover rate for the iterated individual of the population\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Binomial crossover operator\n\t\t\t\tcrossoverIndividual = binomialCrossover(populationIndividual, mutantIndividual, crossoverRate[j], problemDimension); // Function call, crossover the current individual and the mutated individual, binomially (recombination)\n\t\t\t\tcrossoverIndividual = toro(crossoverIndividual, bounds); // Correct the offspring individual (solution) that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\n\t\t\t\tcrossoverFitness = problem.f(crossoverIndividual); // Calculate and store the fitness (value) of the offspring solution (individual)\n\t\t\t\tk++; // Increment the counter to near the computational budget\n\t\t\t\t\n\t\t\t\t// Replace the original individual in the population\n\t\t\t\tif (crossoverFitness < currentFitness) // If the offspring individual is fitter than the original individual in the population, do the following\n\t\t\t\t{\n\t\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t{\n\t\t\t\t\t\t// Survivor selection (1-to-1 spawning)\n\t\t\t\t\t\tnextGeneration[j][l] = crossoverIndividual[l]; // Replace the original individual (solution) in the population with the offspring individual (solution)\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tsolutionFitness[j] = crossoverFitness; // Update the fitness of the individual (solution) to the fitness of the offspring individual (solution)\n\t\t\t\t\t\n\t\t\t\t\t// Update the best known solution\n\t\t\t\t\tif (crossoverFitness < fBest) // If the offspring individual (solution) is fitter than the best known individual (solution), do the following\n\t\t\t\t\t{\n\t\t\t\t\t\tfBest = crossoverFitness; // Update the fitness (value) of the best known solution to the fitness (value) of the offspring individual (solution)\n\t\t\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tbest[l] = crossoverIndividual[l]; // Update the best known individual (solution) to the offspring individual (solution)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Reset exploratory radius\n\t\t\t\t\t\tfor (int i = 0; i < problemDimension; i++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\texploratoryRadius[i] = alpha * (bounds[i][1] - bounds[i][0]); // Calculate and the exploratory radius for each variable in the problem domain\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Main loop\n\t\t\t\t\t\tfor (int l = 0; l < proceduralIterations && k < maxEvaluations; l++) // For the size of the procedural iteration budget and whilst within the computational budget, do the following\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboolean improved = false; // Initialise the improved variable (reinitialise every iteration)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int i = 0; i < problemDimension && k < maxEvaluations; i++) // For the dimensionality of the problem and whilst within the computational budget, do the following\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\txShort[i] = best[i] - exploratoryRadius[i]; // Perturb the currently iterated variable in the problem domain, negatively, along the corresponding axis (exclusively) \n\t\t\t\t\t\t\t\txShort = toro(xShort, bounds); // Correct the trial solution that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfShort = problem.f(xShort); // Calculate the new fitness value of the trial solution\n\t\t\t\t\t\t\t\tk++; // Increment the counter to near the computational budget\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (fShort <= fBest) // If the trial solution is an improvement or equivalent to the best known solution, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tbest[i] = xShort[i]; // Update the best known solution to the current trial solution (one variable perturbed at each iteration)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfBest = fShort; // Store the fitness value of the improved trial solution\n\t\t\t\t\t\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\timproved = true; // The trial solution is an improvement or equivalent to the best known solution\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (k < maxEvaluations) // Else if the trial solution is not an improvement to the best solution found and its within the computational budget, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\txShort[i] = best[i] + (exploratoryRadius[i] / 2); // Perturb the currently iterated variable in the problem domain, positively (half-step), along the corresponding axis (exclusively) \n\t\t\t\t\t\t\t\t\txShort = toro(xShort, bounds); // Correct the trial solution that may exist out of the bounds of the search space (problem domain)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfShort = problem.f(xShort); // Calculate the new fitness value of the trial solution\n\t\t\t\t\t\t\t\t\tk++; // Increment the counter to near the computational budget\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (fShort <= fBest) // If the trial solution is an improvement or equivalent to the best known solution, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbest[i] = xShort[i]; // Update the best known solution to the current trial solution (one variable perturbed at each iteration)\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tfBest = fShort; // Store the fitness value of the improved trial solution\n\t\t\t\t\t\t\t\t\t\t//FT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\timproved = true; // The trial solution is an improvement or equivalent to the best known solution\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse // Else if the trial solution is not an improvement to the best solution found, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\txShort[i] = best[i]; // Return to the original point after the perturbations, as an improvement could not be recognised\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (improved == false) // If the current best solution has never improved from the initial best solution, do the following\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor (int i = 0; i < exploratoryRadius.length; i++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\texploratoryRadius[i] = exploratoryRadius[i] / 2; // Store the exploratory radius for each variable in the problem domain to itself, halved (closer search from initial solution in case the initial guess is the optimum)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse // Else if the current best solution has improved from the initial best solution, do the following\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor (int i = 0; i < problemDimension; i++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextGeneration[j][i] = best[i]; // Replace the original individual (solution) in the population with the best known solution (individual)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tsolutionFitness[j] = fBest; // Update the fitness of the individual (solution) to the fitness of the best known solution (individual)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse // Else if the offspring individual is not fitter than the original individual in the population, do the following\n\t\t\t\t{\n\t\t\t\t\tfor (int l = 0; l < problemDimension; l++) // For the dimensionality of the problem, do the following\n\t\t\t\t\t{\n\t\t\t\t\t\tnextGeneration[j][l] = populationIndividual[l]; // Restore the design variables (genes) of the original individual (solution) as the updated individual (solution)\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tsolutionFitness[j] = currentFitness; // Restore the fitness (value) of the solution to the fitness (value) of the iterated individual (solution)\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (k % 100 == 0 && fitnessTrendPopulated != k) // If the current iteration is divisible by '100' and has no remainder whilst the fitness trend has not been populated for the current iteration, do the following\n\t\t\t\t{\n\t\t\t\t\tFT.add(k, fBest); // Add the best solution found in this iteration to the fitness trend (saved to a .txt file)\n\t\t\t\t\tfitnessTrendPopulated = k; // The fitness trend has been populated for the current iteration\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Survivor selection (1-to-1 spawning)\n\t\t\tpopulation = nextGeneration; // Update the current population of individuals to the next generation of fitter individuals\n\t\t}\n\t\t\n\t\tfinalBest = best; // Store the final iteration of the best known solution\n\t\tFT.add(k, fBest); // Add the final iteration of the best known solution to the fitness trend (saved to a .txt file)\n\n\t\treturn FT; // Return the fitness trend\n\t}",
"public static void main(String[] args) {\n double[] vArr = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75};\n double[] tempArr = {-40, -30, -20, -10, 0, 10, 20, 30, 40, 50};\n //1. utwórz tablice 2-wymiarowa\n //2. potrzebuje: typprzechowanej wartosci i rozmiar, czyli\n //typ: double\n //rozm w kierunku temp.: -40, -30, -20, ... 50 -> 10 elementow\n //rozm w kierunku v: 5, 10, 15, 20, 25, -> 15 elelmentow\n double[][] resultMatrix = new double[vArr.length][tempArr.length];\n\n //3. rM(1, 3) = f(10, -10) = -7,5;\n //Odczytac wartosc v i temp do obliczen i podstawic do wzoru - wynik umiescic w odp miejscu tab rM\n for (int v = 0; v < vArr.length; v++){\n for (int t = 0; t < tempArr.length; t++){\n resultMatrix[v][t] = 35.74 + 0.6215 * tempArr[t] + (0.4275 * tempArr[t] - 35.75) * Math.pow(vArr[v], 0.16);\n }\n }\n\n //mam juz uzupelniona cala tab wartosci - wyswietlic\n for (int v = 0; v < vArr.length; v++){\n for (int t = 0; t < tempArr.length; t++){\n System.out.println(String.format(\"f(%d, %d) = %f\", (int) vArr[v], (int) tempArr[t], resultMatrix[v][t]));\n }\n }\n System.out.println(\"Tabela wartosci: \");\n for (int v = 0; v < vArr.length; v++) {\n for (int t = 0; t < tempArr.length; t++){\n System.out.println(resultMatrix[v][t] + \"\\t\");\n }\n System.out.println();\n }\n System.out.println(\"Podaj v: <5, 10, 15... 75>\");\n //5 -> vArr[0]\n //75 -> vArr[14]\n //userInput/5 - 1\n Scanner sc = new Scanner(System.in);\n int userInput = sc.nextInt();\n int vIdx = userInput / 5 - 1;\n System.out.println(\"Podaj temp: <-40, -30... 50>\");\n userInput = sc.nextByte();\n int tempIdx = (userInput + 40) / 10;\n\n System.out.println(String.format(\"f(%d, %d) = %f\", (int) vArr[vIdx], (int) tempArr[tempIdx], resultMatrix[vIdx][tempIdx]));\n }",
"public int perform_LMVM() {\n if (_inequality_width > 0) {\n int nvars = _fb.Size() * 2;\n double[] x = new double[nvars];\n \n // INITIAL POINT\n for (int i = 0; i < nvars / 2; i++) {\n x[i] = _va.get(i);\n x[i + _fb.Size()] = _vb.get(i);\n }\n \n // int info = BLMVMSolve(x, nvars);\n \n for (int i = 0; i < nvars / 2; i++) {\n _va.set(i, x[i]);\n _vb.set(i, x[i + _fb.Size()]);\n _vl.set(i, _va.get(i) - _vb.get(i));\n }\n \n return 0;\n } else {\n \n int nvars = _fb.Size();\n double[] x = new double[nvars];\n \n // INITIAL POINT\n for (int i = 0; i < nvars; i++) {\n x[i] = _vl.get(i);\n }\n \n // int info = BLMVMSolve(x, nvars);\n \n for (int i = 0; i < nvars; i++) {\n _vl.set(i, x[i]);\n }\n \n return 0;\n }\n }",
"public void calcInc(int np)\n\t{\n \n findSpecEq();\n int nofc=numberOfComponents;\n fvec.timesEquals(0.0);\n fvec.set(nofc+1,0,1.0);\n Matrix dxds=Jac.solve(fvec);\n if (np<5)\n {\n double dp=0.01;\n ds=dp/dxds.get(nofc+1,0);\n Xgij.setMatrix(0,nofc+1,np-1,np-1,u);\n dxds.timesEquals(ds);\n // dxds.print(0,10);\n u.plusEquals(dxds);\n // Xgij.print(0,10);\n// u.print(0,10);\n }\n else\n {\n //System.out.println(\"iter \" +iter + \" np \" + np);\n if (iter>6)\n { \n ds *= 0.5;\n System.out.println(\"ds > 6\");\n }\n \n else\n {\n if (iter<3) {\n ds *= 1.5;\n }\n if (iter==3) {\n ds *= 1.1;\n }\n if (iter==4) {\n ds *= 1.0;\n }\n if (iter>4) {\n ds *= 0.5;\n }\n \n// Now we check wheater this ds is greater than dTmax and dPmax.\n if(Math.abs(system.getTemperature()*dxds.get(nofc,0)*ds)>dTmax){\n // System.out.println(\"true T\");\n ds=sign(dTmax/system.getTemperature()/Math.abs(dxds.get(nofc,0)),ds);\n }\n \n if(Math.abs(system.getPressure()*dxds.get(nofc+1,0)*ds)>dPmax)\n {\n ds=sign(dPmax/system.getPressure()/Math.abs(dxds.get(nofc+1,0)),ds);\n // System.out.println(\"true P\");\n }\n if (etterCP2) {\n etterCP2=false;\n ds = 0.5*ds;\n }\n \n Xgij.setMatrix(0,nofc+1,0,2,Xgij.getMatrix(0,nofc+1,1,3)); \n Xgij.setMatrix(0,nofc+1,3,3,u);\n s.setMatrix(0,0,0,3,Xgij.getMatrix(speceq,speceq,0,3));\n // s.print(0,10);\n // System.out.println(\"ds1 : \" + ds);\n calcInc2(np);\n // System.out.println(\"ds2 : \" + ds);\n \n// Here we find the next point from the polynomial.\n \n }\n }\n }",
"public boolean LocalImprovementDNF (TableVar Variables, TableDat Examples) {\r\n IndDNF solucion = new IndDNF(Variables.getNVars(), Variables);\r\n QualityMeasures res, new_res;\r\n int mejor, cambio;\r\n int[] indices = new int[Variables.getNVars()];\r\n float[] evalua = new float[Variables.getNVars()];\r\n boolean improvement = true;\r\n boolean retValue = false;\r\n int control;\r\n\r\n // Store the pos of the best guy in \"mejor\"\r\n mejor = poblac.getBestGuy();\r\n\r\n // Copy in \"solucion\" the rule to improve\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n for (int j=0; j<=Variables.getNLabelVar(i); j++)\r\n solucion.setCromElemGene(i, j, poblac.getCromElemGene(mejor,i,j));\r\n\r\n // Evaluate de rule and get the measures\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++; // Increment the number of trials\r\n res = solucion.getMedidas();\r\n\r\n control = 1;\r\n\r\n while ((improvement)&&(control<Variables.getNVars())) {\r\n improvement = false; // By now, there is no improvement\r\n for (int i=0; i<Variables.getNVars(); i++) {\r\n indices[i]=i;\r\n // It does not matter if the variable is discrete or continuous\r\n if (solucion.getCromElemGene(i,Variables.getNLabelVar(i))==0)\r\n // If variable does not actually takes part in the rule\r\n evalua[i] = -1;\r\n else {\r\n // The initial value is not stored cause we know the value is 1\r\n solucion.setCromElemGene(i, Variables.getNLabelVar(i),0);\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++;\r\n new_res = solucion.getMedidas();\r\n\r\n if ((new_res.getCnf() >= res.getCnf())&&(new_res.getSup() >= res.getSup())) {\r\n evalua[i] = new_res.getSup();\r\n improvement = true;\r\n }\r\n else\r\n evalua[i]=-1;\r\n // Restore initial values of \"solucion\"\r\n solucion.setCromElemGene(i, Variables.getNLabelVar(i), 1);\r\n }\r\n }\r\n\r\n if (improvement) {\r\n Utils.OrCrecIndex (evalua,0,Variables.getNVars()-1,indices);\r\n cambio = indices[Variables.getNVars()-1];\r\n for (int j=0; j<=Variables.getNLabelVar(cambio); j++)\r\n solucion.setCromElemGene(cambio, j, 0);\r\n\r\n res.setSup(evalua[Variables.getNVars()-1]);\r\n // Important: take into account not to eliminate all the variables of the rule\r\n\r\n // If there is improvement, set return value to true\r\n retValue = true;\r\n control++;\r\n\r\n }\r\n } // End while \"improvement\"\r\n\r\n // Store the new rule if it was improved\r\n if (retValue==true){\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n for (int j=0; j<=Variables.getNLabelVar(i); j++)\r\n poblac.setCromElemGene(mejor, i, j, solucion.getCromElemGene(i,j));\r\n poblac.setIndivEvaluated(mejor,false);\r\n }\r\n\r\n return retValue;\r\n\r\n }",
"max_values OptimizeCargo(ArrayList<ore_excavation> oe, double wt,\n int index) {\n int i;\n double weight = 0.0;\n max_values mv;\n max_values new_mv = new max_values();\n /*\n \t\t * I am making a subset of the original vector because I\n \t\t * will be taking mined minerals out to test if adding\n \t\t * it to the cargo will maximize my value. I may need to\n \t\t * remove this mineral from the cargo and use another.\n \t\t *\n \t\t * But the beauty of recursion is that if the mineral does\n \t\t * not fit, unwinding the stack frames returns the\n \t\t * algorithm to a previous state to try other combinations of\n \t\t * minerals.\n \t\t *\n \t\t * Making a copy of the input vector allows this to happen.\n */\n ArrayList<ore_excavation> ro = new ArrayList<ore_excavation>(oe);\n\n /* Loop over all remaining minerals in subset */\n for (i = index; i < ro.size(); i++) {\n\n ore_excavation o = ro.get(i);\n\n weight = wt - o.ore_mass;\n\n if (weight >= 0.0) {\n /*\n \t\t\t\t * Weight will work. Now make the working\n \t\t\t\t * set smaller and try more minerals.\n \t\t\t\t * Pass the smaller set of remaining minerals\n \t\t\t\t * to try to add them to the cargo.\n */\n ro.remove(i); // Make set smaller.\n mv = OptimizeCargo(ro, weight, 0);\n mv.value += o.ore_value;\n\n if (mv.value > new_mv.value) {\n new_mv.value = mv.value;\n new_mv.weight = mv.weight + o.ore_mass;\n }\n continue;\n }\n }\n return new_mv;\n }",
"public abstract double[] getMaximumValues(List<AbstractObjective> objectives, List<? extends Solution<?>> solutions) ;",
"void findFeasible() {\n\n\t\tfor( int u = 0; u < neg.length; u++ ) {\t\n\t\t\tint i = neg[u];\n\t\t\tfor( int v = 0; v < pos.length; v++ ) {\t\n\t\t\t\tint j = pos[v];\n\t\t\t\tf[i][j] = -delta[i] < delta[j]? -delta[i]: delta[j];\n\t\t\t\tdelta[i] += f[i][j];\n\t\t\t\tdelta[j] -= f[i][j];\n\t\t\t}\n\t\t}\n\t}",
"public float work(float ds, float v);",
"public abstract Vector4fc max(IVector4f v);",
"public static TempResult max(int allowedWeight, Set<Item> items) {\n\t\tint[] values=new int[items.size()];\n\t\tint[] weights=new int[items.size()];\n\t\t\n\n\t\tArrayList<Item> items2=new ArrayList<Item>(items);\n\t\tfor (int i=0; i<items2.size(); i++) {\n\t\t\tvalues[i]=items2.get(i).value;\n\t\t\tweights[i]=items2.get(i).weight;\n\t\t}\n\t\t\n int[][] totalValue = new int[values.length+1][allowedWeight+1];\n boolean[][] includedorNot = new boolean[values.length+1][allowedWeight+1];\n \n //We introduce item one by one to the system.\n //For each introduced item, we consider the maximal profit\n //for weight=[0:allowedWeight]\n for (int i=0; i<values.length; i++) {\n \t//introduce item i into the system.\n \tint val=values[i];\n \tint weight=weights[i];\n \t\n \tint itemIndex=i+1;\n \t\n \tfor (int w=1; w<=allowedWeight; w++) {\n \t\t\n \t\t//Zero copy of ith item; i-1 is calculated already\n \t\tint profit1=totalValue[itemIndex-1][w];\n \t\t\n \t\t//one copy of ith item.\n \t\tint profit2=Integer.MIN_VALUE;\n \t\tif (w-weight>=0) {\n \t\t\t//for a particular targeted weight, add item i does not overflow the targeted weight.\n \t\t\tprofit2=totalValue[itemIndex-1][w-weight]+val;\n \t\t}\n \t\t\n \t\tif (profit1>profit2) {\n \t\t\tincludedorNot[itemIndex][w]=false;\n \t\t\ttotalValue[itemIndex][w]=profit1;\n \t\t} else {\n \t\t\tincludedorNot[itemIndex][w]=true;\n \t\t\ttotalValue[itemIndex][w]=profit2;\n \t\t}\n \t}\n }\n\t\t\n \n TempResult result=new TempResult(0, 0);\n result.value=totalValue[values.length][allowedWeight];\n result.items=new LinkedList<>();\n int w=allowedWeight;\n for (int itemIndex=values.length; itemIndex>0; itemIndex--) {\n \tif (includedorNot[itemIndex][w]) {\n \t\tresult.items.add(items2.get(itemIndex-1));\n \t\tw=w-weights[itemIndex-1];\n \t} \n }\n \n return result;\n \n\t}",
"public static int getMaxValueDynamicGFG(int[] val, int[] weight, int index){\n\t\treturn 0;\n\t}",
"public float solveEqun(float[][] values, int uf, int eq) {\n float sol=0;\n float v=0,u=0,a=0,t=0,s=0;\n for (int i=0;i<3;i++) {\n for (int j=0;j<2;j++) {\n if (values[i][1] == 1)\n v = values[i][0];\n else if (values[i][1] == 2)\n u = values[i][0];\n else if (values[i][1] == 3)\n a = values[i][0];\n else if (values[i][1] == 4)\n t = values[i][0];\n else if (values[i][1] == 5)\n s = values[i][0];\n }\n }\n\n if (eq == 1) {\n if (uf == 1) {\n sol = u+(a*t);\n //System.out.println(\"u:\"+u);\n }\n else if (uf == 2) {\n sol = v - (a*t);\n //System.out.println(\"V:\"+v);\n }\n\n else if (uf == 3)\n sol = (v-u)/t;\n else if (uf == 4)\n sol = (v-u)/a;\n }\n\n else if (eq == 2) {\n if (uf == 5)\n sol = (float) ((u*t) + (0.5*a*t*t));\n else if (uf == 2)\n sol = (float) ((s-(0.5*a*t*t))/t);\n else if (uf == 3)\n sol = (float) ((s-(u*t))/(0.5*t*t));\n else if (uf == 4) {\n float sol1 = (float) ((-u+Math.sqrt(u*u+(4*0.5*a*t*t*s)))/(2*u));\n float sol2 = (float) ((-u-Math.sqrt(u*u+(4*0.5*a*t*t*s)))/(2*u));\n if (sol1<0)\n sol = sol2;\n else\n sol = sol1;\n }\n }\n\n else if (eq == 3) {\n if (uf == 1)\n sol = (float) Math.sqrt((2*a*s)-(u*u));\n else if (uf == 2)\n sol = (float) Math.sqrt((v*v)-(2*a*s));\n else if (uf == 3)\n sol = ((v*v)-(u*u))/(2*s);\n else if (uf == 5)\n sol = ((v*v)-(u*u))/(2*a);\n }\n\n return sol;\n }",
"private double newCost(int v, int w) {\n\t\treturn 0.0;\n\t}",
"private void createOptimizationFunction() {\n \t\tobjective = \"min:\"; //$NON-NLS-1$\n \t\tSet s = slice.entrySet();\n \t\tfor (Iterator iterator = s.iterator(); iterator.hasNext();) {\n \t\t\tMap.Entry entry = (Map.Entry) iterator.next();\n \t\t\tHashMap conflictingEntries = (HashMap) entry.getValue();\n \t\t\tif (conflictingEntries.size() <= 1) {\n \t\t\t\tobjective += \" 1 \" + getVariable((IInstallableUnit) conflictingEntries.values().iterator().next()); //$NON-NLS-1$\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tList toSort = new ArrayList(conflictingEntries.values());\n \t\t\tCollections.sort(toSort);\n \t\t\tint weight = toSort.size();\n \t\t\tfor (Iterator iterator2 = toSort.iterator(); iterator2.hasNext();) {\n \t\t\t\tobjective += \" \" + weight-- + \" \" + getVariable((IInstallableUnit) iterator2.next()); //$NON-NLS-1$//$NON-NLS-2$\n \t\t\t}\n \t\t}\n \t\tobjective += \" ;\"; //$NON-NLS-1$\n \t}",
"public void test4_b_parametric() { // Schedule found: (m + 1)i + j + (-m - 2)\n\t\t/* RelTrafo1: (i, j) - (i, j - 1) = (0, 1)\n\t\t * RelTrafo2: (i, j) - (i - 1, j + m) = (1, -m)\n\t\t * (m + 1) - m + (-m - 2) = -m - 1\n\t\t *//*\n\t\tGDGraph gdGraph = new GDGraph();\n\t\tGDGVertex gdVertex = gdGraph.addVertex();\n\t\tGDGEdge gdEdge1 = gdGraph.addEdge(gdVertex, gdVertex);\n\t\tGDGEdge gdEdge2 = gdGraph.addEdge(gdVertex, gdVertex);\n\n\t\tgdEdge1.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i, j - 1) \n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1},\n\t\t\t\t{ 0, 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + m) \n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 1, 0},\n\t\t\t\t{ 0, 0, 0, 1}\n });\t\t\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, 0}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(true, true);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}",
"public static DoubleVector minimizeFunction(CostFunction f,\n DoubleVector pInput, final int numParticles, double alpha, double beta,\n double phi, final int maxIterations, final int numThreads,\n final boolean verbose) {\n return new ParticleSwarmOptimization(numParticles, alpha, beta, phi,\n numThreads).minimize(f, pInput, maxIterations, verbose);\n }",
"@Override\n public void evaluate(Solution solution) throws JMException {\n\n int[] tour = new int[numberOfNodes + 1];\n int firstCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[0];\n int lastCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[numberOfNodes - 1];\n\n double fitness1_td = 0.0;\n\n // Calculate fitness 1 - total distance\n for (int i = 0; i < numberOfNodes - 1; i++) {\n int x = ((Permutation) solution.getDecisionVariables()[0]).vector_[i];\n int y = ((Permutation) solution.getDecisionVariables()[0]).vector_[i+1];\n\n tour[i] = x;\n tour[i+1] = y;\n\n fitness1_td += calDistances(x, y);\n }\n // generate tour with same start city and end city\n tour[numberOfNodes] = tour[0];\n\n fitness1_td += calDistances(firstCity, lastCity);\n\n\n // Correctness check: does the tour start and end in the same city\n if(tour[0] != tour[tour.length - 1]) {\n System.err.println(\"ERROR: The last city must be the same as the first city\");\n System.exit(1);\n }\n\n /*for (int i = 0; i < tour.length; i++) {\n System.out.print(tour[i] + \" \");\n }*/\n //System.out.println(\"\\n\" + tour.length);\n\n // Calculate fitness 2 - objective value of a given tour\n ArrayInt z = (ArrayInt) solution.getDecisionVariables()[1];\n //System.out.println(z.getLength());\n\n double fitness2_ob;\n double wc = 0.0;\n double ft = 0.0;\n double fp = 0.0;\n\n //the following is used for a different interpretation of \"packingPlan\"\n int itemsPerCity = z.getLength() / (tour.length - 2);\n //System.out.println(itemsPerCity);\n\n for (int i = 0; i < tour.length - 1; i++) {\n\n int currentCityTEMP = tour[i];\n // what's the current city? --> but the items start at city 2 in the TTP file, so I have to take another 1 off!\n int currentCity = currentCityTEMP - 1;\n\n if (i > 0) {\n\n if (currentCity == -1) {\n // No items in city 1\n wc += 0.0;\n fp += 0.0;\n\n } else {\n\n for (int itemNumber = 0; itemNumber < itemsPerCity; itemNumber++) {\n\n int indexOfPackingPlan = (i-1) * itemsPerCity + itemNumber;\n // what is the next item's index in items-array?\n int itemIndex = currentCity + itemNumber * (numberOfNodes - 1);\n //System.out.println(\"i: \" + i);\n\n if (z.getValue(indexOfPackingPlan) == 1) {\n // pack item\n //System.out.println(itemIndex);\n int currentWC = items[itemIndex][2];\n wc += currentWC;\n\n int currentFP = items[itemIndex][1];\n fp += currentFP;\n }\n }\n\n }\n\n int h = (i+1) % (tour.length-1); //h: next tour city index\n //System.out.println(\"h: \" + h);\n long distance = calDistances(i, h);\n // compute the adjusted (effective) distance\n ft += (distance / (1 - wc * (maxSpeed - minSpeed) / capacityOfKnapsack));\n }\n }\n\n wendUsed = wc;\n wend = capacityOfKnapsack - wc;\n fitness2_ob = fp - ft * rentingRatio;\n\n solution.setObjective(0, fitness1_td);\n solution.setObjective(1, -fitness2_ob); // Convert from maximum objective value to minimum objective value\n }",
"static MwMaxNode addMwMax(HazardModel model, MwMaxNode node) {\n OptionalDouble mMax = StreamSupport.stream(model.spliterator(), false)\n .flatMap(sourceSet -> StreamSupport.stream(\n sourceSet.spliterator(),\n false))\n .filter(new SourceFilter(node.loc))\n .mapToDouble(source -> source.mfds().get(0).x(0))\n .min();\n// if (mMax.isPresent() && mMax.getAsDouble() < M_MAX) {\n// System.out.println(mMax.getAsDouble());\n// }\n node.mMax = mMax.isPresent()\n ? Double.min(mMax.getAsDouble(), M_MAX)\n : M_MAX;\n return node;\n }",
"private static int solve(int[] wt, int[] val, int n, int w) {\n int[][] dp = new int[n+1][w + 1];\n\n for (int i = 1; i <= n; ++i) {\n for (int j = 1; j <= w; ++j) {\n if (wt[i-1] <= j) dp[i][j] = Math.max(dp[i-1][j] , val[i-1]+dp[i-1][j-wt[i-1]]);\n else dp[i][j] = dp[i-1][j];\n }\n }\n return dp[n][w];\n }",
"@Override\n\tpublic Object solvePart2(List<Technique> input) {\n\t\tvar m = BigInteger.valueOf(119315717514047L);\n\n\t\tvar a = BigInteger.ONE;\n\t\tvar b = BigInteger.ZERO;\n\t\tfor (var technique : input) {\n\t\t\tvar techniqueA = BigInteger.valueOf(technique.getA());\n\t\t\tvar techniqueB = BigInteger.valueOf(technique.getB());\n\n\t\t\ta = techniqueA.multiply(a).mod(m);\n\t\t\tb = techniqueA.multiply(b).add(techniqueB).mod(m);\n\t\t}\n\n\t\t// We re-arrange our combined f(x) to get x in terms of f(x), so we can\n\t\t// run the function in reverse:\n\t\t//\n\t\t// x = (f(x) - b) * a^(-1) (mod m)\n\t\t// x = f(x) * a^(-1) - b * a^(-1) (mod m)\n\t\t//\n\t\t// Call this new function g(x). Note that g(x) is the same as f(x), but\n\t\t// with:\n\t\t//\n\t\t// a' = a^(-1) (mod m)\n\t\t// b' = -b * a^(-1) (mod m)\n\t\t//\n\t\t// We adjust our a/b below for use with g(x).\n\t\ta = a.modInverse(m);\n\t\tb = b.negate().multiply(a).mod(m);\n\n\t\t// We need to run g(x) several times.\n\t\t//\n\t\t// g^1(x) = a * x + b\n\t\t//\n\t\t// g^2(x) = a * g^1(x) + b\n\t\t// = a * (a * x + b) + b\n\t\t// = a^2 * x + a * b + b\n\t\t//\n\t\t// g^3(x) = a^3 * x + a^2 * b + a * b + b\n\t\t// ...\n\t\t// g^n(x) = a^n * x + a^(n-1) * b + a^(n-2) * b + ... + b\n\t\t//\n\t\t// (mod m omitted for brevity.)\n\t\t//\n\t\t// The latter terms are a geometric series with first term b and common\n\t\t// ratio a.\n\t\t//\n\t\t// We can therefore simplify it to:\n\t\t//\n\t\t// g^n(x) = a^n * x + (1 - a^n) * (1 - a)^-1 * b (mod m)\n\t\tvar n = BigInteger.valueOf(101741582076661L);\n\t\tvar x = BigInteger.valueOf(2020L);\n\n\t\t// Java really needs operator overloading...\n\t\tvar aToN = a.modPow(n, m);\n\t\tvar aToNTimesX = aToN.multiply(x);\n\n\t\tvar geometricSum = BigInteger.ONE.subtract(aToN)\n\t\t\t.multiply(BigInteger.ONE.subtract(a).modInverse(m))\n\t\t\t.multiply(b);\n\n\t\treturn aToNTimesX.add(geometricSum).mod(m).longValue();\n\t}",
"public int chooseVTD(){\n int min=0;\n //this loop is used to avoid a bug\n for(int i=0;i<heuristicArrayTD.length;i++){\n if(heuristicArrayTD[i]< heuristicArrayTD[min]){\n min=i;\n }\n }\n int max=min;\n //returns highest scoring and unused var\n for(int i=0;i<heuristicArrayTD.length;i++){\n if(heuristicArrayTD[i]>= heuristicArrayTD[max] && usageArray[i%variableLength]==0){\n max=i;\n }\n }\n return max%variableLength;\n }",
"public static void gbpusdDEbest(String dir) {\n \n /**\n * Settings of the evolutionary algorithm - Differential Evolution\n */\n \n Algorithm de;\n int dimension = dim; //Length of an individual - when using functions in GFS with maximum number of required arguments max_arg = 2, 2/3 are designated for program, 1/3 for constant values - for 60 it is 40 and 20\n int NP = 75; //Size of the population - number of competitive solutions\n int generations = gen; //Stopping criterion - number of generations in evolution\n int MAXFES = generations * NP; //Number of fitness function evaluations\n double f = 0.5, cr = 0.8; //Scaling factor f and crossover rate cr\n AP.util.random.Random generator = new AP.util.random.UniformRandom(); //Random number generator\n \n /**\n * Symbolic regression part\n * \n * Settings of the dataset which is regressed\n * Example: Sextic problem\n */\n \n // 50 points from range <-1, 1>, another type of data providing is possible\n double[][] dataset_points = dataset;\n ArrayList<AP_object> GFS = new ArrayList<>();\n GFS.add(new AP_Plus()); //Addition\n GFS.add(new AP_Sub()); //Subtraction\n GFS.add(new AP_Multiply()); //Mulitplication\n GFS.add(new AP_Div()); //Divison\n GFS.add(new AP_Abs());\n GFS.add(new AP_Cos());\n GFS.add(new AP_Cubic());\n GFS.add(new AP_Exp());\n GFS.add(new AP_Ln());\n GFS.add(new AP_Log10());\n GFS.add(new AP_Mod());\n GFS.add(new AP_Quad());\n GFS.add(new AP_Sin());\n GFS.add(new AP_Sigmoid());\n GFS.add(new AP_Sqrt());\n GFS.add(new AP_Tan());\n GFS.add(new AP_aTOb());\n GFS.add(new AP_x1()); //Independent variable x1\n// GFS.add(new AP_Const_static()); //Constant object - value is evolved in the extension of the individuals\n //More functions and terminals for GFS can be found or added to model.ap.objects\n \n double const_min = -10; //Minimum value of constants\n double const_max = 10; //Maximum value of constants\n \n APtf tf = new APdataset(dataset_points, GFS, const_min, const_max); //Dataset constructor\n\n /**\n * Additional variables\n */\n \n int runs = run_count; //Number of runs of the regression\n \n double min; //Helping variable for best individual in terms of fitness function value\n double[] bestArray = new double[runs]; //Array for statistics\n int i, best; //Additional helping variables\n\n /**\n * Runs of the algorithm with statistical analysis\n */\n for (int k = 0; k < runs; k++) {\n\n best = 0;\n i = 0;\n min = Double.MAX_VALUE;\n \n de = new AP_DEbest(dimension, NP, MAXFES, tf, generator, f, cr, null);\n\n de.run();\n\n PrintWriter writer;\n\n try {\n writer = new PrintWriter(dir + tf.name() + \"-DEbest\" + k + \".txt\", \"UTF-8\");\n\n writer.print(\"{\");\n \n for (int ii = 0; ii < ((AP_DEbest)de).getBestHistory().size(); ii++) {\n\n writer.print(String.format(Locale.US, \"%.10f\", ((AP_DEbest)de).getBestHistory().get(ii).fitness));\n\n if (ii != ((AP_DEbest)de).getBestHistory().size() - 1) {\n writer.print(\",\");\n }\n\n }\n\n writer.print(\"}\");\n\n writer.close();\n\n } catch (FileNotFoundException | UnsupportedEncodingException ex) {\n Logger.getLogger(AP_LSHADE.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n bestArray[k] = de.getBest().fitness - tf.optimum();\n\n /**\n * AP best result value and equation.\n */\n\n System.out.println(\"=================================\");\n System.out.println(\"Best obtained fitness function value: \\n\" + (de.getBest().fitness - tf.optimum()));\n System.out.println(\"Equation: \\n\" + ((AP_Individual) de.getBest()).equation);\n System.out.println(\"Vector: \\n\" + Arrays.toString(((AP_Individual) de.getBest()).vector));\n System.out.println(\"=================================\");\n \n for(AP_Individual ind : ((AP_DEbest)de).getBestHistory()){\n i++;\n if(ind.fitness < min){\n min = ind.fitness;\n best = i;\n }\n if(ind.fitness == 0){\n System.out.println(\"Solution found in \" + i + \" CFE\");\n break;\n }\n }\n System.out.println(\"Best solution found in \" + best + \" CFE\");\n \n System.out.println(\"\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\n\");\n \n \n }\n\n System.out.println(\"=================================\");\n System.out.println(\"Min: \" + DoubleStream.of(bestArray).min().getAsDouble());\n System.out.println(\"Max: \" + DoubleStream.of(bestArray).max().getAsDouble());\n System.out.println(\"Mean: \" + new Mean().evaluate(bestArray));\n System.out.println(\"Median: \" + new Median().evaluate(bestArray));\n System.out.println(\"Std. Dev.: \" + new StandardDeviation().evaluate(bestArray));\n System.out.println(\"=================================\");\n \n }",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt(), M = scanner.nextInt();\n int[][] graph = new int[N + 1][N + 1];\n\n for (int i = 0; i < M; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int weight = scanner.nextInt();\n graph[from][to] = weight;\n }\n \n int[][][] dp = new int[N + 1][N + 1][N + 1];\n\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (graph[i][j] != 0) {\n dp[0][i][j] = graph[i][j];\n } else {\n dp[0][i][j] = Integer.MAX_VALUE;\n }\n }\n }\n \n for (int k = 0; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n dp[k][i][i] = 0;\n }\n }\n\n for (int k = 1; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (dp[k - 1][i][k] != Integer.MAX_VALUE && dp[k - 1][k][j] != Integer.MAX_VALUE) {\n dp[k][i][j] = Math.min(dp[k - 1][i][j], dp[k -1][i][k] + dp[k -1][k][j]);\n } else {\n dp[k][i][j] = dp[k - 1][i][j];\n }\n }\n }\n }\n\n int Q = scanner.nextInt();\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < Q; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int res = dp[N][from][to] == Integer.MAX_VALUE ? -1 : dp[N][from][to];\n sb.append(res).append('\\n');\n }\n System.out.println(sb.toString());\n }",
"public int objective() {\n\t\tint value = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tvalue += v[i] * x[i];\n\t\treturn value;\n\t}",
"double cekStop(double x[][], double v0[],double v[][],double w0[],double w[][], double t[]){\n double akumY=0;\n //~ itung z_in dan z\n for(int h=0; h<jumlah_data; h++){\n for(int j=0; j<unit_hidden; j++){\n //itung sigma xi vij\n double jum_xv=0;\n for(int i=0; i<unit_input; i++){\n double cc=x[h][i]*v[i][j];\n jum_xv=jum_xv+cc;\n //System.out.println(x[h][j]);\n }\n z_in[j]=v0[j]+jum_xv;\n //itung z\n z[j]=1/(1+(double)Math.exp(-z_in[j]));\n //System.out.println(\" dan z= \"+z[j]);\n }\n \n //~ itung y_in dan y (output)\n double cxc=0;\n for(int k=0; k<unit_output; k++){\n double jum_zw=0;\n for(int j=0; j<unit_hidden; j++){\n double cc=z[j]*w[j][k];\n jum_zw=jum_zw+cc;\n }\n y_in[k]=w0[k]+jum_zw;\n y[k]=1/(1+(double)Math.exp(-y_in[k]));\n akumY = akumY + Math.pow((t[h]-y[k]),2);\n //System.out.println(t[h]+\"-\"+y[k]+\"=\"+(t[k]-y[k]));\n }\n }\n double E = 0.5 * akumY;\n //System.out.println(E);\n return E;\n }",
"static double[][] cStar_m2(int N, int G, double gamma) {\n\tdouble alpha0=1; \n\tdouble beta0=1;\n\t// %1000 for time horizon (i.e. number of 1000 samples collected)\n //%it should be large enough to approximate the dynamic programming\n\t//int N=1000;\n\n\t// %start with the matrix of forwarding all at c=0;\n // c_star=tril(ones(N+1,N+1)); \n\n\tdouble[][] c_star = Mu.matrix(N+1,N+1);\n\tfor(int i=0; i< c_star.length; i++) {\n\t for(int j=0; j< c_star[i].length; j++) {\n\t\tc_star[i][j] = (j<i ? 1 : 0);\n\t }\t \n\t}\n\n\n\t//for k=1:gridSize\n\tfor(int k=1; k<=G; k++) {\n\t //%set c and resolve the DP and found the forwarding\n\t //%decision at each state (1 for forwarding and 0 for not\n\t //%forwarding)\n\t // c=k/gridSize;\n\t final double c= k/(double)G;\n\t //V=zeros(N+1,N+1); %value function at each state\n\t double[][] V = Mu.matrix(N+1,N+1);\n\t //M=zeros(N+1,N+1); %mean mu_n at each state\n\n\t //idx=ones(N+1,N+1); %optimal choice (1 to forward and 0 for not forward) at each state\n\n\t //for i=N:-1:0 % the total number of samples taken is n=N\n\t for(int i=N; i>=0; i--) {\n\t\t//M(i+1,i+1)=(alpha0+i)/(alpha0+beta0+N); %mean at termination state\n\t\tdouble m =(alpha0+i)/(alpha0+beta0+N); \n\t\t//EfReward(i+1,i+1)=0;\n\t\t//% This value is a lower bound, which comes from the\n\t\t//% better of two policies: don't forward anything\n\t\t//% (value of 0) forward now, and forever into the\n\t\t//% future (value of M-c, summed over the geometric\n\t\t//% series of gamma^n)\n\t\t// [V(i+1,i+1),idx(i+1,i+1)]=max([0,M(i+1,i+1)-c]/(1-gamma));\n\t\tdouble q = m-c;\n\t\tif (q>0) {\n\t\t V[i][i] = q/(1-gamma);\n\t\t c_star[i][i] += 1;\n\t\t}\n\t }\n\t // for n=N-1:-1:0 % n is the total number of samples taken\n\t for(int n=N-1; n>=0; n--) {\n\t\t//for i=0:1:n % i is the number of sucesses, so n-i is the number of failures\n\t\tfor(int i=0;i<=n; i++) {\n\t\t //M(i+N-n+1,i+1)=(alpha0+i)/(alpha0+beta0+n); %mean calculated at each state\n\t\t double m = (alpha0+i)/(alpha0+beta0+n);\n\t\t //EfReward(i+N-n+1,i+1)=gamma*(\n\t\t //(1-M(i+N-n+1,i+1))*V(i+N-n,i+1)+M(i+N-n+1,i+1)*V(i+N-n+1,i+2)\n\t\t //);\n \n\t\t double efReward=gamma*((1-m)*V[i+N-n-1][i]+m*V[i+N-n][i+1]);\n\t\t //[V(i+N-n+1,i+1),idx(i+N-n+1,i+1)]=\n\t\t // max([0,M(i+N-n+1,i+1)-c+EfReward(i+N-n+1,i+1)]);\n\t\t double q = m - c + efReward;\n\t\t if (q>0) {\n\t\t\tV[i+N-n][i] = q;\n\t\t\tc_star[i+N-n][i] += 1;\n\t\t }\n\t\t}\n\t }\n\n\t // idx=idx-ones(N+1,N+1); %idx tells us the optimal decision at each state, 1 for forwarding and 0 for not\n \n\t //c_star=c_star+idx; %accumulate optimal decisions at every state to figure out c*\n\t}\n\n\t// c_star=c_star/gridSize; %compute c* by normalizing it\n\tfor(int i=0; i< c_star.length; i++) {\n\t for(int j=0; j< c_star[i].length; j++) {\n\t\tc_star[i][j] /= G;\n\t }\t \n\t}\n\t// reverse order\n\tdouble [][] tmp = new double[c_star.length][];\n\tfor(int i=0; i< c_star.length; i++) {\n\t tmp[i] = c_star[c_star.length-1-i];\n\t}\t\n\treturn tmp;\n }",
"public K max();",
"private static void dtp2v( double xi, double eta,\n double x, double y, double z,\n double[] v ) {\n double f = Math.sqrt( 1 + xi * xi + eta * eta );\n double r = Math.hypot( x, y );\n if ( r == 0 ) {\n r = 1d-20;\n x = r;\n }\n double f1 = 1.0 / f;\n double r1 = 1.0 / r;\n v[ 0 ] = ( x - ( xi * y + eta * x * z ) * r1 ) * f1;\n v[ 1 ] = ( y + ( xi * x - eta * y * z ) * r1 ) * f1;\n v[ 2 ] = ( z + eta * r ) * f1;\n }",
"public abstract OptimisationSolution getBestSolution();",
"public void update(ChiVertex<Integer, RatingEdge> vertex, GraphChiContext context) {\n\t\tboolean isUser = vertex.numOutEdges() > 0;\n\t\tdouble[] nbrPVec = new double[params.numFactors];\n\t\t\n\t\tdouble[] vData = new double[params.numFactors];\n\t\tint sourceId = context.getVertexIdTranslate().backward(vertex.getId());\n\t\tparams.latentFactors.getRow(sourceId, vData);\n\t\t\n\t\t//Will be updated to store SUM(V_j*R_ij)\n\t\tRealVector Xty = new ArrayRealVector(params.numFactors);\n\t\t//Will be updated to store SUM(V_j*V_j')\n\t\tRealMatrix XtX = new BlockRealMatrix(params.numFactors, params.numFactors);\n\t\t\n\t\t//Gather data to update the mean and the covariance for the hidden features.\t\n\t\tfor(int i = 0; i < vertex.numEdges(); i++) {\n\t\t\tRatingEdge edge = vertex.edge(i).getValue(); \n\t\t\tdouble observation = edge.observation;\n\t\t\t\n\t\t\tint nbrId = context.getVertexIdTranslate().backward(vertex.edge(i).getVertexId());\n\t\t\tparams.latentFactors.getRow(nbrId, nbrPVec);\n\t\t\t////VertexDataType nbrVertex = params.latentFactors.get(nbrId);\n\t\t\t\n\t\t\t//Add V_j*R_ij for this observation.\n\t\t\t////Xty = Xty.add(nbrVertex.pVec.mapMultiply(observation));\n\t\t\tfor(int f = 0; f < params.numFactors; f++) {\n\t\t\t\tdouble value = Xty.getEntry(f) + nbrPVec[f]*observation;\n\t\t\t\tXty.setEntry(f, value);\n\t\t\t\t\n\t\t\t\t//Add V_j*V_j' for this\n\t\t\t\tfor(int f2 = 0; f2 < params.numFactors; f2++) {\n\t\t\t\t\tvalue = XtX.getEntry(f, f2) + nbrPVec[f]*nbrPVec[f2];\n\t\t\t\t\tXtX.setEntry(f, f2, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Add V_j*V_j' for this \n\t\t\t////XtX = XtX.add(nbrVertex.pVec.outerProduct(nbrVertex.pVec));\n\t\t\t\n\t\t}\n\t\t\n\t\tRealMatrix lambda_prior = isUser ? params.lambda_U : params.lambda_V;\n\t\tRealVector mu_prior = isUser ? params.mu_U : params.mu_V;\n\t\t\n\t\tRealMatrix precision = lambda_prior.add(XtX.scalarMultiply(params.alpha)); \n\t\tRealMatrix covariance = (new LUDecompositionImpl(precision).getSolver().getInverse());\n\t\t\n\t\tRealVector tmp = lambda_prior.operate(mu_prior);\n\t\tRealVector mean = covariance.operate(Xty.mapMultiply(params.alpha).add(tmp));\n\t\t\n\t\t//We have the covariance and mean. We can grab a sample from this multivariate\n\t\t//normal distribution according to: \n\t\t// http://en.wikipedia.org/wiki/Multivariate_normal_distribution#Drawing_values_from_the_distribution\n\t\t//Javadoc:\n\t\tMultivariateNormalDistribution dist = new MultivariateNormalDistribution(mean.toArray(), covariance.getData());\n\t\t////vData.pVec = new ArrayRealVector(dist.sample());\n\t\tvData = dist.sample();\n\t\tparams.latentFactors.setRow(sourceId, vData);\n\t\t\n\t\t//Compute contribution of all ratings for this vertex to RMSE.\n\t\tif(isUser) {\n\t\t\tfor(int i = 0; i < vertex.numEdges(); i++) {\n\t\t\t\tChiEdge<RatingEdge> edge = vertex.edge(i);\n\t\t\t\tRatingEdge pmfRatingEdge = edge.getValue();\n\t\t\t\tfloat observation = pmfRatingEdge.observation;\n\t\t\t\tint nbrId = context.getVertexIdTranslate().backward(vertex.edge(i).getVertexId());\n\t\t\t\tparams.latentFactors.getRow(nbrId, nbrPVec);\n\t\t\t\t\n\t\t\t\t//Aggregate the sample and compute rmse if greater than burn_in period\n\t\t\t\tdouble prediction = this.params.predict(vData, nbrPVec, datasetDesc);\n\t\t\t\tdouble squaredError = (observation - prediction)*(observation - prediction);\n\t\t\t\tsynchronized (this) {\n\t\t\t\t this.train_rmse += squaredError;\n\t }\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Update Sum of U_i / V_j\n\t\t//Should be synchronized? Or Atomic add of vectors?\n\t\tRealVector vDataVec = new ArrayRealVector(vData);\n\t\tRealMatrix vDataOuterProd = vDataVec.outerProduct(vDataVec);\n\t\tsynchronized (params) {\n\t\t\tif(isUser) {\n\t\t\t\t\tparams.sumU = params.sumU.add(vDataVec);\n\t\t\t\t\tparams.sumUUT = params.sumUUT.add(vDataOuterProd);\n\t\t\t} else {\n\t\t\t\tparams.sumV = params.sumV.add(vDataVec);\n\t\t\t\tparams.sumVVT = params.sumVVT.add(vDataOuterProd);\n\t\t\t}\n\t\t}\n\t}",
"static float[] mulVM(float[] vt, float[] m){\n \n if(vt.length != 4){\n \t \tthrow new IllegalArgumentException();\n }\n \n return mulVM(vt, vt[3], m); \t\n }",
"public static void modifiedNussinov() {\r\n // Declare j\r\n int j;\r\n\r\n // Fill in DPMatrix\r\n for (int k = 0; k < sequence.length(); k++) {\r\n for (int i = 0; i < sequence.length()-1; i++) {\r\n // If bigger than allowed loop size\r\n if (k > minimumLoop - 1) {\r\n // Index is in bounds\r\n if ((i + k + 1) <= sequence.length()-1) {\r\n // Set j to i + k + 1\r\n j = i + k + 1;\r\n\r\n // Set min to max value\r\n double minimum = Double.MAX_VALUE;\r\n\r\n // Check for minimum\r\n minimum = Math.min(minimum, Math.min((DPMatrix[i + 1][j] ), (DPMatrix[i][j - 1] )) );\r\n\r\n // Adjust for pair scores\r\n if (checkPair(sequence.charAt(i), sequence.charAt(j)) == 1) {\r\n // Check for minimum\r\n minimum = Math.min(minimum, DPMatrix[i + 1][j - 1] - 2);\r\n } else if (checkPair(sequence.charAt(i), sequence.charAt(j)) == 2) {\r\n // Check for minimum\r\n minimum = Math.min(minimum, DPMatrix[i + 1][j - 1] - 3);\r\n }\r\n for (int l = i + 1; l < j; l++) {\r\n // Check for minimum\r\n minimum = Math.min(minimum, (DPMatrix[i][l]) + (DPMatrix[l + 1][j]));\r\n }\r\n\r\n // Set the matrix value\r\n DPMatrix[i][j] = minimum;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Run the traceback\r\n String structure = structureTraceback();\r\n\r\n // Create file for writer\r\n File file = new File(\"5.o1\");\r\n\r\n // Create writer\r\n try {\r\n // Writer\r\n BufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\r\n // Write sequence\r\n writer.write(sequence);\r\n writer.write('\\n');\r\n\r\n // Write MFE\r\n writer.write(Double.toString(DPMatrix[0][sequenceLength - 1]));\r\n writer.write('\\n');\r\n\r\n // Write structure\r\n writer.write(structure);\r\n\r\n // Close writer\r\n writer.close();\r\n\r\n } catch (IOException e) {\r\n // Print error\r\n System.out.println(\"Error opening file 5.o1\");\r\n }\r\n\r\n }",
"public static OptimizationProblem createOptimizationProblemLdMinFv() {\n return createOptimizationProblem(From.L_d_theta, To.Fv, false);\n }",
"public static double getBestknapSack01Value(double maxWeight, double[] w, double[] v) {\n // pack = new boolean[weight.length + 1];\n int[] weight = new int[w.length + 1];\n for (int i = 0; i < w.length; i++) {\n weight[i + 1] = (int) w[i];\n }\n int[] value = new int[v.length + 1];\n for (int i = 0; i < v.length; i++) {\n value[i + 1] = (int) v[i];\n }\n boolean[] pack = new boolean[v.length + 1];\n CalculateknapSack01((int) maxWeight, pack, weight, value);\n return getBestKnapSackValue((int) maxWeight, pack, weight, value);\n }",
"private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}",
"public Solution solve(KnapsackData data);",
"public void solve(double mass, int t0, double v_t0, double a, \n double b, double n) {\n\n this.m = mass;\n int t = t0;\n double h = (b - a) / n;\n double v_i = v_t0;\n System.out.println(\"At t = (\"+t0+\"), v(\"+t0+\") = \"+v_i);\n\n for (int i = 0; i < n; i++) {\n v_i = v_i + (h * f(v_i));\n t = t + h;\n System.out.println(\"At t = (\"+(i+1)+\"), v(\"+(i+1)+\") = \"+v_i);\n }\n }",
"public MiniMax(HeuristicFunction H,int depth) {\r\n\t\t\tsuper(H,depth);\r\n\t\t}",
"float xMax();",
"public interface Solver {\n public ArrayList<ArrayList<Double>> solve(double step, List<Pair<Double, Double>> init, int numberOfIterations);\n public ArrayList<ArrayList<Double>> solve(double step, List<Pair<Double, Double>> init, double max);\n}",
"public void FVA( ArrayList< Double > objCoefs, Double objVal, ArrayList< Double > fbasoln, ArrayList< Double > min, ArrayList< Double > max, SolverComponent component ) throws Exception;",
"public VariableUnit solve() {\n LinkedList<VariableUnit> processor = new LinkedList<VariableUnit>();\n\n VariableUnit vu1 = new VariableUnit(250.0, 'x');\n VariableUnit vu2 = new VariableUnit('+');\n VariableUnit vu3 = new VariableUnit(250.0, 'x');\n VariableUnit vu4 = new VariableUnit(501.0, 'x');\n VariableUnit vu5 = new VariableUnit('y');\n VariableUnit vu6 = new VariableUnit('-');\n alpha_arr.get(('x' - 'a')).addLast(vu1);\n alpha_arr.get(('x' - 'a')).addLast(vu2);\n alpha_arr.get(('x' - 'a')).addLast(vu3);\n op_order.add(vu1); op_order.add(vu2); op_order.add(vu3); op_order.add(vu6);\n op_order.add(vu4); op_order.add(vu6); op_order.add(vu5);\n assignValue(2.0, 'x');\n \n System.out.print(vu1); System.out.print(vu2); System.out.print(vu3);\n System.out.print(vu6); System.out.print(vu4); System.out.print(vu6);\n System.out.print(vu5);\n System.out.println();\n System.out.println(\"------------------------------\");\n \n VariableUnit temp, temp1;\n for (int i = 0; i < op_order.size(); i++) {\n \ttemp = op_order.pollFirst();\n \t\n \t\tswitch (temp.getVariable()) {\n \tcase '+':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().add(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tcase '-':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().subtract(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tdefault:\n \t\tprocessor.push(temp);\n \t\t}\n }\n\n /*\n * System.out.println(\"This equation is currently unsolvable.\");\n \tSystem.out.println(\"Try assigning values to some of the variables.\");\n */\n while (!processor.isEmpty()) {\n \top_order.addFirst(processor.pop());\n }\n \n ListIterator<VariableUnit> iter = op_order.listIterator();\n \n while ( iter.hasNext() ) {\n \tVariableUnit iter_temp = iter.next();\n \t//System.out.print(iter_temp.hasValue());\n \tif (iter_temp.hasValue()) {\n \t\tSystem.out.print( Double.toString(iter_temp.subValue()) );\n \t}\n \telse {\n \t\tSystem.out.print(iter_temp);\n \t}\n };\n System.out.println();\n \n return new VariableUnit(Double.NaN, ' ');\n }",
"@Test\n\tpublic void test() {\n\t\tdouble delta = 0.00001;\n\t\tSnp fakeSnp1 = new Snp(\"fakeId1\", 0, 0.3);\n\t\tSnp fakeSnp2 = new Snp(\"fakeId2\", 0, 0.8);\n\t\tSnp fakeSnp3 = new Snp(\"fakeId3\", 0, 1.4);\n\t\tPascal.set.withZScore_=true;\n\t\tArrayList<Snp> geneSnps = new ArrayList<Snp>();\n\t\tgeneSnps.add(fakeSnp1);geneSnps.add(fakeSnp2);geneSnps.add(fakeSnp3);\n\t\tDenseMatrix ld= new DenseMatrix(3,3);\n\t\t//DenseMatrix crossLd= new DenseMatrix(3,2);\n\t\t\n\t\tArrayList<Double> snpScores = new ArrayList<Double>(3);\n\t\tsnpScores.add(fakeSnp1.getZscore());\n\t\tsnpScores.add(fakeSnp2.getZscore());\n\t\tsnpScores.add(fakeSnp3.getZscore());\n\t\t//ld and crossLd calculated as follows:\n\t\t// make 0.9-toeplitz mat of size 5.\n\t\t// 3,4,5 for ld-mat\n\t\t// 1,2 for crossLd-mat\n\t\tld.set(0,0,1);ld.set(1,1,1);ld.set(2,2,1);\n\t\tld.set(0,1,0.9);ld.set(1,2,0.9);\n\t\tld.set(1,0,0.9);ld.set(2,1,0.9);\n\t\tld.set(0,2,0.81);\n\t\tld.set(2,0,0.81);\n\t\tdouble[] weights = {2,2,2};\n\t\tAnalyticVegas myAnalyticObj= null;\n\t\t//UpperSymmDenseMatrix myMatToDecompose = null;\n\t\tdouble[] myEigenvals = null;\n\t\tdouble[] emptyWeights = {1,1,1};\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, emptyWeights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\n\t\tassertEquals(myEigenvals[0],2.74067, delta);\n\t\tassertEquals(myEigenvals[1],0.1900, delta);\n\t\tassertEquals(myEigenvals[2],0.06932, delta);\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\t\n\t\tassertEquals(myEigenvals[0], 5.481348, delta);\n\t\tassertEquals(myEigenvals[1],0.380000, delta);\n\t\tassertEquals(myEigenvals[2],0.138652, delta);\n\t\t\t\n\t\tdouble[] weights2 = {1,2,0.5};\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights2);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\n\t\tassertEquals(myEigenvals[0],3.27694674, delta);\n\t\tassertEquals(myEigenvals[1],0.1492338, delta);\n\t\tassertEquals(myEigenvals[2],0.07381938, delta);\t\t\t\n\t\t\n\t}",
"static int webknapSackDyna(int W, int wt[], int val[], int n) {\n int i, w;\n int K[][] = new int[n + 1][W + 1];\n //K[i][w] represents the max value for weight w by using i elements\n // row i represents using i values\n // col w represents the current weight\n // Build table K[][] in bottom up manner\n // n is the number of values available to use\n // for each available value\n for (i = 0; i <= n; i++) {\n // for each weight until target weight is achieved\n for (w = 0; w <= W; w++) {\n\n if (i == 0 || w == 0)\n K[i][w] = 0;\n // if the previous weight is still less than the target weight it can potentially be included\n // to calculate the max val for current weight\n else if (wt[i - 1] <= w)\n // val[i-1]: value for the i th weight\n // K[i-1][w-wt[i-1]]: max value using i-1 values to achieve weight target weight - wt of i-1 element\n // val[i-1] + K[i-1][w-wt[i-1]] -> used ith weight add val[i-] and use the remaining i-1 weights to\n // get to the target weight w-wt of ith element -> wt-wt[i-1]\n // K[i-1][w] => max value using i-1 elements to achieve weight w i.e. not using ith element\n K[i][w] = max(val[i - 1] + K[i - 1][w - wt[i - 1]], K[i - 1][w]);\n // wt[i-1] > w\n else\n K[i][w] = K[i - 1][w];\n }\n }\n\n return K[n][W];\n }",
"public void calculate(List<Double> x){\n\n for(int j=1;j<=m;j++){\n th[1][j] = wdotF(-1,j,x,1);\n }\n for(int i=2;i<=n;i++){\n for(int l=1;l<=m;l++){\n double max = Double.MIN_VALUE;\n for(int j=1;j<=m;j++){\n double value = th[i-1][j]+ wdotF(j,l,x,i);\n if(value> max){\n max = value;\n path[i][l] = j;\n }\n }\n th[i][l] = max;\n }\n }\n double maxValue = Double.MIN_VALUE;\n int pathValue = 0;\n List<Integer> goodPath = new ArrayList<>();\n for(int j=1;j<=m;j++){\n double value = th[n][j];\n if(value> maxValue){\n maxValue = value;\n pathValue = j;\n }\n }\n goodPath.add(pathValue);\n for(int i=n-1;i>0;i--){\n int value = path[i+1][pathValue];\n pathValue = value;\n goodPath.add(0,pathValue);\n }\n System.out.print(\"path is :\");\n for(Integer path : goodPath){\n System.out.print(path+\" \");\n }\n }",
"public HashMap<List<Integer>, List<Integer>> obtainPolicy(double [] u){\n\t\tHashMap<List<Integer>, List<Integer>> optimalPolicy = new \n\t\t\t\tHashMap<List<Integer>, List<Integer>>();\n\t\tfor(List<Integer> s : states) {\n\t\t\tdouble max = Double.NEGATIVE_INFINITY;\n\t\t\tfor(int a : validActions.get(s)) {\n\t\t\t\tdouble sum = 0.0;\n\t\t\t\tfor(List<Integer> sDash : states) \n\t\t\t\t\tsum += transitionFunction(transitions, s, actions.get(a), \n\t\t\t\t\t\tsDash) * u[states.indexOf(sDash)];\n\t\t\t\tdouble val = getReward(s, actions.get(a)) + \n\t\t\t\t\t\tspec.getDiscountFactor() * sum;\n\t\t\t\tif(val > max) {\n\t\t\t\t\tmax = val;\n\t\t\t\t\toptimalPolicy.put(s, actions.get(a));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn optimalPolicy;\n\t}",
"private static double solve(double[] a, double[] var, double f, int j) {\n\t\tdouble result = f;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tif (i != j) {\n\t\t\t\tresult -= var[i] * a[i];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public AbstractWeightedGraph<V,E>.FlowGraph maximumFlow(V source, V sink);",
"public void solveUsingVogelApproximationMethod() {\n this.solution = new Solution();\n\n Source[] proxySources = Arrays.copyOf(sources, sources.length);\n Destination[] proxyDestinations = Arrays.copyOf(destinations, destinations.length);\n int[][] matrix = new int[costs.length][costs[0].length];\n\n List<Integer> rows = new ArrayList<Integer>();\n List<Integer> columns = new ArrayList<Integer>();\n\n while ( rows.size() != proxySources.length && columns.size() != proxyDestinations.length ) {\n int[] penaltyRow = new int[proxyDestinations.length];\n int[] penaltyColumn = new int[proxySources.length];\n\n int firstTwo = 2;\n int firstValue = 0, secondValue = 0;\n for (int i = 0; i < proxySources.length; i++) {\n if (!rows.contains(i)) {\n for (int j = 0; j < proxyDestinations.length; j++) {\n if (!columns.contains(j)) {\n if (firstTwo == 2) {\n firstValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 1) {\n secondValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 0) {\n if (costs[i][j] < firstValue || costs[i][j] < secondValue) {\n if (firstValue < secondValue) secondValue = costs[i][j];\n else firstValue = costs[i][j];\n }\n }\n }\n }\n penaltyColumn[i] = Math.abs(firstValue - secondValue);\n firstTwo = 2;\n }\n }\n\n firstTwo = 2;\n\n for (int j = 0; j < proxySources.length; j++) {\n if (!columns.contains(j)) {\n for (int i = 0; i < proxyDestinations.length; i++) {\n if (!rows.contains(i)) {\n if (firstTwo == 2) {\n firstValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 1) {\n secondValue = costs[i][j];\n firstTwo--;\n } else if (firstTwo == 0) {\n if (costs[i][j] < firstValue || costs[i][j] < secondValue) {\n if (firstValue < secondValue) secondValue = costs[i][j];\n else firstValue = costs[i][j];\n }\n }\n }\n\n }\n penaltyRow[j] = Math.abs(firstValue - secondValue);\n firstTwo = 2;\n }\n }\n\n int maxI = 0;\n for(int j=0;j<proxyDestinations.length;j++) {\n if(penaltyRow[j] > penaltyRow[maxI]) maxI = j;\n }\n\n int maxJ = 0;\n for(int i=0;i<proxySources.length;i++) {\n if(penaltyColumn[i] > penaltyColumn[maxJ]) maxJ = i;\n }\n\n if( penaltyRow[maxI] > penaltyColumn[maxJ] )\n {\n int indexJ = maxI;\n\n int finalIndexI = 0;\n int finalIndexJ = 0;\n int value = 100000;\n for(int i=0;i<proxySources.length;i++) {\n if(!rows.contains(i)) {\n if(costs[i][indexJ] < value) {\n value = costs[i][indexJ];\n finalIndexI = i;\n finalIndexJ = indexJ;\n }\n else if( costs[i][indexJ] == value ) {\n if( Math.min(proxySources[i].getSupply(),proxyDestinations[indexJ].getDemand()) > Math.min(proxySources[finalIndexI].getSupply(),proxyDestinations[finalIndexJ].getDemand()) ) {\n value = costs[i][indexJ];\n finalIndexI = i;\n finalIndexJ = indexJ;\n }\n }\n }\n }\n\n int supply = proxySources[finalIndexI].getSupply();\n int demand = proxyDestinations[finalIndexJ].getDemand();\n\n\n this.solution.add(sources[finalIndexI], destinations[finalIndexJ], Math.min(supply,demand), costs[finalIndexI][finalIndexJ]);\n\n if ( supply < demand ) {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(demand - supply);\n rows.add(finalIndexI);\n }\n else if( supply > demand ) {\n proxySources[finalIndexI].setSupply(supply-demand);\n proxyDestinations[finalIndexJ].setDemand(0);\n columns.add(finalIndexJ);\n }\n else {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(0);\n rows.add(finalIndexI);\n columns.add(finalIndexJ);\n }\n }\n else {\n int indexI = maxJ;\n\n int finalIndexI = 0;\n int finalIndexJ = 0;\n int value = 100000;\n for(int j=0;j<proxyDestinations.length;j++) {\n if(!columns.contains(j)) {\n if(costs[indexI][j] < value) {\n value = costs[indexI][j];\n finalIndexI = indexI;\n finalIndexJ = j;\n }\n else if( costs[indexI][j] == value ) {\n if( Math.min(proxySources[indexI].getSupply(),proxyDestinations[j].getDemand()) > Math.min(proxySources[finalIndexI].getSupply(),proxyDestinations[finalIndexJ].getDemand()) ) {\n value = costs[indexI][j];\n finalIndexI = indexI;\n finalIndexJ = j;\n }\n }\n }\n }\n\n int supply = proxySources[finalIndexI].getSupply();\n int demand = proxyDestinations[finalIndexJ].getDemand();\n\n\n this.solution.add(sources[finalIndexI], destinations[finalIndexJ], Math.min(supply,demand), costs[finalIndexI][finalIndexJ]);\n\n if ( supply < demand ) {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(demand - supply);\n rows.add(finalIndexI);\n }\n else if( supply > demand ) {\n proxySources[finalIndexI].setSupply(supply-demand);\n proxyDestinations[finalIndexJ].setDemand(0);\n columns.add(finalIndexJ);\n }\n else {\n proxySources[finalIndexI].setSupply(0);\n proxyDestinations[finalIndexJ].setDemand(0);\n rows.add(finalIndexI);\n columns.add(finalIndexJ);\n }\n }\n }\n this.solution.showSolution();\n }",
"public org.apache.spark.mllib.linalg.Vector optimize (org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, org.apache.spark.mllib.linalg.Vector>> data, org.apache.spark.mllib.linalg.Vector initialWeights) ;",
"public int knapsack01(int[] w, int[] v, int C) {\n //dp[i] = Math.max(v[i] + dp[i - 1, c - w[i]], dp[i - 1, c])\n int[][] dp = new int[w.length][C];\n for (int i = 0; i <= C; i++) {\n if (i >= w[0])\n dp[0][i] = v[0];\n }\n for (int i = 1; i < w.length; i++) {\n for (int j = 0; j <= C; j++) {\n if (j >= w[i]) {\n dp[i][j] = Math.max(v[i] + dp[i - 1][C - w[i]], dp[i - 1][C]);\n } else {\n dp[i][j] = dp[i - 1][C];\n }\n }\n }\n return dp[w.length - 1][C];\n }",
"public double[] runOptimizer() {\n List<Integer> sents = new ArrayList<Integer>();\n for(int i=0; i<sentNum; i++)\n sents.add(i);\n \n if(needShuffle)\n Collections.shuffle(sents);\n \n double oraMetric, oraScore, predMetric, predScore;\n double[] oraPredScore = new double[4];\n double eta = 1.0; //learning rate, will not be changed if run percep\n double avgEta = 0; //average eta, just for analysis\n double loss = 0;\n double featNorm = 0;\n double featDiffVal;\n double sumMetricScore = 0;\n double sumModelScore = 0;\n String oraFeat = \"\";\n String predFeat = \"\";\n String[] oraPredFeat = new String[2];\n String[] vecOraFeat;\n String[] vecPredFeat;\n String[] featInfo;\n boolean first = true;\n //int processedSent = 0;\n Iterator it;\n Integer diffFeatId;\n double[] avgLambda = new double[initialLambda.length]; //only needed if averaging is required\n for(int i=0; i<initialLambda.length; i++)\n avgLambda[i] = 0.0;\n\n //update weights\n for(Integer s : sents) {\n //find out oracle and prediction\n if(first)\n findOraPred(s, oraPredScore, oraPredFeat, initialLambda, featScale);\n else\n findOraPred(s, oraPredScore, oraPredFeat, finalLambda, featScale);\n \n //the model scores here are already scaled in findOraPred\n oraMetric = oraPredScore[0];\n oraScore = oraPredScore[1];\n predMetric = oraPredScore[2];\n predScore = oraPredScore[3];\n oraFeat = oraPredFeat[0];\n predFeat = oraPredFeat[1];\n \n //update the scale\n if(needScale) { //otherwise featscale remains 1.0\n sumMetricScore += java.lang.Math.abs(oraMetric+predMetric);\n sumModelScore += java.lang.Math.abs(oraScore+predScore)/featScale; //restore the original model score\n \n if(sumModelScore/sumMetricScore > scoreRatio)\n featScale = sumMetricScore/sumModelScore;\n\n /* a different scaling strategy \n if( (1.0*processedSent/sentNum) < sentForScale ) { //still need to scale\n double newFeatScale = java.lang.Math.abs(scoreRatio*sumMetricDiff / sumModelDiff); //to make sure modelScore*featScale/metricScore = scoreRatio\n \n //update the scale only when difference is significant\n if( java.lang.Math.abs(newFeatScale-featScale)/featScale > 0.2 )\n featScale = newFeatScale;\n }*/\n }\n// processedSent++;\n\n HashMap<Integer, Double> allOraFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> allPredFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> featDiff = new HashMap<Integer, Double>();\n\n vecOraFeat = oraFeat.split(\"\\\\s+\");\n vecPredFeat = predFeat.split(\"\\\\s+\");\n \n for (int i = 0; i < vecOraFeat.length; i++) {\n featInfo = vecOraFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allOraFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n featDiff.put(diffFeatId, Double.parseDouble(featInfo[1]));\n }\n\n for (int i = 0; i < vecPredFeat.length; i++) {\n featInfo = vecPredFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allPredFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n\n if (featDiff.containsKey(diffFeatId)) //overlapping features\n featDiff.put(diffFeatId, featDiff.get(diffFeatId)-Double.parseDouble(featInfo[1]));\n else //features only firing in the 2nd feature vector\n featDiff.put(diffFeatId, -1.0*Double.parseDouble(featInfo[1]));\n }\n\n if(!runPercep) { //otherwise eta=1.0\n featNorm = 0;\n\n Collection<Double> allDiff = featDiff.values();\n for(it =allDiff.iterator(); it.hasNext();) {\n featDiffVal = (Double) it.next();\n featNorm += featDiffVal*featDiffVal;\n }\n \n //a few sanity checks\n if(! evalMetric.getToBeMinimized()) {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score+ora_metric > pred_score+pred_metric\n * pred_score-pred_metric > ora_score-ora_metric\n * => ora_metric > pred_metric */\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be greater than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for max-metric oracle selection or min-metric prediction selection, the oracle metric \" +\n \t\t\"score must be greater than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n } else {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score-ora_metric > pred_score-pred_metric\n * pred_score+pred_metric > ora_score+ora_metric\n * => ora_metric < pred_metric */\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be smaller than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for min-metric oracle selection or max-metric prediction selection, the oracle metric \" +\n \"score must be smaller than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n }\n \n if(predSelectMode==2) {\n if(predScore+1e-10 < oraScore) {\n System.err.println(\"WARNING: for max-model prediction selection, the prediction model score must be greater than oracle model score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n //cost - margin\n //remember the model scores here are already scaled\n loss = evalMetric.getToBeMinimized() ? //cost should always be non-negative \n (predMetric-oraMetric) - (oraScore-predScore)/featScale: \n (oraMetric-predMetric) - (oraScore-predScore)/featScale;\n \n if(loss<0)\n loss = 0;\n\n if(loss == 0)\n eta = 0;\n else\n //eta = C < loss/(featNorm*featScale*featScale) ? C : loss/(featNorm*featScale*featScale); //feat vector not scaled before\n eta = C < loss/(featNorm) ? C : loss/(featNorm); //feat vector not scaled before\n }\n \n avgEta += eta;\n\n Set<Integer> diffFeatSet = featDiff.keySet();\n it = diffFeatSet.iterator();\n\n if(first) {\n first = false;\n \n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = initialLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n else {\n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = finalLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n \n if(needAvg) {\n for(int i=0; i<avgLambda.length; i++)\n avgLambda[i] += finalLambda[i];\n }\n }\n \n if(needAvg) {\n for(int i=0; i<finalLambda.length; i++)\n finalLambda[i] = avgLambda[i]/sentNum;\n }\n \n avgEta /= sentNum;\n System.out.println(\"Average learning rate: \"+avgEta);\n\n // the intitialLambda & finalLambda are all trainable parameters\n //if (!trainMode.equals(\"3\")) // for mode 3, no need to normalize sparse\n // feature weights\n //normalizeLambda(finalLambda);\n //else\n //normalizeLambda_mode3(finalLambda);\n\n /*\n * for( int i=0; i<finalLambda.length; i++ ) System.out.print(finalLambda[i]+\" \");\n * System.out.println(); System.exit(0);\n */ \n\n double initMetricScore = computeCorpusMetricScore(initialLambda); // compute the initial corpus-level metric score\n double finalMetricScore = computeCorpusMetricScore(finalLambda); // compute final corpus-level metric score // the\n\n // prepare the printing info\n int numParamToPrint = 0;\n String result = \"\";\n\n if (trainMode.equals(\"1\") || trainMode.equals(\"4\")) {\n numParamToPrint = paramDim > 10 ? 10 : paramDim; // how many parameters\n // to print\n result = paramDim > 10 ? \"Final lambda(first 10): {\" : \"Final lambda: {\";\n\n for (int i = 1; i < numParamToPrint; i++)\n // in ZMERT finalLambda[0] is not used\n result += finalLambda[i] + \" \";\n } else {\n int sparseNumToPrint = 0;\n if (trainMode.equals(\"2\")) {\n result = \"Final lambda(regular feats + first 5 sparse feats): {\";\n for (int i = 1; i <= regParamDim; ++i)\n result += finalLambda[i] + \" \";\n\n result += \"||| \";\n\n sparseNumToPrint = 5 < (paramDim - regParamDim) ? 5 : (paramDim - regParamDim);\n\n for (int i = 1; i <= sparseNumToPrint; i++)\n result += finalLambda[regParamDim + i] + \" \";\n } else {\n result = \"Final lambda(first 10 sparse feats): {\";\n sparseNumToPrint = 10 < paramDim ? 10 : paramDim;\n\n for (int i = 1; i < sparseNumToPrint; i++)\n result += finalLambda[i] + \" \";\n }\n }\n\n output.add(result + finalLambda[numParamToPrint] + \"}\\n\" + \"Initial \"\n + evalMetric.get_metricName() + \": \" + initMetricScore + \"\\nFinal \"\n + evalMetric.get_metricName() + \": \" + finalMetricScore);\n\n // System.out.println(output);\n\n if (trainMode.equals(\"3\")) {\n // finalLambda = baseline(unchanged)+disc\n for (int i = 0; i < paramDim; i++)\n copyLambda[i + regParamDim + 1] = finalLambda[i];\n\n finalLambda = copyLambda;\n }\n\n return finalLambda;\n }",
"void MemorizeBestSource() \n\t{\n\t int i,j;\n\t \n\t\tfor(i=0;i<FoodNumber;i++)\n\t\t{\n\t\tif (f[i]<GlobalMin)\n\t\t\t{\n\t GlobalMin=f[i];\n\t for(j=0;j<D;j++)\n\t GlobalParams[j]=Foods[i][j];\n\t }\n\t\t}\n\t }",
"@Override\n\tpublic Solution<TTPVariable> run(SingleObjectiveThiefProblem thief, IEvaluator evaluator, MyRandom rand) {\n\t\tTTPVariable var = TTPVariable.create(new TourOptimalFactory(thief).next(rand), Pack.empty());\n\t\tSolution<TTPVariable> currentBest = thief.evaluate(var);\n\t\t\n\n\t\twhile (evaluator.hasNext()) {\n\n\t\t\t// now take the tour and optimize packing plan\n\t\t\tSolution<Pack> nextPack = optPack(thief, evaluator, rand, currentBest.getVariable().getTour(), currentBest.getVariable().getPack());\n\t\t\t\n\t\t\tSolution<Tour> nextTour = optTour(thief, evaluator, rand, currentBest.getVariable().getTour(), nextPack.getVariable());\n\t\t\t\n\t\t\tTTPVariable next = TTPVariable.create(nextTour.getVariable(), nextPack.getVariable());\n\t\t\tSolution<TTPVariable> s = thief.evaluate(next);\n\t\t\t\n\t\t\t//System.out.println(nextPack);\n\t\t\t//System.out.println(currentBest);\n\t\t\t//System.out.println(\"----------------\");\n\t\t\t\n\t\t\t// update the best found solution\n\t\t\tif (SolutionDominator.isDominating(s, currentBest)) {\n\t\t\t\tcurrentBest = s;\n\t\t\t\t//System.out.println(\"YES\");\n\t\t\t}\n\t\t\tevaluator.notify(currentBest);\n\n\t\t}\n\n\t\treturn currentBest;\n\t}",
"int askForTempMax();",
"public final EObject ruleMaximumFunction() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_3=null;\r\n Token otherlv_5=null;\r\n EObject lv_operator_0_0 = null;\r\n\r\n EObject lv_values_2_0 = null;\r\n\r\n EObject lv_values_4_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3094:28: ( ( ( (lv_operator_0_0= ruleMaxOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3095:1: ( ( (lv_operator_0_0= ruleMaxOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3095:1: ( ( (lv_operator_0_0= ruleMaxOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3095:2: ( (lv_operator_0_0= ruleMaxOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')'\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3095:2: ( (lv_operator_0_0= ruleMaxOperator ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3096:1: (lv_operator_0_0= ruleMaxOperator )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3096:1: (lv_operator_0_0= ruleMaxOperator )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3097:3: lv_operator_0_0= ruleMaxOperator\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getMaximumFunctionAccess().getOperatorMaxOperatorParserRuleCall_0_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleMaxOperator_in_ruleMaximumFunction6654);\r\n lv_operator_0_0=ruleMaxOperator();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getMaximumFunctionRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"operator\",\r\n \t\tlv_operator_0_0, \r\n \t\t\"MaxOperator\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,43,FOLLOW_43_in_ruleMaximumFunction6666); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getMaximumFunctionAccess().getLeftParenthesisKeyword_1());\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3117:1: ( (lv_values_2_0= ruleNumberExpression ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3118:1: (lv_values_2_0= ruleNumberExpression )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3118:1: (lv_values_2_0= ruleNumberExpression )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3119:3: lv_values_2_0= ruleNumberExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getMaximumFunctionAccess().getValuesNumberExpressionParserRuleCall_2_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleNumberExpression_in_ruleMaximumFunction6687);\r\n lv_values_2_0=ruleNumberExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getMaximumFunctionRule());\r\n \t }\r\n \t\tadd(\r\n \t\t\tcurrent, \r\n \t\t\t\"values\",\r\n \t\tlv_values_2_0, \r\n \t\t\"NumberExpression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3135:2: (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )*\r\n loop42:\r\n do {\r\n int alt42=2;\r\n int LA42_0 = input.LA(1);\r\n\r\n if ( (LA42_0==20) ) {\r\n alt42=1;\r\n }\r\n\r\n\r\n switch (alt42) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3135:4: otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) )\r\n \t {\r\n \t otherlv_3=(Token)match(input,20,FOLLOW_20_in_ruleMaximumFunction6700); if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \tnewLeafNode(otherlv_3, grammarAccess.getMaximumFunctionAccess().getCommaKeyword_3_0());\r\n \t \r\n \t }\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3139:1: ( (lv_values_4_0= ruleNumberExpression ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3140:1: (lv_values_4_0= ruleNumberExpression )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3140:1: (lv_values_4_0= ruleNumberExpression )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3141:3: lv_values_4_0= ruleNumberExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getMaximumFunctionAccess().getValuesNumberExpressionParserRuleCall_3_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumberExpression_in_ruleMaximumFunction6721);\r\n \t lv_values_4_0=ruleNumberExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getMaximumFunctionRule());\r\n \t \t }\r\n \t \t\tadd(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"values\",\r\n \t \t\tlv_values_4_0, \r\n \t \t\t\"NumberExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop42;\r\n }\r\n } while (true);\r\n\r\n otherlv_5=(Token)match(input,44,FOLLOW_44_in_ruleMaximumFunction6735); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_5, grammarAccess.getMaximumFunctionAccess().getRightParenthesisKeyword_4());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"<C, PM> VariableExp<C, PM> createVariableExp();",
"public double[] ConsumptionDecisionRule(double[] Kt, double[] Zt) {\r\n\t\t// LOGGER.info(\"Kt[0]=\" + Kt[0] + \" , Zt[0]=\" + Zt[0]);\r\n\t\tdouble[] result = new double[N];\r\n\t\tdouble[] W_t = new double[N];\r\n\t\t// double[] result = Kt;\r\n\t\t// fact[9] = iT / (double) T;\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\r\n\t\t\t// Compute wage\r\n\t\t\tW_t[i] = (1 - delta) * Kt[i] + Zt[i] * Math.pow(Kt[i], alpha);\r\n\t\t\t// LOGGER.info(\"Kt[i]=\" + Kt[i] + \" , W_t=\" + W_t);\r\n\r\n\t\t\t// fact[0] = Kt[i];\r\n\t\t\t// fact[1] = Zt[i];\r\n\t\t\t// fact[2] = W_t[i];\r\n\r\n\t\t\t// result[i] = (W_t[i] * 0.34);\r\n\r\n\t\t\t// S[sc=640619,15461196 at 2000, 3x[C 0,35 [], C 0,256 [6], C -0,032 [4]]]\r\n\t\t\t// result[i] = W_t[i] * (0.35 + 0.256 * factValues[6] - 0.032 * factValues[4]);\r\n\t\t\t// S[sc=673175,23434734 at 2000, 4x[C 0,448 [6], C 0,35 [], C -0,192 [8, 8, 8], C -0,032 [4]]]\r\n\t\t\t// result[i] = W_t[i] * (0.35 + 0.448 * fact[6] - 0.192 * fact[8] * fact[8] * fact[8] - 0.032 * fact[4]);\r\n\r\n\t\t\t// S[sc=684511.51178919 at 5000, 6x[C 0.576 [6], C 0.35 [], C -0.256 [4, 5, 8], C -0.128 [8, 8, 8], C 0.032\r\n\t\t\t// [3], C -0.032 [4]]]\r\n\t\t\t// result[i] = W_t[i]\r\n\t\t\t// * (0.35 + 0.576 * fact[6] - 0.256 * fact[4] * fact[5] * fact[8] - 0.128 * fact[8] * fact[8] * fact[8] +\r\n\t\t\t// 0.032\r\n\t\t\t// * fact[3] - 0.032 * fact[4]);\r\n\r\n\t\t\t// S[sc=713249.61733519 at 17000, 10x[C 0.57042768 [6], C -0.42834052 [4, 5, 8], C 0.35726662 [], C\r\n\t\t\t// -0.19234839 [8, 8, 8], C 0.0618062 [3], C 0.03906074 [3, 3], C -0.0354908 [6, 8, 8], C -0.032 [4], C\r\n\t\t\t// 0.02872478 [3, 6, 6], C -0.01470091 [4, 8]]]\r\n\t\t\t// result[i] = W_t[i]\r\n\t\t\t// * (0.35726662 + 0.57042768 * fact[3] - 0.42834052 * fact[1] * fact[2] * fact[5] - 0.19234839 * fact[5] *\r\n\t\t\t// fact[5]\r\n\t\t\t// * fact[5] + 0.0618062 * fact[2] + 0.03906074 * fact[2] * fact[2] - 0.0354908 * fact[3] * fact[5] *\r\n\t\t\t// fact[5]\r\n\t\t\t// - 0.032 * fact[1] + 0.02872478 * fact[0] * fact[3] * fact[3] - 0.01470091 * fact[1] * fact[5]);\r\n\t\t\tresult[i] = W_t[i]\r\n\t\t\t\t\t* ( //\r\n\t\t\t\t\t0.40334336 + 0.22997859 * fact[3] + 0.21837595 * fact[3] * fact[3] + 0.15973829 * fact[3] * fact[4] + -0.10161004\r\n\t\t\t\t\t\t\t* fact[1] * fact[5] + -0.020384 * fact[1] * fact[1] * fact[5]\r\n\t\t\t);\r\n\t\t\t// Keep only valid solutions\r\n\t\t\tresult[i] = Math.max(result[i], VERY_SMALL * W_t[i]);\r\n\t\t\t// to have a valid result\r\n\t\t\tresult[i] = Math.min(result[i], W_t[i] * (1.0 - VERY_SMALL));\r\n\t\t}\r\n\r\n\t\t// LOGGER.info(\"Kt[0]=\" + Kt[0] + \" , Zt[0]=\" + Zt[0] + \" , \" + result[0] + \" for \" + iT);\r\n\t\t// int s = 0;\r\n\t\t// LOGGER.info(\"Kt[\" + s + \"]=\" + Kt[s] + \" , Zt[]=\" + Zt[s] + \" , W_t[]=\" + W_t[s] + \" , \" + result[s] +\r\n\t\t// \" for \" + iT);\r\n\t\tiT++;\r\n\t\treturn result;\r\n\t}",
"public static int dynamic_p(int objects,int capacity){\r\n // Array to accommodate dynamic programming solutions\r\n int dp_array[][] = new int[objects+1][capacity+1];\r\n // filling the 2D array\r\n for(int i=0; i<= objects;i++){\r\n for(int j=0; j<= capacity;j++){\r\n if(i == 0)\r\n dp_array[i][j]=0; // base case(number of objects are zero)\r\n else if(j == 0)\r\n dp_array[i][j]=0; // base case(capacity is zero)\r\n else if(randvariables[i-1] <= j){ // checking if the wight of object is less than the current knapsack capacity\r\n int included = randvalues[i-1]+dp_array[i-1][j-randvariables[i-1]]; // object is included\r\n int not_included = dp_array[i-1][j]; // object is not included\r\n\r\n //taking the max of these two\r\n if(included > not_included)\r\n dp_array[i][j] = included;\r\n else\r\n dp_array[i][j]= not_included;\r\n }\r\n else // weight is more than capacity .. not including the object\r\n dp_array[i][j] = dp_array[i-1][j];\r\n }\r\n }\r\n\r\n //System.out.println(Arrays.deepToString(dp_array));\r\n int solution = dp_array[objects][capacity];\r\n boolean[] optimalset = solution_used(dp_array,objects,capacity);\r\n System.out.println(Arrays.toString(optimalset));\r\n dp_array = null;\r\n return solution; // return the final solution\r\n\r\n }",
"static float[] mulVM(float[] vt, float vt3, float[] m){\n \t // 0 1 2 3 \n \t // 4 5 6 7\n \t // 8 9 10 11\n \t // 12 13 14 15\n \t // 0 1 2 3 \n \t\n \t return new float[] {vt[0]*m[0] + vt[1]*m[4] + vt[2]*m[ 8] + vt3*m[12],\n\t\t \t \t\t vt[0]*m[1] + vt[1]*m[5] + vt[2]*m[ 9] + vt3*m[13],\n\t\t \t \t\t vt[0]*m[2] + vt[1]*m[6] + vt[2]*m[10] + vt3*m[14],\n\t\t \t \t\t vt[0]*m[3] + vt[1]*m[7] + vt[2]*m[11] + vt3*m[15]};\n \t\n }",
"public static int[] knapsackNoRep(int[] values, int[] weights, int twt) {\n // at maxValSets[i] points to a row of weight indices that provide the max set to achieve weight i;\n int[][] maxValSets = new int[twt + 1][];\n for (int i = 0; i < weights.length; i++) {\n //there is only one value[i] to achieve maximum weight i\n maxValSets[weights[i]] = new int[]{i};\n }\n\n // maxValSets[weights[0]] = new int[]{0};\n int currWt = weights[0];\n while (currWt <= twt) {\n // start with weights at currWt\n for (int wtIndx = 0; wtIndx < weights.length; wtIndx++) {\n // these are set of indices that provide current max value at currWt\n int[] currMaxIndices = maxValSets[currWt];\n // if the current weight index has not already been used\n int nextWt = currWt + weights[wtIndx];\n if ((nextWt <= twt) && (!contains(currMaxIndices, wtIndx))) {\n // need to find weight indices at currWt + weight[wtIndx]\n int nextMaxWithCurr = Arrays.stream(currMaxIndices).map((ind) -> values[ind]).sum() + values[wtIndx];\n int[] nextCurrMaxIndices = maxValSets[nextWt];\n int nextCurrMax = 0;\n if (nextCurrMaxIndices != null) {\n nextCurrMax = Arrays.stream(nextCurrMaxIndices).map((ind) -> values[ind]).sum();\n }\n // if\n if (nextMaxWithCurr > nextCurrMax) {\n int[] newMaxArr = new int[currMaxIndices.length + 1];\n System.arraycopy(currMaxIndices, 0, newMaxArr, 0, currMaxIndices.length);\n // at the last element add the current weight index\n newMaxArr[currMaxIndices.length] = wtIndx;\n maxValSets[nextWt] = newMaxArr;\n }\n }\n }\n currWt++;\n while ((currWt <= twt) && (maxValSets[currWt] == null)) {\n currWt++;\n }\n }\n int[] tinds = maxValSets[twt];\n if (tinds != null) {\n int maxVal = 0;\n System.out.println(\"For target weight \" + twt + \" use:\");\n for (int i : tinds) {\n System.out.print(\"weight \" + weights[i] + \" val \" + values[i] + \" ,\");\n maxVal += values[i];\n }\n System.out.println(\" Total value = \" + maxVal);\n }\n return maxValSets[twt];\n\n }",
"private static double evaluate_dev(int count, int t) {\n double[][] tmp_featweights = new double[Features.num_feat][600000];\n double[][] tmp_best_avg_featVal = new double[Features.num_feat][600000];\n double[][] tmp_sum_featVal = new double[Features.num_feat][600000];\n double[][] tmp_changes_featVal = new double[Features.num_feat][600000];\n for (int ii = 0; ii < Features.num_feat; ii++) {\n tmp_featweights[ii] = Arrays.copyOf(Features.featweights[ii], Features.featweights[ii].length);\n tmp_best_avg_featVal[ii] = Arrays.copyOf(Features.best_avg_featVal[ii], Features.best_avg_featVal[ii].length);\n tmp_sum_featVal[ii] = Arrays.copyOf(Features.sum_featVal[ii], Features.sum_featVal[ii].length);\n tmp_changes_featVal[ii] = Arrays.copyOf(Features.changes_featVal[ii], Features.changes_featVal[ii].length);\n }\n double[][] tmp_a = new double[Features.m][Features.m];\n double[][] tmp_best_avg_a = new double[Features.m][Features.m];\n double[][] tmp_sum_a = new double[Features.m][Features.m];\n double[][] tmp_changes_a = new double[Features.m][Features.m];\n for (int ii = 0; ii < Features.m; ii++) {\n tmp_a[ii] = Arrays.copyOf(Features.a[ii], Features.a[ii].length);\n tmp_best_avg_a[ii] = Arrays.copyOf(Features.best_avg_a[ii], Features.best_avg_a[ii].length);\n tmp_sum_a[ii] = Arrays.copyOf(Features.sum_a[ii], Features.sum_a[ii].length);\n tmp_changes_a[ii] = Arrays.copyOf(Features.changes_a[ii], Features.changes_a[ii].length);\n }\n // final average\n Features.final_average(count);\n try {\n BufferedReader test_file = new BufferedReader(new FileReader(dev_file));\n String sentence = \"\";\n String line = null;\n while ((line=test_file.readLine()) != null) {\n if (line.isEmpty()) {\n Features.viterbi(\"<s> \"+sentence.substring(0,sentence.length()-1)+\" </s>\", true, mdl_path+\"/dev_output_\"+ (t+1), avg_flag);\n sentence = \"\";\n } else {\n sentence += line.substring(0,line.indexOf(\"\\t\")) + \" \";\n }\n }\n test_file.close();\n }\n catch(Exception ex){\n ex.printStackTrace();\n }\n double dev_acc = tagging_accuracy(dev_file, mdl_path+\"/dev_output_\"+ (t+1));\n if (dev_acc > best_acc_so_far) {\n Features.bestiter_a = Features.a;\n Features.bestiter_featweights = Features.featweights;\n Features.bestiter_avg_a = Features.best_avg_a;\n Features.bestiter_avg_featVal = Features.best_avg_featVal;\n }\n // restore before evaluation values\n Features.featweights = tmp_featweights;\n Features.best_avg_featVal = tmp_best_avg_featVal;\n Features.sum_featVal = tmp_sum_featVal;\n Features.changes_featVal = tmp_changes_featVal;\n Features.a = tmp_a;\n Features.best_avg_a = tmp_best_avg_a;\n Features.sum_a = tmp_sum_a;\n Features.changes_a = tmp_changes_a;\n return dev_acc;\n }",
"private ASSPSolution floydWarshall(Double[][] aMatrix, Integer[][] pMatrix)\n {\n Double best[][][] = new Double[2][this.numIntxns][this.numIntxns];\n Integer pred[][][] = new Integer[2][this.numIntxns][this.numIntxns];\n\n best[0] = aMatrix;\n best[1] = aMatrix;\n\n pred[0] = pMatrix;\n pred[1] = pMatrix;\n\n int solnIndex = 0;\n\n for (int k = 0; k < this.numIntxns; k++)\n {\n for (int u = 0; u < this.numIntxns; u++)\n {\n for (int v = 0; v < this.numIntxns; v++)\n {\n // we only need to keep two matrices in memory and swap\n // between them. i and j alternate.\n int i = k % 2;\n int j = (i == 0) ? 1 : 0;\n\n best[i][u][v] = best[j][u][v];\n\n // note that null represents infinity\n if (best[i][u][k] != null && best[i][k][v] != null)\n {\n // if this spot is infinite, anything is better\n if (best[i][u][v] == null)\n {\n best[i][u][v] = best[j][u][k] + best[j][k][v];\n pred[i][u][v] = k;\n }\n else if \n ((best[j][u][k] + best[j][k][v]) < best[i][u][v])\n {\n best[i][u][v] = best[j][u][k] + best[j][k][v];\n pred[i][u][v] = k;\n }\n\n // Stores the last i value so that the correct answers \n // can be sent back to the user.\n if (v == this.numIntxns - 1)\n {\n solnIndex = i;\n }\n }\n }\n }\n }\n\n return new ASSPSolution(best[solnIndex], pred[solnIndex]);\n }",
"public void calculate(double[] theta) {\r\n dvModel.vectorToParams(theta);\r\n\r\n double localValue = 0.0;\r\n double[] localDerivative = new double[theta.length];\r\n\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryW_dfsG,binaryW_dfsB;\r\n binaryW_dfsG = TwoDimensionalMap.treeMap();\r\n binaryW_dfsB = TwoDimensionalMap.treeMap();\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryScoreDerivativesG,binaryScoreDerivativesB ;\r\n binaryScoreDerivativesG = TwoDimensionalMap.treeMap();\r\n binaryScoreDerivativesB = TwoDimensionalMap.treeMap();\r\n Map<String, SimpleMatrix> unaryW_dfsG,unaryW_dfsB ;\r\n unaryW_dfsG = new TreeMap<String, SimpleMatrix>();\r\n unaryW_dfsB = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> unaryScoreDerivativesG,unaryScoreDerivativesB ;\r\n unaryScoreDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n unaryScoreDerivativesB= new TreeMap<String, SimpleMatrix>();\r\n\r\n Map<String, SimpleMatrix> wordVectorDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> wordVectorDerivativesB = new TreeMap<String, SimpleMatrix>();\r\n\r\n for (TwoDimensionalMap.Entry<String, String, SimpleMatrix> entry : dvModel.binaryTransform) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n binaryW_dfsG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryW_dfsB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryScoreDerivativesG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n binaryScoreDerivativesB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n }\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.unaryTransform.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n unaryW_dfsG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryW_dfsB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryScoreDerivativesG.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n unaryScoreDerivativesB.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n }\r\n if (op.trainOptions.trainWordVectors) {\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.wordVectors.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n wordVectorDerivativesG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n wordVectorDerivativesB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n }\r\n }\r\n\r\n // Some optimization methods prints out a line without an end, so our\r\n // debugging statements are misaligned\r\n Timing scoreTiming = new Timing();\r\n scoreTiming.doing(\"Scoring trees\");\r\n int treeNum = 0;\r\n MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>> wrapper = new MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>>(op.trainOptions.trainingThreads, new ScoringProcessor());\r\n for (Tree tree : trainingBatch) {\r\n wrapper.put(tree);\r\n }\r\n wrapper.join();\r\n scoreTiming.done();\r\n while (wrapper.peek()) {\r\n Pair<DeepTree, DeepTree> result = wrapper.poll();\r\n DeepTree goldTree = result.first;\r\n DeepTree bestTree = result.second;\r\n\r\n StringBuilder treeDebugLine = new StringBuilder();\r\n Formatter formatter = new Formatter(treeDebugLine);\r\n boolean isDone = (Math.abs(bestTree.getScore() - goldTree.getScore()) <= 0.00001 || goldTree.getScore() > bestTree.getScore());\r\n String done = isDone ? \"done\" : \"\";\r\n formatter.format(\"Tree %6d Highest tree: %12.4f Correct tree: %12.4f %s\", treeNum, bestTree.getScore(), goldTree.getScore(), done);\r\n System.err.println(treeDebugLine.toString());\r\n if (!isDone){\r\n // if the gold tree is better than the best hypothesis tree by\r\n // a large enough margin, then the score difference will be 0\r\n // and we ignore the tree\r\n\r\n double valueDelta = bestTree.getScore() - goldTree.getScore();\r\n //double valueDelta = Math.max(0.0, - scoreGold + bestScore);\r\n localValue += valueDelta;\r\n\r\n // get the context words for this tree - should be the same\r\n // for either goldTree or bestTree\r\n List<String> words = getContextWords(goldTree.getTree());\r\n\r\n // The derivatives affected by this tree are only based on the\r\n // nodes present in this tree, eg not all matrix derivatives\r\n // will be affected by this tree\r\n backpropDerivative(goldTree.getTree(), words, goldTree.getVectors(),\r\n binaryW_dfsG, unaryW_dfsG,\r\n binaryScoreDerivativesG, unaryScoreDerivativesG,\r\n wordVectorDerivativesG);\r\n\r\n backpropDerivative(bestTree.getTree(), words, bestTree.getVectors(),\r\n binaryW_dfsB, unaryW_dfsB,\r\n binaryScoreDerivativesB, unaryScoreDerivativesB,\r\n wordVectorDerivativesB);\r\n\r\n }\r\n ++treeNum;\r\n }\r\n\r\n double[] localDerivativeGood;\r\n double[] localDerivativeB;\r\n if (op.trainOptions.trainWordVectors) {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator(),\r\n wordVectorDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator(),\r\n wordVectorDerivativesB.values().iterator());\r\n } else {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator());\r\n }\r\n\r\n // correct - highest\r\n for (int i =0 ;i<localDerivativeGood.length;i++){\r\n localDerivative[i] = localDerivativeB[i] - localDerivativeGood[i];\r\n }\r\n\r\n // TODO: this is where we would combine multiple costs if we had parallelized the calculation\r\n value = localValue;\r\n derivative = localDerivative;\r\n\r\n // normalizing by training batch size\r\n value = (1.0/trainingBatch.size()) * value;\r\n ArrayMath.multiplyInPlace(derivative, (1.0/trainingBatch.size()));\r\n\r\n // add regularization to cost:\r\n double[] currentParams = dvModel.paramsToVector();\r\n double regCost = 0;\r\n for (int i = 0 ; i<currentParams.length;i++){\r\n regCost += currentParams[i] * currentParams[i];\r\n }\r\n regCost = op.trainOptions.regCost * 0.5 * regCost;\r\n value += regCost;\r\n // add regularization to gradient\r\n ArrayMath.multiplyInPlace(currentParams, op.trainOptions.regCost);\r\n ArrayMath.pairwiseAddInPlace(derivative, currentParams);\r\n\r\n }",
"abstract AbstractTree<T> maximize(int maxOperationsCount);",
"void max_speed (double min_lift, double max_drag, boolean update_info) {\n velocity = kts_to_speed(20);\n find_aoa_of_min_drag();\n double pitch_of_min_drag = craft_pitch;\n trace(\"pitch_of_min_drag: \" + pitch_of_min_drag);\n\n // step 2. with current (lowest drag) pitch, iterate speed up\n // until drag exceeds max_drag.\n double speed = (total_drag() > max_drag) || foil_lift() > min_lift\n ? kts_to_speed(5) // pretty arbitrary...\n : velocity;\n\n for (; speed < v_max; speed += 1) { \n velocity = speed;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() > max_drag) \n break;\n }\n\n trace(\"velocity after step2: \" + velocity);\n\n // // at min drag angle can not produce enough lift? unsolvable.\n // if (foil_lift() < min_lift) {\n // trace(\"can not solve 'fild max speed' task for given inputs.\\nincrease drag input or decrease lift input\");\n // return;\n // }\n\n // step 3. pitch_of_min_drag correction for too much lift...\n if (foil_lift() > min_lift) {\n // unsustainable, needs less pitch & speed...\n // reduce min_pitch until lift is OK\n while(pitch_of_min_drag > aoa_min) {\n pitch_of_min_drag -= 0.05;\n craft_pitch = pitch_of_min_drag;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (foil_lift() <= min_lift)\n break;\n }\n trace(\"corrected pitch_of_min_drag: \" + pitch_of_min_drag);\n }\n\n // step 4. from this speed, iterate speed down\n for (speed = velocity; speed >= 0; speed -= 1) {\n trace(\"speed: \" + speed);\n double lift = 0;\n double drag = 0;\n double pitch = pitch_of_min_drag;\n velocity = speed;\n set_mast_aoa_for_given_drag(max_drag);\n for (; pitch < aoa_max; pitch += 0.1) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n lift = foil_lift();\n drag = total_drag();\n if (drag >= max_drag) {\n // stop increasing pitch, won't work. \n //likely need less speed\n trace(\"too much drag, break. speed: \" + speed + \" pitch: \" + pitch);\n break;\n }\n if (lift >= min_lift) {\n trace(\"done \");\n if (update_info) {\n make_max_speed_info(min_lift, max_drag, velocity);\n System.out.println(\"\\nDone!\\n----------------\\n\" + max_speed_info);\n }\n return;\n } \n }\n // here pitch is at max. what about lift?\n if (pitch >= aoa_max && lift < min_lift) {\n trace(\"oops, can not be solved.\\nincrease drag limit or decrease lift threshold!\");\n return;\n }\n }\n }",
"static int dynamicProgramming(int problem) {\r\n\t\tint items = problems.get(problem).size();\r\n\t\tint cap = capacities.get(problem);\r\n\r\n\t\tint x = 0;\r\n\t\tfor(int i = 1; i < items + 1; i++, x++) {\r\n\t\t\tweights[i] = problems.get(problem).get(x).weight;\r\n\t\t\tprofits[i] = problems.get(problem).get(x).profit;\r\n\t\t}\r\n\r\n\t\tint[][] P = new int[items + 1][cap + 1];\r\n\r\n\t\tfor(int i = 0; i < items + 1; i++) {\r\n\t\t\tfor(int j = 0; j < cap + 1; j++) {\r\n\t\t\t\tP[i][j] = -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(int c = 0; c < cap + 1; c++) {\r\n\t\t\tP[0][c] = 0;\r\n\t\t}\r\n\r\n\t\tfor(int i = 1; i < items + 1; i++) {\r\n\t\t\tP[i][0] = 0;\r\n\t\t\tfor(int c = 1; c < cap + 1; c++) {\r\n\t\t\t\tif(i >= 2 && c >= 2) {\r\n\t\t\t\t\tP[i-2][c-2] = -1;\r\n\t\t\t\t}\r\n\t\t\t\tif(weights[i] <= c && P[i-1][c-weights[i]] + profits[i] > P[i-1][c]) {\r\n\t\t\t\t\tP[i][c] = P[i-1][c-weights[i]] + profits[i];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tP[i][c] = P[i-1][c];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn P[items][cap];\r\n\t}",
"public S6Solution createNewSolution(S6Fragment n,S6Transform.Memo m)\n{\n double newscore = for_source.getScore() + scoreRandom();\n\n return new SolutionBase(base_node,current_node,n,transform_set,m,for_source,newscore);\n}",
"public FireflyOptimization(){\n this(25, 1000);\n }",
"public static void main(String args[]) throws IOException {\n Scanner in = new Scanner(System.in);\n int t = in.nextInt();\n while(t-->0){\n int n = in.nextInt();\n maxProduct(n);\n }\n }",
"private void compute() {\n InputReader sc = null;\n try {\n sc = new InputReader(new FileInputStream(new File(\"./resources/worldtour\")));\n } catch (FileNotFoundException ex) {\n throw new IllegalArgumentException(ex);\n }\n\n //Build Graph\n Graph G = new Graph(sc);\n adj = new int[G.totalVertices + 1][G.totalVertices + 1];\n\n //Run BFS from each vertex and fill adjacency matrix\n for (int v = 1; v <= G.totalVertices; v++) {\n Bfs bfs = new Bfs(G, v, adj);\n }\n\n //printAdjMatrix();\n // Find the farthest 3 cities to each city\n City[][] threeFurthestTo = new City[G.totalVertices + 1][4];\n // Find the farthest 3 cities from each city\n City[][] threeFurthestFrom = new City[G.totalVertices + 1][4];\n\n for (int i = 1; i <= G.totalVertices; i++) {\n City[] source = new City[G.totalVertices + 1];\n int sourceIdx = 1;\n City[] dest = new City[G.totalVertices + 1];\n int destIdx = 1;\n for (int j = 1; j <= G.totalVertices; j++) {\n if (adj[j][i] > 0) {\n source[sourceIdx] = new City(j, adj[j][i]);\n sourceIdx++;\n }\n if (adj[i][j] > 0) {\n dest[destIdx] = new City(j, adj[i][j]);\n destIdx++;\n }\n }\n Arrays.sort(source, 1, sourceIdx);\n threeFurthestTo[i][1] = source[1];\n threeFurthestTo[i][2] = source[2];\n threeFurthestTo[i][3] = source[3];\n Arrays.sort(dest, 1, destIdx);\n threeFurthestFrom[i][1] = dest[1];\n threeFurthestFrom[i][2] = dest[2];\n threeFurthestFrom[i][3] = dest[3];\n }\n\n //printMax3To(threeFurthestTo);\n //printMax3From(threeFurthestFrom);\n //For every path a -> x -> y -> b find the largest path\n int max = 0;\n int[] result = new int[4];\n for (int x = 1; x <= G.totalVertices; x++) {\n for (int y = 1; y <= G.totalVertices; y++) {\n if (adj[x][y] > 0) {\n for (int a = 1; a < 4; a++) {\n City start = threeFurthestTo[x][a];\n if (start != null) {\n for (int b = 1; b < 4; b++) {\n City end = threeFurthestFrom[y][b];\n if (end != null) {\n int startCityId = start.cityId;\n int endCityId = end.cityId;\n if (isDistinctCity(startCityId, x, y, endCityId)) {\n int sum = adj[startCityId][x] + adj[x][y] + adj[y][endCityId];\n if (sum > max) {\n result[0] = startCityId;\n result[1] = x;\n result[2] = y;\n result[3] = endCityId;\n max = sum;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n for (int x : result) {\n System.out.print(x + \" \");\n }\n }",
"public double getBestSolutionEvaluation();",
"public static void main(String args[]) {\n FastReader fastReader = new FastReader(System.in);\n\n solveWithMaxPriorityQueue(fastReader);\n// solveWithVars(fastReader);\n// solveWithTreeSet(fastReader);\n }",
"static int getMaxCoinValGeeks(int arr[], int n)\n {\n // Create a table to store solutions of subproblems\n int table[][] = new int[n][n];\n int gap, gapStartIndx, gapEndIndx, x, y, z;\n\n // Fill table using above recursive formula.\n // Note that the tableis filled in diagonal\n // fashion (similar to http://goo.gl/PQqoS),\n // from diagonal elements to table[0][n-1]\n // which is the result.\n for (gap = 0; gap < n; ++gap)\n {\n // both gapStartIndx and gapEndIndx are incremented in each loop iteration\n // for each gap, gapStartIndx keeps moving\n // gapEndIndx is always gap more than the gapStartIndx\n // when gap == 0, gapStartIndx = gapEndIndx\n // table[i,j] identifies the max value obtained by the player who picks first\n // first player = i to get val[i] , range of coins left = i+1, j\n // second player max value = table[i+1,j], range of coins left = i+2, j\n // first player max value = table[i+2,j]. So total value for player 1 is\n // val[i] + table[i+2, j]\n // first player picks j to get val[j], range of coins left i, j-1.\n // second player max = table[i, j-1] range of coins left i, j-2\n // first player max = table[i,j-2]\n // so for finding max value for a p\n for (gapStartIndx = 0, gapEndIndx = gap; gapEndIndx < n; ++gapStartIndx, ++gapEndIndx)\n {\n // Here x is value of F(i+2, j),\n // y is F(i+1, j-1) and z is\n // F(i, j-2) in above recursive formula\n // if gapStartIndx and gapEndIndx are two or more apart\n x = ((gapStartIndx + 2) <= gapEndIndx) ? table[gapStartIndx + 2][gapEndIndx] : 0;\n y = ((gapStartIndx + 1) <= (gapEndIndx - 1)) ? table[gapStartIndx +1 ][gapEndIndx - 1] : 0;\n z = (gapStartIndx <= (gapEndIndx - 2)) ? table[gapStartIndx][gapEndIndx - 2]: 0;\n\n table[gapStartIndx][gapEndIndx] = Math.max(arr[gapStartIndx] +\n Math.min(x, y), arr[gapEndIndx] +\n Math.min(y, z));\n }\n }\n\n return table[0][n - 1];\n }",
"Model minimize(Model model);",
"void decode(T solution, double[] values);",
"@Test\n public void testBuildGraph_FactorArr() {\n // And now factors\n CostFunction[] factors = new CostFunction[]{\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n };\n\n MCS mcs = new MCS(Arrays.asList(factors));\n UPFactory f = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(f, mcs.getFactorDistribution(), mcs.getAdjacency());\n System.out.println(result);\n }",
"public double[] softmax(double[] input) {\n double output[] = new double[input.length];\n for (int i = 0; i < input.length; i++) {\n double div = 0.0;\n for (int j = 0; j < input.length; j++) {\n div += Math.exp( input[j] / softMax_temperature );\n }\n output[i] = Math.exp( input[i] / softMax_temperature ) / div;\n }\n return output;\n }",
"private void setProblem() throws IOException, InvalidInputException{\r\n String finalInputFileName;\r\n if(scale){\r\n finalInputFileName = inputFileName + \".scaled\";\r\n }\r\n else{\r\n finalInputFileName = inputFileName;\r\n }\r\n \r\n // Read data from the input file\r\n BufferedReader reader = new BufferedReader(new FileReader(finalInputFileName));\r\n if(reader.toString().length() == 0){\r\n throw new InvalidInputException(\"Invalid input file! File is empty!\");\r\n }\r\n\r\n // Prepare holders for dataset D=(X,y)\r\n Vector<svm_node[]> X = new Vector<svm_node[]>();\r\n Vector<Double> y = new Vector<Double>();\r\n int maxIndex = 0;\r\n\r\n // Load data from file to holders\r\n while(true){\r\n String line = reader.readLine();\r\n\r\n if(line == null){\r\n break;\r\n }\r\n\r\n StringTokenizer st = new StringTokenizer(line,\" \\t\\n\\r\\f:\");\r\n\r\n y.addElement(Utils.toDouble(st.nextToken()));\r\n int m = st.countTokens()/2;\r\n svm_node[] x = new svm_node[m];\r\n for(int i = 0; i < m; i++) {\r\n x[i] = new svm_node();\r\n x[i].index = Utils.toInt(st.nextToken());\r\n x[i].value = Utils.toDouble(st.nextToken());\r\n }\r\n if(m > 0){\r\n maxIndex = Math.max(maxIndex, x[m-1].index);\r\n }\r\n X.addElement(x);\r\n }\r\n\r\n this.problem = new svm_problem();\r\n this.problem.l = y.size();\r\n this.inputDime = maxIndex + 1;\r\n\r\n // Wrap up multi-dimensional input vector X\r\n this.problem.x = new svm_node[this.problem.l][];\r\n for(int i=0;i<this.problem.l;i++)\r\n this.problem.x[i] = X.elementAt(i);\r\n\r\n // Wrap up 1-dimensional input vector y\r\n this.problem.y = new double[this.problem.l];\r\n for(int i=0;i<this.problem.l;i++)\r\n this.problem.y[i] = y.elementAt(i);\r\n \r\n////////////////////???\r\n // Verify the gamma setting according to the maxIndex\r\n if(param.gamma == 0 && maxIndex > 0)\r\n param.gamma = 1.0/maxIndex;\r\n\r\n // Dealing with pre-computed kernel\r\n if(param.kernel_type == svm_parameter.PRECOMPUTED){\r\n for(int i = 0; i < this.problem.l; i++) {\r\n if (this.problem.x[i][0].index != 0) {\r\n String msg = \"Invalid kernel matrix! First column must be 0:sample_serial_number.\";\r\n throw new InvalidInputException(msg);\r\n }\r\n if ((int)this.problem.x[i][0].value <= 0 || (int)this.problem.x[i][0].value > maxIndex){\r\n String msg = \"Invalid kernel matrix! Sample_serial_number out of range.\";\r\n throw new InvalidInputException(msg);\r\n }\r\n }\r\n }\r\n\r\n reader.close();\r\n }",
"public static void main(String[] args){ w = the total weight\n\t\t// i = item i\n\t\t// m[i, w] = maximum value attained with weight <= w using items up to i\n\t\t//\n\t\t// recurrence relation:\n\t\t// m[0, w] = 0, if there's zero items, the sum is zero\n\t\t// m[i, w] = m[i-1, w], if w(i) > w, the new item's weight > current weight limit\n\t\t// m[i, w] = max(m[i-1, w],\n\t\t// \t\t\t\t m[i-1, w-w(i)] + v(i), if w(i) <= w\n\t\t//\n\t\t//\n\t\tArrayList<Item> items = new ArrayList<Item>();\n\n\t\titems.add(new Item(10, 60));\n\t\titems.add(new Item(20, 100));\n\t\titems.add(new Item(30, 120));\n\n\t\tSystem.out.println(knapsack(items.size()-1, 50, items));\n\t}",
"public OptimalValueCircuit getOptimalValueCircuit(Matrix<SInt> updateMatrix, SInt[] B, SInt pivot, SInt optimalValue);",
"Long[] searchSolution(int timeLimit, Graph g);",
"double getSolutionCost();",
"public static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\t\t\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tN = Integer.parseInt(st.nextToken());\n\t\tM = Integer.parseInt(st.nextToken());\n\t\t\n\t\tcon = new ArrayList[N+1]; conW = new ArrayList[N+1];\n\t\tD = new long[N+1];\n\t\tfor(int i =1;i<=N;i++ ){\n\t\t\tcon[i] = new ArrayList<>();\n\t\t\tconW[i] = new ArrayList<>();\n\t\t\tD [i] = Long.MAX_VALUE;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<=M;i++){\n\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\tint c = Integer.parseInt(st.nextToken());\n\t\t\tcon[a].add(b); \n\t\t\tconW[a].add(c); \n\t\t}\n\n\t\tD[1] = 0;\n\t\tfor(int i=1;i<=N;i++){\n\t\t\tif(D[i] < Long.MAX_VALUE){\n\t\t\t\tfor (int j=0;j<con[i].size();j++){\n\t\t\t\t\tint k = con[i].get(j);//i->k\n\t\t\t\t\tint w = conW[i].get(j);//i->k까지 가는데 cost\n\t\t\t\t\tD[k] = Math.min(D[k], D[i]+w);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(D[N] < Long.MAX_VALUE ? D[N] : -1);\n\n\t}",
"abstract AbstractTree<T> maximize();",
"public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}",
"@Test\n public void testBuildGraph_FactorArr_booleanArrArr() {\n\n char[][] adjacency = new char[][]{\n {0, 0, 0, 0, 0, 0, 0, 1, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 1, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 1, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 1, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 1, 0, 0, 0},\n {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 1, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},\n };\n\n CostFunction[][] factors = new CostFunction[][]{\n {factory.buildCostFunction( new Variable[]{v[0],v[7]}, 0 )},\n {},\n {factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[3]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3],v[4]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[1],v[5]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[6]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[6],v[7]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[6]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[7]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[4],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[5],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[6],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[4],v[7],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8],v[9]}, 0 )},\n };\n\n GdlFactory gf = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(gf, factors, adjacency);\n //System.out.println(result);\n }",
"public static int[][] hgAlgorithm(double[][] array, String sumType) {\r\n\t\tdouble[][] cost = copyOf(array); // Create the cost matrix\r\n\r\n\t\tif (sumType.equalsIgnoreCase(\"max\")) // Then array is weight array. Must\r\n\t\t\t\t\t\t\t\t\t\t\t\t// change to cost.\r\n\t\t{\r\n\t\t\tdouble maxWeight = findLargest(cost);\r\n\t\t\tfor (int i = 0; i < cost.length; i++) // Generate cost by\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// subtracting.\r\n\t\t\t{\r\n\t\t\t\tfor (int j = 0; j < cost[i].length; j++) {\r\n\t\t\t\t\tcost[i][j] = (maxWeight - cost[i][j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tdouble maxCost = findLargest(cost); // Find largest cost matrix element\r\n\t\t\t\t\t\t\t\t\t\t\t// (needed for step 6).\r\n\r\n\t\tint[][] mask = new int[cost.length][cost[0].length]; // The mask array.\r\n\t\tint[] rowCover = new int[cost.length]; // The row covering vector.\r\n\t\tint[] colCover = new int[cost[0].length]; // The column covering vector.\r\n\t\tint[] zero_RC = new int[2]; // Position of last zero from Step 4.\r\n\t\tint step = 1;\r\n\t\tboolean done = false;\r\n\t\twhile (done == false) // main execution loop\r\n\t\t{\r\n\t\t\tswitch (step) {\r\n\t\t\tcase 1:\r\n\t\t\t\tstep = hg_step1(step, cost);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tstep = hg_step2(step, cost, mask, rowCover, colCover);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tstep = hg_step3(step, mask, colCover);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tstep = hg_step4(step, cost, mask, rowCover, colCover, zero_RC);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\tstep = hg_step5(step, mask, rowCover, colCover, zero_RC);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\tstep = hg_step6(step, cost, rowCover, colCover, maxCost);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\tdone = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}// end while\r\n\r\n\t\tint[][] assignment = new int[array.length][2]; // Create the returned\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// array.\r\n\t\tfor (int i = 0; i < mask.length; i++) {\r\n\t\t\tfor (int j = 0; j < mask[i].length; j++) {\r\n\t\t\t\tif (mask[i][j] == 1) {\r\n\t\t\t\t\tassignment[i][0] = i;\r\n\t\t\t\t\tassignment[i][1] = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// If you want to return the min or max sum, in your own main method\r\n\t\t// instead of the assignment array, then use the following code:\r\n\t\t/*\r\n\t\t * double sum = 0; for (int i=0; i<assignment.length; i++) { sum = sum +\r\n\t\t * array[assignment[i][0]][assignment[i][1]]; } return sum;\r\n\t\t */\r\n\t\t// Of course you must also change the header of the method to:\r\n\t\t// public static double hgAlgorithm (double[][] array, String sumType)\r\n\r\n\t\treturn assignment;\r\n\t}",
"public static void main(String[] args) {\n\n final Graph<UniformFanInShape, NotUsed> max3StaticGraph = GraphDSL.create(builder -> {\n // step 2 - define aux SHAPES\n final FanInShape2<Integer, Integer, Integer> max1 = builder.add(ZipWith.create(Math::max));\n final FanInShape2<Integer, Integer, Integer> max2 = builder.add(ZipWith.create(Math::max));\n // step 3\n builder.from(max1.out()).toInlet(max2.in0());\n\n final Inlet<Integer>[] inlets = asList(max1.in0(), max1.in1(), max2.in1()).toArray(new Inlet[3]);\n\n return new UniformFanInShape(max2.out(), inlets);\n });\n\n final Source<Integer, NotUsed> source1 = Source.range(1, 10);\n final Source<Integer, NotUsed> source2 = Source.range(1, 10).map(x -> 5);\n final Source<Integer, NotUsed> source3 = Source.range(10, 1, -1);\n\n final Sink<Integer, CompletionStage<Done>> sink = Sink.foreach(x -> printf(\"Max is: %s\\n\", x));\n\n // step 1\n final RunnableGraph<CompletionStage<Done>> max3RunnableGraph = RunnableGraph.fromGraph(\n GraphDSL.create(sink,\n (builder, out) -> {\n // step 2: declaring components\n final UniformFanInShape max3Shape = builder.add(max3StaticGraph);\n // step 3: tying them together\n builder.from(builder.add(source1)).viaFanIn(max3Shape);\n builder.from(builder.add(source2)).viaFanIn(max3Shape);\n builder.from(builder.add(source3)).viaFanIn(max3Shape);\n\n builder.from(max3Shape).to(out);\n // step 4\n return ClosedShape.getInstance();\n }\n )\n );\n\n //max3RunnableGraph.run(mat).whenComplete((d, t) -> system.terminate());\n\n /*\n Non-uniform fan out shape\n Processing bank transactions\n Txn suspicious if amount > 10000\n\n Streams component for txns\n - output1: let the transaction go through\n - output2: suspicious txn ids\n */\n @AllArgsConstructor\n @Getter\n @ToString\n class Transaction{ String id; String source; String recipient; Integer amount; Date date; }\n\n Source<Transaction, NotUsed> transactionSource = Source.from(List(\n new Transaction(\"5273890572\", \"Paul\", \"Jim\", 100, new Date()),\n new Transaction(\"3578902532\", \"Daniel\", \"Jim\", 100000, new Date()),\n new Transaction(\"5489036033\", \"Jim\", \"Alice\", 7000, new Date())\n ));\n\n final Sink<Transaction, CompletionStage<Done>> bankProcessor = Sink.foreach(API::println);\n final Sink<String, CompletionStage<Done>> suspiciousAnalysisService = Sink.foreach(txnId -> printf(\"Suspicious transaction ID: %s\\n\",txnId));\n\n // step 1\n final Graph<FanOutShape2, NotUsed> suspiciousTxnStaticGraph = GraphDSL.create(builder -> {\n // step 2 - define SHAPES\n final UniformFanOutShape<Transaction, Transaction> broadcast = builder.add(Broadcast.create(2));\n final FlowShape<Transaction, Transaction> suspiciousTxnFilter = builder.add(Flow.<Transaction>create().filter(txn -> txn.amount > 10000));\n final FlowShape<Transaction, String> txnIdExtractor = builder.add(Flow.fromFunction(txn -> txn.id));\n // step 3 - tie SHAPES\n builder.from(broadcast.out(0)).via(suspiciousTxnFilter).via(txnIdExtractor);\n\n return new FanOutShape2(broadcast.in(), broadcast.out(1), txnIdExtractor.out());\n });\n\n // step 1\n final RunnableGraph<NotUsed> suspiciousTxnRunnableGraph = RunnableGraph.fromGraph(\n GraphDSL.create(transactionSource,\n (builder, sourceShape) -> {\n // step 2: declaring components\n final FanOutShape2 suspiciousTxnShape = builder.add(suspiciousTxnStaticGraph);\n // step 3: tying them together\n builder.from(sourceShape).toInlet(suspiciousTxnShape.in());\n builder.from(suspiciousTxnShape.out0()).to(builder.add(bankProcessor));\n builder.from(suspiciousTxnShape.out1()).to(builder.add(suspiciousAnalysisService));\n // step 4\n return ClosedShape.getInstance();\n }\n )\n );\n\n suspiciousTxnRunnableGraph.run(mat);\n }",
"@Override\r\n\tpublic <E> CSPResult<E> solve(CSP<E> csp, int i) {\r\n\t\titerationCount = 0;\r\n\t\tif(i==0) {\r\n\t\t\tAssignment<E> finalAssignment = backtrackFC(csp, new Assignment<E>());\r\n\t\t\treturn new CSPResult<E>(finalAssignment, iterationCount);\t\r\n\t\t}\r\n\t\tif(i==1) {\r\n\t\t\tAssignment<E> finalAssignment = backtrackFCMRVLRVDH(csp, new Assignment<E>());\r\n\t\t\treturn new CSPResult<E>(finalAssignment, iterationCount);\t\r\n\t\t}\r\n\t\tif(i==2) {\r\n\t\t\t\r\n\t\t\tAssignment<E> AC3Assignment = backtrackAC3(csp, new Assignment<E>());\r\n\t\t\treturn new CSPResult<E>(AC3Assignment,iterationCount);\r\n\t\t}\r\n\t\tif(i==3) {\r\n\t\t\t\r\n\t\t\tAssignment<E> AC3Assignment = backtrackAC3MRVLRVDH(csp, new Assignment<E>());\r\n\t\t\treturn new CSPResult<E>(AC3Assignment,iterationCount);\r\n\t\t}\r\n\t\tif(i==4) {\r\n\t\t\t\r\n\t\t\tAssignment<E> Backtracking = backtracking(csp, new Assignment<E>(), new HashMap<String,Set<E>>());\r\n\t\t\treturn new CSPResult<E>(Backtracking,iterationCount);\r\n\t\t}\r\n\t\tif(i==5) {\r\n\t\t\t\r\n\t\t\tAssignment<E> Backtracking = backtrackingMRVLCVDH(csp, new Assignment<E>(), new HashMap<String,Set<E>>());\r\n\t\t\treturn new CSPResult<E>(Backtracking,iterationCount);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static int knapsackRep(int[] values, int[] weights, int twt) {\n //assume the two input are sorted\n int[] maxVals = new int[twt + 1];\n // maximum value for the minimum weight is corresponding value\n maxVals[weights[0]] = values[0];\n // iterate over until you get the target wt\n for (int currWt = weights[0] + 1; currWt <= twt; currWt++) {\n // initialize current max weight to be infinity\n int currMaxVal = -1;\n for (int wtInd = 0; wtInd < weights.length; wtInd++) {\n // prevWt to check is current\n if ((currWt == weights[wtInd]) && (values[wtInd] > currMaxVal)) {\n currMaxVal = values[wtInd];\n }\n int prevWt = currWt - weights[wtInd];\n // if the prevWt value is valid\n if ((prevWt > 0) && (prevWt <= twt)) {\n // if there is a valid value for prevWt\n if (maxVals[prevWt] > 0) {\n int candMaxVal = maxVals[prevWt] + values[wtInd];\n if (candMaxVal > currMaxVal) {\n currMaxVal = candMaxVal;\n }\n }\n }\n }\n if (currMaxVal != -1) {\n maxVals[currWt] = currMaxVal;\n }\n }\n printArr(maxVals, \"Maximum value is %d for weight %d\" + System.lineSeparator());\n return maxVals[twt];\n }",
"void query(int u, int v) {\n int lca = lca2(u, v, spar, dep);\n// out.println(query_up(u, lca) + \" dv\");\n// out.println(query_up(v, lca) + \" ds\");\n int ans = query_up(u, lca) + query_up(v, lca); // One part of path\n out.println(ans);\n// if (temp > ans) ans = temp; // take the maximum of both paths\n// printf(\"%d\\n\", ans);\n }",
"public ArrayList execute() {//(MultivariateFunction func, double[] xvec, double tolfx, double tolx) \n num_Function_Evaluation = 0;\n double[] stat = {0.0, 0.0};\n double[] storeBest = null;\n double[] storeMean = null;\n double[] storeStd = null;\n if (isOptimization) {\n storeBest = new double[101];\n storeMean = new double[101];\n storeStd = new double[101];\n //System.out.println(\"Initialization Done\");\n }\n int storeIndex = 0;\n\n //f = func;\n //bestSolution = xvec;\n // Create first generation\n firstGeneration();\n //System.out.println(iRet+\" \"+returnResult[iRet]);\n //stopCondition(fx, bestSolution, tolfx, tolx, true);\n\n //main iteration loop\n while (true) {\n boolean xHasChanged;\n do {\n //printing steps\n if (isPrintSteps) {\n if (currGen % printStep == 0) {\n if (isOptimization) {\n if (storeIndex < 101) {\n storeBest[storeIndex] = fx;\n stat = computFitnessStat();\n storeMean[storeIndex] = stat[0];\n storeStd[storeIndex] = stat[1];\n storeIndex++;\n }\n }\n System.out.printf(\" MH algo It: %5d Best: %.9f Mean: %.9f Std: %.9f \\n\", currGen, fx, stat[0], stat[1]);\n }//printsteps\n }//isPrintSteps\n\n xHasChanged = nextGeneration();\n if (currGen >= maxIter) {//if (maxFun > 0 && numFun > maxFun)\n break;\n }\n //if (prin > 1 && currGen % 20 == 0)\n //printStatistics();\n } while (!xHasChanged);\n //if (stopCondition(fx, bestSolution, tolfx, tolx, false) || (maxFun > 0 && numFun > maxFun))\n if (currGen >= maxIter) {\n break;\n }\n if (fx < 0.0000001) {\n //System.out.println(\"treshold\" + fx);\n //break;\n }\n }//while\n //printing final step\n if (isPrintFinal) {\n if (isOptimization) {\n if (storeIndex < 101) {\n storeBest[storeIndex] = fx;\n stat = computFitnessStat();\n storeMean[storeIndex] = stat[0];\n storeStd[storeIndex] = stat[1];\n storeIndex++;\n }\n }\n System.out.printf(\" MH algo It: %5d Best: %.9f Mean: %.9f Std: %.9f \\nTotal Fun Evaluations: %d\\n\", currGen, fx, stat[0], stat[1], num_Function_Evaluation);\n }\n ArrayList array = new ArrayList();\n array.add(storeBest);\n array.add(storeMean);\n array.add(storeStd);\n return array;\n }"
] | [
"0.5920625",
"0.5569691",
"0.54332304",
"0.5410795",
"0.5356538",
"0.532937",
"0.52942413",
"0.5260894",
"0.49930963",
"0.49839368",
"0.494845",
"0.49217987",
"0.49191174",
"0.4874686",
"0.48584643",
"0.47773296",
"0.4777077",
"0.47729784",
"0.4764888",
"0.47548538",
"0.47443396",
"0.47344226",
"0.47166744",
"0.47132263",
"0.47062954",
"0.46727094",
"0.4670549",
"0.46669093",
"0.46520382",
"0.4645718",
"0.46344882",
"0.4633726",
"0.46308357",
"0.46281636",
"0.4627437",
"0.46226782",
"0.45962524",
"0.45898962",
"0.4583703",
"0.45833164",
"0.45821705",
"0.45785654",
"0.45722243",
"0.45693386",
"0.45676988",
"0.4566714",
"0.45582834",
"0.45560646",
"0.45556855",
"0.45474383",
"0.45254874",
"0.45238104",
"0.45115656",
"0.45017463",
"0.44987825",
"0.44964343",
"0.44882658",
"0.44859523",
"0.44786227",
"0.44662136",
"0.4452575",
"0.44519323",
"0.44501603",
"0.44485143",
"0.4445324",
"0.44333184",
"0.44332105",
"0.44325802",
"0.44317132",
"0.44278938",
"0.4424241",
"0.44239742",
"0.4418051",
"0.44128752",
"0.4411678",
"0.4397931",
"0.43962958",
"0.4395334",
"0.43849406",
"0.43722913",
"0.43700197",
"0.43651438",
"0.43627405",
"0.43626496",
"0.4361947",
"0.43572304",
"0.43564707",
"0.4351075",
"0.4349655",
"0.43384427",
"0.43307653",
"0.43300968",
"0.43248066",
"0.43246153",
"0.43218872",
"0.43215498",
"0.43212223",
"0.43195915",
"0.43157017",
"0.4311031"
] | 0.73093367 | 0 |
Creates a new JacksonAdapter instance with default mapper settings. | public JacksonAdapter() {
simpleMapper = initializeObjectMapper(new ObjectMapper());
//
xmlMapper = initializeObjectMapper(new XmlMapper());
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);
xmlMapper.setDefaultUseWrapper(false);
//
ObjectMapper flatteningMapper = initializeObjectMapper(new ObjectMapper())
.registerModule(FlatteningSerializer.getModule(simpleMapper()))
.registerModule(FlatteningDeserializer.getModule(simpleMapper()));
jsonMapper = initializeObjectMapper(new ObjectMapper())
// Order matters: must register in reverse order of hierarchy
.registerModule(AdditionalPropertiesSerializer.getModule(flatteningMapper))
.registerModule(AdditionalPropertiesDeserializer.getModule(flatteningMapper))
.registerModule(FlatteningSerializer.getModule(simpleMapper()))
.registerModule(FlatteningDeserializer.getModule(simpleMapper())); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static synchronized JacksonAdapter createDefaultSerializerAdapter() {\n if (serializerAdapter == null) {\n serializerAdapter = new JacksonAdapter();\n }\n return serializerAdapter;\n }",
"public ObjectMapper() {\n this.typeConverter = null;\n }",
"private static ObjectMapper createObjectMapper() {\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS, false);\n\t\tmapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);\n\t\tmapper.registerModule(new JavaTimeModule());\n\t\treturn mapper;\n\t}",
"private static <T extends ObjectMapper> T initializeObjectMapper(T mapper) {\n mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)\n .configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, true)\n .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)\n .configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true)\n .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)\n .configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true)\n .setSerializationInclusion(JsonInclude.Include.NON_NULL)\n // .registerModule(new JavaTimeModule()) -> TODO: anuchan Java 8 time (This the jackson module for java 8 Time)\n .registerModule(ByteArraySerializer.getModule())\n .registerModule(Base64UrlSerializer.getModule())\n .registerModule(DateTimeSerializer.getModule())\n .registerModule(DateTimeRfc1123Serializer.getModule())\n // .registerModule(DurationSerializer.getModule()) -> TODO: anuchan java 8 time (Custom module to convert java 8 Duration to String for serialization)\n .registerModule(HttpHeadersSerializer.getModule());\n mapper.setVisibility(mapper.getSerializationConfig().getDefaultVisibilityChecker()\n .withFieldVisibility(JsonAutoDetect.Visibility.ANY)\n .withSetterVisibility(JsonAutoDetect.Visibility.NONE)\n .withGetterVisibility(JsonAutoDetect.Visibility.NONE)\n .withIsGetterVisibility(JsonAutoDetect.Visibility.NONE));\n return mapper;\n }",
"public static JsonAdapter.Factory create() {\n return nullSafe(new AutoValueMoshi_AutoValueFactory());\n }",
"protected StreamsJacksonMapper() {\n super();\n registerModule(new StreamsJacksonModule(configuration.getDateFormats()));\n if ( configuration.getEnableScala()) {\n registerModule(new DefaultScalaModule());\n }\n configure();\n }",
"public static ObjectMapper getObjectMapper() {\n return defaultMapper;\n }",
"protected BusinessObjectMapper() {\n }",
"@Bean\n\tpublic ObjectMapper mapper() {\n\t\treturn new ObjectMapper();\n\t}",
"@Bean\n ObjectMapper objectMapper() {\n ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.setSerializationInclusion(Include.NON_DEFAULT);\n return objectMapper;\n }",
"private void setupJsonAdapter(RestAdapter.Builder builder) {\n Gson gson = new GsonBuilder()\n .setExclusionStrategies(new ExclusionStrategy() {\n @Override\n public boolean shouldSkipField(FieldAttributes f) {\n return false;\n }\n\n @Override\n public boolean shouldSkipClass(Class<?> clazz) {\n return false;\n }\n })\n .excludeFieldsWithoutExposeAnnotation()\n .registerTypeAdapterFactory(new ItemTypeAdapterFactory())\n .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)\n .create();\n\n builder.setConverter(new GsonConverter(gson));\n }",
"@Bean\n public ObjectMapper mapper() {\n return new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)\n .setDateFormat(dateFormat());\n }",
"@Bean\n public ObjectMapper objectMapper() {\n return new ObjectMapper();\n }",
"protected void registerObjectMapper() {\n\n ObjectMapper mapper = JacksonMapperRegistry.get();\n\n // create JsonProvider to provide custom ObjectMapper\n JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider(mapper, JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS);\n //provider.setMapper(mapper);\n\n register(provider);\n }",
"@Override\n public void initialize(Bootstrap<?> bootstrap) {\n bootstrap.setObjectMapper(io.dropwizard.jackson.Jackson.newMinimalObjectMapper());\n // avoids warning regarding com.fasterxml.jackson.databind.util.ClassUtil\n bootstrap.getObjectMapper().registerModule(new Jdk8Module());\n\n Jackson.initObjectMapper(bootstrap.getObjectMapper());\n bootstrap.getObjectMapper().setDateFormat(new StdDateFormat());\n // See https://github.com/dropwizard/dropwizard/issues/1558\n bootstrap.getObjectMapper().enable(MapperFeature.ALLOW_EXPLICIT_PROPERTY_RENAMING);\n }",
"public CustomObjectMapper(){\n this.setDateFormat(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\"));\n }",
"public JsonFactory() { this(null); }",
"public static ObjectMapper getMapper() {\n return MAPPER;\n }",
"JSONConverter getDefaultConverter();",
"public ObjectMappers(ObjectMapper objectMapper) {\n\t\tthis(new ObjectMapper[] { objectMapper });\n\t}",
"public Mapper newInstance() {\n Mapper mapper;\n\n mapper = new Mapper(name, parser.newInstance(), oag.newInstance());\n mapper.setLogging(logParsing, logAttribution);\n return mapper;\n }",
"public JSONBuilder() {\n\t\tthis(null, null);\n\t}",
"@Bean\n @Primary\n public ObjectMapper objectMapper(Jackson2ObjectMapperBuilder builder) {\n logger.debug(\"Register Jackson Mappers...\");\n ObjectMapper objectMapper = builder.build();\n objectMapper.registerModule(new JavaTimeModule());\n objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);\n return objectMapper;\n }",
"private JSONHelper() {\r\n\t\tsuper();\r\n\t}",
"public JodaBeanJsonReader jsonReader() {\n return new JodaBeanJsonReader(this);\n }",
"public static TypeAdapterFactory create() {\n return new AutoValueGson_MyTypeAdapterFactory();\n }",
"@Bean\n @Primary\n public ObjectMapper objectMapper() {\n final ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);\n objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n objectMapper.addMixIn(IdentifiableDocument.class, MixIn.class);\n return objectMapper;\n }",
"@Bean\n public Jackson2ObjectMapperBuilder objectMapperBuilder() {\n return new Jackson2ObjectMapperBuilder()\n .serializationInclusion(JsonInclude.Include.NON_NULL);\n }",
"public OBOMapper() {\n this(true);\n }",
"public static BusinessObjectMapper businessObjectMapper() {\n if(businessObjectMapper == null) {\n \tbusinessObjectMapper = new BusinessObjectMapper();\n }\n return businessObjectMapper;\n }",
"public static JSONBuilder newInstance(){\n return new JSONBuilder();\n }",
"public PageAdapter() {\n this.mapper = new MapperImpl();\n }",
"public JSONUtils() {\n\t\tsuper();\n\t}",
"public ActiveRowMapper() {\n\t}",
"public ObjectMapper getObjectMapper()\n/* */ {\n/* 123 */ return this.objectMapper;\n/* */ }",
"public JSONWriter()\n {\n _features = 0;\n _writeNullValues = false;\n _writerLocator = null;\n _treeCodec = null;\n _generator = null;\n _timezone = DEFAULT_TIMEZONE;\n }",
"public ObjectMapper getMapper() {\n return mapper;\n }",
"public JsonFactory setCodec(ObjectCodec oc)\n/* */ {\n/* 721 */ this._objectCodec = oc;\n/* 722 */ return this;\n/* */ }",
"@Bean\n\tpublic ObjectMapper objectMapper() {\n\t\treturn new ObjectMapper()\n\t\t\t\t.registerModules(new ProblemModule(), new ConstraintViolationProblemModule());\n\t}",
"public JsonUtil() {\r\n this.jsonSerializer = new JSONSerializer().transform(new ExcludeTransformer(), void.class).exclude(\"*.class\");\r\n }",
"public LegProfile ()\n {\n\t// For Jackson ObjectMapper's sanity!\n }",
"public JSONLoader() {}",
"protected void initDefaultStrategies() {\n\t\tRedisSerializer<String> keySerializer = new StringRedisSerializer();\n\t\tRedisSerializer<Object> valueSerializer = new JacksonSerializer();\n\t\tsetSerializer(valueSerializer);\n\t\tsetStringSerializer(keySerializer);\n\t}",
"private JsonUtils() {\n\t\tsuper();\n\t}",
"public AdditionalModelsConverter(ObjectMapperProvider springDocObjectMapper) {\n\t\tthis.springDocObjectMapper = springDocObjectMapper;\n\t}",
"public JodaBeanJsonWriter jsonWriter() {\n return new JodaBeanJsonWriter(this);\n }",
"public static synchronized StitchObjectMapper getInstance() {\n if (singleton != null) {\n return singleton;\n }\n singleton = new StitchObjectMapper();\n return singleton;\n }",
"public LibraryAdapterFactory() {\r\n\t}",
"public void setObjectMapper(ObjectMapper objectMapper)\n/* */ {\n/* 114 */ Assert.notNull(objectMapper, \"ObjectMapper must not be null\");\n/* 115 */ this.objectMapper = objectMapper;\n/* 116 */ configurePrettyPrint();\n/* */ }",
"@Override\n protected JsonUtil getJsonUtil() {\n return super.getJsonUtil();\n }",
"public MyEncodableWithEncoderDecoderSpecifiedUsingConfiguration() {}",
"public BinderConfiguration() {\n this(new PropertyResolverRegistry());\n }",
"public HibernateAwareObjectMapper() {\n\t Hibernate4Module hm = new Hibernate4Module();\n\t hm.disable(Hibernate4Module.Feature.FORCE_LAZY_LOADING);\n\t enable(SerializationFeature.INDENT_OUTPUT);\n\t enable(SerializationFeature.WRAP_EXCEPTIONS);\n\t disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);\n\t registerModule(hm);\n\t}",
"private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"Gson() {\n }",
"public Mapping() { this(null); }",
"public ObjectMapper(TypeConverter typeConverter) {\n this.typeConverter = typeConverter;\n }",
"public JsonRequestSerializer() {\n this(JNC.GSON);\n }",
"@Bean\n @ConditionalOnExpression(\"${setl.json.enabled:true}\")\n public WebMvcConfigurer canonicalWebMvcConfigurer(\n @Autowired(required = false) Jackson2ObjectMapperBuilder mapperBuilder\n ) {\n if (mapperBuilder == null) {\n ObjectMapper mapper = new ObjectMapper(new CanonicalFactory());\n mapper.findAndRegisterModules();\n return new CanonicalWebMvcConfigurer(mapper);\n }\n\n mapperBuilder.factory(new CanonicalFactory());\n ObjectMapper mapper = mapperBuilder.build();\n\n // We cannot add a module to the builder, only over-ride what is already configured, nor can we discover what modules are already specified, so the only way\n // not to break the configuration is to manually add our module after building the mapper.\n JsonModule myModule = new JsonModule();\n if (!mapper.getRegisteredModuleIds().contains(myModule.getTypeId())) {\n mapper.registerModule(myModule);\n }\n\n return new CanonicalWebMvcConfigurer(mapper);\n }",
"public static Client create() {\n ClientConfig clientConfig = new ClientConfig(JacksonFeature.class,\n JacksonJaxbJsonProvider.class,\n JacksonJsonProvider.class);\n return ClientBuilder.newClient(clientConfig);\n }",
"private void initializeAdapter() {\n }",
"private JsonUtils() {}",
"public KafkaJsonSerializer() {\n\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic UserSerializer() {\n\t\tsuper();\n\t\tmapSerializer.putAll(BeanRetriever.getBean(\"mapSerializerStrategy\", Map.class));\n\t}",
"public MapperBase() {\r\n }",
"private JsonUtils() { }",
"protected AusschreibungMapper() {\r\n\t}",
"public static JSONWriter getInstance(){\n\t\treturn new JSONWriter();\n\t}",
"@Bean\n public MapperFactory mapperFactory() {\n\n //1. Build the mapperFactory\n DefaultMapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();\n\n //2. Register all the configurable mappers\n mapperConfiguration.registerConfigurableMappers(mapperFactory);\n\n //3. Register all converters\n converterConfiguration.registerCustomConverters(mapperFactory);\n\n return mapperFactory;\n }",
"private static void initializeUnirest() {\n // Only one time\n ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.findAndRegisterModules();\n objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n\n Unirest.setObjectMapper(new JacksonObjectMapper(objectMapper));\n }",
"public Dto() {\n \t\n }",
"public interface JSONAdapter {\n public JSONObject toJSONObject();\n}",
"public CustomDateSerializer() {\n this(null);\n }",
"private void initializeMongoConverter() {\n mongoTemplate = new MongoTemplate(new SimpleMongoDbFactory(new MongoClient(), databaseName));\n JaxbAnnotationModule jaxbAnnotationModule = new JaxbAnnotationModule();\n ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.registerModule(jaxbAnnotationModule);\n }",
"public JsonArray() {\n }",
"public ObjectMappers() {\n\t\tthis.objectMappers = ImmutableList.of();\n\t}",
"@Bean\n public MessageConverter messageConverter() {\n return new Jackson2JsonMessageConverter();\n }",
"@Bean\n public Jackson2ObjectMapperBuilderCustomizer customizeJson() {\n return builder -> {\n builder.serializerByType(EasyComposition.class, compositionSerializer);\n builder.serializerByType(EasyMeasure.class, measureSerializer);\n builder.serializerByType(EasyStaff.class, staffSerializer);\n builder.serializerByType(EasyVoice.class, voiceSerializer);\n builder.serializerByType(Environment.class, environmentSerializer);\n builder.serializerByType(Device.class, deviceSerializer);\n builder.serializerByType(Json.class, jsonSerializer);\n builder.serializerByType(Rational.class, rationalSerializer);\n builder.deserializerByType(Rational.class, rationalDeserializer);\n };\n }",
"public JsonField() {\n }",
"@Bean public RestTemplate createRestTemplate() {\n RestTemplate restTemplate = new RestTemplate();\n List<HttpMessageConverter<?>> converters = new ArrayList<>();\n MappingJackson2HttpMessageConverter jsonConverter = new MappingJackson2HttpMessageConverter();\n jsonConverter.setObjectMapper(objectMapper);\n converters.add(jsonConverter);\n restTemplate.setMessageConverters(converters);\n\n return restTemplate;\n }",
"private SerializerFactory() {\r\n registerAvailableSerializers();\r\n }",
"public BreweriesAdapter() {\n }",
"public static MappableBuilder createMappableBuilder()\r\n {\r\n\r\n return new MappableBuilder( createMappableBuilderFactory() );\r\n }",
"public DataRepository(Mapper<T, K> mapper){\n this.mapper = mapper;\n }",
"public MinecraftJson() {\n }",
"private DatasetJsonConversion() {}",
"@Bean\n public MessageConverter jsonMessageConverter() {\n return new Jackson2JsonMessageConverter();\n }",
"public JSONNode() {\n map = new HashMap<>();\n }",
"CategoryJsonWriterImpl() {\r\n\t\tsuper();\r\n\t}",
"protected JsonFactory(JsonFactory src, ObjectCodec codec)\n/* */ {\n/* 293 */ this._objectCodec = null;\n/* 294 */ this._factoryFeatures = src._factoryFeatures;\n/* 295 */ this._parserFeatures = src._parserFeatures;\n/* 296 */ this._generatorFeatures = src._generatorFeatures;\n/* 297 */ this._characterEscapes = src._characterEscapes;\n/* 298 */ this._inputDecorator = src._inputDecorator;\n/* 299 */ this._outputDecorator = src._outputDecorator;\n/* 300 */ this._rootValueSeparator = src._rootValueSeparator;\n/* */ }",
"static JarCollectorConfigImpl createJarCollectorConfig(Map<String, Object> settings) {\n if (settings == null) {\n settings = Collections.emptyMap();\n }\n return new JarCollectorConfigImpl(settings);\n }",
"private MapOptions initDefaultMapOptions()\n\t{\n\t\tMapOptions options = new MapOptions();\n\t\toptions.removeDefaultControls();\n\t\toptions.setNumZoomLevels(16);\n\t\toptions.setDisplayProjection(new Projection(\"EPSG:4326\"));\n\t\treturn options;\n\t}",
"public JSONModel() {\n jo = new JSONObject();\n }",
"@Bean\n\tpublic ModelMapper modelMapper() {\n\t return new ModelMapper();\n\t}",
"@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}",
"private MappingReader() {\n\t}",
"public ResultSetMapper() {\n registerAttributeConverters();\n this.fieldNamingStrategy = new IdentityFieldNamingStrategy();\n logger.info(\"No specific field naming strategy has been set. It will default to the {} field naming strategy.\", this.fieldNamingStrategy);\n }",
"@Override\n protected void configureFactoryBuilder(final DefaultMapperFactory.Builder factoryBuilder) {\n factoryBuilder.mapNulls(false).build();\n }",
"protected JsonParser getJsonParser( ) {\r\n\t\treturn jsonParser;\r\n\t}",
"private Mapper() {\n\n }"
] | [
"0.7819749",
"0.63870996",
"0.63461256",
"0.6239599",
"0.59781206",
"0.59778243",
"0.59363025",
"0.58983785",
"0.5887651",
"0.58453417",
"0.57218105",
"0.57062864",
"0.55992943",
"0.55539036",
"0.55188847",
"0.5500941",
"0.54605865",
"0.54480714",
"0.5376211",
"0.5327551",
"0.53241855",
"0.5255445",
"0.5208875",
"0.51574504",
"0.5144458",
"0.5125381",
"0.5125161",
"0.5097454",
"0.5094932",
"0.5094146",
"0.50858766",
"0.5074032",
"0.50734437",
"0.5062359",
"0.50579023",
"0.502906",
"0.49931118",
"0.4978055",
"0.49326816",
"0.4927767",
"0.49160644",
"0.49064773",
"0.48858625",
"0.48841304",
"0.4874858",
"0.48696095",
"0.48678446",
"0.4867373",
"0.484432",
"0.48124573",
"0.4809274",
"0.48088083",
"0.48047298",
"0.4748921",
"0.47457066",
"0.47397688",
"0.47396004",
"0.4719855",
"0.47101462",
"0.47011906",
"0.4696897",
"0.46967265",
"0.4695937",
"0.46946037",
"0.46715903",
"0.46649644",
"0.4656453",
"0.46556956",
"0.46302804",
"0.46158427",
"0.4601977",
"0.45848688",
"0.4575319",
"0.45718068",
"0.45717058",
"0.45697498",
"0.4567582",
"0.45529625",
"0.45467493",
"0.4537821",
"0.45221922",
"0.45204806",
"0.45197666",
"0.4514044",
"0.4504382",
"0.4495686",
"0.448777",
"0.4484752",
"0.44846782",
"0.4478848",
"0.4446324",
"0.44420457",
"0.4436828",
"0.4431232",
"0.4430325",
"0.44235766",
"0.44214264",
"0.44167322",
"0.43974248",
"0.43966687"
] | 0.7793313 | 1 |
maintain singleton instance of the default serializer adapter. | public static synchronized JacksonAdapter createDefaultSerializerAdapter() {
if (serializerAdapter == null) {
serializerAdapter = new JacksonAdapter();
}
return serializerAdapter;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static SerializerFactory getInstance() {\r\n return INSTANCE;\r\n }",
"private SerializerFactory() {\r\n registerAvailableSerializers();\r\n }",
"public JacksonAdapter() {\n simpleMapper = initializeObjectMapper(new ObjectMapper());\n //\n xmlMapper = initializeObjectMapper(new XmlMapper());\n xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);\n xmlMapper.setDefaultUseWrapper(false);\n //\n ObjectMapper flatteningMapper = initializeObjectMapper(new ObjectMapper())\n .registerModule(FlatteningSerializer.getModule(simpleMapper()))\n .registerModule(FlatteningDeserializer.getModule(simpleMapper()));\n jsonMapper = initializeObjectMapper(new ObjectMapper())\n // Order matters: must register in reverse order of hierarchy\n .registerModule(AdditionalPropertiesSerializer.getModule(flatteningMapper))\n .registerModule(AdditionalPropertiesDeserializer.getModule(flatteningMapper))\n .registerModule(FlatteningSerializer.getModule(simpleMapper()))\n .registerModule(FlatteningDeserializer.getModule(simpleMapper())); }",
"public SerializerAdapter getSerializerAdapter() {\n return this.serializerAdapter;\n }",
"public SerializerAdapter getSerializerAdapter() {\n return this.serializerAdapter;\n }",
"Serializer<T> getSerializer();",
"public Serializer getDefaultSerializer()\r\n\t{\r\n\t\treturn new XMLSerializer();\r\n\t}",
"public static KafkaSerializer getSerializer() {\n return SerializerHolder.serializer;\n }",
"public void setSerializer(Object serializer);",
"public Serializer getSerializer()\r\n\t{\r\n\t\treturn settings.getSerializer();\r\n\t}",
"public ElementSerializer() {\n _lock = new Object();\n }",
"public static synchronized StitchObjectMapper getInstance() {\n if (singleton != null) {\n return singleton;\n }\n singleton = new StitchObjectMapper();\n return singleton;\n }",
"private SerializerFactory() {\n // do nothing\n }",
"SerializeFactory getSerializeFactory();",
"protected void initDefaultStrategies() {\n\t\tRedisSerializer<String> keySerializer = new StringRedisSerializer();\n\t\tRedisSerializer<Object> valueSerializer = new JacksonSerializer();\n\t\tsetSerializer(valueSerializer);\n\t\tsetStringSerializer(keySerializer);\n\t}",
"private static Serializer getSerializer() {\n\t\tConfiguration config = new Configuration();\n\t\tProcessor processor = new Processor(config);\n\t\tSerializer s = processor.newSerializer();\n\t\ts.setOutputProperty(Property.METHOD, \"xml\");\n\t\ts.setOutputProperty(Property.ENCODING, \"utf-8\");\n\t\ts.setOutputProperty(Property.INDENT, \"yes\");\n\t\treturn s;\n\t}",
"public SerializerService getSerializerService() {\n return serializerService;\n }",
"public void setSerializer(Serializer<Object> serializer) {\n this.serializer = serializer;\n }",
"@Override\n public Serializer<ResponseContainer> serializer() {\n return new Serializer<ResponseContainer>() {\n @Override\n public void configure(Map<String, ?> configs, boolean isKey) {\n // This method is left empty until needed.\n }\n\n @Override\n public byte[] serialize(String topic, ResponseContainer responseContainer) {\n return gson.toJson(responseContainer.getResponseData()).getBytes(StandardCharsets.UTF_8);\n }\n\n @Override\n public void close() {\n // This method is left empty until needed.\n }\n };\n }",
"private void registerAvailableSerializers() {\r\n LOG.info(\"Registering available serializer object\");\r\n mSerializers.put(XML, new XmlObjectBaseSerializer());\r\n mSerializers.put(PHP, new PHPObjectBaseSerializer());\r\n }",
"public Serializer newDefaultSerializer(Class cls) {\n return this.defaultSerializer.makeSerializer(this, cls);\n }",
"public static JsonAdapter.Factory create() {\n return nullSafe(new AutoValueMoshi_AutoValueFactory());\n }",
"private SingletonEager(){\n \n }",
"public static RetrofitClient getInstance() {\n return OUR_INSTANCE;\n }",
"public static Json getInstance() {\n\t\treturn instance;\n\t}",
"public Serializer getDefaultSerializerForAnnotatedType(Class cls) {\n if (cls.isAnnotationPresent(DefaultSerializer.class)) {\n return ReflectionSerializerFactory.makeSerializer(this, ((DefaultSerializer) cls.getAnnotation(DefaultSerializer.class)).value(), cls);\n }\n return null;\n }",
"private SerializationUtils() {\n\n }",
"public ObjectSerializationEncoder() {\n // Do nothing\n }",
"public void setSerializer(Serializer serializer )\r\n\t{\r\n\t\tsettings.setSerializer(serializer);\r\n\t}",
"public static JSONWriter getInstance(){\n\t\treturn new JSONWriter();\n\t}",
"public JsonRequestSerializer() {\n this(JNC.GSON);\n }",
"public UE2_0_3Serializer(){\n\t\txstream = new XStream(/*new DomDriver()*/);\n\t}",
"public interface TransactionSerializer extends ObjectSerializer<Transaction> {\n}",
"private JsonUtils() {\n\t\tsuper();\n\t}",
"public static amlTreeAdapterFactory getInstance() {\r\n\t\treturn instance;\r\n\t}",
"public static ConversionUtils getInstance() {\n ConversionUtils instance = (instanceStorage == null ? null : instanceStorage.get());\n if (instance == null) {\n instance = ConversionUtils.setInstance(null);\n }\n return instance;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic UserSerializer() {\n\t\tsuper();\n\t\tmapSerializer.putAll(BeanRetriever.getBean(\"mapSerializerStrategy\", Map.class));\n\t}",
"private AggregDayLogSerializer() {\n\t throw new UnsupportedOperationException(\n\t \"This class can't be instantiated\");\n\t }",
"private MainModel() {\n jsonManager = new JsonManager(this);\n }",
"public MarketDataManagerImpl()\n {\n instance = this;\n }",
"protected abstract void declareSerializers(Builder builder);",
"private static AdapterManager getAdapterManager() {\r\n return getPersistenceSession().getAdapterManager();\r\n }",
"public static SalesOrderDataSingleton getInstance()\n {\n // Return the instance\n return instance;\n }",
"public KafkaJsonSerializer() {\n\n }",
"private JSONHelper() {\r\n\t\tsuper();\r\n\t}",
"public static Serializer createNewSerializer(ClassLoader classLoader) {\n for (Serializer serializer : load(Serializer.class, classLoader)) {\n // try getting the current service and return\n try {\n return serializer;\n } catch (Throwable t) {\n // just ignore, skip and try getting the next\n }\n }\n return new StandardSerializer();\n }",
"public ListResponseJsonSerializer(ScimResourceSerializer serializer){\n resourceSerializer=serializer;\n }",
"private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"@Override\n\t\t\tprotected IAdapterFactory getDefaultAdapterFactory(Object type) {\n\t\t\t\treturn defaultAdapterFactory;\n\t\t\t}",
"public static TypeAdapterFactory create() {\n return new AutoValueGson_MyTypeAdapterFactory();\n }",
"@Override\n\t\tpublic <T> T getAdapter(Class<T> adapter) {\n\t\t\treturn null;\n\t\t}",
"@Inject\n\tpublic ScenerySerializer() {\n\t}",
"public static synchronized SubscriptionHelper getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new SubscriptionHelper();\n\t\t}\n\t\treturn instance;\n\t}",
"private SingletonSigar(){}",
"private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }",
"public CustomDateSerializer() {\n this(null);\n }",
"public void setSerializer(ImogSerializer serializer) {\n\t\tthis.serializer = serializer;\n\t}",
"public static ObjectMapper getObjectMapper() {\n return defaultMapper;\n }",
"public static RecordUtil sharedInstance() {\n if (sRecordUtil != null) {\n return sRecordUtil;\n } else {\n throw new RuntimeException(\"RecordUtil must be initialized in the Application class before use\");\n }\n }",
"private EagerInitializationSingleton() {\n\t}",
"public static ArrowRelationSerializerTeX getInstance() {\n return INSTANCE;\n }",
"public JSONUtils() {\n\t\tsuper();\n\t}",
"public PersistenceServiceXStream() {\n storageServiceClassName = ConfigurationProperties.getConfiguredStorageService();\n }",
"public static GenericRecordSetManager getInstance() {\n return instance;\n }",
"protected BusinessObjectMapper() {\n }",
"public static MyPlayerAdapter getInstance() {\n if (playerAdapter == null) {\n synchronized (MyPlayerAdapter.class) {\n if (playerAdapter == null) playerAdapter = new MyPlayerAdapter();\n }\n }\n return playerAdapter;\n }",
"public static DataSourceSwapperRegistry getInstance() {\n return INSTANCE;\n }",
"public static ShimizuRunner2 serializableInstance() {\r\n return new ShimizuRunner2(DataWrapper.serializableInstance(),\r\n PcSearchParams.serializableInstance());\r\n }",
"@NonnullAfterInit public StorageSerializer getStorageSerializer() {\n return storageSerializer;\n }",
"@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}",
"private FeedRegistry() {\n // no-op for singleton pattern\n }",
"public static Streamer getInstance() {\r\n if (streamer == null) streamer = new Streamer();\r\n return streamer;\r\n }",
"public SerialMarshallerFactory() {\n if (getSecurityManager() == null) {\n registry = SerializableClassRegistry.getInstance();\n } else {\n registry = doPrivileged(new PrivilegedAction<SerializableClassRegistry>() {\n public SerializableClassRegistry run() {\n return SerializableClassRegistry.getInstance();\n }\n });\n }\n }",
"private SparkeyServiceSingleton(){}",
"private EagerInitializedSingleton() {\n\t}",
"private EagerInitializedSingleton() {\n\t}",
"public static MarketDataManagerImpl getInstance()\n {\n return instance;\n }",
"@Override\n protected JsonUtil getJsonUtil() {\n return super.getJsonUtil();\n }",
"public static APIManager getDefault() {\r\n if (defaultInstance == null) {\r\n synchronized (APIManager.class) {\r\n if (defaultInstance == null) {\r\n defaultInstance = new APIManager();\r\n EventBus.getDefault().register(defaultInstance);\r\n }\r\n }\r\n }\r\n return defaultInstance;\r\n }",
"public LibraryAdapterFactory() {\r\n\t}",
"public interface InstanceSerializer {\n\n /**\n * Serialize instance into the <tt>SerializerWrapperObject</tt>\n *\n * @param submission submission information.\n * @param instance instance to serialize.\n * @param serializerRequestWrapper object to write into.\n * @param defaultEncoding use this encoding in case user did not provide one.\n */\n void serialize(Submission submission, Node instance, SerializerRequestWrapper serializerRequestWrapper, \n String defaultEncoding) throws Exception;\n\n}",
"public JsonUtil() {\r\n this.jsonSerializer = new JSONSerializer().transform(new ExcludeTransformer(), void.class).exclude(\"*.class\");\r\n }",
"@Override\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\n\t}",
"static SerialCommunication getInstance() {\r\n\t\treturn INSTANCE;\r\n\t}",
"@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}",
"private void setupJsonAdapter(RestAdapter.Builder builder) {\n Gson gson = new GsonBuilder()\n .setExclusionStrategies(new ExclusionStrategy() {\n @Override\n public boolean shouldSkipField(FieldAttributes f) {\n return false;\n }\n\n @Override\n public boolean shouldSkipClass(Class<?> clazz) {\n return false;\n }\n })\n .excludeFieldsWithoutExposeAnnotation()\n .registerTypeAdapterFactory(new ItemTypeAdapterFactory())\n .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)\n .create();\n\n builder.setConverter(new GsonConverter(gson));\n }",
"MessageSerializer<T> create();",
"protected Object readResolve(){\n return singletonInstance;\n }",
"synchronized static PersistenceHandler getInstance() {\n return singleInstance;\n }",
"private static Gson gson() {\n return JsonUtils.buildGson(gb -> gb.registerTypeAdapter(Json.class, (JsonSerializer<Json>) (json, type, jsonSerializationContext) ->\n jsonParser.parse(json.value())\n ));\n }",
"public static TypeBridger getInstance() {\n if (typeBridger == null)\n typeBridger = new TypeBridger();\n\n return typeBridger;\n }",
"public ObjectMapper() {\n this.typeConverter = null;\n }",
"private Singleton(){}",
"protected Serializer getSerializerAsInternal(String mechanismType)\n throws JAXRPCException {\n Serializer serializer = getSpecialized(mechanismType);\n \n // Try getting a general purpose Serializer via constructor\n // invocation\n if (serializer == null) {\n serializer = getGeneralPurpose(mechanismType);\n }\n\n try { \n // If not successfull, try newInstance\n if (serializer == null) {\n serializer = (Serializer) serClass.newInstance();\n }\n } catch (Exception e) {\n throw new JAXRPCException(\n Messages.getMessage(\"CantGetSerializer\", \n serClass.getName()),\n e);\n }\n return serializer;\n }",
"public static ChartDataUpdater getInstance(){\n\t\treturn ChartDataUpdaterInstanceHolder.instance;\n\t}",
"private ServicioProductoSingleton() {\n this.listaProductos = new ArrayList<>();\n }",
"public String getAdapter() {\n return adapter;\n }",
"public KafkaAvroSerializer() {\n super();\n }",
"private void initializeAdapter() {\n }"
] | [
"0.72597253",
"0.68301314",
"0.66259784",
"0.65389246",
"0.65389246",
"0.6512585",
"0.6434485",
"0.6334079",
"0.6332987",
"0.6319346",
"0.6268643",
"0.62673724",
"0.61777824",
"0.61680293",
"0.6161944",
"0.60596955",
"0.60433674",
"0.59648544",
"0.5900883",
"0.58979607",
"0.5870033",
"0.582602",
"0.5794403",
"0.5794292",
"0.5789701",
"0.576487",
"0.57364476",
"0.5686441",
"0.5634962",
"0.5632539",
"0.5628852",
"0.5625288",
"0.55500513",
"0.5543721",
"0.55368227",
"0.5533382",
"0.55220795",
"0.5519944",
"0.5497502",
"0.5488601",
"0.546356",
"0.54534215",
"0.5439456",
"0.54307413",
"0.54305696",
"0.54277873",
"0.5426768",
"0.54216963",
"0.5418925",
"0.5416785",
"0.5415443",
"0.5413464",
"0.5410004",
"0.5409273",
"0.5400577",
"0.53972805",
"0.5385546",
"0.53744584",
"0.5366384",
"0.5363215",
"0.5356311",
"0.53514564",
"0.53330714",
"0.5321098",
"0.53210115",
"0.52995574",
"0.5290781",
"0.5287623",
"0.52839094",
"0.5283588",
"0.5281522",
"0.5274974",
"0.5258765",
"0.5256051",
"0.5252131",
"0.5252131",
"0.5244346",
"0.5239106",
"0.52351993",
"0.52335674",
"0.5230756",
"0.5228148",
"0.52232295",
"0.52202976",
"0.5219076",
"0.5219076",
"0.52179164",
"0.5216434",
"0.5212432",
"0.520159",
"0.5200789",
"0.5197775",
"0.5187598",
"0.5187121",
"0.5180905",
"0.5180208",
"0.5179664",
"0.51790327",
"0.51764023",
"0.5175004"
] | 0.7944096 | 0 |
Initializes an instance of JacksonMapperAdapter with default configurations applied to the object mapper. | private static <T extends ObjectMapper> T initializeObjectMapper(T mapper) {
mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
.configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, true)
.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true)
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true)
.setSerializationInclusion(JsonInclude.Include.NON_NULL)
// .registerModule(new JavaTimeModule()) -> TODO: anuchan Java 8 time (This the jackson module for java 8 Time)
.registerModule(ByteArraySerializer.getModule())
.registerModule(Base64UrlSerializer.getModule())
.registerModule(DateTimeSerializer.getModule())
.registerModule(DateTimeRfc1123Serializer.getModule())
// .registerModule(DurationSerializer.getModule()) -> TODO: anuchan java 8 time (Custom module to convert java 8 Duration to String for serialization)
.registerModule(HttpHeadersSerializer.getModule());
mapper.setVisibility(mapper.getSerializationConfig().getDefaultVisibilityChecker()
.withFieldVisibility(JsonAutoDetect.Visibility.ANY)
.withSetterVisibility(JsonAutoDetect.Visibility.NONE)
.withGetterVisibility(JsonAutoDetect.Visibility.NONE)
.withIsGetterVisibility(JsonAutoDetect.Visibility.NONE));
return mapper;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JacksonAdapter() {\n simpleMapper = initializeObjectMapper(new ObjectMapper());\n //\n xmlMapper = initializeObjectMapper(new XmlMapper());\n xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);\n xmlMapper.setDefaultUseWrapper(false);\n //\n ObjectMapper flatteningMapper = initializeObjectMapper(new ObjectMapper())\n .registerModule(FlatteningSerializer.getModule(simpleMapper()))\n .registerModule(FlatteningDeserializer.getModule(simpleMapper()));\n jsonMapper = initializeObjectMapper(new ObjectMapper())\n // Order matters: must register in reverse order of hierarchy\n .registerModule(AdditionalPropertiesSerializer.getModule(flatteningMapper))\n .registerModule(AdditionalPropertiesDeserializer.getModule(flatteningMapper))\n .registerModule(FlatteningSerializer.getModule(simpleMapper()))\n .registerModule(FlatteningDeserializer.getModule(simpleMapper())); }",
"public ObjectMapper() {\n this.typeConverter = null;\n }",
"public static synchronized JacksonAdapter createDefaultSerializerAdapter() {\n if (serializerAdapter == null) {\n serializerAdapter = new JacksonAdapter();\n }\n return serializerAdapter;\n }",
"protected StreamsJacksonMapper() {\n super();\n registerModule(new StreamsJacksonModule(configuration.getDateFormats()));\n if ( configuration.getEnableScala()) {\n registerModule(new DefaultScalaModule());\n }\n configure();\n }",
"protected BusinessObjectMapper() {\n }",
"@Override\n public void initialize(Bootstrap<?> bootstrap) {\n bootstrap.setObjectMapper(io.dropwizard.jackson.Jackson.newMinimalObjectMapper());\n // avoids warning regarding com.fasterxml.jackson.databind.util.ClassUtil\n bootstrap.getObjectMapper().registerModule(new Jdk8Module());\n\n Jackson.initObjectMapper(bootstrap.getObjectMapper());\n bootstrap.getObjectMapper().setDateFormat(new StdDateFormat());\n // See https://github.com/dropwizard/dropwizard/issues/1558\n bootstrap.getObjectMapper().enable(MapperFeature.ALLOW_EXPLICIT_PROPERTY_RENAMING);\n }",
"public ObjectMappers(ObjectMapper objectMapper) {\n\t\tthis(new ObjectMapper[] { objectMapper });\n\t}",
"@Bean\n ObjectMapper objectMapper() {\n ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.setSerializationInclusion(Include.NON_DEFAULT);\n return objectMapper;\n }",
"public static ObjectMapper getObjectMapper() {\n return defaultMapper;\n }",
"private static ObjectMapper createObjectMapper() {\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS, false);\n\t\tmapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);\n\t\tmapper.registerModule(new JavaTimeModule());\n\t\treturn mapper;\n\t}",
"@Bean\n public ObjectMapper objectMapper() {\n return new ObjectMapper();\n }",
"@Bean\n\tpublic ObjectMapper mapper() {\n\t\treturn new ObjectMapper();\n\t}",
"protected void registerObjectMapper() {\n\n ObjectMapper mapper = JacksonMapperRegistry.get();\n\n // create JsonProvider to provide custom ObjectMapper\n JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider(mapper, JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS);\n //provider.setMapper(mapper);\n\n register(provider);\n }",
"private void initializeAdapter() {\n }",
"public void setObjectMapper(ObjectMapper objectMapper)\n/* */ {\n/* 114 */ Assert.notNull(objectMapper, \"ObjectMapper must not be null\");\n/* 115 */ this.objectMapper = objectMapper;\n/* 116 */ configurePrettyPrint();\n/* */ }",
"public ObjectMappers() {\n\t\tthis.objectMappers = ImmutableList.of();\n\t}",
"public PageAdapter() {\n this.mapper = new MapperImpl();\n }",
"public BinderConfiguration() {\n this(new PropertyResolverRegistry());\n }",
"@Bean\n public ObjectMapper mapper() {\n return new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)\n .setDateFormat(dateFormat());\n }",
"public CustomObjectMapper(){\n this.setDateFormat(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\"));\n }",
"private void initializeMongoConverter() {\n mongoTemplate = new MongoTemplate(new SimpleMongoDbFactory(new MongoClient(), databaseName));\n JaxbAnnotationModule jaxbAnnotationModule = new JaxbAnnotationModule();\n ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.registerModule(jaxbAnnotationModule);\n }",
"public AdditionalModelsConverter(ObjectMapperProvider springDocObjectMapper) {\n\t\tthis.springDocObjectMapper = springDocObjectMapper;\n\t}",
"public OBOMapper() {\n this(true);\n }",
"@Bean\n @Primary\n public ObjectMapper objectMapper(Jackson2ObjectMapperBuilder builder) {\n logger.debug(\"Register Jackson Mappers...\");\n ObjectMapper objectMapper = builder.build();\n objectMapper.registerModule(new JavaTimeModule());\n objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);\n return objectMapper;\n }",
"private void setupJsonAdapter(RestAdapter.Builder builder) {\n Gson gson = new GsonBuilder()\n .setExclusionStrategies(new ExclusionStrategy() {\n @Override\n public boolean shouldSkipField(FieldAttributes f) {\n return false;\n }\n\n @Override\n public boolean shouldSkipClass(Class<?> clazz) {\n return false;\n }\n })\n .excludeFieldsWithoutExposeAnnotation()\n .registerTypeAdapterFactory(new ItemTypeAdapterFactory())\n .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)\n .create();\n\n builder.setConverter(new GsonConverter(gson));\n }",
"public static ObjectMapper getMapper() {\n return MAPPER;\n }",
"public MapperBase() {\r\n }",
"@Bean\n public Jackson2ObjectMapperBuilder objectMapperBuilder() {\n return new Jackson2ObjectMapperBuilder()\n .serializationInclusion(JsonInclude.Include.NON_NULL);\n }",
"@Bean\n\tpublic ObjectMapper objectMapper() {\n\t\treturn new ObjectMapper()\n\t\t\t\t.registerModules(new ProblemModule(), new ConstraintViolationProblemModule());\n\t}",
"@Bean\n @Primary\n public ObjectMapper objectMapper() {\n final ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);\n objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n objectMapper.addMixIn(IdentifiableDocument.class, MixIn.class);\n return objectMapper;\n }",
"protected AbstractMessageSubscriber(ObjectMapper objectMapper) {\n this.objectMapper = objectMapper;\n }",
"@Before\n public void initialize()\n {\n map = new MapAdapter();\n }",
"public ObjectMapper(TypeConverter typeConverter) {\n this.typeConverter = typeConverter;\n }",
"@Before\n public void setup()\n {\n mapper.registerModules(new S3InputSourceDruidModule().getJacksonModules());\n }",
"public ActiveRowMapper() {\n\t}",
"@Bean\n public MapperFactory mapperFactory() {\n\n //1. Build the mapperFactory\n DefaultMapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();\n\n //2. Register all the configurable mappers\n mapperConfiguration.registerConfigurableMappers(mapperFactory);\n\n //3. Register all converters\n converterConfiguration.registerCustomConverters(mapperFactory);\n\n return mapperFactory;\n }",
"protected AusschreibungMapper() {\r\n\t}",
"public LegProfile ()\n {\n\t// For Jackson ObjectMapper's sanity!\n }",
"protected void initDefaultStrategies() {\n\t\tRedisSerializer<String> keySerializer = new StringRedisSerializer();\n\t\tRedisSerializer<Object> valueSerializer = new JacksonSerializer();\n\t\tsetSerializer(valueSerializer);\n\t\tsetStringSerializer(keySerializer);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic UserSerializer() {\n\t\tsuper();\n\t\tmapSerializer.putAll(BeanRetriever.getBean(\"mapSerializerStrategy\", Map.class));\n\t}",
"public HALMapper() {\n registerModule(DEFAULT_HAL_MODULE);\n }",
"@Autowired\n public void objectMapper(ObjectMapper objectMapper) {\n objectMapper.addMixIn(ProductOption.class, ProductOptionMixIn.class);\n }",
"public DataRepository(Mapper<T, K> mapper){\n this.mapper = mapper;\n }",
"private ModuleMapper() {\n mapper = new HashMap<String, String>();\n mapper.put(\"accounts\", \"Accounts\");\n mapper.put(\"acl_actions\", \"ACLActions\");\n mapper.put(\"acl_roles\", \"ACLRoles\");\n mapper.put(\"bugs\", \"Bugs\");\n mapper.put(\"calls\", \"Calls\");\n mapper.put(\"campaign_log\", \"CampaignLog\");\n mapper.put(\"campaign_trkrs\", \"CampaignTrackers\");\n mapper.put(\"campaigns\", \"Campaigns\");\n mapper.put(\"cases\", \"Cases\");\n mapper.put(\"contacts\", \"Contacts\");\n mapper.put(\"currencies\", \"Currencies\");\n mapper.put(\"document_revisions\", \"DocumentRevisions\");\n mapper.put(\"documents\", \"Documents\");\n mapper.put(\"eapm\", \"EAPM\");\n mapper.put(\"email_addresses\", \"EmailAddresses\");\n mapper.put(\"email_marketing\", \"EmailMarketing\");\n mapper.put(\"email_templates\", \"EmailTemplates\");\n mapper.put(\"emailman\", \"EmailMan\");\n mapper.put(\"emails\", \"Emails\");\n mapper.put(\"inbound_email\", \"InboundEmail\");\n mapper.put(\"job_queue\", \"SchedulersJobs\");\n mapper.put(\"leads\", \"Leads\");\n mapper.put(\"meetings\", \"Meetings\");\n mapper.put(\"notes\", \"Notes\");\n mapper.put(\"oauth_consumer\", \"OAuthKeys\");\n mapper.put(\"oauth_tokens\", \"OAuthTokens\");\n mapper.put(\"opportunities\", \"Opportunities\");\n mapper.put(\"project\", \"Project\");\n mapper.put(\"project_task\", \"ProjectTask\");\n mapper.put(\"prospect_lists\", \"ProspectLists\");\n mapper.put(\"prospects\", \"Prospects\");\n mapper.put(\"releases\", \"Releases\");\n mapper.put(\"roles\", \"Roles\");\n mapper.put(\"saved_search\", \"SavedSearch\");\n mapper.put(\"schedulers\", \"Schedulers\");\n mapper.put(\"sugarfeed\", \"SugarFeed\");\n mapper.put(\"tasks\", \"Tasks\");\n mapper.put(\"users\", \"Users\");\n }",
"public ObjectMapper getObjectMapper()\n/* */ {\n/* 123 */ return this.objectMapper;\n/* */ }",
"public void init() throws IllegalArgumentException {\r\n\t\tthis.listItemMapper = ListItemMapper.listitemMapper();\r\n\t\tthis.itemMapper = ItemMapper.itemMapper();\r\n\t\tthis.personMapper = PersonMapper.personMapper();\r\n\t\tthis.shoppingListMapper = ShoppingListMapper.shoppinglistMapper();\r\n\t\tthis.storeMapper = StoreMapper.storeMapper();\r\n\t\tthis.groupMapper = GroupMapper.groupMapper();\r\n\t\tthis.responsibilityMapper = ResponsibilityMapper.responsibilityMapper();\r\n\t\tthis.favoriteItemMapper = FavoriteItemMapper.favoriteItemMapper();\r\n\r\n\t}",
"public ObjectMapper getMapper() {\n return mapper;\n }",
"public JSONWriter()\n {\n _features = 0;\n _writeNullValues = false;\n _writerLocator = null;\n _treeCodec = null;\n _generator = null;\n _timezone = DEFAULT_TIMEZONE;\n }",
"public void init(Map<String, String> configuration);",
"public JSONUtils() {\n\t\tsuper();\n\t}",
"public HibernateAwareObjectMapper() {\n\t Hibernate4Module hm = new Hibernate4Module();\n\t hm.disable(Hibernate4Module.Feature.FORCE_LAZY_LOADING);\n\t enable(SerializationFeature.INDENT_OUTPUT);\n\t enable(SerializationFeature.WRAP_EXCEPTIONS);\n\t disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);\n\t registerModule(hm);\n\t}",
"private static void initializeUnirest() {\n // Only one time\n ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.findAndRegisterModules();\n objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n\n Unirest.setObjectMapper(new JacksonObjectMapper(objectMapper));\n }",
"public ObjectMappers(ImmutableList<ObjectMapper> objectMappers) {\n\t\tthis.objectMappers = objectMappers;\n\t}",
"private Mapper() {\n\n }",
"private JSONHelper() {\r\n\t\tsuper();\r\n\t}",
"public Mapping() { this(null); }",
"@Autowired\n\t@Override\n\tpublic void setBaseMapper() {\n\t\tthis.baseMapper=trxMapper;\n\t}",
"public JSONBuilder() {\n\t\tthis(null, null);\n\t}",
"@Override\n public void initialize(Map<String, String> configuration) {\n userToMap = configuration.get(\"UserToMap\");\n realmToMapTo = configuration.get(\"RealmToMapTo\");\n }",
"public CrawlerConfiguration() {\n\t\tinitConfiguration();\n\t}",
"@Bean\n @ConditionalOnExpression(\"${setl.json.enabled:true}\")\n public WebMvcConfigurer canonicalWebMvcConfigurer(\n @Autowired(required = false) Jackson2ObjectMapperBuilder mapperBuilder\n ) {\n if (mapperBuilder == null) {\n ObjectMapper mapper = new ObjectMapper(new CanonicalFactory());\n mapper.findAndRegisterModules();\n return new CanonicalWebMvcConfigurer(mapper);\n }\n\n mapperBuilder.factory(new CanonicalFactory());\n ObjectMapper mapper = mapperBuilder.build();\n\n // We cannot add a module to the builder, only over-ride what is already configured, nor can we discover what modules are already specified, so the only way\n // not to break the configuration is to manually add our module after building the mapper.\n JsonModule myModule = new JsonModule();\n if (!mapper.getRegisteredModuleIds().contains(myModule.getTypeId())) {\n mapper.registerModule(myModule);\n }\n\n return new CanonicalWebMvcConfigurer(mapper);\n }",
"public static BusinessObjectMapper businessObjectMapper() {\n if(businessObjectMapper == null) {\n \tbusinessObjectMapper = new BusinessObjectMapper();\n }\n return businessObjectMapper;\n }",
"public LibraryAdapterFactory() {\r\n\t}",
"private void initMapper() {\n final BeanPropertyFilter filterOutAllExcept =\n SimpleBeanPropertyFilter.filterOutAllExcept(\"fname\", \"executionTimeNano\");\n this.mapper.addMixInAnnotations(\n PortalEvent.class, PortletRenderExecutionEventFilterMixIn.class);\n final SimpleFilterProvider filterProvider = new SimpleFilterProvider();\n filterProvider.addFilter(\n PortletRenderExecutionEventFilterMixIn.FILTER_NAME, filterOutAllExcept);\n this.portletEventWriter = this.mapper.writer(filterProvider);\n }",
"public JsonFactory() { this(null); }",
"JSONConverter getDefaultConverter();",
"public Mapper newInstance() {\n Mapper mapper;\n\n mapper = new Mapper(name, parser.newInstance(), oag.newInstance());\n mapper.setLogging(logParsing, logAttribution);\n return mapper;\n }",
"private MappingReader() {\n\t}",
"public JsonUtil() {\r\n this.jsonSerializer = new JSONSerializer().transform(new ExcludeTransformer(), void.class).exclude(\"*.class\");\r\n }",
"private MapOptions initDefaultMapOptions()\n\t{\n\t\tMapOptions options = new MapOptions();\n\t\toptions.removeDefaultControls();\n\t\toptions.setNumZoomLevels(16);\n\t\toptions.setDisplayProjection(new Projection(\"EPSG:4326\"));\n\t\treturn options;\n\t}",
"@Bean\n\tpublic ModelMapper modelMapper() {\n\t return new ModelMapper();\n\t}",
"public static void initialize() {\n \tinitialize(new Configuration().configure());\n }",
"protected Configuration() {\r\n }",
"public JSONLoader() {}",
"@Override\n protected void configureFactoryBuilder(final DefaultMapperFactory.Builder factoryBuilder) {\n factoryBuilder.mapNulls(false).build();\n }",
"public ScreenDefaultTemplateMapper()\n {\n \t// empty\n }",
"public DataAdapter() {\n }",
"protected abstract void initializeImpl(Map<String,String> configuration);",
"private JsonUtils() {\n\t\tsuper();\n\t}",
"public MyEncodableWithEncoderDecoderSpecifiedUsingConfiguration() {}",
"public void init() {\n\t\tregisterBeanDefinitionParser(\"component-scan\", new AutoComponentScanBeanDefinitionParser());\n\t}",
"public ResultSetMapper() {\n registerAttributeConverters();\n this.fieldNamingStrategy = new IdentityFieldNamingStrategy();\n logger.info(\"No specific field naming strategy has been set. It will default to the {} field naming strategy.\", this.fieldNamingStrategy);\n }",
"public Mapping(final ClassLoader loader) {\r\n if (loader == null) {\r\n _classLoader = getClass().getClassLoader();\r\n } else {\r\n _classLoader = loader;\r\n }\r\n }",
"protected MXBeanMappingFactory() {}",
"public BreweriesAdapter() {\n }",
"public void setConfigurations() {\n configurations = jsonManager.getConfigurationsFromJson();\n }",
"public static JsonAdapter.Factory create() {\n return nullSafe(new AutoValueMoshi_AutoValueFactory());\n }",
"public JerseyInitializer() {\n this.register(new JacksonJsonProvider(ObjectMapperFactory.create()));\n this.property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);\n this.property(ServerProperties.BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK, true);\n this.packages(true, \"com.hh.resources\");\n }",
"private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"public ModularConfiguration(Logger logger) {\n this.logger = logger;\n }",
"protected void initialize() {\n \t\n }",
"public JAXBConverter() {\n\t}",
"public MapBuilder() {\r\n map = new Map();\r\n json = new Gson();\r\n }",
"@Before\n public void init() {\n user = new User();\n user.setId(5);\n user.setUsername(\"username\");\n user.setPassword(\"password\");\n user.setName(\"name\");\n user.setSurname(\"surname\");\n user.setCityId(1);\n user.setEmail(\"email@gmail.com\");\n user.setPhone(\"phone...\");\n JacksonTester.initFields(this, new ObjectMapper());\n }",
"@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }",
"@Before\n public void init() {\n final Map<String, DataType> defaultTypes = new HashMap<>();\n defaultTypes.put(\"frieda\", StringCell.TYPE);\n defaultTypes.put(\"berta\", StringCell.TYPE);\n ReadAdapterFactory<String, String> readAdapterFactory = new ReadAdapterFactory<String, String>() {\n\n @Override\n public ReadAdapter<String, String> createReadAdapter() {\n return new TestReadAdapter();\n }\n\n @Override\n public ProducerRegistry<String, ? extends ReadAdapter<String, String>> getProducerRegistry() {\n return m_producerRegistry;\n }\n\n @Override\n public Map<String, DataType> getDefaultTypeMap() {\n return defaultTypes;\n }\n\n };\n m_testInstance = new DefaultTypeMappingFactory<>(readAdapterFactory);\n }",
"@Override\r\n public void initialize(Bootstrap<Configuration> bootstrap) {\n }",
"@Override public void init()\n\t\t{\n\t\t}",
"@JsonCreator\n public JsonExperimentConfig(\n @JsonProperty(\"fernservers\") List<String> fernServers,\n @JsonProperty(\"wilburservers\") List<String> wilburServers,\n @JsonProperty(\"blocksperexperiment\") int blocksPerExperiment,\n @JsonProperty(\"wilburthreshold\") int wilburThreshold,\n @JsonProperty(\"privatekey\") String privatekey,\n @JsonProperty(\"me\") String me,\n @JsonProperty(\"contacts\") Map<String, JsonContact> contacts,\n @JsonProperty(\"blocksize\") int blocksize\n ) {\n super(privatekey, me, contacts);\n this.fernServers = fernServers;\n this.blocksPerExperiment = blocksPerExperiment;\n this.wilburServers = wilburServers;\n this.wilburThreshold = wilburThreshold;\n this.blocksize = blocksize;\n }",
"@Bean\n MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {\n MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();\n converter.setSupportedMediaTypes(Collections.singletonList(MediaType.ALL));\n return converter;\n }"
] | [
"0.79145277",
"0.6747996",
"0.6635654",
"0.6466982",
"0.6322962",
"0.61728114",
"0.61243606",
"0.59278667",
"0.592256",
"0.5877916",
"0.5800438",
"0.5771672",
"0.56771594",
"0.5626333",
"0.5620409",
"0.55579394",
"0.5556702",
"0.555192",
"0.55512875",
"0.5526526",
"0.55117744",
"0.54968137",
"0.54887325",
"0.5467607",
"0.53696364",
"0.5326142",
"0.53078085",
"0.530724",
"0.5301872",
"0.5296173",
"0.5242031",
"0.52286613",
"0.52256143",
"0.5198536",
"0.5190181",
"0.51455003",
"0.51341856",
"0.51147914",
"0.5112431",
"0.5073144",
"0.5064972",
"0.5043606",
"0.5037269",
"0.5033855",
"0.50325227",
"0.503121",
"0.50140107",
"0.5012387",
"0.49755484",
"0.49660438",
"0.496237",
"0.49614248",
"0.49526402",
"0.4951218",
"0.49342152",
"0.4927206",
"0.492525",
"0.49201065",
"0.49159762",
"0.48865402",
"0.4867079",
"0.48408318",
"0.48154184",
"0.4814238",
"0.48002362",
"0.47902092",
"0.47868598",
"0.47836298",
"0.47570014",
"0.47552684",
"0.47541532",
"0.47414547",
"0.4740798",
"0.4739544",
"0.47351903",
"0.47279486",
"0.4722305",
"0.4719885",
"0.47014165",
"0.4696095",
"0.46934545",
"0.4685093",
"0.468125",
"0.46757236",
"0.46622908",
"0.46550465",
"0.46317345",
"0.46301317",
"0.46298042",
"0.46134132",
"0.4609844",
"0.46085104",
"0.4606273",
"0.45947397",
"0.4593692",
"0.45913604",
"0.4583766",
"0.45800942",
"0.4579106",
"0.45594096"
] | 0.64660895 | 4 |
Draws a line on path from origin to orOpActive using touchPos and returns if line has been finished | private boolean createLine() {
boolean lineFinished = false;
//tempPiece = gridPieces.get(getGridPiece(touchPos));
lineVector = touchPos;
if (origin.row == orOpActive.row) {
if (Math.abs(lineVector.x - origin.rectangle.x) > Math.abs(orOpActive.rectangle.x - origin.rectangle.x)) {
tempPiece = orOpActive;
} else {
lineVector.y = origin.rectangle.y;
tempPiece = game.gridPieces[game.getGridPiece(lineVector)];
}
// Right
if (origin.column < tempPiece.column) {
for (int i = origin.column + 1; i <= tempPiece.column; i++) {
game.gridMap.get(origin.row).get(i).setState(game.STATE_TEMP);
}
// Left
} else {
for (int i = tempPiece.column; i < origin.column; i++) {
game.gridMap.get(origin.row).get(i).setState(game.STATE_TEMP);
}
}
} else {
if (Math.abs(lineVector.y - origin.rectangle.y) > Math.abs(orOpActive.rectangle.y - origin.rectangle.y)) {
tempPiece = orOpActive;
} else {
lineVector.x = origin.rectangle.x;
tempPiece = game.gridPieces[game.getGridPiece(lineVector)];
}
// Up
if (origin.row < tempPiece.row) {
for (int i = origin.row + 1; i <= tempPiece.row; i++) {
game.gridMap.get(i).get(origin.column).setState(game.STATE_TEMP);
}
// Down
} else {
for (int i = tempPiece.row; i < origin.row; i++) {
game.gridMap.get(i).get(origin.column).setState(game.STATE_TEMP);
}
}
}
if (getDirectNeighbors(orOpActive).contains(game.gridPieces[game.getGridPiece(lineVector)])) {
lineFinished = true;
}
if(checkFingerFling()) {
lineFinished = true;
}
return lineFinished;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n float eventX = event.getX();\n float eventY = event.getY();\n\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n // Set a new starting point\n path.moveTo(eventX, eventY);\n return true;\n case MotionEvent.ACTION_MOVE:\n // Connect the points\n path.lineTo(eventX, eventY);\n break;\n default:\n return false;\n }\n\n // Makes our view repaint and call onDraw\n invalidate();\n return true;\n }",
"public boolean followLine(Line2D path)\r\n\t{\r\n\t\tif(phase != DONE)\r\n\t\t{\r\n\t\t\tsetAngle(path);\r\n\t\t\t//debugLine = path;\r\n\t\t\tsetVelX(2*Math.cos(Math.toRadians(mcnAngle)));\r\n\t\t\tsetVelY(-2*Math.sin(Math.toRadians(mcnAngle)));\r\n\t\t\tif(getPoint().distance(path.getP2()) < 10)\r\n\t\t\t{\r\n\t\t\t\tphase = DONE;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private void touchEnded(int lineID){\n Path path = pathMap.get(lineID); // get corresponding Path\n mCanvas.drawPath(path, mPaintLine); // draw to Canvas\n path.reset(); // reset the path\n }",
"private void touchUp(){\n path.lineTo(pointX,pointY);\n }",
"public boolean lineOfSight(PathAgentModel viewer, PathAgentModel target)\r\n/* 293: */ {\r\n/* 294: */ float ty;\r\n/* 295: */ float tx;\r\n/* 296: */ float ty;\r\n/* 297:336 */ if (target.hasTarget())\r\n/* 298: */ {\r\n/* 299:338 */ float tx = target.getTargetX();\r\n/* 300:339 */ ty = target.getTargetY();\r\n/* 301: */ }\r\n/* 302: */ else\r\n/* 303: */ {\r\n/* 304:343 */ tx = target.getX();\r\n/* 305:344 */ ty = target.getY();\r\n/* 306: */ }\r\n/* 307:348 */ if (viewer.fov(tx, ty)) {\r\n/* 308:350 */ if (line(viewer.getX(), viewer.getY(), tx, ty)) {\r\n/* 309:352 */ return true;\r\n/* 310: */ }\r\n/* 311: */ }\r\n/* 312:355 */ return false;\r\n/* 313: */ }",
"@Override\n public boolean drawPathLine(Location loc1, Location loc2) {\n if (loc1.distanceTo(loc2) < DRAW_LINE_THRESHOLD_METERS) {\n return false;\n }\n Polyline line = new Polyline();\n List<GeoPoint> points = Arrays.asList(MapUtils.makeGeoPoint(loc1), MapUtils.makeGeoPoint(loc2));\n line.setPoints(points);\n line.setColor(Color.RED);\n line.setWidth(2.0f);\n mMap.getOverlayManager().add(line);\n\n mPathLines.add(line);\n return true;\n }",
"private void touchStarted(float x, float y, int lineID){\n Path path;\n Point point;\n\n // if there is already a path of lineID\n if( pathMap.containsKey(lineID) ){\n path = pathMap.get(lineID); // get the Path\n path.reset(); // reset Path because new touch has started\n point = previousPointMap.get(lineID); // get Path's last point\n } else {\n path = new Path();\n pathMap.put(lineID, path); // add the Path to Map\n point = new Point(); // create a new Point\n previousPointMap.put(lineID, point); // add the Point\n }\n\n // move to coordinates of the touch\n path.moveTo(x, y);\n point.x = (int) x;\n point.y = (int) y;\n }",
"public boolean line(float x0, float y0, float x1, float y1)\r\n/* 355: */ {\r\n/* 356:412 */ float dx = Math.abs(x1 - x0);\r\n/* 357:413 */ float dy = Math.abs(y1 - y0);\r\n/* 358: */ int sx;\r\n/* 359: */ int sx;\r\n/* 360:416 */ if (x0 < x1) {\r\n/* 361:418 */ sx = 1;\r\n/* 362: */ } else {\r\n/* 363:421 */ sx = -1;\r\n/* 364: */ }\r\n/* 365: */ int sy;\r\n/* 366: */ int sy;\r\n/* 367:423 */ if (y0 < y1) {\r\n/* 368:425 */ sy = 1;\r\n/* 369: */ } else {\r\n/* 370:429 */ sy = -1;\r\n/* 371: */ }\r\n/* 372:431 */ float err = dx - dy;\r\n/* 373:432 */ boolean line = true;\r\n/* 374:433 */ while (line)\r\n/* 375: */ {\r\n/* 376:435 */ float e2 = 2.0F * err;\r\n/* 377:437 */ if (e2 > -dy)\r\n/* 378: */ {\r\n/* 379:439 */ err -= dy;\r\n/* 380:440 */ x0 += sx;\r\n/* 381: */ }\r\n/* 382:442 */ if (e2 < dx)\r\n/* 383: */ {\r\n/* 384:444 */ err += dx;\r\n/* 385:445 */ y0 += sy;\r\n/* 386: */ }\r\n/* 387:448 */ line = tileWalkable(x0, y0);\r\n/* 388:451 */ if ((x0 == x1) && (y0 == y1)) {\r\n/* 389: */ break;\r\n/* 390: */ }\r\n/* 391:457 */ if (getAgentOnTile(x0, y0) != null) {\r\n/* 392:459 */ line = false;\r\n/* 393: */ }\r\n/* 394: */ }\r\n/* 395:465 */ return line;\r\n/* 396: */ }",
"public boolean passedBy(Line2D path) {\n\t\tfor (int i = 0; i < coordinates.size() - 1; i++) {\n\t\t\tvar p1 = coordinates.get(i);\n\t\t\tvar p2 = coordinates.get(i + 1);\n\t\t\tLine2D buildingEdge = new Line2D.Double(p1.getLng(), p1.getLat(), p2.getLng(), p2.getLat()); // x1, y1, x2, y2 \n\t\t\tif (buildingEdge.intersectsLine(path)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public boolean onTouchEvent(MotionEvent event){\n\n //Defining the X and Y co-ordinates for the paint brush position\n float x_dir_point = event.getX();\n float y_dir_point = event.getY();\n\n //Adding a swith case to detect the direction in which the paint brush will move\n switch(event.getAction()){\n //When the user touches the screen with the brush, fetch those co-ordinates\n case MotionEvent.ACTION_DOWN:\n path_draw.moveTo(x_dir_point, y_dir_point);\n return true;\n //When user starts moving the paint brush, show a line to connect to those points\n case MotionEvent.ACTION_MOVE:\n path_draw.lineTo(x_dir_point, y_dir_point);\n break;\n //When the user lifts the hand from the paint brush, do nothing\n case MotionEvent.ACTION_UP:\n break;\n default:\n return false;\n }\n\n //Perform a repaint()\n invalidate();\n return true;\n\n }",
"@Override\n\tpublic boolean onTouchEvent(MotionEvent event)\n\t{\n\t\tif (event.getPointerCount() == 1)\n\t\t{\n\t\t\tif (event.getAction() != MotionEvent.ACTION_UP)\n\t\t\t{\n\t\t\t\ttouchXPrev = touchX;\n\t\t\t\ttouchYPrev = touchY;\n\n\t\t\t\ttouchX = event.getX();\n\t\t\t\ttouchY = event.getY();\n\t\t\t}\n\t\t\telse if (touchAction == TOUCH_PINCH)\n\t\t\t{\n\t\t\t\tstrokeSegmentLength = 0;\n\t\t\t\tstrokePointCount = 0;\n\t\t\t\tlatestStroke = new Stroke(this, true);\n\t\t\t\ttouchAction = TOUCH_NONE;\n\t\t\t\trenderer.resetRenderCount();\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tswitch (tool)\n\t\t\t{\n\t\t\t\tcase TOOL_ERASER:\n\t\t\t\t{\n\t\t\t\t\t// Do nothing here. Let the TOOL_PENCIL case execute.\n\t\t\t\t}\n\t\t\t\tcase TOOL_PENCIL:\n\t\t\t\t{\n\t\t\t\t\tswitch (event.getAction())\n\t\t\t\t\t{\n\t\t\t\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (touchAction == TOUCH_NONE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Start drawing a new path.\n\t\t\t\t\t\t\t\ttouchAction = TOUCH_DRAG;\n\n\t\t\t\t\t\t\t\tlatestStroke.isEraser = tool == TOOL_ERASER;\n\t\t\t\t\t\t\t\tlatestStroke.setColor(strokeColor);\n\t\t\t\t\t\t\t\tlatestStroke.setThickness(strokeThickness);\n\n\t\t\t\t\t\t\t\tstrokeSegmentLength = 0f;\n\t\t\t\t\t\t\t\tstrokePointCount = 0;\n\t\t\t\t\t\t\t\taddPointToStroke(touchX, touchY);\n\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (touchAction == TOUCH_DRAG)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Has the stroke reached the maximum number of points? Stop adding any more points.\n\t\t\t\t\t\t\t\tif (strokePointCount >= Stroke.TriangleStrip.STROKE_POINT_LIMIT) return true;\n\n\t\t\t\t\t\t\t\t// Continue drawing a new path.\n\t\t\t\t\t\t\t\tstrokeSegmentLength += Math.sqrt((touchX - touchXPrev) * (touchX - touchXPrev)\n\t\t\t\t\t\t\t\t\t\t+ (touchY - touchYPrev) * (touchY - touchYPrev));\n\n\t\t\t\t\t\t\t\t// Has the path distance exceeded the threshold? Add a new point.\n\t\t\t\t\t\t\t\tif (strokeSegmentLength >= Stroke.SEGMENT_THRESHOLD)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstrokeSegmentLength = 0f;\n\t\t\t\t\t\t\t\t\tstrokePointCount++;\n\t\t\t\t\t\t\t\t\taddPointToStroke(touchX, touchY);\n\t\t\t\t\t\t\t\t\trequestRender();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (touchAction == TOUCH_DRAG)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (strokePointCount > 2 && latestStroke != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlatestStroke.optimize(this);\n\n\t\t\t\t\t\t\t\t\tproject.getChunkFromId(latestStroke.chunkId).addStroke(latestStroke);\n\t\t\t\t\t\t\t\t\tproject.addLoadedStroke(latestStroke);\n\n\t\t\t\t\t\t\t\t\tproject.saveChunks(new long[]{latestStroke.getContainingChunk()}, false);\n\t\t\t\t\t\t\t\t\tproject.saveMetadata();\n\t\t\t\t\t\t\t\t\tproject.getCurrentSheet().saveMetadata();\n\n\t\t\t\t\t\t\t\t\tproject.incrementStrokeCount();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlatestStroke = new Stroke(this, true);\n\t\t\t\t\t\t\t\trequestRender();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\ttouchAction = TOUCH_NONE;\n\t\t\t\t\t\t\trenderer.resetRenderCount();\n\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Is a double touch detected?\n\t\telse if (event.getPointerCount() == 2)\n\t\t{\n\t\t\t// Prepare the necessary variables for the pinch/drag.\n\t\t\tif (event.getAction() != MotionEvent.ACTION_UP)\n\t\t\t{\n\t\t\t\t/* For some reason, MotionEvent.getPointerId(int) can throw an IllegalArgumentException\n\t\t\t\t * even when MotionEvent.getPointerCount() is 2. If this happens, catch the exception\n\t\t\t\t * and discard the touch operation. */\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\ttouchXPrev = touchX;\n\t\t\t\t\ttouchYPrev = touchY;\n\n\t\t\t\t\ttouchX = event.getX(event.getPointerId(0));\n\t\t\t\t\ttouchY = event.getY(event.getPointerId(0));\n\n\t\t\t\t\ttouchX2 = event.getX(event.getPointerId(1));\n\t\t\t\t\ttouchY2 = event.getY(event.getPointerId(1));\n\n\t\t\t\t\tpinchCenterXPrev = pinchCenterX;\n\t\t\t\t\tpinchCenterYPrev = pinchCenterY;\n\n\t\t\t\t\tpinchCenterX = (touchX + touchX2)/2f;\n\t\t\t\t\tpinchCenterY = (touchY + touchY2)/2f;\n\t\t\t\t}\n\t\t\t\tcatch (IllegalArgumentException e)\n\t\t\t\t{\n\t\t\t\t\ttouchAction = TOUCH_NONE;\n\t\t\t\t\trenderer.resetRenderCount();\n\t\t\t\t\tlatestStroke = new Stroke(this, true);\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch (event.getAction())\n\t\t\t{\n\t\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t{\n\t\t\t\t\treturn false; // Nothing should happen here, so reject the event.\n\t\t\t\t}\n\t\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\t{\n\t\t\t\t\tif (touchAction != TOUCH_PINCH)\n\t\t\t\t\t{\n\t\t\t\t\t\tinitialPinchDistance = (float) Math.sqrt((touchX - touchX2) * (touchX - touchX2) + (touchY - touchY2) * (touchY - touchY2));\n\t\t\t\t\t\tinitialZoom = zoom;\n\t\t\t\t\t\tzoomPrev = zoom;\n\t\t\t\t\t\ttouchAction = TOUCH_PINCH;\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat pinchDistance = (float) Math.sqrt((touchX - touchX2) * (touchX - touchX2) + (touchY - touchY2) * (touchY - touchY2));\n\t\t\t\t\tfloat pinchDistanceRatio = pinchDistance / initialPinchDistance;\n\n\t\t\t\t\tfloat pinchCenterDiffX = pinchCenterX - pinchCenterXPrev;\n\t\t\t\t\tfloat pinchCenterDiffY = pinchCenterY - pinchCenterYPrev;\n\n\t\t\t\t\tfloat vectorX = (pinchCenterX - (viewportWidth/2f))/zoom;\n\t\t\t\t\tfloat vectorY = (pinchCenterY - (viewportHeight/2f))/zoom;\n\n\t\t\t\t\tfloat zoomDiff = zoom - zoomPrev;\n\n\t\t\t\t\tzoomPrev = zoom;\n\t\t\t\t\tsetZoomAndPan(initialZoom * pinchDistanceRatio, -(pinchCenterDiffX - vectorX * zoomDiff)/zoom, (pinchCenterDiffY - vectorY * zoomDiff)/zoom);\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\t{\n\t\t\t\t\ttouchAction = TOUCH_NONE;\n\t\t\t\t\trenderer.resetRenderCount();\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"private ShapeDrawable addPointToShapeDrawablePath(float x, float y, android.graphics.Path path){\n path.lineTo(x,y);\n\n // make local copy of path and store in new ShapeDrawable\n android.graphics.Path currPath = new android.graphics.Path(path);\n\n ShapeDrawable shapeDrawable = new ShapeDrawable();\n float[] color = {40,100,100};\n shapeDrawable.getPaint().setColor(Color.HSVToColor(color));//Color.MAGENTA);\n shapeDrawable.getPaint().setStyle(Paint.Style.STROKE);\n shapeDrawable.getPaint().setStrokeWidth(10);\n shapeDrawable.getPaint().setStrokeJoin(Paint.Join.ROUND);\n shapeDrawable.getPaint().setStrokeCap(Paint.Cap.ROUND);\n shapeDrawable.getPaint().setPathEffect(new CornerPathEffect(30));\n shapeDrawable.getPaint().setAntiAlias(true); // set anti alias so it smooths\n shapeDrawable.setIntrinsicHeight(displayManager.getHeight());\n shapeDrawable.setIntrinsicWidth(displayManager.getWidth());\n shapeDrawable.setBounds(0, 0, displayManager.getWidth(), displayManager.getHeight());\n\n shapeDrawable.setShape(new PathShape(currPath,displayManager.getWidth(),displayManager.getHeight()));\n\n return shapeDrawable;\n}",
"private boolean isPointOnLine(Location loc, Line line) {\n\n\n //System.out.println(\"SX: \"+line.getStart().getxCoord()+\" SY: \"+line.getStart().getyCoord()+\" EX: \"+line.getEnd().getxCoord()+\" EY: \"+line.getEnd().getyCoord());\n //System.out.println(\"Weight: \" + line.getWeight());\n if (isInBounds(loc, line)) {\n Vector edge = new Vector(line.getStart(), line.getEnd());\n Vector click = new Vector(line.getStart(), loc);\n\n double weight = line.getWeight();\n if (weight <= 5) {\n weight = 12;\n }\n\n double scalarProj = click.scalarProjection(edge); // scalar project of click onto edge\n double yCompClick = Math.sqrt(Math.pow(click.magntiude(), 2) - Math.pow(scalarProj, 2)); // get y component of clicked location\n //System.out.println(\"Click Magnitude: \" + click.magntiude() + \" Scalar Projection: \" + scalarProj + \" yComponent of Click: \" + yCompClick);\n\n return (yCompClick <= weight / 2);\n }\n return false;\n\n\n\n }",
"public void drawLine(Point2D startPoint, Point2D endPoint, double lineStroke, int EndType);",
"boolean lineLine(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) {\n\n\t // calculate the direction of the lines\n\t float uA = ((x4-x3)*(y1-y3) - (y4-y3)*(x1-x3)) / ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1));\n\t float uB = ((x2-x1)*(y1-y3) - (y2-y1)*(x1-x3)) / ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1));\n\n\t // if uA and uB are between 0-1, lines are colliding\n\t if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1) {\n\n\t // optionally, draw a circle where the lines meet\n\t float intersectionX = x1 + (uA * (x2-x1));\n\t float intersectionY = y1 + (uA * (y2-y1));\n\t fill(255,0,0);\n\t noStroke();\n\t ellipse(intersectionX, intersectionY, 20, 20);\n\n\t return true;\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onTouchEvent(MotionEvent _event) {\n\n float x = _event.getX();\n float y = _event.getY();\n\n switch (_event.getAction()){\n case MotionEvent.ACTION_DOWN: {\n mPath.moveTo(x,y);\n mX = x;\n mY = y;\n invalidate();\n }break;\n case MotionEvent.ACTION_MOVE: {\n int intY = (int) y;\n int intX = (int) x;\n\n int indexX;\n int indexY;\n for(int i = 0; i < size; i++){\n if(i < size/2) {\n indexX = intX + i;\n indexY = intY + i;\n } else {\n indexX = intX - i;\n indexY = intY - i;\n }\n if(indexY < height && indexY > -1 && indexX < width && indexX > -1) {\n mPixelY[indexY] = 1;\n mPixelX[indexX] = 1;\n }\n }\n float dx = Math.abs(x - mX);\n float dy = Math.abs(y - mY);\n if (dx >= TOUCH_TOLERANCE || dy >= TOUCH_TOLERANCE) {\n mPath.quadTo(mX, mY, (x + mX)/2, (y + mY)/2);\n mX = x;\n mY = y;\n }\n invalidate();\n }break;\n case MotionEvent.ACTION_UP:{\n if(isScreenFull()){\n LevelCompleteDialog d = new LevelCompleteDialog(mActivity,4);\n d.show();\n }\n }break;\n }\n\n return true;\n }",
"public void lineTo(int x1, int y1, int c1) {\n\n if (lineToOrigin) {\n if (x1 == sx0 && y1 == sy0) {\n // staying in the starting point\n return;\n }\n\n // not closing the path, do the previous lineTo\n lineToImpl(sx0, sy0, scolor0, joinToOrigin);\n lineToOrigin = false;\n } else if (x1 == x0 && y1 == y0) {\n return;\n } else if (x1 == sx0 && y1 == sy0) {\n lineToOrigin = true;\n joinToOrigin = joinSegment;\n joinSegment = false;\n return;\n }\n\n lineToImpl(x1, y1, c1, joinSegment);\n joinSegment = false;\n }",
"protected abstract void lineTo(final float x, final float y);",
"private void drawLine(GraphicsContext canvas, Point start, Point end) {\n canvas.strokeLine(\n start.X, start.Y,\n end.X, end.Y\n );\n }",
"void touch_move_draw(float event_x, float event_y) {\n path.lineTo(event_x,event_y);\n cur_x = event_x;\n cur_y = event_y;\n\n // Add point to list\n addPoint();\n }",
"public void startDraw(Vector2 point){\n path.add(point);\n }",
"private static boolean isPointOnLine(LineSegment a, Point2D b) {\r\n\t // Move the image, so that a.first is on (0|0)\r\n\t LineSegment aTmp = new LineSegment(new PointDouble(0, 0), new PointDouble(\r\n\t a.endPoint.getX() - a.startPoint.getX(), a.endPoint.getY() - a.startPoint.getY()));\r\n\t PointDouble bTmp = new PointDouble(b.getX() - a.startPoint.getX(), b.getY() - a.startPoint.getY());\r\n\t double r = crossProduct(aTmp.endPoint, bTmp);\r\n\t return Math.abs(r) < 0.000001;\r\n\t}",
"private ShapeDrawable addPointToShapeDrawablePath_quad(float x, float y, float x_next, float y_next, android.graphics.Path path){\n path.quadTo(x,y,(x_next+x)/2,(y_next+y)/2);\n\n // make local copy of path and store in new ShapeDrawable\n android.graphics.Path currPath = new android.graphics.Path(path);\n\n ShapeDrawable shapeDrawable = new ShapeDrawable();\n //shapeDrawable.getPaint().setColor(Color.MAGENTA);\n float[] color = {40,100,100};\n shapeDrawable.getPaint().setColor(Color.HSVToColor(color));\n shapeDrawable.getPaint().setStyle(Paint.Style.STROKE);\n shapeDrawable.getPaint().setStrokeWidth(10);\n shapeDrawable.getPaint().setStrokeJoin(Paint.Join.ROUND);\n shapeDrawable.getPaint().setStrokeCap(Paint.Cap.ROUND);\n shapeDrawable.getPaint().setPathEffect(new CornerPathEffect(30));\n shapeDrawable.getPaint().setAntiAlias(true); // set anti alias so it smooths\n shapeDrawable.setIntrinsicHeight(displayManager.getHeight());\n shapeDrawable.setIntrinsicWidth(displayManager.getWidth());\n shapeDrawable.setBounds(0, 0, displayManager.getWidth(), displayManager.getHeight());\n\n shapeDrawable.setShape(new PathShape(currPath,displayManager.getWidth(),displayManager.getHeight()));\n\n return shapeDrawable;\n }",
"private ArrayList<Vector2f> drawRasterLine(Graphics g, Vector2f p0, Vector2f p1) {\r\n g.setColor(Color.BLUE);\r\n // Storage for drawn points\r\n ArrayList<Vector2f> vertices = new ArrayList<>();\r\n // Get pixels on the canvas\r\n int x0 = (int) world2Pixel(p0).x;\r\n int y0 = (int) world2Pixel(p0).y;\r\n int x1 = (int) world2Pixel(p1).x;\r\n int y1 = (int) world2Pixel(p1).y;\r\n // Delta x\r\n float dx = Math.abs(x1 - x0);\r\n // Step for x-value\r\n int sx = x0 < x1 ? 1 : -1;\r\n // Delta y\r\n float dy = -Math.abs(y1 - y0);\r\n // Step for y-value\r\n int sy = y0 < y1 ? 1 : -1;\r\n // Error values to determine with step to take\r\n float err = dx + dy, e2;\r\n // Loop until algorithm has finished\r\n while(true) {\r\n // Draw point on current coordinates\r\n g.drawArc(x0, y0, 1, 1, 0, 360);\r\n // Add point to drawn points list\r\n vertices.add(new Vector2f(x0, y0));\r\n // Loop condition\r\n if (x0==x1 && y0==y1) break;\r\n // Check which step to take for next point to draw\r\n e2 = 2 * err;\r\n if (e2 > dy) {\r\n err += dy;\r\n x0 += sx;\r\n }\r\n if (e2 < dx) {\r\n err += dx;\r\n y0 += sy;\r\n }\r\n }\r\n // Return all drawn points\r\n return vertices;\r\n }",
"public void drawLine(Position scanPos, Position mypos)// in\n \t\t// ver�nderter\n \t\t// Form von\n \t\t// http://www-lehre.informatik.uni-osnabrueck.de\n \t\t\t{\n \t\t\t\tint x, y, error, delta, schritt, dx, dy, inc_x, inc_y;\n \n \t\t\t\tx = mypos.getX(); // \n \t\t\t\ty = mypos.getY(); // As i am center\n \n \t\t\t\tdx = scanPos.getX() - x;\n \t\t\t\tdy = scanPos.getY() - y; // Hoehenzuwachs\n \n \t\t\t\t// Schrittweite\n \n \t\t\t\tif (dx > 0) // Linie nach rechts?\n \t\t\t\t\tinc_x = 1; // x inkrementieren\n \t\t\t\telse\n \t\t\t\t\t// Linie nach links\n \t\t\t\t\tinc_x = -1; // x dekrementieren\n \n \t\t\t\tif (dy > 0) // Linie nach oben ?\n \t\t\t\t\tinc_y = 1; // y inkrementieren\n \t\t\t\telse\n \t\t\t\t\t// Linie nach unten\n \t\t\t\t\tinc_y = -1; // y dekrementieren\n \n \t\t\t\tif (Math.abs(dy) < Math.abs(dx))\n \t\t\t\t\t{ // flach nach oben oder unten\n \t\t\t\t\t\terror = -Math.abs(dx); // Fehler bestimmen\n \t\t\t\t\t\tdelta = 2 * Math.abs(dy); // Delta bestimmen\n \t\t\t\t\t\tschritt = 2 * error; // Schwelle bestimmen\n \t\t\t\t\t\twhile (x != scanPos.getX())\n \t\t\t\t\t\t\t{\n \n \t\t\t\t\t\t\t\tif (x != mypos.getX())\n \t\t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\t\tincPix(x + mypos.getX(), y + mypos.getY()); // Fuer\n \t\t\t\t\t\t\t\t\t\t// jede\n \t\t\t\t\t\t\t\t\t\t// x-Koordinate\n \t\t\t\t\t\t\t\t\t\t// System.out.println(\"inc pos \"+ (x +\n \t\t\t\t\t\t\t\t\t\t// mypos.getX()));\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t// Pixel\n \t\t\t\t\t\t\t\tx += inc_x; // naechste x-Koordinate\n \t\t\t\t\t\t\t\terror = error + delta; // Fehler aktualisieren\n \t\t\t\t\t\t\t\tif (error > 0)\n \t\t\t\t\t\t\t\t\t{ // neue Spalte erreicht?\n \t\t\t\t\t\t\t\t\t\ty += inc_y; // y-Koord. aktualisieren\n \t\t\t\t\t\t\t\t\t\terror += schritt; // Fehler\n \t\t\t\t\t\t\t\t\t\t// aktualisieren\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t} else\n \t\t\t\t\t{ // steil nach oben oder unten\n \t\t\t\t\t\terror = -Math.abs(dy); // Fehler bestimmen\n \t\t\t\t\t\tdelta = 2 * Math.abs(dx); // Delta bestimmen\n \t\t\t\t\t\tschritt = 2 * error; // Schwelle bestimmen\n \t\t\t\t\t\twhile (y != scanPos.getY())\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\tif (y != mypos.getY())\n \t\t\t\t\t\t\t\t\t{// fuer jede y-Koordinate\n \t\t\t\t\t\t\t\t\t\tincPix(x + mypos.getX(), y + mypos.getY());\n \t\t\t\t\t\t\t\t\t}// setze\n \t\t\t\t\t\t\t\t// Pixel\n \t\t\t\t\t\t\t\ty += inc_y; // naechste y-Koordinate\n \t\t\t\t\t\t\t\terror = error + delta; // Fehler aktualisieren\n \t\t\t\t\t\t\t\tif (error > 0)\n \t\t\t\t\t\t\t\t\t{ // neue Zeile erreicht?\n \t\t\t\t\t\t\t\t\t\tx += inc_x; // x-Koord. aktualisieren\n \t\t\t\t\t\t\t\t\t\terror += schritt; // Fehler\n \t\t\t\t\t\t\t\t\t\t// aktualisieren\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\tif ((x != scanPos.getX() && y != scanPos.getY()))\n \t\t\t\t\t{\n \t\t\t\t\t\tdecPix(scanPos.getX() + x, scanPos.getY() + y);\n \t\t\t\t\t}\n \t\t\t}",
"public boolean isPointInLine(Coordinates point, Coordinates linePointA, Coordinates linePointB);",
"public boolean lineOfSight(AgentModel viewer, float x, float y)\r\n/* 316: */ {\r\n/* 317:361 */ if ((viewer.fov(x, y)) && (line(viewer.getX(), viewer.getY(), x, y))) {\r\n/* 318:363 */ return true;\r\n/* 319: */ }\r\n/* 320:366 */ return false;\r\n/* 321: */ }",
"public PathOverlay drawPath(Path path);",
"private boolean lineline(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4){\n float uA = ((x4-x3)*(y1-y3) - (y4-y3)*(x1-x3)) / ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1));\n float uB = ((x2-x1)*(y1-y3) - (y2-y1)*(x1-x3)) / ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1));\n\n return uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1;\n }",
"public abstract void lineTo(double x, double y);",
"void drawLine(int startx,int starty,int endx,int endy,ImageView imageView){\n imageView.setVisibility(View.VISIBLE);\n Bitmap bitmap = Bitmap.createBitmap(getWindowManager().getDefaultDisplay().getWidth(),getWindowManager().getDefaultDisplay().getHeight(),Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n imageView.setImageBitmap(bitmap);\n\n Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStrokeWidth(20);\n paint.setStyle(Paint.Style.STROKE);\n\n canvas.drawLine(startx,starty,endx,endy,paint);\n\n //animates the drawing to fade in\n Animation animation = new AlphaAnimation(0.0f,1.0f);\n animation.setDuration(4000);\n imageView.startAnimation(animation);\n }",
"public void drawLine(int x, int y, int x2, int y2, int color);",
"private void drawLineBetweenCircle(float x1, float y1, float x2, float y2, float radius, Canvas canvas, boolean isLast) {\n float x = Math.abs(x1 - x2);\n float y = Math.abs(y1 - y2);\n double z = Math.sqrt(x * x + y * y);\n double angle = Math.asin(y / z);\n if (z <= radius) {\n return;\n }\n float distanceX = (float) (radius * Math.cos(angle));\n float distanceY = (float) (radius * Math.sin(angle));\n float xPoint1 = x1 < x2 ? x1 + distanceX : x1 - distanceX;\n float yPoint1 = y1 < y2 ? y1 + distanceY : y1 - distanceY;\n float xPoint2 = x1 < x2 ? x2 - distanceX : x2 + distanceX;\n float yPoint2 = y1 < y2 ? y2 - distanceY : y2 + distanceY;\n if (isLast) {\n canvas.drawLine(xPoint1, yPoint1, x2, y2, mGestureLinePaint);\n } else {\n canvas.drawLine(xPoint1, yPoint1, xPoint2, yPoint2, mGestureLinePaint);\n }\n }",
"public boolean playerThrough(int px, int py, int pw, int ph){\r\n Line2D.Double line = new Line2D.Double(p1,p2); //the gate line\r\n //check if line intersects the player's rectangle of space\r\n if(line.intersects(px, py, pw, ph)){\r\n return true; //gate triggered\r\n }\r\n return false; //gate not triggered\r\n }",
"@Override\n\tpublic boolean onTouchEvent(MotionEvent event)\n\t{\n\t\tfloat eventX = event.getX();\n\t\tfloat eventY = event.getY();\n\n\t\tswitch (event.getAction())\n\t\t{\n\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t// Sets the beginning of the next contour to the point (eventX, eventY).\n\t\t\tpath.moveTo(eventX, eventY);\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t// Add a line from the last point to the the point (eventX, eventY).\n\t\t\tpath.lineTo(eventX, eventY);\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_UP:\n\t\t\t// Use the signature canvas to draw the path which also updates\n\t\t\t// the underlying signBitmap.\n\t\t\tsignCanvas.drawPath(path, paint);\n\t\t\tpath.reset();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\n\t\tinvalidate();\n\t\treturn true;\n\t}",
"public DirectShapeRenderer beginPath() {\n \t\treturn renderer.beginPath();\n \t}",
"public boolean traceLine(float x1, float y1, float x2, float y2, int mask) {\n\t\tint cx1 = (int)x1;\n\t\tint cy1 = (int)y1;\n\t\tint cx2 = (int)x2;\n\t\tint cy2 = (int)y2;\n\t\tint maxX = state.levelWidth - 1;\n\t\tint maxY = state.levelHeight - 1;\n\n\t\t// level has one-cell border\n\t\tif (cx1 <= 0 || cx1 >= maxX || cy1 <= 0 || cy1 >= maxY ||\n\t\t\tcx2 <= 0 || cx2 >= maxX || cy2 <= 0 || cy2 >= maxY\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tint[][] localPassableMap = state.passableMap;\n\n\t\tif (cx1 != cx2) {\n\t\t\tint stepX;\n\t\t\tfloat partial;\n\n\t\t\tif (cx2 > cx1) {\n\t\t\t\tpartial = 1.0f - (x1 - (float)((int)x1));\n\t\t\t\tstepX = 1;\n\t\t\t} else {\n\t\t\t\tpartial = x1 - (float)((int)x1);\n\t\t\t\tstepX = -1;\n\t\t\t}\n\n\t\t\tfloat dx = ((x2 >= x1) ? (x2 - x1) : (x1 - x2));\n\t\t\tfloat stepY = (y2 - y1) / dx;\n\t\t\tfloat y = y1 + (stepY * partial);\n\n\t\t\tcx1 += stepX;\n\t\t\tcx2 += stepX;\n\n\t\t\tdo {\n\t\t\t\tif ((localPassableMap[(int)y][cx1] & mask) != 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\ty += stepY;\n\t\t\t\tcx1 += stepX;\n\t\t\t} while (cx1 != cx2);\n\t\t}\n\n\t\tif (cy1 != cy2) {\n\t\t\tint stepY;\n\t\t\tfloat partial;\n\n\t\t\tif (cy2 > cy1) {\n\t\t\t\tpartial = 1.0f - (y1 - (float)((int)y1));\n\t\t\t\tstepY = 1;\n\t\t\t} else {\n\t\t\t\tpartial = y1 - (float)((int)y1);\n\t\t\t\tstepY = -1;\n\t\t\t}\n\n\t\t\tfloat dy = ((y2 >= y1) ? (y2 - y1) : (y1 - y2));\n\t\t\tfloat stepX = (x2 - x1) / dy;\n\t\t\tfloat x = x1 + (stepX * partial);\n\n\t\t\tcy1 += stepY;\n\t\t\tcy2 += stepY;\n\n\t\t\tdo {\n\t\t\t\tif ((localPassableMap[cy1][(int)x] & mask) != 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx += stepX;\n\t\t\t\tcy1 += stepY;\n\t\t\t} while (cy1 != cy2);\n\t\t}\n\n\t\treturn true;\n\t}",
"@Override\n public boolean isPointInPath(double x, double y) {\n return graphicsEnvironmentImpl.isPointInPath(canvas, x, y);\n }",
"public void renderLine (Graphics g)\r\n {\r\n if (glyph.getContourBox()\r\n .intersects(g.getClipBounds())) {\r\n getLine(); // To make sure the line has been computed\r\n\r\n Point start = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStart(),\r\n (int) Math.rint(line.yAt((double) getStart()))),\r\n null);\r\n Point stop = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStop() + 1,\r\n (int) Math.rint(line.yAt((double) getStop() + 1))),\r\n null);\r\n g.drawLine(start.x, start.y, stop.x, stop.y);\r\n }\r\n }",
"public void drawLine(int x, int y, int x2, int y2, int color){\n int dy = y - y2;\n int dx = x - x2;\n int fraction, stepx, stepy;\n\n if(dy < 0){\n dy = -dy;\n stepy = -1;\n }else{\n stepy = 1;\n }\n if(dx < 0){\n dx = -dx;\n stepx = -1;\n }else{\n stepx = 1;\n }\n dy <<= 1;\n dx <<= 1;\n\n set(x, y, color);\n\n if(dx > dy){\n fraction = dy - (dx >> 1);\n while(x != x2){\n if(fraction >= 0){\n y += stepy;\n fraction -= dx;\n }\n x += stepx;\n fraction += dy;\n set(x, y, color);\n }\n }else{\n fraction = dx - (dy >> 1);\n while(y != y2){\n if(fraction >= 0){\n x += stepx;\n fraction -= dy;\n }\n y += stepy;\n fraction += dx;\n set(x, y, color);\n }\n }\n }",
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n startX = (int) event.getX();\n startY = (int) event.getY();\n break;\n case MotionEvent.ACTION_MOVE:\n moveX = (int) event.getX();\n moveY = (int) event.getY();\n\n mCanvas.drawLine(startX, startY, moveX, moveY, mPaint);\n\n ivGraffit.setImageBitmap(mBitmap);\n startX = moveX;\n startY = moveY;\n break;\n case MotionEvent.ACTION_UP:\n\n break;\n\n default:\n break;\n }\n return true;\n }",
"public void runPath()\n\t{\n\t\tinit();\n\t\t\n\t\twhile(_run && (SEQUENCE != null))\n\t\t{\n\t\t\tboolean midLine = LS_MIDDLE.getLightValue() >= s_mid.threshold;\n\t\t\tboolean leftLine = LS_LEFT.getLightValue() >= s_left.threshold;\n\t\t\tboolean rightLine = LS_RIGHT.getLightValue() >= s_right.threshold;\n\t\t\t\n\t\t\tif(!leftLine && !rightLine) handleIntersection();\n\t\t\telse // just a straight line\n\t\t\t{\n\t\t\t\tif (!midLine && !leftLine && !rightLine) turnAround();\n\t\t\t\telse followLine();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean arrow, boolean screenCoords) {\n if(screenCoords) {\n start = convToImageCoords(start);\n end = convToImageCoords(end);\n }\n Line l = new Line(id, start, end, weight, color, arrow);\n lineMap.put(id, l);\n render();\n }",
"protected boolean isFinished() {\r\n if (lineHasBeenFound) {\r\n lineTrackTime = System.currentTimeMillis();\r\n }\r\n if(System.currentTimeMillis()-lineTrackTime > 4000){\r\n return true;\r\n }\r\n return false;\r\n }",
"public PathOverlay drawPath(Path path, Color color);",
"private void startTouch(float x, float y) {\n// try {\n// socket.emit(\"drawing\", getJsonObject(x,y));\n//\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n path.moveTo(x, y);\n mX = x;\n mY = y;\n emitToServer(x, y);\n\n }",
"public boolean intersects(RMPath aPath)\n{\n // Get line width to be used in intersects test\n float lineWidth = getStrokeWidth();\n \n // Get bounds, adjusted for line width\n RMRect bounds = getBoundsInside();\n bounds.inset(-lineWidth/2, -lineWidth/2);\n\n // If paths don't even intersect bounds, just return false\n if(!aPath.getBounds2D().intersectsRectEvenIfEmpty(bounds))\n return false;\n \n // Get path in bounds\n RMPath path = getPathInBounds();\n \n // Return whether path intersects given path\n return path.intersects(aPath, lineWidth);\n}",
"public GLGraphics drawPath(Iterable<Vec2f> points, boolean closed) {\n\t\treturn render(closed ? GL.GL_LINE_LOOP : GL.GL_LINE_STRIP, points);\n\t}",
"public void drawLine(int x1, int y1, int x2, int y2);",
"public static boolean pointOnLine(int x1, int y1, int x2, int y2, int px, int py, int EPSILON) {\n\t\t// ..a.. ..b..\n\t\t// start |------P-----| end\t=> a+b = len\n\t\t//\t\t\t...len...\n\t\tint a = dist(x1, y1, px, py);\n\t\tint b = dist(x2, y2, px, py);\n\t\tint l = dist(x1, y1, x2, y2);\n\t\t\n\t\tint ab = a + b;\n\t\tint diff = Math.abs(l-ab);\n\t\t\n\t\treturn diff <= (EPSILON*EPSILON);\n\t}",
"public void closepath() \n {\n\tLine line = new Line(_currentx, _currenty, _startx, _starty);\n\t_currentPath.add(line);\n\t_currentx = _startx;\n\t_currenty = _starty;\n\t_closedPath = true;\n }",
"public boolean isLinePainting ()\r\n {\r\n return constants.linePainting.getValue();\r\n }",
"@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean screenCoords) {\n drawLine(id, start, end, weight, color, false, screenCoords);\n }",
"public boolean doLinesOverlap(Line2d line, Line2d otherLine)\n\t{\n\t\tdouble angle = (line.angle(otherLine));\n\t\tif(Gtk.epsilonEquals(angle, Math.PI/2)) return false;\n\t\tif (!Gtk.epsilonEquals(angle, Math.PI) \n\t\t\t\t|| !Gtk.epsilonEquals(angle, 0.0))\t\t\n\t\t{\n\t\t\tLine2d pLine = new Line2d (otherLine.getDirection(), line.getStartPoint());\n\t\t\tPoint2d pp = pLine.projectPoint(line.getEndPoint());\n\t\t\tpLine.setEndPoint(pp);\n\t\t\tline = pLine;\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tLine2d line1 = \n\t\t\t\tnew Line2d(line.pointOnLine(0.001), \n\t\t\t\t\t\tline.pointOnLine(line.factorForPoint(line.getEndPoint()) - 0.001));\n\t\t\t//the above line of code ensures that two lines with exactly one\n\t\t\t//end point (and no other overlap) are not returned, e.g.\n\t\t\t//Line1[(0.0, 0.0), (1.0, 0.0)] and Line2[(1.0, 1.0),(2.0, 1.0)]\n\t\t\tPoint2d lspp = otherLine.projectPoint(line1.getStartPoint());\n\t\t\tPoint2d lepp = otherLine.projectPoint(line1.getEndPoint());\n\t\t\tPoint2d olspp = line1.projectPoint(otherLine.getStartPoint());\n\t\t\tPoint2d olepp = line1.projectPoint(otherLine.getEndPoint());\n\t\t\t\n\t\t\treturn ((line1.isPointOnCurve(olspp)) \n\t\t\t\t\t|| line1.isPointOnCurve(olepp))\t|| \n\t\t\t\t\t((otherLine.isPointOnCurve(lspp)) \n\t\t\t\t\t\t\t|| otherLine.isPointOnCurve(lepp));\n\t\t}\n\t\tcatch (GeometryException ile)\n\t\t{\n\t\t\tile.printStackTrace();\n\t\t}\t\t\n\t\treturn false;\n\t}",
"@Override\n\tpublic void drawLine(Vector3f from, Vector3f to, Vector3f color) {\n\n\t\tfloat[] positions = new float[6];\n\t\tpositions[0] = from.x;\n\t\tpositions[1] = from.y;\n\t\tpositions[2] = from.z;\n\n\t\tpositions[3] = to.x;\n\t\tpositions[4] = to.y;\n\t\tpositions[5] = to.z;\n\n\t\t// Create a rawmodel to store the line\n\t\tRawModel model = Globals.getLoader().loadToVAO(positions, 3);\n\n\t\tshader.start();\n\t\tshader.loadProjectionMatrix(Globals.getRenderer().getProjectionMatrix());\n\t\tshader.loadViewMatrix(Globals.getActiveCamera());\n\t\tGL30.glBindVertexArray(model.getVaoID());\n\n\t\tGL20.glEnableVertexAttribArray(0);\n\t\tGL11.glDrawArrays(GL11.GL_LINES, 0, 6);\n\t\tGL20.glDisableVertexAttribArray(0);\n\t\tGL30.glBindVertexArray(0);\n\t\tshader.stop();\n\t\tmodel.cleanUp();\n\n\t}",
"public boolean onSingleTap(MotionEvent point) {\n\t\t\tif (active\n\t\t\t\t\t&& (drawType == POLYGON || drawType == POLYLINE || drawType == MULTI_POINT)) {\n\t\t\t\tif (ptStart == null)\n\t\t\t\t\tdrawLayer.removeAll();// 第一次开始前,清空全部graphic\n\n\t\t\t\tPoint ptCurrent = mapView.toMapPoint(new Point(point.getX(),\n\t\t\t\t\t\tpoint.getY()));\n\t\t\t\tpoints.add(ptCurrent);// 将当前点加入点集合中\n\t\t\t\tif (drawType == MULTI_POINT) {\n\t\t\t\t\t// 多选\n\t\t\t\t\t// Log.d(\"map\",\n\t\t\t\t\t// \"------点选-多选 ------SingleTap--x:\"+point.getX()+\" y: \"+point.getY());\n\t\t\t\t\tptOnly = null;\n\t\t\t\t\tptOnly = mapView.toMapPoint(point.getX(), point.getY());\n\n\t\t\t\t\tdrawLayer.removeAll();\n\t\t\t\t\tqueryAttribute4OnlyOnePonit(ptOnly);\n\t\t\t\t} else {\n\t\t\t\t\tif (ptStart == null) {// 画线或多边形的第一个点\n\t\t\t\t\t\tptStart = ptCurrent;\n\n\t\t\t\t\t\tmarkerSymbol = new SimpleMarkerSymbol(Color.BLUE, 10,\n\t\t\t\t\t\t\t\tSimpleMarkerSymbol.STYLE.CIRCLE);\n\t\t\t\t\t\t// 绘制第一个点\n\t\t\t\t\t\tGraphic graphic = new Graphic(ptStart, markerSymbol);\n\t\t\t\t\t\tdrawLayer.addGraphic(graphic);\n\t\t\t\t\t} else {// 画线或多边形的其他点\n\t\t\t\t\t\t// 绘制其他点\n\t\t\t\t\t\tmarkerSymbol = new SimpleMarkerSymbol(Color.BLUE, 15,\n\t\t\t\t\t\t\t\tSimpleMarkerSymbol.STYLE.DIAMOND);\n\t\t\t\t\t\tGraphic graphic = new Graphic(ptCurrent, markerSymbol);\n\t\t\t\t\t\tdrawLayer.addGraphic(graphic);\n\n\t\t\t\t\t\t// 生成当前线段(由当前点和上一个点构成)\n\t\t\t\t\t\tLine line = new Line();\n\t\t\t\t\t\tline.setStart(ptPrevious);\n\t\t\t\t\t\tline.setEnd(ptCurrent);\n\n\t\t\t\t\t\tif (drawType == DrawTool.POLYLINE) {\n\t\t\t\t\t\t\t// 绘制当前线段\n\t\t\t\t\t\t\tPolyline polyline = new Polyline();\n\t\t\t\t\t\t\tpolyline.addSegment(line, true);\n\t\t\t\t\t\t\tGraphic g = new Graphic(polyline, lineSymbol);\n\t\t\t\t\t\t\tdrawLayer.addGraphic(g);\n\n\t\t\t\t\t\t\tdouble len = GeometryEngine.geodesicLength(\n\t\t\t\t\t\t\t\t\tpolyline, mapView.getSpatialReference(),\n\t\t\t\t\t\t\t\t\tnull);\n\t\t\t\t\t\t\tString length = \"\";\n\t\t\t\t\t\t\tDecimalFormat df = new DecimalFormat(\"#.00\");\n\t\t\t\t\t\t\tdouble temp = BigDecimal.valueOf(len)\n\t\t\t\t\t\t\t\t\t.divide(new BigDecimal(1000)).doubleValue();\n\t\t\t\t\t\t\tlength = df.format(temp) + \" 千米\";\n\t\t\t\t\t\t\tToast.makeText(mapView.getContext(),\n\t\t\t\t\t\t\t\t\t\"长度: \" + length, Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif (tempPolygon == null)\n\t\t\t\t\t\t\t\ttempPolygon = new Polygon();\n\n\t\t\t\t\t\t\tif (uid == -1) {\n\t\t\t\t\t\t\t\ttempPolygon.addSegment(line, false);\n\t\t\t\t\t\t\t\tGraphic g = new Graphic(tempPolygon, fillSymbol);\n\t\t\t\t\t\t\t\tuid = drawLayer.addGraphic(g);\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttempPolygon.addSegment(line, false);\n\t\t\t\t\t\t\t\tdrawLayer.updateGraphic(uid, tempPolygon);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlines.add(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tptPrevious = ptCurrent;\n\t\t\t\t// tempLayer.postInvalidate();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"@Override\n public void draw(GraphicsContext gc){\n for(int i = 1; i < path.size(); i++) {\n Point2D from = path.get(i-1);\n Point2D to = path.get(i);\n gc.strokeLine(from.getX(), from.getY(), to.getX(), to.getY());\n }\n }",
"private static boolean isPointRightOfLine(LineSegment a, Point2D b) {\r\n\t // Move the image, so that a.first is on (0|0)\r\n\t LineSegment aTmp = new LineSegment(new PointDouble(0, 0), new PointDouble(\r\n\t a.endPoint.getX() - a.startPoint.getX(), a.endPoint.getY() - a.startPoint.getY()));\r\n\t PointDouble bTmp = new PointDouble(b.getX() - a.startPoint.getX(), b.getY() - a.startPoint.getY());\r\n\t return crossProduct(aTmp.endPoint, bTmp) < 0;\r\n\t}",
"private void upTouch(float x, float y) {\n Log.d(\"UPTOUCH\", \"upTouch: \" + x + \" \" + y);\n\n// try {\n// socket.emit(\"drawing\", getJsonObject(x,y));\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n emitToServer(x, y);\n path.lineTo(mX, mY);\n }",
"@Override\n protected void paintTrace(Painter aPntr)\n {\n // Get area bounds\n double areaW = getWidth();\n double areaH = getHeight();\n\n // Get whether TraceView/Trace is selected or targeted\n boolean isSelected = isSelectedOrTargeted();\n\n // Get Trace info\n Trace trace = getTrace();\n boolean showLine = trace.isShowLine();\n boolean showPoints = trace.isShowPoints();\n boolean showArea = trace.isShowArea();\n\n // Get DataColor, DataStroke\n Color dataColor = getDataColor();\n Stroke dataStroke = trace.getLineStroke();\n\n // If reveal is not full (1) then clip\n double reveal = getReveal();\n if (reveal < 1 && (showPoints || showArea)) {\n aPntr.save();\n aPntr.clipRect(0, 0, areaW * reveal, areaH);\n }\n\n // If ShowArea, fill path, too\n if (showArea) {\n Shape traceAreaShape = getTraceAreaShape();\n Color traceFillColor = trace.getFillColor();\n aPntr.setColor(traceFillColor);\n aPntr.fill(traceAreaShape);\n }\n\n // Get dataShape (path) (if Reveal is active, get shape as SplicerShape so we can draw partial/animated)\n Shape dataShape = getTraceLineShape();\n if (reveal < 1 && showLine)\n dataShape = new SplicerShape(dataShape, 0, reveal);\n\n // If ShowLine, draw path\n if (isSelected && showLine) {\n aPntr.setStrokePure(true);\n\n // If selected, draw path\n Color selColor = dataColor.blend(Color.CLEARWHITE, .75);\n Stroke selStroke = dataStroke.copyForWidth(dataStroke.getWidth() * 3 + 8).copyForDashes(null);\n aPntr.setColor(selColor);\n aPntr.setStroke(selStroke);\n aPntr.draw(dataShape);\n\n // If selected, draw path\n Color selColor2 = dataColor.blend(Color.WHITE, 1);\n Stroke selStroke2 = dataStroke.copyForWidth(dataStroke.getWidth() + 2);\n aPntr.setColor(selColor2);\n aPntr.setStroke(selStroke2);\n aPntr.draw(dataShape);\n\n aPntr.setStrokePure(false);\n aPntr.setColor(dataColor);\n aPntr.setStroke(dataStroke);\n }\n\n // Set color, stroke\n aPntr.setColor(dataColor);\n aPntr.setStroke(dataStroke);\n\n // If ShowLine, draw path\n if (showLine) {\n aPntr.setStrokePure(true);\n aPntr.draw(dataShape);\n aPntr.setStrokePure(false);\n }\n\n // If Reveal is active, paint TailShape\n if (dataShape instanceof SplicerShape)\n paintTailShape(aPntr, (SplicerShape) dataShape);\n\n // Paint selected point\n if (isSelected)\n paintSelDataPoint(aPntr);\n\n // If ShowPoints or ShowTags\n boolean showTags = trace.isShowTags();\n if (showPoints || showTags)\n _pointPainter.paintSymbolsAndTagsPrep();\n\n // If ShowPoints, paint symbols\n if (showPoints)\n paintSymbols(aPntr);\n\n // If reveal not full, resture gstate\n if (reveal < 1 && (showPoints || showArea))\n aPntr.restore();\n }",
"@Override\n protected void onDraw(Canvas canvas){\n super.onDraw(canvas);\n canvas.drawPath(path_draw, paint_brush);\n }",
"@Override\n public boolean isFinished() \n {\n int curCount = mPath.kNumPoints - mCount;\n if(curCount<1)\n {\n System.out.println(mPath.kNumPoints);\n }\n \n return curCount<1;\n }",
"public PathOverlay drawPath(Path path, Color color, boolean markers);",
"@Override\n public void handle(long now) {\n OneIteration();\n if (current.getRow() == ia && current.getCol() == ja) {\n drawPath();\n this.stop();\n }\n }",
"public void lineTo(double x, double y)\n {\n\tPoint2D pos = transformedPoint(x,y);\n\tdouble tx = pos.getX();\n\tdouble ty = pos.getY();\n\t\n\tLine line = new Line(_currentx, _currenty, tx, ty);\n\n\tSystem.out.println(\"+Line: \" + line.toString());\n\t_currentPath.add(line);\n\t_currentx = tx;\n\t_currenty = ty;\n }",
"public PathOverlay drawPath(Path path, boolean markers);",
"public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}",
"private void setPathLine(Position prevPos, Position newPos) {\n\t\t//Grid coordinates\n\t\tint xStart = prevPos.getX();\n\t\tint yStart = prevPos.getY();\n\t\tint xEnd = newPos.getX();\n\t\tint yEnd = newPos.getY();\n\t\t\n\t\t//Set width/height in pixels of screen dimension\n\t\tfloat xF = (xEnd*PIXEL_WIDTH);\n\t\tfloat yF = (yEnd*PIXEL_HEIGHT);\n\t\t\n\t\t//Check that this grid IS free (ie 0) to draw a path\n\t\tif (checkPathCo(newPos) == 0) {\n\t\t\tsPath.lineTo(xF, yF);\n\t\t\tsetPathCo(newPos,1);\n\t\t\twhile (xStart != xEnd)\n\t\t\t{ //set everything in between as 1 ie undroppable\n\t\t\t\tPosition tmpPos = new Position(xStart, yEnd);\n\t\t\t\tsetPathCo(tmpPos,1);\n\t\t\t\tif (xStart < xEnd)\n\t\t\t\t\txStart++;\n\t\t\t\telse\n\t\t\t\t\txStart--;\n\t\t\t}\n\t\t\t\n\t\t\twhile(yStart < yEnd)\n\t\t\t{ //same as x above\n\t\t\t\tPosition tmpPos = new Position(xEnd,yStart);\n\t\t\t\tsetPathCo(tmpPos,1);\n\t\t\t\tyStart++;\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void paintLine(Point2D pt1, Point2D pt2, Graphics graphics) {\n Graphics2D g = (Graphics2D) graphics;\n g.setXORMode(java.awt.Color.lightGray);\n g.setColor(java.awt.Color.darkGray);\n if (pt1 != null && pt2 != null) {\n // the line connecting the segments\n OMLine cLine = new OMLine((float) pt1.getY(), (float) pt1.getX(), (float) pt2.getY(), (float) pt2.getX(), lineType);\n // get the map projection\n Projection proj = theMap.getProjection();\n // prepare the line for rendering\n cLine.generate(proj);\n // render the line graphic\n cLine.render(g);\n }\n }",
"@Override\n public void lineTo(double x, double y) {\n graphicsEnvironmentImpl.lineTo(canvas, x, y);\n }",
"private void touch_start(float x, float y) {\n\t\tmPath.reset();\n\t\t\n\t\t// posiciona o primeiro ponto no canvas\n\t\tmPath.moveTo(x, y);\n\t\tmX = x;\n\t\tmY = y;\n\t\t\n\t\t// desenha um ponto simples no ecr‹\n\t\tmPath.quadTo(mX, mY, ((x + 0.1f) + mX) / 2, ((y + 0.1f) + mY) / 2);\n\t\t\n\t\t// guarda os dados necess‡rios para o replay\n\t\tif (toReplay) {\n\t\t\txs.add(mX);\n\t\t\tys.add(mY);\n\t\t\tcolors.add(mPaint.getColor());\n\t\t}\n\t}",
"public boolean isLineHit(TessSeg s1)\r\n {\r\n int side00 = \r\n Math2DUtil.getLineSide(s1.c0.x, s1.c0.y, s1.getDx(), s1.getDy(),\r\n c0.x, c0.y);\r\n int side01 = \r\n Math2DUtil.getLineSide(s1.c0.x, s1.c0.y, s1.getDx(), s1.getDy(), \r\n c1.x, c1.y);\r\n\r\n if (side00 == 0 && side01 == 0)\r\n {\r\n //Lines lie along same ray\r\n double t0 = pointOnLineT(s1.c0);\r\n double t1 = pointOnLineT(s1.c1);\r\n return ((t0 < 0 && t1 < 0) || (t0 > 1 && t1 > 1)) ? false : true;\r\n }\r\n \r\n if ((side00 < 0 && side01 < 0) || (side00 > 0 && side01 > 0))\r\n {\r\n return false;\r\n }\r\n \r\n int side10 = \r\n Math2DUtil.getLineSide(c0.x, c0.y, getDx(), getDy(),\r\n s1.c0.x, s1.c0.y);\r\n int side11 = \r\n Math2DUtil.getLineSide(c0.x, c0.y, getDx(), getDy(), \r\n s1.c1.x, s1.c1.y);\r\n\r\n if ((side10 < 0 && side11 < 0) || (side10 > 0 && side11 > 0))\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n \r\n /*\r\n if (!isBoundingBoxOverlap(s1))\r\n {\r\n return false;\r\n }\r\n \r\n if (isParallelTo(s1))\r\n {\r\n if (!isPointOnLine(s1.c0))\r\n {\r\n return false;\r\n }\r\n \r\n double t0 = pointOnLineT(s1.c0);\r\n double t1 = pointOnLineT(s1.c1);\r\n \r\n if ((t0 <= 0 && t1 <= 0) || (t0 >= 1 && t1 >= 1))\r\n {\r\n return false;\r\n }\r\n return true;\r\n }\r\n \r\n if (isPointOnLine(s1.c0))\r\n {\r\n double t = pointOnLineT(s1.c0);\r\n if (t > 0 && t < 1)\r\n {\r\n return true;\r\n }\r\n }\r\n \r\n if (isPointOnLine(s1.c1))\r\n {\r\n double t = pointOnLineT(s1.c1);\r\n if (t > 0 && t < 1)\r\n {\r\n return true;\r\n }\r\n }\r\n \r\n if (s1.isPointOnLine(c0))\r\n {\r\n double t = s1.pointOnLineT(c0);\r\n if (t > 0 && t < 1)\r\n {\r\n return true;\r\n }\r\n }\r\n \r\n if (s1.isPointOnLine(c1))\r\n {\r\n double t = s1.pointOnLineT(c1);\r\n if (t > 0 && t < 1)\r\n {\r\n return true;\r\n }\r\n }\r\n \r\n //Solve system of linear eqns\r\n double s0x0 = c0.x;\r\n double s0y0 = c0.y;\r\n double s0x1 = c1.x;\r\n double s0y1 = c1.y;\r\n double s1x0 = s1.c0.x;\r\n double s1y0 = s1.c0.y;\r\n double s1x1 = s1.c1.x;\r\n double s1y1 = s1.c1.y;\r\n\r\n double[] t = Math2DUtil.lineIsectFractions(\r\n s0x0, s0y0, s0x1 - s0x0, s0y1 - s0y0,\r\n s1x0, s1y0, s1x1 - s1x0, s1y1 - s1y0,\r\n null);\r\n\r\n if (t[0] > 0 && t[0] < 1 && t[1] > 0 && t[1] < 1)\r\n {\r\n return true;\r\n }\r\n \r\n return false;\r\n */\r\n }",
"public void drawLine(float x, float y, float x2, float y2, float width, float u, float v, float texW, float texH) {\n throw new NotImplementedException(); // TODO Implement\n }",
"public void drawLine(float x, float y, float x2, float y2, float width) {\n throw new NotImplementedException(); // TODO Implement\n }",
"private void startTouch(float x, float y) {\n /* mPath.moveTo(x, y);\n mX = x;\n mY = y;*/\n }",
"public Line drawLine(double startx, double starty, double endx, double endy, int[][] vertices) throws IOException {\n int ind = 0;\n int[] coord = new int[4];\n while (ind < 36) {\n if (vertices[ind][0] <= startx && startx <= vertices[ind][1] && vertices[ind][2] >= starty && starty >= vertices[ind][3]) {\n coord[0] = vertices[ind][4];\n coord[1] = vertices[ind][5];\n return endVali(coord[0],coord[1],endx,endy,vertices);\n }\n ind++;\n }\n return null;\n }",
"boolean hasDynamicLineup();",
"public abstract void onLineMode ();",
"public boolean isIntersected(Line line)\n {\n float a = direction.y;\n float b = -direction.x;\n float d = line.getDirection().y;\n float e = -line.getDirection().x;\n\n return ((a * e - b * d) != 0);\n }",
"private void addPath(double prevXPos, double prevYPos, double xPos, double yPos) {\n\n\t\tif (penShowing) {\n\t\t\tDouble[] newPath = { prevXPos, prevYPos, xPos, yPos };\n\t\t\tpathList.add(newPath);\n\t\t\tpenColorList.add(screen.getPenColor());\n\t\t\torientationList.add(orientation);\n\n\t\t}\n\t}",
"public static void renderLine(double startx , double starty , double endx , double endy) {\n\t\t//Find out what rendering mode to use\n\t\tif (! Settings.Android && Settings.Video.OpenGL)\n\t\t\t//Render a line using OpenGL\n\t\t\tBasicRendererOpenGL.renderLine(startx , starty , endx , endy);\n\t\telse if (! Settings.Android && ! Settings.Video.OpenGL)\n\t\t\t//Render a line using Java\n\t\t\tBasicRendererJava.renderLine(startx , starty , endx , endy);\n\t\telse if (Settings.Android && ! Settings.Video.OpenGL)\n\t\t\t//Render a line using Android\n\t\t\tBasicRendererAndroid.renderLine(startx , starty , endx , endy);\n\t}",
"public DrawLineWithFinger(Context _context, AttributeSet _attrs){\n super(_context, _attrs);\n mPath = new Path();\n mPaint = new Paint(Paint.DITHER_FLAG);\n mPaint.setStyle(Paint.Style.STROKE);\n mPaint.setColor(Color.WHITE);\n mPaint.setStrokeWidth(size);\n mPaint.setStrokeJoin(Paint.Join.ROUND);\n mPaint.setStrokeCap(Paint.Cap.ROUND);\n mPixelY = new int[height];\n mPixelX = new int[width];\n\n for(int i = 0; i < width; i++){\n mPixelX[i] = 0;\n }\n\n for(int i = 0; i < height; i++){\n mPixelY[i] = 0;\n }\n }",
"public void undo(){\n if(!isFreeDraw) { //in waypoint mode delete the last point\n int size = mMapInterface.getPathFrame().size();\n if (size >= 1) {\n isPathReady=false;\n mMapInterface.getPathFrame().remove(size - 1);\n pointsCounter--;\n googleMap.clear();\n drawLine();\n }\n }\n else{ //in continu mode delete all path\n deletePath();\n drawFree();\n }\n }",
"public boolean locatePoint(Point2D p, VisualItem item) {\n Shape s = getShape(item);\n if ( s == null ) {\n return false;\n } else {\n double width = Math.max(2, getLineWidth(item));\n double halfWidth = width/2.0;\n \n EdgeItem edge = (EdgeItem)item;\n CallEdge callEdge = ReacherDisplay.Instance.getCallEdge(item);\n \n boolean retVal;\n //if (callEdge.isBranching())\n //{\n \tretVal = line1.intersects(p.getX()-halfWidth, p.getY()-halfWidth, width,width) || \n \t\t\tline2.intersects(p.getX()-halfWidth, p.getY()-halfWidth, width,width);\n /*}\n else\n {\n \tretVal = curve.intersects(p.getX()-halfWidth, p.getY()-halfWidth, width,width);\n } */ \n return retVal;\n }\n }",
"private void moveTouch(float x, float y) {\n// try {\n// socket.emit(\"drawing\", getJsonObject(x,y));\n//\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n float dx = Math.abs(x - mX);\n float dy = Math.abs(y - mY);\n if (dx >= TOLERANCE || dy >= TOLERANCE) {\n emitToServer(x, y);\n path.quadTo(mX, mY, (x + mX) / 2, (y + mY) / 2);\n mX = x;\n mY = y;\n }\n }",
"public boolean onSegment(Line line) {\n\n // Define minimum and maximum for X and Y values.\n double maxX = Math.max(line.start().getX(), line.end().getX());\n double maxY = Math.max(line.start().getY(), line.end().getY());\n double minX = Math.min(line.start().getX(), line.end().getX());\n double minY = Math.min(line.start().getY(), line.end().getY());\n\n // Calculation deviation.\n double d = 0.0000000001;\n\n // Check if this point is in between minimum and maximum and return result.\n return minX - d <= this.x && this.x <= maxX + d && minY - d <= this.y && this.y <= maxY + d;\n\n }",
"private void touchStart(float x,float y){\n redoList.clear();\n path = new Path();\n FingerPath fingerPath = new FingerPath(currentColor,strokeWidth,path);\n pathsList.add(fingerPath);\n path.reset();\n path.moveTo(x,y);\n pointX=x;\n pointY=y;\n }",
"private void drawLine(Graphics g, int x1, int y1, int x2, int y2) {\n int d = 0;\n\n int dx = Math.abs(x2 - x1);\n int dy = Math.abs(y2 - y1);\n\n int dx2 = 2 * dx; // slope scaling factors to\n int dy2 = 2 * dy; // avoid floating point\n\n int ix = x1 < x2 ? 1 : -1; // increment direction\n int iy = y1 < y2 ? 1 : -1;\n\n int x = x1;\n int y = y1;\n\n if (dx >= dy) {\n while (true) {\n plot(g, x, y);\n if (x == x2)\n break;\n x += ix;\n d += dy2;\n if (d > dx) {\n y += iy;\n d -= dx2;\n }\n }\n } else {\n while (true) {\n plot(g, x, y);\n if (y == y2)\n break;\n y += iy;\n d += dx2;\n if (d > dy) {\n x += ix;\n d -= dy2;\n }\n }\n }\n }",
"private void routeDrawing(Location location) {\n\n // validity check in case the first point does not have a previous point\n if (previousLocation == null) {\n // copy the current location to the previous point\n previousLocation = location;\n }\n double lat = location.getLatitude();\n double lon = location.getLongitude();\n\n latitude = lat;\n longitude = lon;\n latList.add(latitude);\n lonList.add(longitude);\n\n // previous coordinates\n //System.out.println(\"previous Location: \" + previousLocation.getLatitude() + \" \" + previousLocation.getLongitude());\n // current coordinates\n //System.out.println(\"Current Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n\n // Polyline Options differ from\n PolylineOptions lineOptions = new PolylineOptions();\n // set the option of each part of polyline\n // 0.03 is the location update interval also the drawing interval\n vdraw = (GetDistance(previousLocation.getLatitude(), previousLocation.getLongitude(), location.getLatitude(), location.getLongitude()))/0.3;\n System.out.println(\"vdraw: \"+vdraw);\n if (vdraw<0.01){\n\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.slow))\n .width(30);\n System.out.print(\"I am running slow\");\n }\n if (vdraw>=0.008 && vdraw<=0.03){\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.commen))\n .width(30);\n System.out.print(\"I am running normally\");\n }\n if (vdraw>0.03){\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.fast))\n .width(30);\n System.out.print(\"I am running fast\");\n }\n\n // add the polyline to the map\n Polyline partOfRunningRoute = mMap.addPolyline(lineOptions);\n // set the zindex so that the poly line stays on top of my tile overlays\n partOfRunningRoute.setZIndex(1000);\n // add the poly line to the array so they can all be removed if necessary\n runningRoute.add(partOfRunningRoute);\n // add the latlng from this point to the array\n points.add(location);\n // store current location as previous location in the end\n previousLocation = location;\n }",
"public void setCellToPath(int pos){//how to check for the end???\n\t\t\n\t\tif(pos<0||pos>width*height-1||getCompletePath())\n\t\t\treturn;// the position entered is not valid or the path has already been completed\n\t\t\n\t\telse if(temp.isEmpty()){//no path tile have been defined\n\t\t\tif(currentPos<0){//start hasn't been placed\t\t\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\n\t\t\t\tsetEntryPoint(currentPath);\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tint d = currentPath.getDirection(pos);\n\t\t\t\tif (d<0||d>=4)\n\t\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\tPathType type =Map.createPathTileOfType(d, caseEdge);\n\t\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\t\n\t\t\t\t//fix direction of tile\n\t\t\t\tif(p.getEntry()==pos)\n\t\t\t\t\tp.rotate();\n\t\t\t\t//validate spot (for entry/exit)\n\t\t\t\t\n\t\t\t\t//set as Path entry point \n\t\t\t\tp.setStart();\n\t\t\t\tsetEntryPoint(p);\n\t\t\t\t\n\t\t\t\t//add to grid and list\n\t\t\t\tp.storePathTile();\n\n\t\t\t\t//update current\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\t\t\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tif (getGrid(pos/width, pos%width)!=null)\n\t\t\t\tif(getGrid(pos/width, pos%width).isPath())\n\t\t\t\t\treturn;//causes intersection\n\t\t\t\n\t\t\tint dExit = currentPath.getDirection(pos);\n\t\t\tint lastPos= temp.peekLast().getPos();\n\t\t\tint dEntry= currentPath.getDirection(lastPos);\n\n\t\t\t\n\t\t\tif (dExit<0||dExit>3||dEntry<0||dEntry>3)\n\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\n\t\t\t\n\t\t\tPathType type =Map.createPathTileOfType(dExit,dEntry);\n\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\n\t\t\t//fix direction of tile\n\t\t\tif(p.getEntry()==pos)\n\t\t\t\tp.rotate();\n\t\t\t\n\t\t\tif(!inValidSpot(p))\n\t\t\t\treturn; //\n\t\t\t\n\t\t\t//add to grid and list\n\t\t\tp.storePathTile();\n\t\t\t\n\t\t\t//update current\n\t\t\tcurrentPos=pos;\n\t\t\tcurrentPath=new Path(currentPos);\t\n\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t}\n\t}",
"public static boolean getPath2(int x, int y, ArrayList<Point> path) {\n\t\t// If out of bounds or not available, return.\n\t\tif (y < 0 || x < 0 || !isFree(x, y)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tboolean isAtOrigin = (x == 0) && (y == 0);\n\t\t\n\t\t// If there's a path from the start to my current location, add my location.\n\t\tif (isAtOrigin || getPath2(x, y - 1, path) || getPath2(x - 1, y, path)) { \n\t\t\tPoint p = new Point(x, y);\n\t\t\tpath.add(p);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public Line verif(boolean Free, int startx, int starty, int endx, int endy) {\n if (Free == true) {\n Line line1 = new Line(startx, starty, endx, endy);\n return line1;\n }\n return null;\n }",
"@Override\n public void drawPolyline(PointList pointList) {\n Path2D path = new Path2D.Float();\n \n if (pointList.size() > 1) {\n Point origin = pointList.getPoint(0);\n path.moveTo(origin.x + transX, origin.y + transY);\n \n // Draw polylines as a Path2D\n for(int x = 1; x < pointList.size(); x++) {\n Point p2 = pointList.getPoint(x);\n path.lineTo(p2.x + transX, p2.y + transY);\n }\n \n checkState();\n getGraphics2D().setPaint(getColor(getSWTGraphics().getForegroundColor()));\n getGraphics2D().setStroke(createStroke());\n getGraphics2D().draw(path);\n }\n }",
"private void drawLine(Vector2 vt1, Vector2 vt2, GLayerGroup pGroup){\n DrawLineLaser.DrawLine(vt1,vt2);\n\n }",
"public void drawLine(double startx, double starty, double endx, double endy, Color color) {\n\t\tgc.setStroke(color);\n\t\tgc.strokeLine(startx,starty,endx,endy);\n\t}",
"public boolean doesLineCut(Line line) {\n if (containsExclusive(line.getPoint1())) {\n return true;\n }\n if (containsExclusive(line.getPoint2())) {\n return true;\n }\n\n double x1 = Math.min(line.getPoint1().getX(), line.getPoint2().getX());\n double x2 = Math.max(line.getPoint1().getX(), line.getPoint2().getX());\n double y1 = Math.min(line.getPoint1().getY(), line.getPoint2().getY());\n double y2 = Math.max(line.getPoint1().getY(), line.getPoint2().getY());\n\n // y = mx + c\n // x = (y-c)/m\n double m = (line.getPoint2().getY() - line.getPoint1().getY()) / (line.getPoint2().getX() - line.getPoint1().getX());\n double c = line.getPoint1().getY() - (m * line.getPoint1().getX());\n\n double xNorth = Double.NaN;\n double xSouth = Double.NaN;\n double yWest = Double.NaN;\n double yEast = Double.NaN;\n if (Double.isInfinite(m)) {\n // Vertical line\n xNorth = x1;\n xSouth = x1;\n } else if (m == 0.0) {\n yWest = c;\n yEast = c;\n } else {\n xNorth = ((double) start.getY() - c) / m;\n xSouth = ((double) end.getY() - 1 - c) / m;\n yWest = m * (double) start.getX() + c;\n yEast = m * (double) end.getX() - 1 + c;\n }\n\n\n // Since both points are outside the rectangle, one crossed edged is enough.\n\n // Check north\n if (!Double.isNaN(xNorth) && start.getX() <= xNorth && xNorth < end.getX() && x1 <= xNorth && xNorth <= x2 && y2 > start.getY() && y1 < end.getY()) {\n return true;\n }\n // Check east\n if (!Double.isNaN(yWest) && start.getY() <= yWest && yWest < end.getY() && y1 <= yWest && yWest <= y2 && x2 > start.getX() && x1 < end.getX()) {\n return true;\n }\n // Check south\n if (!Double.isNaN(xSouth) && start.getX() <= xSouth && xSouth < end.getX() && x1 <= xSouth && xSouth <= x2 && y2 > start.getY() && y1 < end.getY()) {\n return true;\n }\n // Check west\n return !Double.isNaN(yEast) && start.getY() <= yEast && yEast < end.getY() && y2 <= yEast && yEast <= y2 && x2 > start.getX() && x1 < end.getX();\n }",
"public void drawLine(float[] line) {\n\t\tline(line[0], line[1], line[2], line[3]);\n\t}",
"public static boolean getPath(int x, int y, ArrayList<Point> path) {\n\t\tif (x > size-1 || y > size-1 || !isFree(x, y)) { // !isFree -> [x][y] = 0\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tboolean isAtFinal = (x == size-1) && (y == size-1); //destination: 5, 5\n\t\t\n\t\t//if there is a path from my current to end, add it\n\t\tif(isAtFinal || getPath(x, y+1, path) || getPath(x+1, y, path)){\n\t\t\tPoint p = new Point(x,y);\n\t\t\tpath.add(p);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public void onDirectionSuccess(List<Points> point) {\n for (Points points:point){\n PolylineOptions polyLineOptions = new PolylineOptions().geodesic(true).color(Color.BLUE\n ).width(15);\n for (int i = 0; i < points.points.size(); i++)\n polyLineOptions.add(points.points.get(i));\n\n polylinePaths.add(mMap.addPolyline(polyLineOptions));\n\n }\n\n }",
"public void mousePressed(MouseEvent e) // When mouse is pressed:\n {\n Location pt = new Location(e.getX(),e.getY());\n origPress = pt;\n\n if(hLine.contains(pt)) // If press is on hLine:\n {\n hLineGrabbed = true; // hLine is grabbed\n }\n\n if(vLine.contains(pt)) // If press is on vLine:\n {\n vLineGrabbed = true; // vLine is grabbed\n }\n\n lastPt = pt; // Set the point to lastPt\n }"
] | [
"0.6685717",
"0.63290465",
"0.60790145",
"0.60608",
"0.6037106",
"0.6033968",
"0.5990261",
"0.59805834",
"0.59558",
"0.5939762",
"0.5919698",
"0.58412594",
"0.5746619",
"0.5729087",
"0.5705436",
"0.56971514",
"0.56879294",
"0.56876916",
"0.56637305",
"0.56288904",
"0.5596432",
"0.5594903",
"0.55735314",
"0.55642724",
"0.556403",
"0.5554807",
"0.552789",
"0.55250436",
"0.55189806",
"0.5514634",
"0.5489571",
"0.54859716",
"0.54599655",
"0.545007",
"0.542101",
"0.5403429",
"0.53886294",
"0.5379971",
"0.5355228",
"0.5354872",
"0.53328645",
"0.53265244",
"0.532491",
"0.5318875",
"0.53163636",
"0.53070146",
"0.53066593",
"0.5302879",
"0.5301678",
"0.5296996",
"0.5295402",
"0.5289816",
"0.528021",
"0.5269432",
"0.526027",
"0.5259562",
"0.5253087",
"0.5249151",
"0.5239712",
"0.5236539",
"0.52334946",
"0.5224802",
"0.5223374",
"0.5211103",
"0.5199093",
"0.51906955",
"0.5187112",
"0.51853067",
"0.5183821",
"0.5180494",
"0.51757365",
"0.5174443",
"0.51649094",
"0.51616776",
"0.5144002",
"0.51373214",
"0.512679",
"0.512386",
"0.51192856",
"0.5117963",
"0.5117573",
"0.51121056",
"0.51095945",
"0.510768",
"0.5082997",
"0.5070858",
"0.506408",
"0.5062106",
"0.5060135",
"0.505723",
"0.5049847",
"0.5041617",
"0.5030475",
"0.50152427",
"0.5005619",
"0.4995706",
"0.49883074",
"0.49841332",
"0.4982376",
"0.49791256"
] | 0.70419186 | 0 |
Draws a line between origin and orOpActive (noninclusive) | private void createFinalLine() {
//Up
if (orOpActive.row > origin.row) {
for (int i = origin.row + 1; i <= orOpActive.row; i++) {
game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);
//setState(gridMap.get(i).get(origin.column), STATE_FINAL);
}
}
//Down
if (orOpActive.row < origin.row) {
for (int i = origin.row - 1; i >= orOpActive.row; i--) {
game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);
//setState(gridMap.get(i).get(origin.column), STATE_FINAL);
}
}
//Right
if (orOpActive.column > origin.column) {
for (int i = origin.column + 1; i <= orOpActive.column; i++) {
game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);
//setState(gridMap.get(origin.row).get(i), STATE_FINAL);
}
}
//Left
if (orOpActive.column < origin.column) {
for (int i = origin.column - 1; i >= orOpActive.column; i--) {
game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);
//setState(gridMap.get(origin.row).get(i), STATE_FINAL);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void drawLine(int x, int y, int x2, int y2, int color);",
"public static List<Position> drawline(Position origin, Position target, int range, boolean includeOrigin){\n\t\tList<Position> line = new ArrayList<Position>();\n\n\t\tif(includeOrigin){\n\t\t\tline.add(origin);\n\t\t}\n\t\tint totalDist = origin.getDistance(target);\n\t\tfor(float f = 1; f <= range; f++){\n\t\t\tfloat delta = f / range;\n\t\t\tfloat deltaQ = (target.getQ() - origin.getQ()) * delta;\n\t\t\tfloat deltaR = (target.getR() - origin.getR()) * delta;\n\t\t\tfloat deltaS = (target.getS() - origin.getS()) * delta;\n\t\t\tfloat deltaH = (target.getH() - origin.getH()) * delta;\n\t\t\tPosition deltaPos = roundPosition(deltaQ, deltaR, deltaS, deltaH);\n\t\t\tline.add(vectorAdd(origin, deltaPos));\n\t\t}\n\n\t\treturn line;\n\t}",
"protected abstract void lineTo(final float x, final float y);",
"private void DrawOval(GL gl, float x, float y, float size, float r, float g, float b) {\n\t\t// Degeneracy = do not want\n\t\tif (m_length == 0.0f || m_width == 0.0f) {\n\t\t\treturn;\n\t\t}\n\n\n\t\t////int mct = (int) (1 / this.GetPEngine().m_uniscale);\n\t\t////mct = (mct / 2) / 100 * 100;\n\t\tgl.glPushMatrix();\n\t\tfloat theta = (float) Math.toRadians(m_slope);\n\t\t// Draw our line:\n\t\tgl.glLineWidth(2.0f);\n\n\t\tif (Iteration != 0) {\n\t\t\tfor (int i = 0; i < Iteration; i++) {\n\n\n\t\t\t\tif ((m_slope >= 0 && m_slope <= 45) || (m_slope >= 315 && m_slope <= 360)) {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (0 + i * 200) * ((float) Math.cos(theta)), 100 + y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-50 + i * 200) * ((float) Math.cos(theta)), 100 + y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\n\t\t\t\t\tgl.glEnd();\n\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + -20 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (40 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 20 + (40 + i * 200) * ((float) Math.sin(theta)));\n\n\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t} else if ((m_slope >= 135 && m_slope < 225)) {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 - 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 - 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\n\n\t\t\t\t\tgl.glEnd();\n\n\t\t\t\t} else if (m_slope > 45 && m_slope < 135) {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + -100 + (100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + -100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 20 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + -20 + (40 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (40 + i * 200) * ((float) Math.sin(theta)));\n\n\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t} else {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 20 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 20 + (-40 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-40 + i * 200) * ((float) Math.sin(theta)));\n\n\n\n\t\t\t\t\tgl.glEnd();\n\n\t\t\t\t}\n\n\t\t\t\tgl.glPopMatrix();\n\t\t\t}\n\t\t}\n\t}",
"public void drawLine(float x, float y, float x2, float y2, float width, float u, float v, float texW, float texH) {\n throw new NotImplementedException(); // TODO Implement\n }",
"public abstract void lineTo(double x, double y);",
"public void drawLine(int x1, int y1, int x2, int y2);",
"public void drawLine(float x, float y, float x2, float y2, float width) {\n throw new NotImplementedException(); // TODO Implement\n }",
"private boolean createLine() {\n boolean lineFinished = false;\n\n //tempPiece = gridPieces.get(getGridPiece(touchPos));\n lineVector = touchPos;\n\n\n if (origin.row == orOpActive.row) {\n if (Math.abs(lineVector.x - origin.rectangle.x) > Math.abs(orOpActive.rectangle.x - origin.rectangle.x)) {\n tempPiece = orOpActive;\n } else {\n lineVector.y = origin.rectangle.y;\n tempPiece = game.gridPieces[game.getGridPiece(lineVector)];\n }\n // Right\n if (origin.column < tempPiece.column) {\n for (int i = origin.column + 1; i <= tempPiece.column; i++) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_TEMP);\n }\n // Left\n } else {\n for (int i = tempPiece.column; i < origin.column; i++) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_TEMP);\n }\n }\n } else {\n if (Math.abs(lineVector.y - origin.rectangle.y) > Math.abs(orOpActive.rectangle.y - origin.rectangle.y)) {\n tempPiece = orOpActive;\n } else {\n lineVector.x = origin.rectangle.x;\n tempPiece = game.gridPieces[game.getGridPiece(lineVector)];\n }\n // Up\n if (origin.row < tempPiece.row) {\n for (int i = origin.row + 1; i <= tempPiece.row; i++) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_TEMP);\n }\n // Down\n } else {\n for (int i = tempPiece.row; i < origin.row; i++) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_TEMP);\n }\n }\n }\n\n if (getDirectNeighbors(orOpActive).contains(game.gridPieces[game.getGridPiece(lineVector)])) {\n lineFinished = true;\n }\n\n if(checkFingerFling()) {\n lineFinished = true;\n }\n\n return lineFinished;\n }",
"public void drawLine(Point2D startPoint, Point2D endPoint, double lineStroke, int EndType);",
"private void drawLine(GraphicsContext canvas, Point start, Point end) {\n canvas.strokeLine(\n start.X, start.Y,\n end.X, end.Y\n );\n }",
"@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean screenCoords) {\n drawLine(id, start, end, weight, color, false, screenCoords);\n }",
"public boolean playerThrough(int px, int py, int pw, int ph){\r\n Line2D.Double line = new Line2D.Double(p1,p2); //the gate line\r\n //check if line intersects the player's rectangle of space\r\n if(line.intersects(px, py, pw, ph)){\r\n return true; //gate triggered\r\n }\r\n return false; //gate not triggered\r\n }",
"public static List<Position> drawLine(Position origin, Direction dir, int range, boolean includeOrigin){\n\n\t\tPosition deltaVector = scalarMultiply(dir.getPosVector(), range);\n\t\tPosition target = vectorAdd(origin, deltaVector);\n\n\t\treturn drawline(origin, target, range, includeOrigin);\n\t}",
"public void addPolyLine() {\n abstractEditor.drawNewShape(new ELineDT());\n }",
"private void drawLine(double x1, double y1, double x2, double y2) {\r\n\t\tGLine line = new GLine(x1,y1,x2,y2);\r\n\t\tadd(line);\r\n\t}",
"@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean arrow, boolean screenCoords) {\n if(screenCoords) {\n start = convToImageCoords(start);\n end = convToImageCoords(end);\n }\n Line l = new Line(id, start, end, weight, color, arrow);\n lineMap.put(id, l);\n render();\n }",
"public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}",
"public void drawTo(Point that) {\r\n /* DO NOT MODIFY */\r\n StdDraw.line(this.x, this.y, that.x, that.y);\r\n }",
"@Override\n\tpublic void drawLine(Vector3f from, Vector3f to, Vector3f color) {\n\n\t\tfloat[] positions = new float[6];\n\t\tpositions[0] = from.x;\n\t\tpositions[1] = from.y;\n\t\tpositions[2] = from.z;\n\n\t\tpositions[3] = to.x;\n\t\tpositions[4] = to.y;\n\t\tpositions[5] = to.z;\n\n\t\t// Create a rawmodel to store the line\n\t\tRawModel model = Globals.getLoader().loadToVAO(positions, 3);\n\n\t\tshader.start();\n\t\tshader.loadProjectionMatrix(Globals.getRenderer().getProjectionMatrix());\n\t\tshader.loadViewMatrix(Globals.getActiveCamera());\n\t\tGL30.glBindVertexArray(model.getVaoID());\n\n\t\tGL20.glEnableVertexAttribArray(0);\n\t\tGL11.glDrawArrays(GL11.GL_LINES, 0, 6);\n\t\tGL20.glDisableVertexAttribArray(0);\n\t\tGL30.glBindVertexArray(0);\n\t\tshader.stop();\n\t\tmodel.cleanUp();\n\n\t}",
"public void setDrawLine(boolean b){\n\t\tdraw = b; \n\t}",
"public void paintLine(Point2D pt1, Point2D pt2, Graphics graphics) {\n Graphics2D g = (Graphics2D) graphics;\n g.setXORMode(java.awt.Color.lightGray);\n g.setColor(java.awt.Color.darkGray);\n if (pt1 != null && pt2 != null) {\n // the line connecting the segments\n OMLine cLine = new OMLine((float) pt1.getY(), (float) pt1.getX(), (float) pt2.getY(), (float) pt2.getX(), lineType);\n // get the map projection\n Projection proj = theMap.getProjection();\n // prepare the line for rendering\n cLine.generate(proj);\n // render the line graphic\n cLine.render(g);\n }\n }",
"public Line verif(boolean Free, int startx, int starty, int endx, int endy) {\n if (Free == true) {\n Line line1 = new Line(startx, starty, endx, endy);\n return line1;\n }\n return null;\n }",
"public void drawTo(Point that) {\n /* DO NOT MODIFY */\n StdDraw.line(this.x, this.y, that.x, that.y);\n }",
"public void drawTo(Point that) {\n /* DO NOT MODIFY */\n StdDraw.line(this.x, this.y, that.x, that.y);\n }",
"public void drawTo(Point that) {\n /* DO NOT MODIFY */\n StdDraw.line(this.x, this.y, that.x, that.y);\n }",
"public void drawTo(Point that) {\n /* DO NOT MODIFY */\n StdDraw.line(this.x, this.y, that.x, that.y);\n }",
"private boolean lineline(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4){\n float uA = ((x4-x3)*(y1-y3) - (y4-y3)*(x1-x3)) / ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1));\n float uB = ((x2-x1)*(y1-y3) - (y2-y1)*(x1-x3)) / ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1));\n\n return uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1;\n }",
"public boolean lineOfSight(PathAgentModel viewer, PathAgentModel target)\r\n/* 293: */ {\r\n/* 294: */ float ty;\r\n/* 295: */ float tx;\r\n/* 296: */ float ty;\r\n/* 297:336 */ if (target.hasTarget())\r\n/* 298: */ {\r\n/* 299:338 */ float tx = target.getTargetX();\r\n/* 300:339 */ ty = target.getTargetY();\r\n/* 301: */ }\r\n/* 302: */ else\r\n/* 303: */ {\r\n/* 304:343 */ tx = target.getX();\r\n/* 305:344 */ ty = target.getY();\r\n/* 306: */ }\r\n/* 307:348 */ if (viewer.fov(tx, ty)) {\r\n/* 308:350 */ if (line(viewer.getX(), viewer.getY(), tx, ty)) {\r\n/* 309:352 */ return true;\r\n/* 310: */ }\r\n/* 311: */ }\r\n/* 312:355 */ return false;\r\n/* 313: */ }",
"public Polyline drawLine(Star one, Star two)\r\n\t{\t\t\r\n\t\treturn lang.newPolyline(new Offset[] { getStarPosition(one.x, one.y), getStarPosition(two.x, two.y) }, \"line\" + one.toString() + two.toString(), null, connectionLines);\r\n\t}",
"private void drawConnectorLine(final Graphics g) {\r\n if (startPort != null && startPoint != null && current != null) {\r\n g.drawLine((int) startPoint.getX(), (int) startPoint.getY(), (int) current.getX(), (int) current.getY());\r\n }\r\n }",
"public void drawAngleIndicator(){\n\t\tfloat bottomLineHyp = 60;\n\t\tfloat topLineHyp = 100;\n\t\t\n\t\tfloat bottomXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\tfloat bottomYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\t\n\t\tfloat bottomX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale()) / 2 ) + bottomXCoord;\n\t\tfloat bottomY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale()) / 2 ) + bottomYCoord ;\n\t\t\n\t\tfloat topXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * topLineHyp);\n\t\tfloat topYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * topLineHyp);\n\t\t\n\t\tfloat topX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale() ) / 2 ) + topXCoord;\n\t\tfloat topY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale() ) / 2 ) + topYCoord;\n\t\t\n\t\tShapeRenderer shape = new ShapeRenderer();\n\t\tshape.setColor(Color.BLACK);\n\t\tshape.begin(ShapeType.Line);\n\t\tshape.line(bottomX, bottomY, topX, topY);\n\t\tshape.end();\n\t}",
"public void drawLine(double x0, double y0, double x1, double y1, int red, int green, int blue){\n\t\tif( x0 > x1 ) {\n\t\t\tdouble xt = x0 ; x0 = x1 ; x1 = xt ;\n\t\t\tdouble yt = y0 ; y0 = y1 ; y1 = yt ;\n\t\t}\n\t\t\n\t\tdouble a = y1-y0;\n\t\tdouble b = -(x1-x0);\n\t\tdouble c = x1*y0 - x0*y1;\n\n\t\t\tif(y0<y1){ // Octant 1 or 2\n\t\t\t\tif( (y1-y0) <= (x1-x0) ) { //Octant 1\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y+0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or SE\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\ty = y+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { // Octant 2\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y+1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go SE or S\t\t\t\t\t\n\t\t\t\t\twhile(y<=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){\n\t\t\t\t\t\t\td = d+b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y+1;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else { // Octant 7 or 8\n\t\t\t\tif( (y0-y1) <= (x1-x0) ) { // Octant 8\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y-0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or NE\t\t\t\t\t\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){ \n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else { \n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\ty = y-1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { //Octant 7\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y-1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go NE or N\n\t\t\t\t\twhile(y>=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d-b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y-1;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}",
"public void lineTo(int x1, int y1, int c1) {\n\n if (lineToOrigin) {\n if (x1 == sx0 && y1 == sy0) {\n // staying in the starting point\n return;\n }\n\n // not closing the path, do the previous lineTo\n lineToImpl(sx0, sy0, scolor0, joinToOrigin);\n lineToOrigin = false;\n } else if (x1 == x0 && y1 == y0) {\n return;\n } else if (x1 == sx0 && y1 == sy0) {\n lineToOrigin = true;\n joinToOrigin = joinSegment;\n joinSegment = false;\n return;\n }\n\n lineToImpl(x1, y1, c1, joinSegment);\n joinSegment = false;\n }",
"@Override\n public String getLineJoin() {\n return graphicsEnvironmentImpl.getLineJoin(canvas);\n }",
"public void drawTo(Point that) {\n StdDraw.line(this.x, this.y, that.x, that.y);\n }",
"@Override\n public void lineTo(double x, double y) {\n graphicsEnvironmentImpl.lineTo(canvas, x, y);\n }",
"public abstract void onLineMode ();",
"public void draw()\n {\n drawLine(x1, y1, x2, y2);\n }",
"public boolean lineOfSight(AgentModel viewer, float x, float y)\r\n/* 316: */ {\r\n/* 317:361 */ if ((viewer.fov(x, y)) && (line(viewer.getX(), viewer.getY(), x, y))) {\r\n/* 318:363 */ return true;\r\n/* 319: */ }\r\n/* 320:366 */ return false;\r\n/* 321: */ }",
"public void lineDraw(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2) {\n Line l = new Line((int) l1.data.xCo, (int) l1.data.yCo, (int) l2.data.xCo, (int) l2.data.yCo);\n l.setTranslateX(mapImage.getLayoutX());\n l.setTranslateY(mapImage.getLayoutY());\n ((Pane) mapImage.getParent()).getChildren().add(l);\n }",
"private void drawTopLeft1(Graphics g) {\r\n int pipX = 0;\r\n int pipY = 0;\r\n switch (state) {\r\n case 0:\r\n pipX = this.x + 4;\r\n pipY = this.y + 4;\r\n break;\r\n case 1:\r\n pipX = this.x - 12;\r\n pipY = this.y + 4;\r\n break;\r\n case 2:\r\n pipX = this.x - 12;\r\n pipY = this.y - 12;\r\n break;\r\n case 3:\r\n pipX = this.x + 4;\r\n pipY = this.y - 12;\r\n break;\r\n }\r\n g.fillOval(pipX, pipY, 8, 8);\r\n }",
"public void drawLine(int x, int y, int x2, int y2, int color){\n int dy = y - y2;\n int dx = x - x2;\n int fraction, stepx, stepy;\n\n if(dy < 0){\n dy = -dy;\n stepy = -1;\n }else{\n stepy = 1;\n }\n if(dx < 0){\n dx = -dx;\n stepx = -1;\n }else{\n stepx = 1;\n }\n dy <<= 1;\n dx <<= 1;\n\n set(x, y, color);\n\n if(dx > dy){\n fraction = dy - (dx >> 1);\n while(x != x2){\n if(fraction >= 0){\n y += stepy;\n fraction -= dx;\n }\n x += stepx;\n fraction += dy;\n set(x, y, color);\n }\n }else{\n fraction = dx - (dy >> 1);\n while(y != y2){\n if(fraction >= 0){\n x += stepx;\n fraction -= dy;\n }\n y += stepy;\n fraction += dx;\n set(x, y, color);\n }\n }\n }",
"public void drawOneLine(float x1, float y1,float x2,float y2){\n \tGL11.glBegin(GL11.GL_LINES);\n \tGL11.glVertex2f(x1,y1);\n \tGL11.glVertex2f(x2,y2);\n \tGL11.glEnd();\n }",
"void showLine(int[] xy1, int[] xy2, int width, char col) {\r\n\t\tgc.setStroke(colFromChar(col)); // set the stroke colour\r\n\t\tgc.setLineWidth(width);\r\n\t\tgc.strokeLine(xy1[0], xy1[1], xy2[0], xy2[1]); // draw line\r\n\t}",
"public void\nshiftToOrigin()\n{\n\tthis.setLine(0.0, 0.0,\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n}",
"public PointRelation pointLineRelation(Coordinates point, Coordinates linePointA, Coordinates linePointB);",
"private void drawT(int[] xPoints,int[] yPoints,boolean condition){\r\n if(condition)\r\n g.setColor(Color.red); \r\n else\r\n g.setColor(Color.gray); \r\n g.fillPolygon(xPoints,yPoints,3);\r\n g.setColor(Color.black);\r\n g.drawPolygon(xPoints,yPoints,3); \r\n }",
"private void drawLine(int x1, int y1, int x2, int y2)\n {\n System.out.println(\"Draw a line from x of \" + x1 + \" and y of \" + y1);\n System.out.println(\"to x of \" + x2 + \" and y of \" + y2);\n System.out.println(\"The line color is \" + lineColor);\n System.out.println(\"The width of the line is \" + lineWidth);\n System.out.println(\"Then length of the line is \" + df.format(getLength()) + \"\\n\" );\n }",
"private void drawLine(Vector2 vt1, Vector2 vt2, GLayerGroup pGroup){\n DrawLineLaser.DrawLine(vt1,vt2);\n\n }",
"public void drawBorder(boolean blue)\n\t{\n\t\t// copied most of the following from http://forums.inside3d.com/viewtopic.php?t=1326\n\t\tif (blue)\n\t\t\tglColor3f(0, 0, 1); // blue\n\t\telse\n\t\t\tglColor3f(1, 0, 0); // red\n\n\t\tglLineWidth(2); // Set line width to 2\n\t\tglLineStipple(1, (short) 0xf0f0); // Repeat count, repeat pattern\n\t\tglEnable(GL_LINE_STIPPLE); // Turn stipple on\n\n\t\tglBegin(GL_LINE_LOOP);\n\t\tglVertex2d(x - BORDER, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y + BORDER + height);\n\t\tglVertex2d(x - BORDER, y + BORDER + height);\n\t\tglEnd();\n\t\tif (action == 3)\n\t\t{\n\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\tdouble endPoint = endPos;\n\t\t\tif (!downRight)\n\t\t\t\tendPoint = startPos;\n\t\t\t//System.out.println(\"StartPos, EndPos, endPoint: \" + startPos + \", \" + endPos + \", \" + endPoint);\n\t\t\tif (upDown)\n\t\t\t{\n\t\t\t\tglVertex2d(x - BORDER, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint + BORDER + height);\n\t\t\t\tglVertex2d(x - BORDER, endPoint + BORDER + height);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglVertex2d(endPoint - BORDER, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y + BORDER + height);\n\t\t\t\tglVertex2d(endPoint - BORDER, y + BORDER + height);\n\t\t\t}\n\t\t\tglEnd();\n\t\t}\n\n\t\tglDisable(GL_LINE_LOOP); // Turn it back off\n\t\tglDisable(GL_LINE_STIPPLE); // Turn it back off\n\t\tglEnd();\n\t}",
"public void drawLine(Position scanPos, Position mypos)// in\n \t\t// ver�nderter\n \t\t// Form von\n \t\t// http://www-lehre.informatik.uni-osnabrueck.de\n \t\t\t{\n \t\t\t\tint x, y, error, delta, schritt, dx, dy, inc_x, inc_y;\n \n \t\t\t\tx = mypos.getX(); // \n \t\t\t\ty = mypos.getY(); // As i am center\n \n \t\t\t\tdx = scanPos.getX() - x;\n \t\t\t\tdy = scanPos.getY() - y; // Hoehenzuwachs\n \n \t\t\t\t// Schrittweite\n \n \t\t\t\tif (dx > 0) // Linie nach rechts?\n \t\t\t\t\tinc_x = 1; // x inkrementieren\n \t\t\t\telse\n \t\t\t\t\t// Linie nach links\n \t\t\t\t\tinc_x = -1; // x dekrementieren\n \n \t\t\t\tif (dy > 0) // Linie nach oben ?\n \t\t\t\t\tinc_y = 1; // y inkrementieren\n \t\t\t\telse\n \t\t\t\t\t// Linie nach unten\n \t\t\t\t\tinc_y = -1; // y dekrementieren\n \n \t\t\t\tif (Math.abs(dy) < Math.abs(dx))\n \t\t\t\t\t{ // flach nach oben oder unten\n \t\t\t\t\t\terror = -Math.abs(dx); // Fehler bestimmen\n \t\t\t\t\t\tdelta = 2 * Math.abs(dy); // Delta bestimmen\n \t\t\t\t\t\tschritt = 2 * error; // Schwelle bestimmen\n \t\t\t\t\t\twhile (x != scanPos.getX())\n \t\t\t\t\t\t\t{\n \n \t\t\t\t\t\t\t\tif (x != mypos.getX())\n \t\t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\t\tincPix(x + mypos.getX(), y + mypos.getY()); // Fuer\n \t\t\t\t\t\t\t\t\t\t// jede\n \t\t\t\t\t\t\t\t\t\t// x-Koordinate\n \t\t\t\t\t\t\t\t\t\t// System.out.println(\"inc pos \"+ (x +\n \t\t\t\t\t\t\t\t\t\t// mypos.getX()));\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t// Pixel\n \t\t\t\t\t\t\t\tx += inc_x; // naechste x-Koordinate\n \t\t\t\t\t\t\t\terror = error + delta; // Fehler aktualisieren\n \t\t\t\t\t\t\t\tif (error > 0)\n \t\t\t\t\t\t\t\t\t{ // neue Spalte erreicht?\n \t\t\t\t\t\t\t\t\t\ty += inc_y; // y-Koord. aktualisieren\n \t\t\t\t\t\t\t\t\t\terror += schritt; // Fehler\n \t\t\t\t\t\t\t\t\t\t// aktualisieren\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t} else\n \t\t\t\t\t{ // steil nach oben oder unten\n \t\t\t\t\t\terror = -Math.abs(dy); // Fehler bestimmen\n \t\t\t\t\t\tdelta = 2 * Math.abs(dx); // Delta bestimmen\n \t\t\t\t\t\tschritt = 2 * error; // Schwelle bestimmen\n \t\t\t\t\t\twhile (y != scanPos.getY())\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\tif (y != mypos.getY())\n \t\t\t\t\t\t\t\t\t{// fuer jede y-Koordinate\n \t\t\t\t\t\t\t\t\t\tincPix(x + mypos.getX(), y + mypos.getY());\n \t\t\t\t\t\t\t\t\t}// setze\n \t\t\t\t\t\t\t\t// Pixel\n \t\t\t\t\t\t\t\ty += inc_y; // naechste y-Koordinate\n \t\t\t\t\t\t\t\terror = error + delta; // Fehler aktualisieren\n \t\t\t\t\t\t\t\tif (error > 0)\n \t\t\t\t\t\t\t\t\t{ // neue Zeile erreicht?\n \t\t\t\t\t\t\t\t\t\tx += inc_x; // x-Koord. aktualisieren\n \t\t\t\t\t\t\t\t\t\terror += schritt; // Fehler\n \t\t\t\t\t\t\t\t\t\t// aktualisieren\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\tif ((x != scanPos.getX() && y != scanPos.getY()))\n \t\t\t\t\t{\n \t\t\t\t\t\tdecPix(scanPos.getX() + x, scanPos.getY() + y);\n \t\t\t\t\t}\n \t\t\t}",
"protected abstract void drawBorderLine(\n // CSOK: ParameterNumber\n final float x1, final float y1, final float x2, final float y2,\n final boolean horz, final boolean startOrBefore, final int style,\n final Color col);",
"public String toString() {\n\t\treturn \"LINE:(\"+startPoint.getX()+\"-\"+startPoint.getY() + \")->(\" + endPoint.getX()+\"-\"+endPoint.getY()+\")->\"+getColor().toString();\n\t}",
"private void drawLine(Graphics g, int x1, int y1, int x2, int y2) {\n int d = 0;\n\n int dx = Math.abs(x2 - x1);\n int dy = Math.abs(y2 - y1);\n\n int dx2 = 2 * dx; // slope scaling factors to\n int dy2 = 2 * dy; // avoid floating point\n\n int ix = x1 < x2 ? 1 : -1; // increment direction\n int iy = y1 < y2 ? 1 : -1;\n\n int x = x1;\n int y = y1;\n\n if (dx >= dy) {\n while (true) {\n plot(g, x, y);\n if (x == x2)\n break;\n x += ix;\n d += dy2;\n if (d > dx) {\n y += iy;\n d -= dx2;\n }\n }\n } else {\n while (true) {\n plot(g, x, y);\n if (y == y2)\n break;\n y += iy;\n d += dx2;\n if (d > dy) {\n x += ix;\n d -= dy2;\n }\n }\n }\n }",
"private ArrayList<Vector2f> drawRasterLine(Graphics g, Vector2f p0, Vector2f p1) {\r\n g.setColor(Color.BLUE);\r\n // Storage for drawn points\r\n ArrayList<Vector2f> vertices = new ArrayList<>();\r\n // Get pixels on the canvas\r\n int x0 = (int) world2Pixel(p0).x;\r\n int y0 = (int) world2Pixel(p0).y;\r\n int x1 = (int) world2Pixel(p1).x;\r\n int y1 = (int) world2Pixel(p1).y;\r\n // Delta x\r\n float dx = Math.abs(x1 - x0);\r\n // Step for x-value\r\n int sx = x0 < x1 ? 1 : -1;\r\n // Delta y\r\n float dy = -Math.abs(y1 - y0);\r\n // Step for y-value\r\n int sy = y0 < y1 ? 1 : -1;\r\n // Error values to determine with step to take\r\n float err = dx + dy, e2;\r\n // Loop until algorithm has finished\r\n while(true) {\r\n // Draw point on current coordinates\r\n g.drawArc(x0, y0, 1, 1, 0, 360);\r\n // Add point to drawn points list\r\n vertices.add(new Vector2f(x0, y0));\r\n // Loop condition\r\n if (x0==x1 && y0==y1) break;\r\n // Check which step to take for next point to draw\r\n e2 = 2 * err;\r\n if (e2 > dy) {\r\n err += dy;\r\n x0 += sx;\r\n }\r\n if (e2 < dx) {\r\n err += dx;\r\n y0 += sy;\r\n }\r\n }\r\n // Return all drawn points\r\n return vertices;\r\n }",
"public void drawLine(int x0, int y0, int x1, int y1) {\n \t\tmyCanvas.drawLine(x0, y0, x1, y1, myPaint);\n \t}",
"public Line getOrthogonalLine(){\n return new Line(point, MathUtil.getOrthogonalDirection(direction));\n }",
"private void drawCurve(){\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Line);\n for (int i = 0; i<dragonCurve1.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve1[i], dragonCurve1[i+1], dragonCurve1[i+2], dragonCurve1[i+3]);\n }\n for (int i = 0; i<dragonCurve2.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve2[i], dragonCurve2[i+1], dragonCurve2[i+2], dragonCurve2[i+3]);\n }\n for (int i = 0; i<dragonCurve3.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve3[i], dragonCurve3[i+1], dragonCurve3[i+2], dragonCurve3[i+3]);\n }\n for (int i = 0; i<dragonCurve4.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve4[i], dragonCurve4[i+1], dragonCurve4[i+2], dragonCurve4[i+3]);\n }\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.setColor(Color.RED);\n renderer.end();\n if(MyCamera.renderSystems){ //Put red dots on the systems that are close enough to a certain point while zoomed in\n systems = GameScreen.database.getSystems(\"SELECT SystemX, SystemY, id FROM 'Systems' WHERE ABS(SystemX-\"+MyCamera.closeupCamera.position.x+\")<25\");\n for(int i = 0; i<systems.size(); i++){\n String[] parts = systems.get(i).split(\" \");\n float x = Float.parseFloat(parts[0]);\n float y = Float.parseFloat(parts[1]);\n String id = String.valueOf(Float.parseFloat(parts[2]));\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.circle(x, y, 0.5f);\n renderer.end();\n }\n }\n }",
"public void drawLine(int i, int y1, int j, int y2, Paint paint) {\n\t\t\n\t}",
"Line(Dot StartDot,Dot EndDot,int index){\n \tthis.StartDot = StartDot;\n \tthis.EndDot = EndDot;\n \tthis.sx = StartDot.getX();\n \tthis.sy = StartDot.getY();\n \tthis.ex = EndDot.getX();\n \tthis.ey = EndDot.getY();\n \tthis.Angle = Math.atan2((ey - sy),(ex - sx)); \n// \tif((ey - sy) > 0 && (ex - sx) < 0) Angle += Math.PI;\n// \tif((ey - sy) < 0 && (ex - sx) < 0) Angle += Math.PI;\n// \tif((ey - sy) < 0 && (ex - sx) > 0) Angle += Math.PI * 2;\n// \tif((ex-sx) < 0) Angle += Math.PI;\n// \tif((ex - sx) > 0 && (ey - sy) < 0) Angle += Math.PI * 2;\n \tif(Angle < 0) Angle += Math.PI * 2;\n \tthis.rightPoly = null;\n \tthis.leftPoly = null;\n \tthis.index = index;\n }",
"public void drawLine(int x1, int y1, int x2, int y2){\n int a1 = new Coordinate2D(x1, y1).getPixelPointX();\n int b1 = new Coordinate2D(x1, y1).getPixelPointY();\n int a2 = new Coordinate2D(x2, y2).getPixelPointX();\n int b2 = new Coordinate2D(x2, y2).getPixelPointY();\n graphics2D.drawLine(a1, b1, a2, b2);\n }",
"void displayOppositeObject() {\n\t\tif (selectedLine >= 0 || selectedPoint >= 0) {\n\t\t\tmyParent.stroke(255, 0, 0);\n\t\t\tswitch (state) {\n\t\t\tcase DRAG_FREE_LINE:\n\t\t\t\tmyParent.line(line[neighbor(selectedLine)[2]].start.x, line[neighbor(selectedLine)[2]].start.y,\n\t\t\t\t\t\tline[neighbor(selectedLine)[2]].end.x, line[neighbor(selectedLine)[2]].end.y);\n\t\t\t\tbreak;\n\n\t\t\tcase SCALE_FREE_POINT:\n\t\t\t\tmyParent.ellipse(point[neighbor(selectedPoint)[2]].x, point[neighbor(selectedPoint)[2]].y, 30, 30);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public boolean drawPathLine(Location loc1, Location loc2) {\n if (loc1.distanceTo(loc2) < DRAW_LINE_THRESHOLD_METERS) {\n return false;\n }\n Polyline line = new Polyline();\n List<GeoPoint> points = Arrays.asList(MapUtils.makeGeoPoint(loc1), MapUtils.makeGeoPoint(loc2));\n line.setPoints(points);\n line.setColor(Color.RED);\n line.setWidth(2.0f);\n mMap.getOverlayManager().add(line);\n\n mPathLines.add(line);\n return true;\n }",
"public OMAbstractLine() {\n super();\n }",
"public void draw( Graphics graphics, Point p1, Point p2 )\n {\n Rectangle rect = panel.getVisibleRect();\n int min_x = rect.x;\n int max_x = rect.x + rect.width;\n int min_y = rect.y;\n int max_y = rect.y + rect.height;\n\n // only draw in region\n if ( p2.x >= min_x && p2.x <= max_x )\n graphics.drawLine( p2.x, min_y, p2.x, max_y);\n\n if ( p2.y >= min_y && p2.y <= max_y )\n graphics.drawLine( min_x, p2.y, max_x, p2.y);\n }",
"void addLine(int index, Coordinate start, Coordinate end);",
"public void DrawGraphActive() {\n if (CurrentEQ == null || CurrentEQ.isEmpty()) {\n return;\n }\n StringParser parser = new StringParser();\n Equation eq = parser.ParseString(CurrentEQ);\n\n int size = (int) ((Math.max(MinX, MaxX) - Math.min(MinX, MaxX)) / Step);\n double[] points = new double[size * 2 + 2];\n int index = 0;\n for (double i = Math.min(MinX, MaxX); i <= Math.max(MinX, MaxX); i += Step) {\n points[index] = i;\n index++;\n points[index] = eq.peekAt(\"x\", i);\n index++;\n }\n LineGraph root = new LineGraph(points);\n root.raw = CurrentEQ;\n root.setIncrements(Increments);\n root.setLineColour(LineColor);\n root.SetDrawArea(DrawArea);\n root.setShowNumbers(DrawScale);\n root.setBackColor(BackColor);\n root.setCurveThickness(CurveThickness);\n Canvas.removeAll();\n Canvas.repaint();\n int h = Frame.getHeight();\n int w = Frame.getWidth();\n GraphPanel p;\n if (ForceRange) {\n p = (GraphPanel) root.drawToJPanel((int) (w * Zoom), (int) (h * Zoom),\n Math.min(MinX, MaxX),\n Math.min(MinY, MaxY),\n Math.max(MinX, MaxX),\n Math.max(MinY, MaxY));\n p.addMouseMotionListener(new MouseMovementListener(p, root, eq));\n Canvas.add(p);\n } else {\n p = (GraphPanel) root.drawToJPanel((int) (w * Zoom), (int) (h * Zoom));\n p.addMouseMotionListener(new MouseMovementListener(p, root, eq));\n Canvas.add(p);\n // Canvas.setBackground(Color.red);\n }\n\n Frame.validate();\n CenterScrollPane();\n lineGraphs.set(RootGraph, root);\n p.LineGraphs = lineGraphs;\n }",
"private void drawLine(KdNode kdNode, double x0, double x1, double y0, double y1) {\n if (kdNode.dimension) { // True, or node is vertical\n StdDraw.setPenColor(Color.red);\n StdDraw.line(kdNode.point.x(), y0, kdNode.point.x(), y1);\n if (kdNode.left != null) drawLine(kdNode.left, x0, kdNode.point.x(), y0, y1);\n if (kdNode.right != null) drawLine(kdNode.right, kdNode.point.x(), x1, y0, y1);\n }\n else { // False, or node is horizontal\n StdDraw.setPenColor(Color.blue);\n StdDraw.line(x0, kdNode.point.y(), x1, kdNode.point.y());\n if (kdNode.left != null) drawLine(kdNode.left, x0, x1, y0, kdNode.point.y());\n if (kdNode.right != null) drawLine(kdNode.right, x0, x1, kdNode.point.y(), y1);\n }\n\n }",
"@Override\n public void draw(Graphics g) {\n g.setColor(Color.BLACK);\n g.drawLine(startingPoint.x, startingPoint.y, endingPoint.x, endingPoint.y);\n }",
"public boolean line(float x0, float y0, float x1, float y1)\r\n/* 355: */ {\r\n/* 356:412 */ float dx = Math.abs(x1 - x0);\r\n/* 357:413 */ float dy = Math.abs(y1 - y0);\r\n/* 358: */ int sx;\r\n/* 359: */ int sx;\r\n/* 360:416 */ if (x0 < x1) {\r\n/* 361:418 */ sx = 1;\r\n/* 362: */ } else {\r\n/* 363:421 */ sx = -1;\r\n/* 364: */ }\r\n/* 365: */ int sy;\r\n/* 366: */ int sy;\r\n/* 367:423 */ if (y0 < y1) {\r\n/* 368:425 */ sy = 1;\r\n/* 369: */ } else {\r\n/* 370:429 */ sy = -1;\r\n/* 371: */ }\r\n/* 372:431 */ float err = dx - dy;\r\n/* 373:432 */ boolean line = true;\r\n/* 374:433 */ while (line)\r\n/* 375: */ {\r\n/* 376:435 */ float e2 = 2.0F * err;\r\n/* 377:437 */ if (e2 > -dy)\r\n/* 378: */ {\r\n/* 379:439 */ err -= dy;\r\n/* 380:440 */ x0 += sx;\r\n/* 381: */ }\r\n/* 382:442 */ if (e2 < dx)\r\n/* 383: */ {\r\n/* 384:444 */ err += dx;\r\n/* 385:445 */ y0 += sy;\r\n/* 386: */ }\r\n/* 387:448 */ line = tileWalkable(x0, y0);\r\n/* 388:451 */ if ((x0 == x1) && (y0 == y1)) {\r\n/* 389: */ break;\r\n/* 390: */ }\r\n/* 391:457 */ if (getAgentOnTile(x0, y0) != null) {\r\n/* 392:459 */ line = false;\r\n/* 393: */ }\r\n/* 394: */ }\r\n/* 395:465 */ return line;\r\n/* 396: */ }",
"private void drawAxisLines() {\n\t\t//Draw axis lines\n\t\tgl.glLineWidth(2.0f);\n\t\tgl.glBegin(GL2.GL_LINES);\n\t\t\n\t\t//Line Positive X - Red\n\t\tgl.glColor3d(1, 0, 0);\n\t\tgl.glVertex3d(0, 0, 0);\n\t\tgl.glVertex3d(1, 0, 0);\n\t\t//Line Negative X - Red\n\t\tgl.glColor3d(1, 0, 0);\n\t\tgl.glVertex3d(0, 0, 0);\n\t\tgl.glVertex3d(-1, 0, 0);\n\t\t//Line Positive Y - Green\n\t\tgl.glColor3d(0, 1, 0);\n\t\tgl.glVertex3d(0, 0, 0);\n\t\tgl.glVertex3d(0, 1, 0);\n\t\t//Line Negative Y - Green\n\t\tgl.glColor3d(0, 1, 0);\n\t\tgl.glVertex3d(0, 0, 0);\n\t\tgl.glVertex3d(0, -1, 0);\n\t\t//Line Positive Z - Blue\n\t\tgl.glColor3d(0, 0, 1);\n\t\tgl.glVertex3d(0, 0, 0);\n\t\tgl.glVertex3d(0, 0, 1);\n\t\t//Line Negative Z - Blue\n\t\tgl.glColor3d(0, 0, 1);\n\t\tgl.glVertex3d(0, 0, 0);\n\t\tgl.glVertex3d(0, 0, -1);\n\n\t\tgl.glEnd();\n\t}",
"@Override\n\tpublic void drawShape(Graphics g) {\n\t\tg.setColor(getColor());\n\t\tg.drawLine(startPoint.getX(), startPoint.getY(), endPoint.getX(), endPoint.getY());\n\t\tif(isSelected())\n\t\t\tselectedShape(g);\n\t}",
"public static void writeLine(Model model, int x1, int y1, int x2, int y2, char colour) {\n int xLength = model.getWidth();\n int yLength = model.getHeight();\n\n if (x1 > xLength || x2 > xLength || y1 > yLength || y2 > yLength) {\n System.out.println(String.format(\"Couldn't create line inside current simpleCanvas width: %d, height: %d\", xLength, yLength));\n return;\n }\n\n // Simple optimization if the line are orthogonal x or y.\n if (x1 == x2 || y1 == y2) {\n for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++)\n for (int j = Math.min(y1, y2); j <= Math.max(y1, y2); j++)\n model.set(i, j, colour);\n } else {\n // try to draw line from left to write\n // To do this we should find min x coordinate\n int startx, starty, endx, endy;\n if (x1 < x2) {\n startx = x1;\n starty = y1;\n endx = x2;\n endy = y2;\n } else {\n startx = x2;\n starty = y2;\n endx = x1;\n endy = y1;\n }\n\n model.set(startx, starty, colour);\n model.set(endx, endy, colour);\n\n if (y1 < y2) {\n // Find line equation of the line\n // (y - y1)/(y2-y1) = (x - x1)/(x2 - x1)\n // y - y1 = (x - x1)(y2-y1)/(x2 - x1)\n // y = y1 + (x - x1)(y2-y1)/(x2 - x1)\n int newX = startx;\n int newY = starty;\n while (newX < endx && newY <= endy) {\n //TODO optimize coefficient\n double newYcompare = findY(newX + 1, startx, starty, endx, endy);\n\n if (newYcompare == newY + 1) {\n newY++;\n newX++;\n model.set(newX, newY, colour);\n model.set(newX, newY - 1, colour);\n } else if (newYcompare < newY + 1) {\n newX++;\n model.set(newX, newY, colour);\n } else {\n newY++;\n model.set(newX, newY, colour);\n }\n }\n } else {\n // Find line equation of the line\n // (x - x1)/(x2 - x1) = (y - y1)/(y2-y1)\n // (x - x1) = (y - y1)(x2 - x1)/(y2-y1)\n // x = x1 + (y - y1)(x2 - x1)/(y2-y1)\n int newX = startx;\n int newY = starty;\n while (newX <= endx && newY > endy) {\n //TODO optimize coefficient\n double newXcompare = findX(newY - 1, startx, starty, endx, endy);\n\n if (newXcompare == newX + 1) {\n newY--;\n newX++;\n model.set(newX, newY, colour);\n // array[newX - 2][newY - 1] = colour;\n model.set(newX, newY + 1, colour);\n } else if (newXcompare < newX + 1) {\n newY--;\n model.set(newX, newY, colour);\n } else {\n newX++;\n model.set(newX, newY, colour);\n }\n }\n }\n }\n }",
"private void drawCursor(final Terminal term, int prevOption, int curOption)\n {\n // create a blank string and use it to clear where the cursor used to be\n String blank = \"\";\n for (int i = 0; i < cursor.length(); i++)\n {\n blank += SPACE;\n }\n LanternaUtil.termPrint(term, blank, firstColumn, firstRow + prevOption);\n LanternaUtil.termPrint(term, cursor, firstColumn, firstRow + curOption);\n term.flush();\n }",
"public void drawLine(int x1, int y1, int x2, int y2 , Graphics g) {\r\n \tfloat dY, dX;\r\n \tfloat x,y;\r\n \tdX = x2-x1;\r\n \tdY = y2-y1;\r\n \tx = x1;\r\n \ty = y1;\r\n \t\t\t\r\n \tfloat range = Math.max(Math.abs(dX), Math.abs(dY));\r\n \tdY = dY/range;\r\n \tdX = dX/range;\r\n \t\r\n \tfor (int i =0 ; i < range ; i++ ) { \r\n \t\tg.drawRect(Math.round(x), Math.round(y),1,1);\r\n \t\tx = x + dX;\r\n \t\ty = y + dY;\r\n \t}\r\n\r\n \t\r\n }",
"private void drawLine(Vector3 point1, Vector3 point2, Node n) {\n\n Node nodeForLine= new Node();\n nodeForLine.setName(LINE_STRING);\n //First, find the vector extending between the two points and define a look rotation\n //in terms of this Vector.\n final Vector3 difference = Vector3.subtract(point1, point2);\n final Vector3 directionFromTopToBottom = difference.normalized();\n final Quaternion rotationFromAToB =\n Quaternion.lookRotation(directionFromTopToBottom, Vector3.up());\n MaterialFactory.makeTransparentWithColor(getApplicationContext(), new Color(this.colorLine.x, this.colorLine.y, this.colorLine.z,this.alphaColor))\n .thenAccept(\n material -> {\n /* Then, create a rectangular prism, using ShapeFactory.makeCube() and use the difference vector\n to extend to the necessary length. */\n ModelRenderable model = ShapeFactory.makeCube(\n new Vector3(this.sizeLine, this.sizeLine, difference.length()),\n Vector3.zero(), material);\n /* Last, set the world rotation of the node to the rotation calculated earlier and set the world position to\n the midpoint between the given points . */\n\n nodeForLine.setParent(n);\n\n\n nodeForLine.setRenderable(model);\n nodeForLine.setWorldPosition(Vector3.add(point1, point2).scaled(.5f));\n nodeForLine.setWorldRotation(rotationFromAToB);\n }\n );\n\n }",
"@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n if (bdhcHandler != null) {\n int[] slopes = bdhcHandler.getSelectedPlate().getSlope();\n float angle = (float) Math.atan2(slopes[indexSlope1], slopes[indexSlope2]);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g.setColor(Color.magenta);\n final int angleRadius = (radius * 2) / 3;\n final int angleOffset = size / 2 - angleRadius;\n g2.setStroke(new BasicStroke(2));\n g.drawArc(angleOffset, angleOffset, 2 * angleRadius, 2 * angleRadius, 0, (int) (-(angle * 180) / Math.PI));\n\n g2.setStroke(new BasicStroke(2));\n if (frontView) {\n g.setColor(Color.red);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n } else {\n g.setColor(Color.green);\n //g.drawLine(size / 2, size / 2, size, size / 2);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n }\n\n int circleOffset = size / 2 - radius;\n g.setColor(Color.black);\n g2.setStroke(new BasicStroke(1));\n g.drawOval(circleOffset, circleOffset, radius * 2, radius * 2);\n\n int x = (int) (Math.cos(angle) * radius);\n int y = (int) (Math.sin(angle) * radius);\n int lineOffset = size / 2;\n g.setColor(Color.orange);\n g2.setStroke(new BasicStroke(3));\n g.drawLine(lineOffset - x, lineOffset - y, lineOffset + x, lineOffset + y);\n\n }\n\n }",
"@Override\r\n\tpublic void BuildLegRight() {\n\t\tg.drawLine(70, 100, 85, 150);\r\n\t}",
"void plotLine(int argbA, boolean tScreenedA, int argbB, boolean tScreenedB,\n int xA, int yA, int zA, int xB, int yB, int zB,\n boolean clipped) {\n x1t = xA;\n x2t = xB;\n y1t = yA;\n y2t = yB;\n z1t = zA;\n z2t = zB;\n //if (xA != 250 && xB != 250)return;\n //System.out.println(\"\\t\\t\\t\" + xA + \",\" + yA + \" \" + xB + \",\" + yB);\n\n if (clipped)\n switch (getTrimmedLine()) {\n case VISIBILITY_UNCLIPPED:\n clipped = false;\n break;\n case VISIBILITY_OFFSCREEN:\n return;\n }\n plotLineClipped(argbA, tScreenedA, argbB, tScreenedB, xA, yA, zA, xB - xA,\n yB - yA, zB - zA, clipped, 0, 0);\n }",
"@Override\n public void onDrag(MouseEvent e, GraphicsContext g) {\n g.lineTo(e.getX(), e.getY());\n g.setLineWidth(1);\n g.stroke();\n }",
"public void lineTo(double x, double y)\n {\n\tPoint2D pos = transformedPoint(x,y);\n\tdouble tx = pos.getX();\n\tdouble ty = pos.getY();\n\t\n\tLine line = new Line(_currentx, _currenty, tx, ty);\n\n\tSystem.out.println(\"+Line: \" + line.toString());\n\t_currentPath.add(line);\n\t_currentx = tx;\n\t_currenty = ty;\n }",
"public void addEdge(Integer x1, Integer y1, Integer x2, Integer y2, boolean added){\n\t\tif(!added){\n\t\t\toutput += \"<line x1=\\\"\" + x1*scale + \"\\\" y1=\\\"\" + y1*scale + \"\\\" x2=\\\"\" \n\t\t\t\t\t\t+ x2*scale + \"\\\" y2=\\\"\" + y2*scale + \"\\\" style=\\\"stroke:black; stroke-width:1;\\\"/>\\n\";\n\t\t}else{\n\t\t\toutput += \"<line x1=\\\"\" + x1*scale + \"\\\" y1=\\\"\" + y1*scale + \"\\\" x2=\\\"\" \n\t\t\t\t\t\t+ x2*scale + \"\\\" y2=\\\"\" + y2*scale + \"\\\" style=\\\"stroke:#d7d7d7; stroke-width:1;\\\"/>\\n\";\n\t\t}\n\t}",
"public DirectShapeRenderer beginPath() {\n \t\treturn renderer.beginPath();\n \t}",
"public void renderLine (Graphics g)\r\n {\r\n if (glyph.getContourBox()\r\n .intersects(g.getClipBounds())) {\r\n getLine(); // To make sure the line has been computed\r\n\r\n Point start = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStart(),\r\n (int) Math.rint(line.yAt((double) getStart()))),\r\n null);\r\n Point stop = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStop() + 1,\r\n (int) Math.rint(line.yAt((double) getStop() + 1))),\r\n null);\r\n g.drawLine(start.x, start.y, stop.x, stop.y);\r\n }\r\n }",
"@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(this.color);\r\n\t\tg.fillOval((int)x, (int)y, side, side);\r\n\t\tg.setColor(this.color2);\r\n\t\tg.fillOval((int)x+5, (int)y+2, side/2, side/2);\r\n\t}",
"private void drawEdge(Graphics2D g2d,Point p0, Point p1) {\n int x0 = (int)p0.x + FRAME_WIDTH/2;\n int y0 = FRAME_HEIGHT/2 - (int)p0.y ;\n int x1 = (int)p1.x + FRAME_WIDTH/2;\n int y1 = FRAME_HEIGHT/2 - (int)p1.y;\n if(DEBUG) System.out.println(\"In drawEdge: \" + x0 + \" \" + y0 + \" \"\n + x1 + \" \" + y1);\n g2d.drawLine(x0, y0, x1, y1);\n \n }",
"private void linearFunction(Graphics g, double x0, double y0, double x1, double y1) {\n //abriviaciones para las funciones\n double dx = x1 - x0;\n double dy = y1 - y0;\n\n if (Math.abs(dx) > Math.abs(dy)) {\n double m = dy / dx;\n double b = y0 - m * x0;\n if (dx < 0) {\n dx = -1;\n } else {\n dx = 1;\n }\n\n while (x0 != x1) {\n x0 += dx;\n y0 = Math.round(m * x0 + b);\n g.drawLine((int) coord_x(x0), (int) coord_y(y0), (int) coord_x(x0), (int) coord_y(y0));\n }\n } else {\n if (dy != 0) {\n double m = dx / dy;\n double b = x0 - m * y0;\n if (dy < 0) {\n dy = -1;\n } else {\n dy = 1;\n }\n while (y0 != y1) {\n y0 += dy;\n x0 = Math.round(m * y0 + b);\n g.drawLine((int) coord_x(x0), (int) coord_y(y0), (int) coord_x(x0), (int) coord_y(y0));\n }\n }\n }\n }",
"public void markLine(int x1, int y1, int x2, int y2) {\n for (int row = y1 - 1; row <= y2 - 1 && row < height; row++) {\n for (int col = x1 - 1; col <= x2 - 1 && col < width; col++) {\n pixels[row][col] = DRAWING_CHAR;\n }\n }\n }",
"private void drawLineSeg(int entryNum, GPoint from, GPoint to) {\n\t\tGLine line = new GLine(from.getX(), from.getY(),\n\t\t\t\t\t\t\t to.getX(), to.getY());\n\t\tline.setColor(getColor(entryNum));\n\t\tadd(line);\n\t}",
"public Line(Point startingPoint, Point endingPoint) {\n this.startingPoint = startingPoint;\n this.endingPoint = endingPoint;\n }",
"private Line addLine() {\n\t\t// Create a new line\n\t\tLine line = new Line(doily.settings.getPenScale(), \n\t\t\t\tdoily.settings.getPenColor(), doily.settings.isReflect());\n\t\tdoily.lines.add(line);\n\t\treturn line;\n\t}",
"@Override\r\n\tpublic void BuildLegLeft() {\n\t\tg.drawLine(60, 100, 45, 150);\r\n\t}",
"public abstract void offLineMode ();",
"public void drawLine() {\n for(int i=0; i < nCols; i++) {\n System.out.print(\"----\");\n }\n System.out.println(\"\");\n }",
"public static void line(GL2 gl, Vec3d start, Vec3d end)\n\t{\n\t\tgl.glBegin(GL.GL_LINES);\n\t\tgl.glVertex3d(start.x, start.y, start.z);\n\t\tgl.glVertex3d(end.x, end.y, end.z);\n\t\tgl.glEnd();\n\t}",
"static void line() {\n int x1, x2, y1, y2;\n String m = \"\";\n \n System.out.print(\"Enter point 1: \");\n y1 = scan.nextInt(); x1 = scan.nextInt(); scan.nextLine();\n\n System.out.print(\"Enter point 2: \");\n y2 = scan.nextInt(); x2 = scan.nextInt(); scan.nextLine();\n\n if ( ! lineBetween(x1, y1, x2, y2) ) m = \" not\";\n\n System.out.printf(\"Point 2 is%s visible from point 1.\\n\", m);\n }",
"@Override\n public void draw() {\n super.draw(); \n double radius = (this.getLevel() * 0.0001 + 0.025) * 2.5e10;\n double x = this.getR().cartesian(0) - Math.cos(rot) * radius;\n double y = this.getR().cartesian(1) - Math.sin(rot) * radius;\n StdDraw.setPenRadius(0.01);\n StdDraw.setPenColor(StdDraw.RED);\n StdDraw.point(x, y);\n \n }",
"private void lineColor() {\n\n\t}",
"private void drawConnectLine(double[] startPoint, double[] endPoint, Color color) {\r\n\t\tdouble startX = startPoint[0];\r\n\t\tdouble startY = startPoint[1];\r\n\t\t\r\n\t\tdouble endX = endPoint[0];\r\n\t\tdouble endY = endPoint[1];\r\n\t\t\r\n\t\tGLine line = new GLine();\r\n\t\tline.setStartPoint(startX, startY);\r\n\t\tline.setEndPoint(endX, endY);\r\n\t\tline.setColor(color);\r\n\t\tadd(line);\r\n\t}"
] | [
"0.5769062",
"0.56813985",
"0.5661399",
"0.5622709",
"0.55898154",
"0.5537428",
"0.55132234",
"0.54485625",
"0.54391134",
"0.540239",
"0.5399822",
"0.53572154",
"0.53533715",
"0.5343098",
"0.53326035",
"0.5293456",
"0.5277194",
"0.5270463",
"0.5264171",
"0.5260174",
"0.5251268",
"0.52484494",
"0.52457875",
"0.5239308",
"0.5239308",
"0.5239308",
"0.5239308",
"0.52174616",
"0.5215721",
"0.52139753",
"0.52089345",
"0.5198894",
"0.51946086",
"0.51880383",
"0.5178519",
"0.5167018",
"0.5160943",
"0.5157805",
"0.51493335",
"0.5138389",
"0.51378655",
"0.51274353",
"0.51244307",
"0.51226413",
"0.51217073",
"0.50969553",
"0.5087843",
"0.5085758",
"0.50775486",
"0.50634474",
"0.50620025",
"0.5054219",
"0.5053513",
"0.50491303",
"0.504875",
"0.50440633",
"0.5035799",
"0.5032336",
"0.5022773",
"0.50148016",
"0.5007364",
"0.50055903",
"0.5002578",
"0.5001462",
"0.49865073",
"0.49813926",
"0.49721393",
"0.49691677",
"0.49678358",
"0.4962962",
"0.49627426",
"0.4956396",
"0.49320436",
"0.49267766",
"0.49243307",
"0.49143702",
"0.49138206",
"0.490581",
"0.4895852",
"0.48875138",
"0.48869133",
"0.487967",
"0.48786044",
"0.4876507",
"0.48714116",
"0.4870609",
"0.48694938",
"0.48668602",
"0.48634377",
"0.4862234",
"0.48620686",
"0.4861521",
"0.48590967",
"0.48586592",
"0.4857089",
"0.4851537",
"0.48407996",
"0.48405528",
"0.48393834",
"0.4838558"
] | 0.49470496 | 72 |
Returns a list of grid pieces that the user can aim toward to finish a fence | private ArrayList<GridPiece> getOpposite(GridPiece origin) {
originOpposite.clear();
//Check for corners
if (origin.column == 0 && (origin.row == 0 || origin.row == game.gridSizeHeight - 1)) {
originOpposite.add(falsePiece);
return originOpposite;
} else if (origin.column == game.gridSizeWidth - 1 && (origin.row == 0 || origin.row == game.gridSizeHeight - 1)) {
originOpposite.add(falsePiece);
return originOpposite;
}
if (originOpposite.size() > 0) {
return originOpposite;
}
// Search Around
boolean canCreateOp;
// Search up
if (game.gridMap.size() > origin.row + 1) {
canCreateOp = false;
for (int i = origin.row + 1; i < game.gridSizeHeight; i++) {
if (game.gridMap.get(i).get(origin.column).state == game.STATE_NONE) {
canCreateOp = true;
} else if (game.gridMap.get(i).get(origin.column).state == game.STATE_FINAL && canCreateOp) {
originOpposite.add(game.gridMap.get(i).get(origin.column));
break;
}
}
// Search down
}
if (origin.row > 0) {
canCreateOp = false;
for (int i = origin.row - 1; i >= 0; i--) {
if (game.gridMap.get(i).get(origin.column).state == game.STATE_NONE) {
canCreateOp = true;
} else if (game.gridMap.get(i).get(origin.column).state == game.STATE_FINAL && canCreateOp) {
originOpposite.add(game.gridMap.get(i).get(origin.column));
break;
}
}
// Search right
}
if (game.gridMap.get(0).size() > origin.column + 1) {
canCreateOp = false;
for (int i = origin.column + 1; i < game.gridSizeWidth; i++) {
if (game.gridMap.get(origin.row).get(i).state == game.STATE_NONE) {
canCreateOp = true;
} else if (game.gridMap.get(origin.row).get(i).state == game.STATE_FINAL && canCreateOp) {
originOpposite.add(game.gridMap.get(origin.row).get(i));
break;
}
}
// Search left
}
if (origin.column > 0) {
canCreateOp = false;
for (int i = origin.column - 1; i >= 0; i--) {
if (game.gridMap.get(origin.row).get(i).state == game.STATE_NONE) {
canCreateOp = true;
} else if (game.gridMap.get(origin.row).get(i).state == game.STATE_FINAL && canCreateOp) {
originOpposite.add(game.gridMap.get(origin.row).get(i));
break;
}
}
}
noLine = true;
if (originOpposite.size() == 0) {
originOpposite.add(falsePiece);
}
return originOpposite;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Collection<Piece> getActivePieces();",
"public abstract Collection<Piece> getActivePieces();",
"public List<Grid> getPossibleMoves(Grid g){\n\t\tint i=g.row, j=g.col;\n\t\tif(i>=0 && i<data.length && j>=0 && j<data[i].length){\n\t\t\tList<Grid> list=new ArrayList<>();\n\t\t\tif(isFree(i, j-1)) list.add(new Grid(i,j-1));\n\t\t\tif(isFree(i-1, j-1)) list.add(new Grid(i-1,j-1));\n\t\t\tif(isFree(i-1, j)) list.add(new Grid(i-1,j));\n\t\t\tif(isFree(i-1, j+1)) list.add(new Grid(i-1,j+1));\n\t\t\tif(isFree(i, j+1)) list.add(new Grid(i,j+1));\n\t\t\tif(isFree(i+1, j+1)) list.add(new Grid(i+1,j+1));\n\t\t\tif(isFree(i+1, j)) list.add(new Grid(i+1,j));\n\t\t\tif(isFree(i+1, j-1)) list.add(new Grid(i+1,j-1));\n\t\t\treturn list;\n\t\t}\n\t\treturn null;\n\t}",
"public List<Piece> allPieces();",
"@Override\r\n public void getRange(ArrayList<Piece> pieces){\r\n this.range.clear();\r\n int pieceX = this.getX(); int pieceY = this.getY(); // X and Y coordinates for the king piece\r\n\r\n // getPiece: 0 = empty; 1 = same color; 2 = opposite color\r\n //Up\r\n if (this.getPiece(pieceX, pieceY+1, pieces) == 0 || this.getPiece(pieceX, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Up-right\r\n if (this.getPiece(pieceX+1, pieceY+1, pieces) == 0 || this.getPiece(pieceX+1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Right\r\n if (this.getPiece(pieceX+1, pieceY, pieces) == 0 || this.getPiece(pieceX+1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Down-right\r\n if (this.getPiece(pieceX+1, pieceY-1, pieces) == 0 || this.getPiece(pieceX+1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down\r\n if (this.getPiece(pieceX, pieceY-1, pieces) == 0 || this.getPiece(pieceX, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down-left\r\n if (this.getPiece(pieceX-1, pieceY-1, pieces) == 0 || this.getPiece(pieceX-1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Left\r\n if (this.getPiece(pieceX-1, pieceY, pieces) == 0 || this.getPiece(pieceX-1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Up-left\r\n if (this.getPiece(pieceX-1, pieceY+1, pieces) == 0 || this.getPiece(pieceX-1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Castling\r\n for (Piece piece : pieces) {\r\n if (piece instanceof Rook) {\r\n if (piece.getColor() == this.getColor()) {\r\n if (validCastling(pieces, (Rook)piece)) {\r\n int targetX = (piece.getX() < getX()) ? (this.getX() - 2) : (this.getX() + 2);\r\n this.range.add(new int[] {targetX, this.getY()});\r\n }\r\n }\r\n }\r\n }\r\n }",
"private GridPiece getOppositeActive() {\n\n\t\t/*System.out.println(\"GS| origin row: \" + origin.row);\n\t\tSystem.out.println(\"GS| origin col: \" + origin.column);\n\t\tSystem.out.println(\"GS| origin center x,y: \" + origin.getCenter());*/\n\n\n if (game.gridPieces[game.getGridPiece(touchPos)] == origin) {\n return origin;\n }\n float degrees;\n\n // Get degrees\n degrees = MathUtils.atan2(touchPos.y - origin.getCenter().y, touchPos.x - origin.getCenter().x);\n\n float quarterPi = 0.78539816339f;\n\n if (!originOpposite.contains(falsePiece)) {\n for (GridPiece gridPiece : originOpposite) {\n\n //System.out.println(\"GS| degrees: \" + degrees);\n\t\t\t/*System.out.println(\"GS| gridpiece row: \" + gridPiece.row);\n\t\t\tSystem.out.println(\"GS| gridpiece col: \" + gridPiece.column);\n\t\t\tSystem.out.println(\"GS| gridpiece center x,y: \" + gridPiece.getCenter());*/\n\n // Right\n if (degrees >= 0 && degrees < quarterPi || degrees < 0 && degrees >= -quarterPi) {\n if (gridPiece.row == origin.row && gridPiece.getCenter().x > origin.getCenter().x) {\n return gridPiece;\n }\n }\n\n // Down\n else if (degrees <= -quarterPi && degrees > -quarterPi * 3) {\n if (gridPiece.column == origin.column && gridPiece.getCenter().y < origin.getCenter().y) {\n return gridPiece;\n }\n }\n\n // Left\n else if (degrees > quarterPi * 3 && degrees <= quarterPi * 4\n || degrees < -quarterPi * 3 && degrees >= -quarterPi * 4) {\n if (gridPiece.row == origin.row && gridPiece.getCenter().x < origin.getCenter().x) {\n return gridPiece;\n }\n }\n\n // Up\n else if (degrees >= quarterPi && degrees < quarterPi * 3) {\n if (gridPiece.column == origin.column && gridPiece.getCenter().y > origin.getCenter().y) {\n return gridPiece;\n }\n }\n\n }\n }\n return origin;\n }",
"public List<Piece> whitePieces();",
"private void addPieces() {\n gridPane.getChildren().clear();\n Map<Piece, Position> pieces = controller.getAllActivePiecesPositions();\n /* Add the tiles */\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 8; col++) {\n Tile tile = new TileView(new Position(row, col));\n gridPane.add(tile.getRootNode(),\n 1 + tile.getPosition().getCol(),\n 1 + tile.getPosition().getRow());\n GridPane.setHgrow(tile.getRootNode(), Priority.ALWAYS);\n GridPane.setVgrow(tile.getRootNode(), Priority.ALWAYS);\n getTiles()[row][col] = tile;\n tile.getRootNode().setOnMouseClicked(\n tileListener(tile));\n tile.clear();\n tile.setSymbol(\"\");\n }\n }\n /* Add the pieces */\n for (Piece p : pieces.keySet()) {\n Position placeAt = pieces.get(p);\n getTileAt(placeAt).setSymbol(p.getType().getSymbol(p.getSide()));\n }\n /* Add the coordinates around the perimeter */\n for (int i = 1; i <= 8; i++) {\n Text coord1 = new Text((char) (64 + i) + \"\");\n coord1.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord1.setFill(Color.WHITE);\n GridPane.setHalignment(coord1, HPos.CENTER);\n gridPane.add(coord1, i, 0);\n\n Text coord2 = new Text((char) (64 + i) + \"\");\n coord2.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord2.setFill(Color.WHITE);\n GridPane.setHalignment(coord2, HPos.CENTER);\n gridPane.add(coord2, i, 9);\n\n Text coord3 = new Text(\" \" + (9 - i) + \" \");\n coord3.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord3.setFill(Color.WHITE);\n GridPane.setHalignment(coord3, HPos.CENTER);\n gridPane.add(coord3, 0, i);\n\n Text coord4 = new Text(\" \" + (9 - i) + \" \");\n coord4.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord4.setFill(Color.WHITE);\n GridPane.setHalignment(coord4, HPos.CENTER);\n gridPane.add(coord4, 9, i);\n }\n }",
"public List<Square> getSquareGrid();",
"private ArrayList<GridPiece> getDirectNeighbors(GridPiece piece) {\n neighbors.clear();\n\n //Top\n if (game.gridMap.size() > piece.row + 1) {\n neighbors.add(game.gridMap.get(piece.row + 1).get(piece.column));\n }\n //Bottom\n if (piece.row > 0) {\n neighbors.add(game.gridMap.get(piece.row - 1).get(piece.column));\n }\n\n //Right\n if (game.gridMap.get(0).size() > piece.column + 1) {\n neighbors.add(game.gridMap.get(piece.row).get(piece.column + 1));\n }\n\n //Left\n if (piece.column > 0) {\n neighbors.add(game.gridMap.get(piece.row).get(piece.column - 1));\n }\n\n return neighbors;\n }",
"List<Coord> allActiveCells();",
"public List<REPoint> getObstacles();",
"public void landPiece() {\n\t\t// current rotation of piece\n\t\tint rot = currentPiece.getPieceRotation();\n\t\t\n\t\t// x coordinate of current piece's northwest corner\n\t\tint row = currentPieceGridPosition[0];\n\t\t\n\t\t// y coordinate of current piece's northwest corner\n\t\tint col = currentPieceGridPosition[1];\t\n\n\t\t// adds currentPiece's landing positions to be true in blockMatrix\n\t\tfor(int i = 0; i < 4; i++) { \n\t\t\tfor(int j = 0; j < 4; j++) { \n\t\t\t\tif(currentPiece.isFilled(rot, i, j)) {\n\t\t\t\t\tblockMatrix[i + row][j + col] = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//add up scores\n\t\tnumLines += numberOfFormedLines(); \n\t\tif(numberOfFormedLines() >= 4) {\n\t\t\tnumTetrises++; \n\t\t}\n\t\t\n\t\t//clear out full lines\n\t\tfor(int i = 0; i < blockMatrix.length; i++) { \n\t\t\tif(fullLine(i)) { \n\t\t\t\tremoveLine(i);\n\t\t\t\t//find rows with blocks filled above cleared line to drop those down\n\t\t\t\tfor(int m = i-1; m >= 0; m--) { \n\t\t\t\t\tfor(int n = 0; n < NUM_COLS; n++) {\n\t\t\t\t\t\t// fill in space below, clear out current row \n\t\t\t\t\t\tif(hasBlock(m, n)) { \n\t\t\t\t\t\t\tblockMatrix[m][n] = false;\n\t\t\t\t\t\t\tblockMatrix[m+1][n] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ready for next piece\n\t\taddNewPiece();\n\t}",
"List<Tile> getAdjacentTiles();",
"public ArrayList<Piece> getAllPieceOfCell() {\n ArrayList<Piece> overAllList = new ArrayList<>(mImmegrintsList);\n overAllList.addAll(mResidentQ);\n return overAllList;\n }",
"private ArrayList<Coordinates> getThreats() {\n\t\tArrayList<Coordinates> result = new ArrayList<>();\n\t\tArrayList<Coordinates> adversary = chessboard.getEnemyPieces();\n\t\tCoordinates king = null;\n\t\tking = chessboard.getTurnKing();\n\t\t\t\t\n\t\tfor (Coordinates c : adversary ){\n\t\t\tif ( checkMove(c, king) ){\n\t\t\t\tresult.add(c);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public ArrayList<Coordinates> getHeroesPositions (){\n\t\tArrayList<Coordinates> path = new ArrayList<>();\n\t\tArrayList<Coordinates> coordinatePieces = chessboard.getTurnPieces();\n\t\tArrayList<Coordinates> threats = getThreats();\n\n\t\tfor ( Coordinates c : threats ){\n\t\t\tpath.add(c); //aggiungo la posizione dell'avversario\n\t\t\tif ( !(chessboard.at(c) instanceof Knight) )\n\t\t\t\tpath.addAll(chessboard.at(c).getPath(c, chessboard.getTurnKing())); //tutte le posizione in cui può andare\n\t\t}\n\t\t\n\t\tArrayList<Coordinates> result = new ArrayList<>();\n\t\t\tfor ( Coordinates c : coordinatePieces )\n\t\t\t\tfor ( Coordinates to : path)\n\t\t\t\t\tif ( !(chessboard.at(c) instanceof King) && checkMove(c, to) )\n\t\t\t\t\t\tresult.add(to);\n\t\treturn result;\n\t}",
"List<MineTile> getSurround(int position) {\n int dimension = getDimension();\n int row = position / dimension;\n int col = position % dimension;\n List<MineTile> surround = new ArrayList<>();\n\n if (row != 0 && col != 0) {\n surround.add(getTiles().get(position - dimension - 1));\n }\n if (row != 0 && col != dimension - 1) {\n surround.add(getTiles().get(position - dimension + 1));\n }\n if (row != 0) {\n surround.add(getTiles().get(position - dimension));\n }\n if (row != dimension - 1 && col != 0) {\n surround.add(getTiles().get(position + dimension - 1));\n }\n if (row != dimension - 1 && col != dimension - 1) {\n surround.add(getTiles().get(position + dimension + 1));\n }\n if (row != dimension - 1) {\n surround.add(getTiles().get(position + dimension));\n }\n if (col != 0) {\n surround.add(getTiles().get(position - 1));\n }\n if (col != dimension - 1) {\n surround.add(getTiles().get(position + 1));\n }\n return surround;\n }",
"private void checkForConversions() {\n\n for(int r=0; r<COLUMN_ROW_COUNT; r++) {\n for(int c=0; c<COLUMN_ROW_COUNT; c++) {\n Piece p = cells[r][c];\n if(p == null) continue;\n\n if (p.getType().equals(Type.GUARD)) {\n int surroundingDragons = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c + 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+ 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n\n if (surroundingDragons >= 3) {\n cells[r][c].changeType(Type.DRAGON);\n }\n }\n\n /*\n if(p.getType().equals(Type.KING)) {\n int blockedDirections = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c - 2) >= COLUMN_ROW_COUNT && cells[r][c-2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r - 2) >= COLUMN_ROW_COUNT && cells[r-2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c+1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c + 2) < COLUMN_ROW_COUNT && cells[r][c+2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r + 2) < COLUMN_ROW_COUNT && cells[r+2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if(blockedDirections == 4) {\n //gameOver = true;\n }\n }*/\n }\n }\n }",
"public List<Piece> allPieces(){\n List<Piece> pieces = new ArrayList<>();\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n int val = board[y][x];\n if (val != 0){\n pieces.add(new Piece(val,x,y));\n }\n }\n }\n return pieces;\n }",
"List<Move> legalMoves(Piece side) {\r\n legalMovesArr = new ArrayList<Move>();\r\n HashSet<Square> pieceSide = pieceLocations(side);\r\n for (Square pieces : pieceSide) {\r\n for (int i = 0; i <= 8; i++) {\r\n Move x = mv(pieces, sq(pieces.col(), i));\r\n legalMovesArr.add(x);\r\n }\r\n for (int j = 0; j <= 8; j++) {\r\n Move y = mv(pieces, sq(j, pieces.row()));\r\n legalMovesArr.add(y);\r\n }\r\n while (legalMovesArr.remove(null));\r\n }\r\n return legalMovesArr;\r\n }",
"public void createPieces(){ \n\t\tfor(int x = 0; x<BOARD_LENGTH; x++){\n\t\t\tfor(int y = 0; y<BOARD_LENGTH; y++){ \n\t\t\t\tif(CHESS_MAP[x][y] != (null)){\n\t\t\t\t\tswitch (CHESS_MAP[x][y]){\n\t\t\t\t\tcase KING:\n\t\t\t\t\t\tpieces[pieceCounter] = new King(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase QUEEN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Queen(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BISHOP:\n\t\t\t\t\t\tpieces[pieceCounter] = new Bishop(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase KNIGHT:\n\t\t\t\t\t\tpieces[pieceCounter] = new Knight(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PAWN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Pawn(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ROOK:\n\t\t\t\t\t\tpieces[pieceCounter] = new Rook(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tsetPieceIconAndName(x, y, CHESS_MAP[x][y]); \t\n\t\t\t\t\tpieceCounter++;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}",
"@Override\n public void revealAllMines() {\n for (Tile[] tiles : grid) {\n for (Tile t : tiles) {\n if (t.getType() == Tile.MINE) {\n t.setState(Tile.REVEALED);\n }\n }\n }\n }",
"public static Array<GamePiece> getAllFirstMoves(PlayerArea pa, GameMode.Tile[][] grid){\n int ox = 0, oy = 0;\n\n switch(pa.playerColor){\n case BLUE:\n ox = -1;\n oy = -1;\n break;\n case RED:\n ox = 20;\n oy = -1;\n break;\n case GREEN:\n ox = 20;\n oy = 20;\n break;\n case YELLOW:\n ox = -1;\n oy = 20;\n break;\n }\n\n Array<GamePiece> possibleMoves = new Array<GamePiece>();\n for(GamePiece gp : pa.gamePieces){\n if(gp != null) {\n Piece p = gp.template;\n for (int i = 0; i < p.rotations; i++) {\n for (int j = 0; j < p.corners[i].length; j++) {\n Pair pair = p.corners[i][j];\n int x = ox - pair.x;\n int y = oy - pair.y;\n if (validPartial(p, i, x, y, grid, pa.playerColor)) {\n possibleMoves.add(new GamePiece(x, y, i, p, pa.playerColor));\n }\n }\n }\n }\n }\n return possibleMoves;\n }",
"public List<List<Box>> finish() {\n\t\treturn cells;\n\t}",
"public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }",
"public int[] getCurrentPieceGridPosition() {\n\t\treturn currentPieceGridPosition; \n\t}",
"private void placePieces(List<Piece> pieces) {\r\n pieces.forEach(\r\n piece -> {\r\n grid[piece.getPosition()] = piece;\r\n // if key doesn't exist create new with array containing piece\r\n // if it does exist add piece to existing array\r\n this.pieces.merge(\r\n piece.getPlayerColor(),\r\n new ArrayList<>(Collections.singletonList(piece)),\r\n (o, n) -> {\r\n o.add(piece);\r\n return o;\r\n });\r\n });\r\n }",
"List genCaps() {\n\tList ret = new ArrayList();\n\n\tif (side == LIGHT) {\n\tlong moves = ((pawnBits[LIGHT] & 0x00fefefefefefefeL) >> 9)\n\t& pieceBits[DARK];\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove + 9, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\tmoves = ((pawnBits[LIGHT] & 0x007f7f7f7f7f7f7fL) >> 7)\n\t& pieceBits[DARK];\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove + 7, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\t} else {\n\tlong moves = ((pawnBits[DARK] & 0x00fefefefefefefeL) << 7)\n\t& pieceBits[LIGHT];\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove - 7, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\tmoves = ((pawnBits[DARK] & 0x007f7f7f7f7f7f7fL) << 9)\n\t& pieceBits[LIGHT];\n\twhile (moves != 0) {\n\tint theMove = getLBit(moves);\n\tgenPush(ret, theMove - 9, theMove, 17);\n\tmoves &= (moves - 1);\n\t}\n\t}\n\tlong pieces = pieceBits[side] ^ pawnBits[side];\n\twhile (pieces != 0) {\n\tint p = getLBit(pieces);\n\tfor (int j = 0; j < offsets[piece[p]]; ++j)\n\tfor (int n = p;;) {\n\tn = mailbox[mailbox64[n] + offset[piece[p]][j]];\n\tif (n == -1)\n\tbreak;\n\tif (color[n] != EMPTY) {\n\tif (color[n] == xside)\n\tgenPush(ret, p, n, 1);\n\tbreak;\n\t}\n\tif (!slide[piece[p]])\n\tbreak;\n\t}\n\tpieces &= (pieces - 1);\n\t}\n\tif (ep != -1) {\n\tif (side == LIGHT) {\n\tif (COL(ep) != 0 && color[ep + 7] == LIGHT\n\t&& piece[ep + 7] == PAWN)\n\tgenPush(ret, ep + 7, ep, 21);\n\tif (COL(ep) != 7 && color[ep + 9] == LIGHT\n\t&& piece[ep + 9] == PAWN)\n\tgenPush(ret, ep + 9, ep, 21);\n\t} else {\n\tif (COL(ep) != 0 && color[ep - 9] == DARK\n\t&& piece[ep - 9] == PAWN)\n\tgenPush(ret, ep - 9, ep, 21);\n\tif (COL(ep) != 7 && color[ep - 7] == DARK\n\t&& piece[ep - 7] == PAWN)\n\tgenPush(ret, ep - 7, ep, 21);\n\t}\n\t}\n\treturn ret;\n\t}",
"pieces getPiece(int position)\n {\n int j ;\n if(position == whiteHorse1.position && whiteHorse1.alive == true ) return whiteHorse1;\n if(position == whiteHorse2.position && whiteHorse2.alive == true) return whiteHorse2;\n if(position == whiteQueen.position && whiteQueen.alive == true ) return whiteQueen;\n if(position == whiteKing.position && whiteKing.alive == true) return whiteKing;\n if(position == whiteCastle1.position && whiteCastle1.alive == true ) return whiteCastle1;\n if(position == whiteCastle2.position && whiteCastle2.alive == true) return whiteCastle2;\n if(position == whiteBishop1.position && whiteBishop1.alive == true) return whiteBishop1;\n if(position == whiteBishop2.position && whiteBishop2.alive == true) return whiteBishop2;\n j=0;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];\n \n \n \n if(position == blackHorse1.position && blackHorse1.alive == true ) return blackHorse1;\n if(position == blackHorse2.position && blackHorse2.alive == true) return blackHorse2;\n if(position == blackQueen.position && blackQueen.alive == true ) return blackQueen;\n if(position == blackKing.position && blackKing.alive == true) return blackKing;\n if(position == blackCastle1.position && blackCastle1.alive == true ) return blackCastle1;\n if(position == blackCastle2.position && blackCastle2.alive == true) return blackCastle2;\n if(position == blackBishop1.position && blackBishop1.alive == true) return blackBishop1;\n if(position == blackBishop2.position && blackBishop2.alive == true) return blackBishop2;\n j=0;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];\n\n else return null;\n }",
"public void splitBoard(Posn start, int currRows, int currCols) {\n int startRow = start.x;\n int startCol = start.y;\n if (currRows != 1 && currCols != 1) {\n // top left piece\n this.board.get(startCol).get(startRow).down = true; \n\n // top right piece\n this.board.get(startCol + currCols - 1).get(startRow).down = true; \n\n // bottom left right\n this.board.get(startCol).get(startRow + currRows - 1).right = true; \n this.board.get(startCol).get(startRow + currRows - 1).up = true; // bottom left up\n\n // bottom, right, left\n this.board.get(startCol + currCols - 1).get(startRow + currRows - 1).left = true; \n // bottom, right, up\n this.board.get(startCol + currCols - 1).get(startRow + currRows - 1).up = true; \n\n // connect middle pieces on both sides of subgrid\n for (int i = startRow + 1; i < startRow + currRows - 1; i++) { \n this.board.get(startCol).get(i).up = true;\n this.board.get(startCol).get(i).down = true;\n this.board.get(startCol + currCols - 1).get(i).up = true;\n this.board.get(startCol + currCols - 1).get(i).down = true;\n }\n // connect middle pieces on bottom of subgrid\n for (int i = startCol + 1; i < startCol + currCols - 1; i++) { \n this.board.get(i).get(startRow + currRows - 1).left = true;\n this.board.get(i).get(startRow + currRows - 1).right = true;\n }\n }\n\n // grid base cases\n if (this.height == 1) {\n for (ArrayList<GamePiece> p : this.board) {\n if (p.get(0).row == 0) {\n p.get(0).right = true;\n }\n else if (p.get(0).row == this.width - 1) {\n p.get(0).left = true;\n }\n else {\n p.get(0).right = true;\n p.get(0).left = true;\n }\n }\n }\n else if (this.width == 1) {\n for (GamePiece p : this.board.get(0)) {\n if (p.col == 0) {\n p.down = true;\n }\n else if (p.col == this.height - 1) {\n p.up = true;\n }\n else {\n p.down = true;\n p.up = true;\n }\n }\n }\n else if (currRows == 2) {\n for (int i = startCol + 1; i < startCol + currCols - 1; i++) {\n this.board.get(i).get(startRow).down = true;\n this.board.get(i).get(startRow + 1).up = true;\n }\n }\n else if (currRows == 3 && currCols == 3) { // base case for odd grid\n this.board.get(startCol).get(startRow + 1).right = true;\n this.board.get(startCol + 1).get(startRow + 1).left = true;\n this.board.get(startCol + 1).get(startRow + 1).up = true;\n this.board.get(startCol + 1).get(startRow).down = true;\n\n }\n // recur if the grid can be divided into 4 non-overlapping quadrants\n else if (currRows > 3 || currCols > 3) { \n this.splitBoard(new Posn(startRow, startCol), (int) Math.ceil(currRows / 2.0),\n (int) Math.ceil(currCols / 2.0));\n this.splitBoard(new Posn(startRow + (int) Math.ceil(currRows / 2.0), startCol), currRows / 2,\n (int) Math.ceil(currCols / 2.0));\n this.splitBoard(new Posn(startRow + (int) Math.ceil(currRows / 2.0),\n startCol + (int) Math.ceil(currCols / 2.0)), currRows / 2, currCols / 2);\n this.splitBoard(new Posn(startRow, startCol + (int) Math.ceil(currCols / 2.0)),\n (int) Math.ceil(currRows / 2.0), currCols / 2);\n }\n }",
"public List<Grid> getGrids() {\n\tList<Grid> grids = new ArrayList<Grid>();\n\tList<Line> currentLines = _path;\n\twhile(currentLines.size()>1) {\n\t Grid grid = new Grid();\n\t grids.add(grid);\n\t List<Line> nonOverlappingLines = grid.overlapping(currentLines);\n\t \t \n\t Double[] xs = grid.xs();\n\t Double[] ys = grid.ys();\n\t \n\t if (xs.length>3 && ys.length>3) {\n\t\tDouble minx = xs[0];\n\t\tDouble maxx = xs[xs.length-1];\n\t\t\n\t\tDouble miny = ys[0];\n\t\tDouble maxy = ys[ys.length-1];\n\t\t\n\t\tfor(int i=0; i<xs.length; i++) {\n\t\t System.out.println(\"Line: \" + xs[i].toString() + \",\" + miny.toString() + \",\" + xs[i].toString() + \",\" + maxy.toString());\n\t\t}\n\t\tfor(int i=0; i<ys.length; i++) {\n\t\t System.out.println(\"Line: \" + minx.toString() + \",\" + ys[i].toString() + \",\" + maxx.toString() + \",\" + ys[i].toString());\n\t\t}\n\t }\n\n\t currentLines = nonOverlappingLines;\n\t}\n\treturn grids;\n }",
"private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }",
"private List<Cell> getSurroundingCells(int x, int y) {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = x - 1; i <= x + 1; i++) {\n for (int j = y - 1; j <= y + 1; j++) {\n // Don't include the current position i != x && j != y &&\n if ( isValidCoordinate(i, j)) {\n if (i == x && j == y) {\n continue;\n } else {\n cells.add(gameState.map[j][i]);\n }\n }\n }\n }\n return cells;\n }",
"public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( currentx - 1 >= 0 && currenty - 1 >= 0 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1].isOccupiedByOpponent()) {\t// Diagonol left space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1]);\n\t\t\t}\n\t\t\tif (currentx - 1 >= 0 && currenty + 1 <= 7 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1].isOccupiedByOpponent()) { \t//Diagonol right space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1]);\n\t\t\t}\n\t\t\t\n\t}",
"private List<Position> getHalos() {\n\t\t\tList<Position> halos = new ArrayList<Position>();\n\t\t\tGamePiece selectedPiece = game.getSelectedPiece();\n\t\t\tif (selectedPiece != null) {\n\t\t\t\thalos.add(selectedPiece.getPosition());\n\t\t\t\thalos.addAll(selectedPiece.getLegalMoves());\n\t\t\t}\n\t\t\treturn halos;\n\t\t}",
"public void SpiritBomb()\r\n {\r\n\r\n\t \r\n\t\tLocation loc = new Location(userRow+1, userCol);\r\n\t\tLocation loc1 = new Location(userRow+1, userCol1);\r\n\t\tLocation loc2 = new Location(userRow+1, userCol2);\r\n\t\tLocation loc3 = new Location(userRow+1, userCol3);\r\n\t\t\r\n\t\tLocation loc4 = new Location(userRow, userCol);\r\n\t\tLocation loc5 = new Location(userRow, userCol1);\r\n\t\tLocation loc6 = new Location(userRow, userCol2);\r\n\t\tLocation loc7 = new Location(userRow, userCol3);\r\n\t\t\r\n\t\tLocation loc8 = new Location(userRow-1, userCol);\r\n\t\tLocation loc9 = new Location(userRow-1, userCol1);\r\n\t\tLocation loc10 = new Location(userRow-1, userCol2);\r\n\t\tLocation loc11 = new Location(userRow-1, userCol3);\r\n\t\t\r\n\t\tLocation loc12 = new Location(userRow-2, userCol);\r\n\t\tLocation loc13= new Location(userRow-2, userCol1);\r\n\t\tLocation loc14 = new Location(userRow-2, userCol2);\r\n\t\tLocation loc15 = new Location(userRow-2, userCol3);\r\n\r\n\t \r\n\r\n\r\n\r\n\t\t\r\n\t\tLocation base1 = new Location(userRow,0);\r\n\t\t\r\n\t\t\tgrid.setImage(base1, \"FSpiritHold.png\");\r\n\t\t\t\r\n\t\tfor(int a = 0; a<9; a++) {\r\n\t\tif(userCol>0 && userCol3 !=15 && userCol2!=15 && userCol1!=15 && userCol!=15 && userRow>0)\r\n\t\t{\r\n\t\r\n\t\t\t Location next101 = new Location(userRow+1,userCol);\r\n\t\t\t Location next102 = new Location(userRow+1,userCol1);\r\n\t\t\t Location next103 = new Location(userRow+1,userCol2);\r\n\t\t\t Location next104 = new Location(userRow+1,userCol3);\r\n\r\n\t\t\t\tLocation next201 = new Location(userRow,userCol);\r\n\t\t\t\tLocation next202 = new Location(userRow,userCol1);\r\n\t\t\t\tLocation next203 = new Location(userRow,userCol2);\r\n\t\t\t\tLocation next204 = new Location(userRow,userCol3);\r\n\t\t\t\t\r\n\t\t\t\tLocation next301 = new Location(userRow-1,userCol);\r\n\t\t\t\tLocation next302 = new Location(userRow-1,userCol1);\r\n\t\t\t\tLocation next303 = new Location(userRow-1,userCol2);\r\n\t\t\t\tLocation next304 = new Location(userRow-1,userCol3);\r\n\t\t\t\t\r\n\t\t\t Location next401 = new Location(userRow-2,userCol);\r\n\t\t\t Location next402 = new Location(userRow-2,userCol1);\r\n\t\t\t Location next403 = new Location(userRow-2,userCol2);\r\n\t\t\t Location next404 = new Location(userRow-2,userCol3);\r\n\t\t\t userCol+=1;\r\n\t\t\t userCol1+=1;\r\n\t\t\t\tuserCol2+=1;\r\n\t\t\t\tuserCol3+=1;\r\n\t\t\t grid.setImage(next101, \"SB401.png\");\r\n\t\t\t grid.setImage(loc1, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next102, \"SB402.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next103, \"SB403.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next104, \"SB404.png\");\r\n\t\t\t grid.setImage(loc3, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next201, \"SB301.png\");\r\n\t\t\t grid.setImage(loc4, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next202, \"SB302.png\");\r\n\t\t\t grid.setImage(loc5, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next203, \"SB303.png\");\r\n\t\t\t grid.setImage(loc6, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next204, \"SB304.png\");\r\n\t\t\t grid.setImage(loc7, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next301, \"SB201.png\");\r\n\t\t\t grid.setImage(loc8, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next302, \"SB202.png\");\r\n\t\t\t grid.setImage(loc9, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next303, \"SB203.png\");\r\n\t\t\t grid.setImage(loc10, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next304, \"SB204.png\");\r\n\t\t\t grid.setImage(loc11, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next401, \"SB101.png\");\r\n\t\t\t grid.setImage(loc12, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next402, \"SB102.png\");\r\n\t\t\t grid.setImage(loc13, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next403, \"SB103.png\");\r\n\t\t\t grid.setImage(loc14, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next404, \"SB104.png\");\r\n\t\t\t grid.setImage(loc15, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t \r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n }\r\n }",
"public List<Piece> blackPieces();",
"public static void makePieces() {\n\t\tPiece[] pieces = new Piece[35];\n\t\tfor (int i = 0; i < pieces.length; i++) {\n\t\t\tTile t = new Tile(false, true, 0, 0);\n\t\t\tTile f = new Tile(false, false, 0, 0);\n\t\t\tTile[][] tiles = new Tile[6][6];\n\t\t\tswitch (i) {\n\t\t\tcase 0:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, t, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 34:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpieces[i] = new Piece(tiles);\n\t\t}\n\t\ttry {\n\t\t\tFileOutputStream saveFile = new FileOutputStream(\"pieces.data\");\n\t\t\tObjectOutputStream save = new ObjectOutputStream(saveFile);\n\t\t\tsave.reset();\n\t\t\tsave.writeObject(pieces);\n\t\t\tsave.close();\n\t\t} catch (Exception exc) {\n\t\t\texc.printStackTrace(); // If there was an error, print the info.\n\t\t}\n\t}",
"public static HooverAIDataHolder processHooverAIDataHolder(HooverAIDataHolder hooverAIDataHolder) {\n DataPoint startingPoint = hooverAIDataHolder.getStartingPoint();\r\n // get grid bounds\r\n int maxX = hooverAIDataHolder.getMaxSize().getX();\r\n int maxY = hooverAIDataHolder.getMaxSize().getY();\r\n // prepare to parse driving insturctions\r\n String instructions = hooverAIDataHolder.getDrivingDirections();\r\n char[] discreteDirectionsArray = instructions.toCharArray();\r\n\r\n //intially just start with starting point\r\n DataPoint nextPoint = new DataPoint(startingPoint.getX(), startingPoint.getY());\r\n ArrayList<DataPoint> placesHoovered = new ArrayList();\r\n for (int i = 0; i < discreteDirectionsArray.length; i++) {\r\n\r\n int tempX = 0;\r\n int tempY = 0;\r\n\r\n char direction = discreteDirectionsArray[i];\r\n String directionString = Character.toString(direction);\r\n if (directionString.equalsIgnoreCase(\"N\")) // go north\r\n {\r\n\r\n tempY = nextPoint.getY();\r\n tempY = tempY + 1; // do move\r\n if (tempY > maxY) // we hit a wall, remove increment\r\n {\r\n tempY = tempY - 1;\r\n }\r\n\r\n nextPoint.setY(tempY);\r\n\r\n DataPoint entry = new DataPoint(nextPoint.getX(), nextPoint.getY());\r\n\r\n placesHoovered.add(entry);\r\n\r\n } else if (directionString.equalsIgnoreCase(\"S\")) // go south\r\n {\r\n tempY = nextPoint.getY();\r\n tempY = tempY - 1; // do move\r\n if (tempY < 0) // we hit a wall add value back in\r\n {\r\n tempY = tempY + 1;\r\n }\r\n nextPoint.setY(tempY);\r\n DataPoint entry = new DataPoint(nextPoint.getX(), nextPoint.getY());\r\n placesHoovered.add(entry);\r\n\r\n } else if (directionString.equalsIgnoreCase(\"W\")) // go west\r\n {\r\n tempX = nextPoint.getX();\r\n tempX = tempX - 1; // do move\r\n if (tempX < 0) // we hit a wall\r\n {\r\n tempX = tempX + 1;\r\n }\r\n nextPoint.setX(tempX);\r\n DataPoint entry = new DataPoint(nextPoint.getX(), nextPoint.getY());\r\n placesHoovered.add(entry);\r\n\r\n } else if (directionString.equalsIgnoreCase(\"E\")) // go east\r\n {\r\n tempX = nextPoint.getX();\r\n tempX = tempX + 1; // do move\r\n if (tempX > maxX) // wall\r\n {\r\n tempX = tempX - 1;\r\n }\r\n nextPoint.setX(tempX);\r\n DataPoint entry = new DataPoint(nextPoint.getX(), nextPoint.getY());\r\n placesHoovered.add(entry);\r\n\r\n }\r\n // read each char in string \r\n // logic is N = y + 1 \r\n // S = y - 1\r\n // E = x + 1\r\n // W = x - 1\r\n\r\n }\r\n\r\n hooverAIDataHolder.setRestingPoint(nextPoint);\r\n hooverAIDataHolder.setCleanedZones(placesHoovered);\r\n\r\n return hooverAIDataHolder;\r\n }",
"private void drawGrid() {\r\n\t\t// loops through the 2d array of the grid.\r\n\t\tfor (int i = 0; i < TetrisGame.PANEL_WIDTH; i++) {\r\n\t\t\tfor (int j = 0; j < TetrisGame.PANEL_HEIGHT; j++) {\r\n\t\t\t\t// checks to see if the piece isn't empty, and draws the piece at it's position.\r\n\t\t\t\tif (game.grid[i][j] != Piece.PieceShape.E) {\r\n\t\t\t\t\tdrawSquare(i, j, Piece.getColor(game.grid[i][j]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static native PointerByReference OpenMM_AmoebaTorsionTorsionForce_getTorsionTorsionGrid(PointerByReference target, int index);",
"static ArrayList<Piece> createPieces (Bitmap image) {\n\t\tint[] picSize = InitDisplay.getPicDimensions();\n\t\tint[] pieceSize = InitDisplay.getPieceDimensions();\n\t\t\n\t\t/* Scale the image to the dynamically calculated values */\n\t\tBitmap imageScaled = Bitmap.createScaledBitmap(image, picSize[WIDTH], picSize[HEIGHT], false);\n\t\t\n\t\t/* The imageScaled bitmap now contains the given image in scaled bitmap form. Break it and\n\t\t * assign it to [rows*cols] small Jigsaw pieces after randomizing their positions and orientations\n\t\t * The image is being broken into a 3x3 grid. i represents rows while j represents columns */\n\t\t\n\t\tArrayList<Piece> pieces = new ArrayList<Piece>(Play.NUM[TOTAL]);\n\t\tBitmap imgPiece = null;\n\t\tint offsetX = 0, offsetY = 0;\n\t\tint pos = 0;\n\t\t\n\t\tfor (int i=0; i<Play.NUM[COLS]; i++) {\n\t\t\t/* offsetX represents the x coordinate while offsetY represents the y coordinate */\n\t\t\toffsetX = 0; //start from (0,0)\n\t\t\tfor (int j=0; j<Play.NUM[ROWS]; j++) {\n\t\t\t\t/* Extract a specific area of the imageScaled bitmap and store it in imgPiece.\n\t\t\t\t * Coordinates for the extraction are specified using offsetX and offsetY */\n\t\t\t\timgPiece = Bitmap.createBitmap\n\t\t\t\t\t\t(imageScaled, offsetX, offsetY, pieceSize[WIDTH], pieceSize[HEIGHT]);\n\t\t\t\t\n\t\t\t\t/* Create a Jigsaw piece and add it to the pieces array */\n\t\t\t\tPiece piece = new Piece (imgPiece); //create a new piece with the extracted bitmap image\n\t\t\t\tpieces.add(pos, piece); //add the piece to the pieces array\n\t\t\t\t\n\t\t\t\toffsetX += pieceSize[WIDTH]; //move to the next x coordinate\n\t\t\t\tpos++;\n\t\t\t}\n\t\t\toffsetY += pieceSize[HEIGHT]; //move to the next y coordinate\n\t\t}\n\t\t\n\t\treturn pieces;\n\t}",
"private void createFinalLine() {\n //Up\n if (orOpActive.row > origin.row) {\n for (int i = origin.row + 1; i <= orOpActive.row; i++) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n\n //Down\n if (orOpActive.row < origin.row) {\n for (int i = origin.row - 1; i >= orOpActive.row; i--) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n //Right\n if (orOpActive.column > origin.column) {\n for (int i = origin.column + 1; i <= orOpActive.column; i++) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n //Left\n if (orOpActive.column < origin.column) {\n for (int i = origin.column - 1; i >= orOpActive.column; i--) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n }",
"Image[][] getImagesToDisplayInCells(boolean showBarriers);",
"private void moveRemainingMhos() {\n\t\t\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\t\t\t\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\t\t\t\n\t\t\t//Check if there is a fence 1 block away from the mho\n\t\t\tif(newMap[mhoX][mhoY+1] instanceof Fence || newMap[mhoX][mhoY-1] instanceof Fence || newMap[mhoX-1][mhoY] instanceof Fence || newMap[mhoX-1][mhoY+1] instanceof Fence || newMap[mhoX-1][mhoY-1] instanceof Fence || newMap[mhoX+1][mhoY] instanceof Fence || newMap[mhoX+1][mhoY+1] instanceof Fence || newMap[mhoX+1][mhoY-1] instanceof Fence) {\n\t\t\t\t\n\t\t\t\t//Assign the new map location as a Mho\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\t\t\t\t\n\t\t\t\t//Set the mho's move in the moveList\n\t\t\t\tmoveList[mhoX][mhoY] = Legend.SHRINK;\n\t\t\t\t\n\t\t\t\t//remove each X and Y from mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\t\t\t\t\n\t\t\t\t//Call moveRemainingMhos again, because the list failed to be checked through completely\n\t\t\t\tmoveRemainingMhos();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}",
"private void makeGrid(JLabel moves, JLabel remainingBombs) {\r\n this.grid = new Tile[gridSize][gridSize]; \r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (solution[r][c] == 1) {\r\n grid[r][c] = new Tile(r, c, true);\r\n } else {\r\n grid[r][c] = new Tile(r, c, false);\r\n }\r\n final Tile t = grid[r][c];\r\n t.repaint();\r\n handleClicksAndMoves(t, moves, remainingBombs); \r\n }\r\n }\r\n }",
"private void updateGrid() {\n\t\tfor (Neighbor neighbor : upsetNeighbors) {\n\t\t\tClear vacated_cell = new Clear(neighbor.getCoordsX(), neighbor.getCoordsY());\n\t\t\tgrid.setGridIndex(vacated_cell, vacated_cell.getCoordsX(), vacated_cell.getCoordsY());\n\t\t\tCell new_location = availableSpaces.get((int) (Math.random() * (availableSpaces.size() - 1)));\n\t\t\tint new_x = new_location.getCoordsX();\n\t\t\tint new_y = new_location.getCoordsY();\n\t\t\tif (neighbor.getClass().equals(Group1.class))\n\t\t\t\tgrid.setGridIndex(new Group1(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\telse\n\t\t\t\tgrid.setGridIndex(new Group2(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\tavailableSpaces.remove(new_location);\n\t\t\tavailableSpaces.add(vacated_cell);\n\t\t}\n\t}",
"protected void calculatePathfindingGrid(Tile[] tiles) {\n \n if(tiles == null) {\n return;\n }\n \n /**\n * Problem:\n * Because the tile size used by the path finding engine will most likely be\n * different from that of the visual effect size, we have to\n * look at all the visual tiles and judge whether they are blocking of\n * particular kinds of unit.\n * \n * Algorithm:\n * For land, air and sea take a look at the number of blocking/non-blocking\n * tiles there are and if there is over 50% either way then that will be the\n * PathTiles result.\n */\n \n // First get the size of the map in PathTile(s)\n int rows = getActualHeightInTiles();\n int cols = getActualWidthInTiles();\n \n // Calculate the number of tiles to a PathTile\n int tilesPerActualTilesX = getActualTileWidth() / getTileWidth();\n int tilesPerActualTilesY = getActualTileHeight() / getTileHeight();\n int tileCount = tilesPerActualTilesX * tilesPerActualTilesY;\n \n int tileCols = getWidthInTiles();\n \n // Create an array\n mPathTiles = new PathTile[ rows * cols ];\n \n // Iterate through these tiles\n for(int x = 0; x < cols ; x++) {\n for(int y = 0; y < rows; y++) {\n \n // Setup some variables\n int blockSea, blockAir, blockLand;\n blockAir = blockLand = blockSea = 0;\n \n // Figure out the percentage of each block\n for(int tx = 0; tx < tilesPerActualTilesX; tx++) {\n for(int ty = 0; ty < tilesPerActualTilesY; ty++) {\n \n int tileX = (x * tilesPerActualTilesX) + tx;\n int tileY = (y * tilesPerActualTilesY) + ty;\n \n Tile thisTile = tiles[ (tileY * tileCols) + tileX ];\n \n if(thisTile.blockAir()) {\n blockAir++;\n }\n \n if(thisTile.blockLand()) {\n blockLand++;\n }\n \n if(thisTile.blockSea()) {\n blockSea++;\n }\n \n }\n }\n \n // Calculate percentage\n float a,b,c;\n a = (float)blockAir / (float)tileCount;\n b = (float)blockLand / (float)tileCount;\n c = (float)blockSea / (float)tileCount;\n \n // Set the new tile\n mPathTiles[ (y * cols) + x ] = new PathTile( (a >= .5f), (b >= .5f), (c >= .5f) );\n \n // System.out.println(\"Grid \" + ((y * cols) + x) + \" (\" + x + \", \" + y + \") Air: \" + a + \" Land: \" + b + \" Sea: \" + c);\n \n }\n }\n \n }",
"public static ArrayList<FloorTile> getEffectedTiles() {\r\n\r\n ArrayList<FloorTile> temp = new ArrayList<>();\r\n for(int i = GameControl.ytile-1; i < GameControl.ytile + 2; i++) {\r\n for(int j = GameControl.xtile-1; j < GameControl.xtile + 2; j++) {\r\n if(i >= 0 && i < board.length && j >= 0 && j < board[0].length) {\r\n temp.add(board[i][j]);\r\n }\r\n }\r\n }\r\n return temp;\r\n }",
"private int[] chooseCoordinates() {\n\t\t// Choose new (posX,posY) location for the Fish\n\t\tint pasX, pasY;\n\n\t\t// at least pasX or pasY not null\n\t\tdo {\n\t\t\tpasX = this.appConfig.getRandom().nextInt(3) - 1;\n\t\t\tpasY = this.appConfig.getRandom().nextInt(3) - 1;\n\t\t} while (pasX == 0 && pasY == 0);\n\n\t\t// choose one free cell based on the random steps (+1 logic)\n\t\tfor (int x = pasX; x <= 1; x++) {\n\t\t\tfor (int y = pasY; y <= 1; y++) {\n\t\t\t\tint newX = this.posX + x;\n\t\t\t\tint newY = this.posY + y;\n\n\t\t\t\t// not a good choice with isTorus\n\t\t\t\tif (!this.appConfig.isTorus() && this.environment.isOutOfBound(newX, newY)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// change x or y if environment is a torus\n\t\t\t\tif (this.appConfig.isTorus()) {\n\t\t\t\t\tif (newX < 0) {\n\t\t\t\t\t\tnewX = this.environment.getWidth() - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (newX >= this.environment.getWidth()) {\n\t\t\t\t\t\tnewX = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (newY < 0) {\n\t\t\t\t\t\tnewY = this.environment.getHeight() - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (newY >= this.environment.getHeight()) {\n\t\t\t\t\t\tnewY = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Fish can move here\n\t\t\t\tif (this.environment.getCell(newX, newY) == null) {\n\t\t\t\t\treturn new int[] { newX, newY };\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// choose one free cell based on the random steps (-1 logic)\n\t\tfor (int x = pasX; x >= -1; x--) {\n\t\t\tfor (int y = pasY; y >= -1; y--) {\n\t\t\t\tint newX = this.posX + x;\n\t\t\t\tint newY = this.posY + y;\n\n\t\t\t\t// not a good choice with isTorus\n\t\t\t\tif (!this.appConfig.isTorus() && this.environment.isOutOfBound(newX, newY)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// change x or y if environment is a torus\n\t\t\t\tif (this.appConfig.isTorus()) {\n\t\t\t\t\tif (newX < 0) {\n\t\t\t\t\t\tnewX = this.environment.getWidth() - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (newX >= this.environment.getWidth()) {\n\t\t\t\t\t\tnewX = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (newY < 0) {\n\t\t\t\t\t\tnewY = this.environment.getHeight() - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (newY >= this.environment.getHeight()) {\n\t\t\t\t\t\tnewY = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Fish can move here\n\t\t\t\tif (this.environment.getCell(newX, newY) == null) {\n\t\t\t\t\treturn new int[] { newX, newY };\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// no available cell if we arrive here\n\t\treturn null;\n\t}",
"public ArrayList<Pair<Coord,Coord>> returnMoves(Board b) {\r\n\t\t//copy Piece grid\r\n\t\tPiece[][] g = b.getGrid();\r\n\t\t\r\n\t\t//return array of all the possible moves\r\n\t\tArrayList<Pair<Coord,Coord>> possibleMoves = new ArrayList<Pair<Coord,Coord>>();\r\n\r\n\t\t//System.out.println(team + \": (\" + c.y + \", \" + c.x + \")\");\r\n\t\t//if the team is moving north (white team)\r\n\t\tif(team) {\r\n\t\t\t//first move, two square pawn advance\r\n\t\t\tif(moves==0 && g[c.y-1][c.x] == null && g[c.y-2][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-2,c.x),null));\r\n\t\t\t\r\n\t\t\t//single square pawn advance\r\n\t\t\tif(g[c.y-1][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally west\r\n\t\t\tif(c.x-1>=0 && c.x-1<=7 && g[c.y-1][c.x-1]!=null && (!g[c.y-1][c.x-1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x-1),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally east\r\n\t\t\tif(c.x+1>=0 && c.x+1<=7 && g[c.y-1][c.x+1]!=null && (!g[c.y-1][c.x+1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x+1),null));\r\n\t\t\t\r\n\t\t\t//en passant west\r\n\t\t\tif(c.x-1>=0 && c.y==3 && g[c.y-1][c.x-1]==null && g[c.y][c.x-1]!=null && !g[c.y][c.x-1].team \r\n\t\t\t\t\t&& g[c.y][c.x-1].toString().equals(\"P\") && g[c.y][c.x-1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x-1),new Coord(c.y, c.x-1)));\r\n\t\t\t\r\n\t\t\t//en passant east\r\n\t\t\tif(c.x+1<=7 && c.y==3 && g[c.y-1][c.x+1]==null && g[c.y][c.x+1]!=null && !g[c.y][c.x+1].team\r\n\t\t\t\t\t&& g[c.y][c.x+1].toString().equals(\"P\") && g[c.y][c.x+1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x+1),new Coord(c.y, c.x+1)));\r\n\t\t\t\r\n\t\t//if the team is moving south (black team)\r\n\t\t} else {\r\n\t\t\t//first move, two square pawn advance\r\n\t\t\tif(moves==0 && g[c.y+1][c.x] == null && g[c.y+2][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+2,c.x),null));\r\n\r\n\t\t\t//single square pawn advance\r\n\t\t\tif(g[c.y+1][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally west\r\n\t\t\tif(c.x-1>=0 && c.x-1<=7 && g[c.y+1][c.x-1]!=null && (g[c.y+1][c.x-1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x-1),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally east\r\n\t\t\tif(c.x+1>=0 && c.x+1<=7 && g[c.y+1][c.x+1]!=null && (g[c.y+1][c.x+1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x+1),null));\r\n\t\t\t\r\n\t\t\t//en passant west\r\n\t\t\tif(c.x-1>=0 && c.y==4 && g[c.y+1][c.x-1]==null && g[c.y][c.x-1]!=null && g[c.y][c.x-1].team \r\n\t\t\t\t\t&& g[c.y][c.x-1].toString().equals(\"P\") && g[c.y][c.x-1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x-1),new Coord(c.y, c.x-1)));\r\n\t\t\t\r\n\t\t\t//en passant east\r\n\t\t\tif(c.x+1<=7 && c.y==4 && g[c.y-1][c.x+1]==null && g[c.y][c.x+1]!=null && g[c.y][c.x+1].team \r\n\t\t\t\t\t&& g[c.y][c.x+1].toString().equals(\"P\") && g[c.y][c.x+1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x+1),new Coord(c.y, c.x+1)));\r\n\t\t\t\r\n\t\t}\t\t\r\n\r\n\t\treturn possibleMoves;\r\n\t}",
"public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void enemymoveGarret(){\n\t\tint YEG = 0;\n\t\tint XEG = 0;\n\t\tint[] turns = new int[]{0,0,0,0,0,2,1,1,1,1,1,3};//dependign on the placement garret will move a certain way\n\t\tfor(int i = 0 ; i < this.Garret.length;i++){//this grabs garrets current locations\n\t\t\tfor(int p = 0; p < this.Garret.length;p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tYEG = i;\n\t\t\t\t\tXEG = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint move = turns[count];\n\t\tswitch(move){//first block is up and down second block is left and right\n\t\t\tcase 0:\n\t\t\t\tif(this.area[YEG][XEG-1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG-1] = 1;//to turn left\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(this.area[YEG][XEG+1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG+1] = 1;//to turn right\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(this.area[YEG-1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG-1][XEG] = 1;//to turn up\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(this.area[YEG+1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG+1][XEG] = 1;//to turn down\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}//end of switch\t\n\t}",
"public ArrayList<Movable> getProjectiles(){\n\t\tArrayList<Movable> moving = new ArrayList<Movable>(temp);\n\t\ttemp = new ArrayList<Movable>();\n\t\treturn moving;\n\t}",
"public void drawPiece(Graphics g){\n if (current == null){\n return;\n }\n\n for (int y = 1; y < 21; y++){\n for (int x = 1; x < 13; x++){\n if (map[x][y]){\n g.setColor(colors[x][y]);\n g.fillRoundRect(26 * x - 13, 26 * (21 - y) - 13, 25, 25, 2, 2);\n }\n }\n }\n }",
"private void collapseIgloo() {\n blocks.sort(Comparator.comparing(a -> a.center.getY()));\n\n double minDistance, distance;\n Point3D R = new Point3D(0, -1, 0);\n for (int i = 0; i < blocks.size(); i++) {\n minDistance = Double.MAX_VALUE;\n for (int j = i - 1; j >= 0; j--) {\n if (boundingSpheresIntersect(blocks.get(i), blocks.get(j))) {\n distance = minDistance(blocks.get(i), blocks.get(j), R);\n if (distance < minDistance) {\n minDistance = distance;\n }\n }\n }\n if (minDistance != Double.MAX_VALUE) {\n blocks.get(i).move(R.multiply(minDistance));\n }\n }\n }",
"public void draw() {\n PImage grid = loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/tile.png\");\n for(int i = 0 ; i < 10 ; i++){\n for(int j = 0 ; j < 6 ; j++){\n image(grid, i*grid.width, j*grid.height);\n if(gridPlane.get(List.of(i, j)).getOwner() != null){\n if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Red\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red3.png\"), i*grid.width, j*grid.height);\n }\n }else if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Green\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green3.png\"), i*grid.width, j*grid.height);\n }\n }\n }\n }\n }\n if(this.finish == true){\n System.exit(0);\n }\n }",
"@Override\n public Position[] getCanMoves() {\n PieceWay way = new PieceWay(getPosition());\n Position[] PawnWay = way.waysPawnPos(color);\n return PawnWay;\n }",
"public List<Piece> inCheck(int kingX, int kingY){ // returns list of attacking pieces.\n // Also have to look for opponent king to avoid moving into check.\n // In this case only care whether or not a check occurs, not how many so breaks still ok\n // for regular check tests, want to know if 1 or 2 checks, cannot have multiple diagonal checks.\n List<Piece> attackers = new ArrayList<>();\n // knights\n int knight = turn == WHITE ? BLACK_KNIGHT : WHITE_KNIGHT;\n knightSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (kingX + dx >= 0 && kingX + dx < 8 && kingY + dy >= 0 && kingY + dy < 8){\n if (board[kingY+dy][kingX+dx] == knight){\n attackers.add(new Piece(knight, kingX+dx, kingY+dy));\n break knightSearch; // can only be checked by 1 knight at a time\n }\n }\n if (kingX + dy >= 0 && kingX + dy < 8 && kingY + dx >= 0 && kingY + dx < 8){\n if (board[kingY+dx][kingX+dy] == knight){\n attackers.add(new Piece(knight, kingX+dy, kingY+dx));\n break knightSearch;\n }\n }\n }\n }\n // bishop/queen/pawn/king\n int pawn = turn == WHITE ? BLACK_PAWN : WHITE_PAWN;\n int bish = turn == WHITE ? BLACK_BISHOP : WHITE_BISHOP;\n int queen = turn == WHITE ? BLACK_QUEEN : WHITE_QUEEN;\n int king = turn == WHITE ? BLACK_KING : WHITE_KING;\n diagSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (kingX + dx*i >= 0 && kingX + dx*i < 8 && kingY + dy*i >= 0 && kingY + dy*i < 8){\n int piece = board[kingY + dy*i][kingX + dx*i];\n if (piece != 0){\n if (piece == bish || piece == queen || (piece == pawn && i == 1 && dy == turn)\n || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX+dx*i, kingY+dy*i));\n break diagSearch;\n }\n break;\n }\n i++;\n }\n }\n }\n // rook/queen/king\n int rook = turn == WHITE ? BLACK_ROOK : WHITE_ROOK;\n straightSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n int i = 1;\n while (kingX + i*dx >= 0 && kingX + i*dx < 8){\n int piece = board[kingY][kingX + dx*i];\n if (piece != 0){\n if (piece == rook || piece == queen || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX+dx*i, kingY));\n break straightSearch;\n }\n break;\n }\n i++;\n }\n i = 1;\n while (kingY + i*dx >= 0 && kingY + i*dx < 8){\n int piece = board[kingY+dx*i][kingX];\n if (piece != 0){\n if (piece == rook || piece == queen || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX, kingY+dx*i));\n break straightSearch;\n }\n break;\n }\n i++;\n }\n }\n return attackers;\n }",
"public ArrayList<Cell> getPseudoLegalMoves() {\n\n int[][] offsetMultiplier = {{-1,-1},{-1,1},{1,-1},{1,1}}; //4 directions NW, NE, SW, SE\n int x = getRow(); int y = getColumn();\n\n\n return Piece.slidingPieceMoves(x,y,this.getColor(),offsetMultiplier);\n\n }",
"public List<Piece> getPieces() {\n\t\treturn this.pieces;\n\t}",
"public void explode(int min_pieces/* > 0 */, int max_pieces, double blastPower) {\n\t\t\n\t\tdouble blastPowerRandomness = .4;\n\n//\t\tfor (Point2D.Double p: disp.shape.points) {\n\t\tint s = disp.shape.points.size();\n\t\tfor (int i = 0; i < s; i++) {\n//\t\t\tPoint2D.Double p1 = disp.shape.points.get(i), p2 = disp.shape.points.get(i%s);\n\t\t\t//final int nbDebs = Math.random() > .5? 1: 2;\n//\t\t\tfinal int nbDebs = Util.rand.nextInt(max_pieces)+min_pieces;\n\t\t\tint nbDebs = Util.rand.nextInt(max_pieces)+min_pieces;\n\n//\t\t\tCoord.View prevPt = model().position();\n//\t\t\tCoord.View prevPt = new Coord(p1).view();\n//\t\t\tfinal Coord.View endPt = new Coord(p2).view();\n\n\t\t\tCoord.View prevPt = new Coord(disp.shape.points.get(i)).addedTo(model().position()).view();\n\t\t\tfinal Coord.View endPt = new Coord(disp.shape.points.get((i+1)%s)).addedTo(model().position()).view();\n\n\t\t\t\n//\t\t\tSystem.out.println(prevPt.distanceTo(endPt));\n//\t\t\tnbDebs = (prevPt.distanceTo(endPt) > 0.05)? 1: 2; // FIXME: doesn't work?\n\t\t\tnbDebs = 1;\n\t\t\t\n\t\t\tint nbDebsRemaining = nbDebs;\n\t\t\t\n\t\t\tfor (int j = 0; j < nbDebs; j++) {\n//\t\t\t\tCoord.View bary = Coord.barycenter(prevPt, endPt, ((double)j+1)/(nbDebs)).view();\n\t\t\t\tCoord.View bary = Coord.barycenter(prevPt, endPt, ((double)1)/(nbDebsRemaining)).view();\n\t\t\t\t\n\t\t\t\t//double blastPower = .003; // .005;\n\t\t\t\t\n\t\t\t\tCoord blast = prevPt.addedTo(model().position(), -1);\n\t\t\t\tblast.mult(blastPower/blast.norm() * (1 - blastPowerRandomness/2 + blastPowerRandomness * Math.random()));\n//\t\t\t\tUnique<Coord> inertia = model().speedVector();\n\t\t\t\tCoord.Unique inertia = new Coord.Unique(model().speedVector());\n\t\t\t\tinertia.mult(.5); // .5 ??? otherwise it's 2x too fast...\n\t\t\t\tinertia.add(blast.view());\n\t\t\t\tsim.addEntity(new Debris(\n\t\t\t\t\t\tsim,\n\t\t\t\t\t\tprevPt,\n\t\t\t\t\t\tbary,\n\t\t\t\t\t\tinertia,\n\t\t\t\t\t\tmodel.ownerId()\n\t\t\t\t));\n\t\t\t\tprevPt = bary;\n\t\t\t\tnbDebsRemaining--;\n\t\t\t}\n\t\t\t\n//\t\t\tfinal Coord.View begPt = new Coord(disp.shape.points.get(i)).addedTo(model().position()).view();\n//\t\t\tfinal Coord.View endPt = new Coord(disp.shape.points.get((i+1)%s)).addedTo(model().position()).view();\n//\t\t\tfor (int j = 0; j < nbDebs; j++) {\n//\t\t\t\tsim.addEntity(new Debris(\n//\t\t\t\t\t\tsim,\n//\t\t\t\t\t\tbegPt,\n//\t\t\t\t\t\tCoord.barycenter(begPt, endPt, ((double)j+1)/(nbDebs)).view(),\n//\t\t\t\t\t\tmodel().speedVector(),\n//\t\t\t\t\t\tmodel.ownerId()\n//\t\t\t\t));\n//\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public Set<ExtendedTileModel> getReach(ExtendedPieceModel model) {\r\n\t\tSet<ExtendedTileModel> list = new HashSet<ExtendedTileModel>();\r\n\t\tSet<int[]> directions = new HashSet<>();\r\n\r\n\t\tint[] dir = MetaMapping.getActionDirection(model.getDirection());\r\n\r\n\t\tint range = model.getDecisionRange();\r\n\t\t// no direction\r\n\t\tif (dir == null || dir[0] == 0 && dir[1] == 0) {\r\n\t\t\t// no range, local decision\r\n\t\t\tif (range == 0) {\r\n\t\t\t\treturn list;\r\n\t\t\t}\r\n\t\t\t// ranged, undirected decision, unidirected\r\n\t\t\telse {\r\n\t\t\t\t// depends upon controllertype\r\n\t\t\t\tControllerType type = model.getControllerType();\r\n\t\t\t\tList<String> decisions = MetaMapping.getPieceMetaActions(type);\r\n\t\t\t\tfor (String decision : decisions) {\r\n\t\t\t\t\tdir = MetaMapping.getActionDirection(decision);\r\n\t\t\t\t\tif (dir != null)\r\n\t\t\t\t\t\tdirections.add(dir);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// directed decision\r\n\t\telse {\r\n\t\t\t// depends upon controllertype\r\n\t\t\tdirections.add(dir);\r\n\t\t}\r\n\t\t// iterate all directions and save all tiles on path\r\n\t\tExtendedTileModel currentTile = MetaMapping.getBoardModel()\r\n\t\t\t\t.getPiecePosition(model);\r\n\t\tfor (int[] direction : directions) {\r\n\r\n\t\t\tExtendedTileModel iterateTile = currentTile;\r\n\t\t\tint i = range;\r\n\t\t\twhile (iterateTile != null && i > 0) {\r\n\t\t\t\titerateTile = BoardLogic.getTileNeighbour(iterateTile,\r\n\t\t\t\t\t\tdirection[0], direction[1], false, true, false);\r\n\t\t\t\t// reach has ended\r\n\t\t\t\tif (iterateTile == null)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tlist.add(iterateTile);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}",
"public OthelloPiece[][] getPieces() {\n \t return m_Pieces;\n \t}",
"public void solucioInicial2() {\n int grupsRecollits = 0;\n for (int i=0; i<numCentres*helisPerCentre; ++i) {\n Helicopter hel = new Helicopter();\n helicopters.add(hel);\n }\n int indexHelic = 0;\n int indexGrup = 0;\n int places = 15;\n while (indexGrup < numGrups) {\n int trajecte[] = {-1,-1,-1};\n for (int i=0; i < 3 && indexGrup<numGrups; ++i) {\n Grupo grup = grups.get( indexGrup );\n if (places - grup.getNPersonas() >= 0) {\n places -= grup.getNPersonas();\n trajecte[i] = indexGrup;\n indexGrup++;\n\n }\n else i = 3;\n }\n Helicopter helicopter = helicopters.get( indexHelic );\n helicopter.addTrajecte( trajecte, indexHelic/helisPerCentre );\n places = 15;\n indexHelic++;\n if (indexHelic == numCentres*helisPerCentre) indexHelic = 0;\n }\n }",
"public PVector cohesion (ArrayList<Boid> boids) {\n float neighbordist = 90.0f;\n PVector steer = new PVector(0,0); // Start with empty vector to accumulate all locations\n int count = 0;\n for (Boid other : boids) {\n float d = PVector.dist(location,other.location);\n if ((d > 0) && (d < neighbordist)) {\n steer.add(other.location); // Add location\n count++;\n }\n }\n if (count > 0) {\n steer.div((float)count);\n return seek(steer); // Steer towards the location\n }\n return steer;\n }",
"Piece[][] getPieces() {\n return _pieces;\n }",
"private void computeMovableTilesToDisplayToPlayer() {\n \tfor (Entity enemyEntity : allCreaturesOfCurrentRoom) {\n \t\tAIComponent aiComponent = Mappers.aiComponent.get(enemyEntity);\n \t\tif (aiComponent.getSubSystem() != null) {\n \t\t\tboolean handledInSubSystem = aiComponent.getSubSystem().computeMovableTilesToDisplayToPlayer(this, enemyEntity, room);\n \t\t\tif (handledInSubSystem) continue;\n \t\t}\n \t\t\n \tMoveComponent moveCompo = Mappers.moveComponent.get(enemyEntity);\n \tAttackComponent attackCompo = Mappers.attackComponent.get(enemyEntity);\n \t\n \t\t//clear the movable tile\n \t\tmoveCompo.clearMovableTiles();\n \t\tif (attackCompo != null) attackCompo.clearAttackableTiles();\n \t\t\n \t\tmoveCompo.setMoveRemaining(moveCompo.getMoveSpeed());\n \t\t\n \t//Build the movable tiles list\n \t\ttileSearchService.buildMoveTilesSet(enemyEntity, room);\n \t\tif (attackCompo != null) attackTileSearchService.buildAttackTilesSet(enemyEntity, room, false, true);\n \t\tmoveCompo.hideMovableTiles();\n \t\tif (attackCompo != null) attackCompo.hideAttackableTiles();\n \t}\n }",
"@Test\n public void testJuvenilesSpreadFromOutsideInsideGrid() {\n params = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 5);\n }",
"protected void kingPieces() {\n Row firstRowRed = redBoard.getLastRow();\n Row firstRowWhite = whiteBoard.getLastRow();\n\n for (Space space : firstRowRed) {\n Piece piece = space.getPiece();\n if (piece != null)\n if (piece.getColor() == Piece.COLOR.WHITE) {\n if (piece.getType() == Piece.TYPE.SINGLE) {\n redBoard.kingPiece(firstRowRed.getIndex(), space.getCellIdx());\n whiteBoard.kingPiece(7 - firstRowRed.getIndex(), 7 - space.getCellIdx());\n }\n }\n }\n for (Space space : firstRowWhite) {\n Piece piece = space.getPiece();\n if (piece != null)\n if (piece.getColor() == Piece.COLOR.RED) {\n if (piece.getType() == Piece.TYPE.SINGLE) {\n redBoard.kingPiece(7 - firstRowWhite.getIndex(), 7 - space.getCellIdx());\n whiteBoard.kingPiece(firstRowWhite.getIndex(), space.getCellIdx());\n }\n }\n }\n }",
"private void createPieces() {\n\t\t// Create and fill up the array, iterating by piece row and piece column.\n\t\tpieces = new ArrayList<CvMat>();\n\t\tfor (int pi = 0; pi < prows; pi++) {\n\t\t\tfor (int pj = 0; pj < pcols; pj++) {\n\t\t\t\tCvMat piece = CvMat.create(pieceHeight, pieceWidth, image.type());\n\t\t\t\tpieces.add(piece);\n\t\t\t\t// Copy pixels from image to piece (as usual, do it by hand rather than OpenCV).\n\t\t\t\tfor (int i = 0; i < pieceHeight; i++) {\n\t\t\t\t\tfor (int j = 0; j < pieceWidth; j++) {\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\t\t\tpiece.put(i, j, c, image.get(i + pi * pieceHeight, j + pj * pieceWidth, c));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public ArrayList<Piece> getPieces()\n {\n ArrayList<Piece> pieces = new ArrayList<>();\n for (Square[] s1: squares)\n {\n for (Square s: s1)\n {\n Piece p = s.getPiece();\n if (p!=null)\n pieces.add(p);\n }\n }\n return pieces;\n }",
"public ArrayList<Collidable> getNeighbors();",
"public void displayGrid(){\n \tint max = currentOcean.getMaxGrid(); // modified by Ludo\n \tint line = max*2 +1; \t\t\t\t// modified by Ludo\n \tfor(int i=0; i<max+1;i++){\t\t\t// modified by Ludo\n \t int lineStart = 0 + line*i;\t\t// modified by Ludo\n \t int lineEnd = line + line*i;\t\t// modified by Ludo\n \t System.out.println(currentOcean.toString().substring(lineStart, lineEnd)); // modified by Ludo\n }\n }",
"private List<Collection<Pixel>> holeFinder() {\n\n\t\tList<Pixel> holePixels = new LinkedList<Pixel>();\n\t\tList<Pixel> boundaryPixels = new LinkedList<Pixel>();\n\t\tQueue<Pixel> bfsQueue = new LinkedList<Pixel>();\n\t\tboolean[][] marked = new boolean[mRows][mCols];\n\n\t\tPixel pixel = findFirstHolePixel();\n\t\tbfsQueue.add(pixel);\n\t\tholePixels.add(pixel);\n\t\tmarked[pixel.getRow()][pixel.getCol()] = true;\n\n\t\twhile (!bfsQueue.isEmpty()) {\n\t\t\tPixel currentPixel = bfsQueue.remove();\n\n\t\t\tList<Pixel> connectedPixels = mConnections.getConnections(currentPixel);\n\n\t\t\t// iterates on the pixels who are connected to current pixel\n\t\t\t// if the pixel was already visited skip it\n\t\t\t// else, if the pixel is a hole add it to the list of the holes and to the BFS Queue to expand the hole\n\t\t\t// \t\t else add it to the result list, the pixel belongs to the boundary\n\t\t\tfor (Pixel p : connectedPixels) {\n\t\t\t\tint indexRow = p.getRow();\n\t\t\t\tint indexCol = p.getCol();\n\n\t\t\t\tif (!marked[indexRow][indexCol]) {\n\t\t\t\t\tmarked[indexRow][indexCol] = true;\n\n\t\t\t\t\tif (mImage[indexRow][indexCol] == HOLE) {\n\t\t\t\t\t\tholePixels.add(p);\n\t\t\t\t\t\tbfsQueue.add(p);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tp.setColor(mImage[p.getRow()][p.getCol()]);\n\t\t\t\t\t\tboundaryPixels.add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tList<Collection<Pixel>> result = new LinkedList<Collection<Pixel>>();\n\t\tresult.add(boundaryPixels);\n\t\tresult.add(holePixels);\n\t\treturn result;\n\t}",
"private void cs8() {\n\t\t\t\n\t\n\t\t\tif(new Tile(3088,3092,0).matrix(ctx).reachable()){\n\t\t\t\t\n\t\t\t\tif(new Tile(3079,3084,0).distanceTo(ctx.players.local().tile())<7){\n\t\t\t\t\tMethod.interactO(9709, \"Open\", \"Door\");\n\t\t\t\t}else ctx.movement.step(new Tile(3079,3084,0));\n\t\t\t\t\n\t\t\t}else if(new Tile(3090,3092,0).distanceTo(ctx.players.local().tile())<7){\n\t\t\t\tfinal int[] bounds = {140, 108, -84, 144, -64, 136};\n\t\t\t\tGameObject gate = ctx.objects.select().id(GATEBYFISH).each(Interactive.doSetBounds(bounds)).select(Interactive.areInViewport()).nearest().poll();\n\t\t\t\tgate.interact(\"Open\",\"\");\n\t\t\t}else ctx.movement.step(new Tile(3090,3092,0));\n\t\t\t\n\t\t\t\n\t\t}",
"public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }",
"abstract public Point[] getCheminDeplacement(Coup c);",
"@Override\n\tpublic void motionScheme(int a){\n\t\tint i;\n\t\tArrayList<Dimension> list = new ArrayList<Dimension>();\n\t\tCase t;\n\t\tboolean ok=true;\n\t\t\n\t\ti = this.x-1;\n\t\twhile((i>-1)&&ok){\n\t\t\tt = Window.getTabCase(i,y);\n\t\t\t\n\t\t\tif((t.getOccupant()==null)){\n\t\t\t\tlist.add(new Dimension(y,i));\n\t\t\t}else if(((t.getOccupant().getColor()!=this.col))){//Si la case est occupee par une piece de couleur differente\n\t\t\t\tif(a!=1){\n\t\t\t\t\tif(t.getOccupant().getRep().substring(0,3).equals(\"Roi\")){\n\t\t\t\t\t\tt.getOccupant().inChess(this);\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlist.add(new Dimension(y,i));\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tlist.add(new Dimension(y,i));\n\t\t\t\t\tok=false;\n\t\t\t\t}\n\t\t\t}else if(((t.getOccupant().getColor()==this.col))){\n\t\t\t\tok=false;\n\t\t\t}\n\t\t\t--i;\n\t\t}\n\t\t\n\t\tok=true;\n\t\ti = this.x+1;\n\t\twhile((i<8)&&ok){\n\t\t\tt = Window.getTabCase(i,y);\n\t\t\t\n\t\t\tif((t.getOccupant()==null)){\n\t\t\t\tlist.add(new Dimension(y,i));\n\t\t\t}else if(((t.getOccupant().getColor()!=this.col))){//Si la case est occupee par une piece de couleur differente\n\t\t\t\tif(a!=1){\n\t\t\t\t\tif(t.getOccupant().getRep().substring(0,3).equals(\"Roi\")){\n\t\t\t\t\t\tt.getOccupant().inChess(this);\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlist.add(new Dimension(y,i));\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tlist.add(new Dimension(y,i));\n\t\t\t\t\tok=false;\n\t\t\t\t}\n\t\t\t}else if(((t.getOccupant().getColor()==this.col))){\n\t\t\t\tok=false;\n\t\t\t}\n\t\t\t++i;\n\t\t}\n\t\t\n\t\tok=true;\n\t\ti = this.y-1;\n\t\twhile((i>-1)&&ok){\n\t\t\tt = Window.getTabCase(x,i);\n\t\t\t\n\t\t\tif((t.getOccupant()==null)){\n\t\t\t\tlist.add(new Dimension(i,x));\n\t\t\t}else if(((t.getOccupant().getColor()!=this.col))){//Si la case est occupee par une piece de couleur differente\n\t\t\t\tif(a!=1){\n\t\t\t\t\tif(t.getOccupant().getRep().substring(0,3).equals(\"Roi\")){\n\t\t\t\t\t\tt.getOccupant().inChess(this);\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlist.add(new Dimension(i,x));\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tlist.add(new Dimension(i,x));\n\t\t\t\t\tok=false;\n\t\t\t\t}\n\t\t\t}else if(((t.getOccupant().getColor()==this.col))){\n\t\t\t\tok=false;\n\t\t\t}\n\t\t\t--i;\n\t\t}\n\t\t\n\t\t\n\t\tok=true;\n\t\ti = this.y+1;\n\t\twhile((i<8)&&ok){\n\t\t\tt = Window.getTabCase(x,i);\n\t\t\t\n\t\t\tif((t.getOccupant()==null)){\n\t\t\t\tlist.add(new Dimension(i,x));\n\t\t\t}else if(((t.getOccupant().getColor()!=this.col))){//Si la case est occupee par une piece de couleur differente\n\t\t\t\tif(a!=1){\t\n\t\t\t\t\tif(t.getOccupant().getRep().substring(0,3).equals(\"Roi\")){//piece dans la case == Roi\n\t\t\t\t\t\tt.getOccupant().inChess(this);\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}else{//occupant de la case different d'un Roi\n\t\t\t\t\t\tlist.add(new Dimension(i,x));\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tlist.add(new Dimension(i,x));\n\t\t\t\t\tok=false;\n\t\t\t\t}\n\t\t\t}else if(((t.getOccupant().getColor()==this.col))){//case occupee par une piece de meme couleur\n\t\t\t\tok=false;\n\t\t\t}\n\t\t\t++i;\n\t\t}\n\t\t\n\t\tthis.dep = list;\n\t}",
"private ArrayList<GameSquare> getAdjacentSquares()\n {\n ArrayList<GameSquare> list = new ArrayList<GameSquare>();\n for (int r = row - 1; r <= row + 1; r++)\n {\n if (r >= 0 && r < grid.length)\n {\n for (int c = col - 1; c <= col + 1; c++)\n {\n if (c >= 0 && c < grid[0].length)\n {\n list.add(grid[r][c]);\n }\n }\n }\n }\n return list;\n }",
"public void displayPathOfMovements(ArrayList<PositionInBoard> movements){\n\n cleanBoard();\n\n paintSquare(new PositionInBoard(0,0), 0);\n\n for (int i = 0; i < amountOfMovements - 1; i++){\n paintSquare(movements.get(i), i+1);\n positionsThatArePainted.add( movements.get(i) );\n }\n\n for(int j = amountOfMovements -1; j < movements.size(); j++) {\n paintHorse(movements.get(j));\n positionsThatArePainted.add( movements.get(j) );\n }\n\n }",
"private void decorateMountains(int xStart, int xLength, int floor, ArrayList finalListElements, ArrayList states,boolean enemyAddedBefore)\r\n\t {\n\t if (floor < 1)\r\n\t \treturn;\r\n\r\n\t // boolean coins = random.nextInt(3) == 0;\r\n\t boolean rocks = true;\r\n\r\n\t //add an enemy line above the box\r\n\t Random r = new Random();\r\n\t boolean enemyAdded=addEnemyLine(xStart + 1, xLength - 1, floor - 1);\r\n\r\n\t int s = 1;\r\n\t int e = 1;\r\n\r\n\t if(enemyAdded==false && enemyAddedBefore==false)\r\n\t {\r\n\t if (floor - 2 > 0){\r\n\t if ((xLength - e) - (xStart + s) > 0){\r\n\t for(int x = xStart + s; x < xLength- e; x++){\r\n\t \tboolean flag=true;\r\n\t \tfor(int i=0;i<states.size();i++)\r\n\t \t{\r\n\t \t\tElements element=(Elements)finalListElements.get(i);\r\n\t \t\t\tBlockNode state=(BlockNode)states.get(i);\r\n\t \t\t\t\r\n\t \t\t\tint xElement = (int)(initialStraight+state.getX());\r\n\t \t int floorC= (int)state.getY()+1;\r\n\t \t int widthElement=element.getWidth();\r\n\t \t int heigthElement=element.getHeigth()+2;\r\n\t \t \r\n\t \t int widthElementNext=1;\r\n\t \t int heigthElementNext=0;\r\n\t \t \r\n\t \t if(x+(widthElementNext-1)>=xElement && x<xElement+widthElement && (floor-1)-heigthElementNext<=floorC && (floor-1)>= floorC-heigthElement )\r\n\t \t {\r\n\t \t \tflag=false;\r\n\t \t \tbreak;\r\n\t \t }\r\n\t \t \t \t \t\t \t \r\n\t \t } \r\n\t \tif(flag==true)\r\n\t \t{\r\n\t \t\tsetBlock(x, floor - 1, COIN);\r\n\t \t}\r\n\t \r\n\t //COINS++;\r\n\t }\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t s = random.nextInt(4);\r\n\t e = random.nextInt(4);\r\n\t \r\n\t //this fills the set of blocks and the hidden objects inside them\r\n\t /*\r\n\t if (floor - 4 > 0)\r\n\t {\r\n\t if ((xLength - 1 - e) - (xStart + 1 + s) > 2)\r\n\t {\r\n\t for (int x = xStart + 1 + s; x < xLength - 1 - e; x++)\r\n\t {\r\n\t if (rocks)\r\n\t {\r\n\t if (x != xStart + 1 && x != xLength - 2 && random.nextInt(3) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_POWERUP);\r\n\t //BLOCKS_POWER++;\r\n\t }\r\n\t else\r\n\t {\t//the fills a block with a hidden coin\r\n\t setBlock(x, floor - 4, BLOCK_COIN);\r\n\t //BLOCKS_COINS++;\r\n\t }\r\n\t }\r\n\t else if (random.nextInt(4) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (2 + 1 * 16));\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (1 + 1 * 16));\r\n\t }\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_EMPTY);\r\n\t //BLOCKS_EMPTY++;\r\n\t }\r\n\t }\r\n\t }\r\n\t //additionElementToList(\"Block\", 1,(xLength - 1 - e)-(xStart + 1 + s));\r\n\t }\r\n\t \r\n\t }*/\r\n\t }",
"public BufferedImage[] moves(){\n\t\t\n\t\tBufferedImage arr[] = new BufferedImage[4];\n\t\t//arr[0] = img.getSubimage(725, 143, 70, 67);\n\t\t//arr[1] = img.getSubimage(725, 72, 70, 66);\n\t\t//arr[2] = img.getSubimage(496, 212, 74, 67);\n\t\t\n\t\tarr[0] = img.getSubimage(724, 283, 71, 67);\n\t\t\n\t\tarr[1] = img.getSubimage(724, 283, 71, 67);\n\t\t\n\t\tarr[2] = img.getSubimage(724, 283, 71, 67);\n\t\t\n\t\tarr[3] = img.getSubimage(724, 283, 71, 67);\n\t\t\n\t\treturn arr;\n\t}",
"private static boolean anyObstacles(ArrayList<CharacterSprite> pieces, int[] position, int[] destination,\n moveMode mode, boolean inclusive) {\n switch (mode) {\n case X_AXIS:\n int h = destination[0] < position[0] ? -1 : 1;\n for (int i = position[0] + h; i != destination[0]; i += h) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(i * CharacterSprite.size, position[1] * CharacterSprite.size)) {\n return true;\n }\n }\n }\n break;\n\n case Y_AXIS:\n h = destination[1] < position[1] ? -1 : 1;\n for (int i = position[1] + h; i != destination[1]; i += h) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(position[0] * CharacterSprite.size, i * CharacterSprite.size)) {\n return true;\n }\n }\n }\n break;\n\n case DIAGONAL:\n int i = destination[0], j = destination[1];\n i += i > position[0] ? -1 : 1;\n j += j > position[1] ? -1 : 1;\n\n while (i != position[0]) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(i * CharacterSprite.size, j * CharacterSprite.size)) {\n return true;\n }\n }\n\n i += i > position[0] ? -1 : 1;\n j += j > position[1] ? -1 : 1;\n }\n break;\n\n default:\n return true;\n }\n\n if (inclusive) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(destination[0] * CharacterSprite.size, destination[1] * CharacterSprite.size)) {\n return true;\n }\n }\n }\n\n return false;\n }",
"List<IShape> getVisibleShapes();",
"private List<List<Cell>> constructFireDirectionLines(int range) {\n List<List<Cell>> directionLines = new ArrayList<>();\n for (Direction direction : Direction.values()) {\n List<Cell> directionLine = new ArrayList<>();\n for (int directionMultiplier = 1; directionMultiplier <= range; directionMultiplier++) {\n\n int coordinateX = currentWorm.position.x + (directionMultiplier * direction.x);\n int coordinateY = currentWorm.position.y + (directionMultiplier * direction.y);\n\n if (!isValidCoordinate(coordinateX, coordinateY)) {\n break;\n }\n\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, coordinateX, coordinateY) > range) {\n break;\n }\n\n Cell cell = gameState.map[coordinateY][coordinateX];\n if (cell.type != CellType.AIR) {\n break;\n }\n\n directionLine.add(cell);\n }\n directionLines.add(directionLine);\n }\n\n return directionLines;\n }",
"@Test\n\tpublic void kingOnThroneBlackPieceRightWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\t//moving pieces out so capture can occur\n\t\td.set(24,68);\n\t\td.set(7,29);\n\t\td.set(36,119);\n\t\td.set(11,106);\n\t\td.set(20,33);\n\t\td.set(4,85);\n\t\td.set(35,118);\n\t\td.set(3,95);\n\t\td.set(25,62);\n\t\td.set(4,63);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(63);\n\t\tassertTrue(6==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\n\t}",
"private void clearStragglers() {\n for (int i = 0; i < game.gridPieces.length; i++) {\n GridPiece piece = game.gridPieces[i];\n\n if (piece.state == game.STATE_TEMP) {\n piece.restoreState();\n //restoreState(piece);\n } else if (piece.state == game.STATE_TEMP_NOTOUCH) {\n piece.setState(game.STATE_FINAL);\n }\n }\n }",
"public Pair<Queue<BaseSingle>, boolean[][]> getBorderTroops() {\n Queue<BaseSingle> borderTroops = new LinkedList<>();\n boolean[][] inDanger = new boolean[depth][width];\n int i = 0;\n int j = 0;\n\n // First, scan the first line.\n BaseSingle troop;\n boolean oneLineLeft = false;\n for (j = 0; j < width; j++) {\n troop = aliveTroopsFormation[i][j];\n if (troop != null) {\n borderTroops.add(troop);\n inDanger[i][j] = true;\n } else {\n oneLineLeft = true;\n }\n }\n if (oneLineLeft) return new Pair<>(borderTroops, inDanger);\n\n // Then scan downward from both sides\n int heightLeft = 0;\n int heightRight = 0;\n BaseSingle troopLeft;\n BaseSingle troopRight;\n for (i = 1; i < depth; i++) {\n troopLeft = aliveTroopsFormation[i][0];\n troopRight = aliveTroopsFormation[i][width - 1];\n if (troopLeft != null) {\n borderTroops.add(troopLeft);\n heightLeft += 1;\n inDanger[i][0] = true;\n }\n if (troopRight != null) {\n borderTroops.add(troopRight);\n heightRight += 1;\n inDanger[i][width - 1] = true;\n }\n if (troopLeft == null || troopRight == null) break;\n }\n\n // Last line\n int lastLine = Math.min(heightLeft, heightRight);\n if (lastLine == depth - 1) {\n for (j = 1; j < width - 1; j++) {\n inDanger[lastLine][j] = true;\n borderTroops.add(aliveTroopsFormation[lastLine][j]);\n }\n } else {\n for (j = 1; j < width - 1; j++) {\n if (aliveTroopsFormation[lastLine + 1][j] == null) {\n inDanger[lastLine][j] = true;\n borderTroops.add(aliveTroopsFormation[lastLine][j]);\n } else {\n inDanger[lastLine + 1][j] = true;\n borderTroops.add(aliveTroopsFormation[lastLine + 1][j]);\n }\n }\n }\n return new Pair<>(borderTroops, inDanger);\n }",
"public PVector cohesion (ArrayList<Boid> boids) {\n float neighbordist = 50;\n PVector sum = new PVector(0, 0); // Start with empty vector to accumulate all positions\n int count = 0;\n for (Boid other : boids) {\n float d = PVector.dist(position, other.position);\n if ((d > 0) && (d < neighbordist)) {\n sum.add(other.position); // Add position\n count++;\n }\n }\n if (count > 0) {\n sum.div(count);\n return seek(sum); // Steer towards the position\n } else {\n return new PVector(0, 0);\n }\n }",
"public ArrayList<PentagoGame> nextPossibleMoves() {\n ArrayList<PentagoGame> children = new ArrayList<>();\n for(int i = 0; i < 6; i++) { // for each row I can place a piece\n for(int j = 0; j < 6; j++) { // for each column\n for(int k = 0; k < 4; k++ ) { // for each board to rotate\n for(int d = 0; d < 2; d ++) {// for each direction to rotate\n boolean leftRotate = false;\n if(d == 0) {\n leftRotate = true;\n }\n Move move = new Move(i, j, k, leftRotate);\n if(validMove(whosTurn(), move)) {\n PentagoGame tempGame = new PentagoGame(this);\n tempGame.playPiece(whosTurn(), move);\n tempGame.rotateBoard(whosTurn(), move);\n tempGame.turnOver();\n move.setGameState(tempGame);\n move.setUtility(calulateUtility(move));\n // todo\n children.add(tempGame);\n }\n }\n }\n }\n }\n\n return children;\n }",
"public void takeTurnsDebug() {\n boolean antFound = false;\n int gridPos = 0;\n while (antFound == false) {\n if (antGrid[gridPos] != null && antGrid[gridPos].getId() == 14) {\n antGrid[gridPos].moving = true;\n antFound = true;\n } else {\n gridPos++;\n }\n }\n \n takeTurn(antGrid[gridPos], gridPos);\n }",
"public void mouseClicked(){\n int x = mouseX/64;\n int y = mouseY/64;\n boolean placed = Grid.place(x, y, gridPlane, 10, 6, this.turn, this.players, 0);\n if(placed){\n Player prev_player = players.get(this.turn%2);\n players.get(this.turn%2).addNumMoves();\n this.turn+=1;\n while(true){\n if((players.get(this.turn%2).getNumMoves() > 0 && players.get(this.turn%2).getGridsOwned() == 0) || (players.get(this.turn%2).isLost() == true)){\n players.get(this.turn%2).lost();\n this.turn+=1;\n }else{\n break;\n }\n }\n if(players.get(this.turn%2).equals(prev_player)){\n this.finish = true;\n }\n }\n }",
"List<Point> getPath(int grid[][], Point src, Point dest);",
"public float getPieces(){\r\n return pieces; \r\n }",
"@Override\n\tpublic void motionScheme(int a){\n\t\tint i,j;\n\t\tCase t;\n\t\tboolean ok=true;\n\t\tArrayList<Dimension> list = new ArrayList<Dimension>();\n\t\t\n\t\t\n\t\t/*en bas a droite*/\n\t\ti = this.x+1;\n\t\tj = this.y+1;\n\t\twhile((i<8)&&(j<8)&&ok){\n\t\t\tt = Window.getTabCase(i,j);\n\t\t\t\n\t\t\tif((t.getOccupant()==null)){\n\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t}else if(((t.getOccupant().getColor()!=this.col))){//Si la case est occupee par une piece de couleur differente\n\t\t\t\tif(a!=1){\t\n\t\t\t\t\tif(t.getOccupant().getRep().substring(0,3).equals(\"Roi\")){\n\t\t\t\t\t\tt.getOccupant().inChess(this);\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t\t\tok=false;\n\t\t\t\t}\n\t\t\t}else if(((t.getOccupant().getColor()==this.col))){\n\t\t\t\tok=false;\n\t\t\t}\n\t\t\t++i;\n\t\t\t++j;\n\t\t}\n\t\t\n\t\t/*en haut a droite*/\n\t\tok=true;\n\t\ti = this.x-1;\n\t\tj = this.y+1;\n\t\twhile((i>-1)&&(j<8)&&ok){\n\t\t\tt = Window.getTabCase(i,j);\n\t\t\t\n\t\t\tif((t.getOccupant()==null)){\n\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t}else if(((t.getOccupant().getColor()!=this.col))){//Si la case est occupee par une piece de couleur differente\n\t\t\t\tif(a!=1){\t\n\t\t\t\t\tif(t.getOccupant().getRep().substring(0,3).equals(\"Roi\")){\n\t\t\t\t\t\tt.getOccupant().inChess(this);\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t\t\tok=false;\n\t\t\t\t}\n\t\t\t}else if(((t.getOccupant().getColor()==this.col))){\n\t\t\t\tok=false;\n\t\t\t}\n\t\t\t--i;\n\t\t\t++j;\n\t\t}\n\t\t\n\t\t/*en bas a gauche*/\n\t\tok=true;\n\t\ti = this.x+1;\n\t\tj = this.y-1;\n\t\twhile((i<8)&&(j>-1)&&ok){\n\t\t\tt = Window.getTabCase(i,j);\n\t\t\t\n\t\t\tif((t.getOccupant()==null)){\n\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t}else if(((t.getOccupant().getColor()!=this.col))){//Si la case est occupee par une piece de couleur differente\n\t\t\t\tif(a!=1){\n\t\t\t\t\tif(t.getOccupant().getRep().substring(0,3).equals(\"Roi\")){\n\t\t\t\t\t\tt.getOccupant().inChess(this);\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t\t\tok=false;\n\t\t\t\t}\n\t\t\t}else if(((t.getOccupant().getColor()==this.col))){\n\t\t\t\tok=false;\n\t\t\t}\n\t\t\t++i;\n\t\t\t--j;\n\t\t}\n\t\t\n\t\t/*en haut a gauche*/ \n\t\tok=true;\n\t\ti = this.x-1;\n\t\tj = this.y-1;\n\t\twhile((i>-1)&&(j>-1)&&ok){\n\t\t\tt = Window.getTabCase(i,j);\n\t\t\t\n\t\t\tif((t.getOccupant()==null)){\n\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t}else if(((t.getOccupant().getColor()!=this.col))){//Si la case est occupee par une piece de couleur differente\n\t\t\t\tif(a!=1){\n\t\t\t\t\tif(t.getOccupant().getRep().substring(0,3).equals(\"Roi\")){//piece dans la case == Roi\n\t\t\t\t\t\tt.getOccupant().inChess(this);\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}else{//occupant de la case different d'un Roi\n\t\t\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t\t\t\tok=false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tlist.add(new Dimension(j,i));\n\t\t\t\t\tok=false;\n\t\t\t\t}\n\t\t\t}else if(((t.getOccupant().getColor()==this.col))){//case occupee par une piece de meme couleur\n\t\t\t\tok=false;\n\t\t\t}\n\t\t\t--i;\n\t\t\t--j;\n\t\t}\n\t\t\n\t\tthis.dep = list;\t\t\n\t}",
"public void pullPlayerTiles() {\r\n\t\tRandom r = new Random();\r\n\t\tfor (int i=0; i < 7; i++) {\r\n\t\t\tint random = r.nextInt(Launch.getBoneyard().size());\r\n\t\t\t//System.out.println(\"[debug] random = \"+random);\r\n\t\t\t//System.out.println(\"[debug] index\"+random+\" in BONEYARD = \"+Arrays.toString(Launch.BONEYARD.get(random).getDots()));\r\n\t\t\tif (Utils.isSet(Launch.getBoneyard(), random)) {\r\n\t\t\t\tPLAYER_DOMINOS.add(Launch.getBoneyard().get(random));\r\n\t\t\t\tLaunch.getBoneyard().remove(random);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tprotected void fallBeginInGrid(int j) {\n\t\tint i = 0;\n\t\tint empty = -1;\n\t\tIDiamond diamondCur = null;\n\t\tIDiamond diamondPre = null;\n\t\tIDiamond firstDiamond = null;\n\t\n\t\tif (screen.colHeight[j] < 8) {\n\t\t\tfirstDiamond = null;\n\t\t\tdiamondCur = null;\n\t\t\tdiamondPre = null;\n\t\t\tfor (i = 0 ; i < 8 ; i++) { // vong for danh cho grid\n\t\t\t\tint flag1 = screen.inGridFlag[i][j];\n\t\t\t\tint value = screen.grid[i][j];\n\t\t\t\tint dType = diamondType(value);\n\t\t\t\tif (flag1 == Effect.EMPTY) {\n\t\t\t\t\tif (empty == -1) empty = i; \n\t\t\t\t} \n\t\t\t\tif (empty > -1) {\n\t\t\t\t\tif (Operator.getBit(Effect.FIXED_POS, flag1) > 0 && screen.logic.grid[i][j] != -1 && dType != IDiamond.ROCK_DIAMOND) {\n\t\t\t\t\t\tdiamondCur = screen.logic.savedDiamonds.newObject(\n\t\t\t\t\t\t\t\tscreen.gridPos.x + j * screen.DIAMOND_WIDTH\n\t\t\t\t\t\t\t\t\t\t+ screen.DIAMOND_WIDTH / 2,\n\t\t\t\t\t\t\t\tscreen.gridPos.y + i\n\t\t\t\t\t\t\t\t\t\t* screen.DIAMOND_HEIGHT\n\t\t\t\t\t\t\t\t\t\t+ screen.DIAMOND_HEIGHT / 2,\n\t\t\t\t\t\t\t\tscreen.DIAMOND_WIDTH,\n\t\t\t\t\t\t\t\tscreen.DIAMOND_HEIGHT, screen);\n\t\t\t\t\t\tdiamondCur.setDestination(screen.gridPos.x + j\n\t\t\t\t\t\t\t\t* screen.DIAMOND_WIDTH\n\t\t\t\t\t\t\t\t+ screen.DIAMOND_WIDTH / 2,\n\t\t\t\t\t\t\t\tscreen.gridPos.y + empty\n\t\t\t\t\t\t\t\t\t\t* screen.DIAMOND_HEIGHT\n\t\t\t\t\t\t\t\t\t\t+ screen.DIAMOND_HEIGHT / 2);\n\t\t\t\t\t\tfallDown = true;\n\t\t\t\t\t\tdiamondCur.setDiamondValue(screen.logic.grid[i][j]);\n//\t\t\t\t\t\tMyAnimation animation = gAssets.getDiamondAnimation(screen.logic.grid[i][j], screen.getGameID());\n//\t\t\t\t\t\tdiamondCur.setSprite(animation);\n\t\t\t\t\t\tdiamondCur.setAction(Diamond.FALL);\n\t\t\t\t\t\t\n\t\t\t\t\t\tchangeStatusBeforeFall(i, j);\n//\t\t\t\t\t\tif (diamondType(screen.logic.grid[i][j]) == IDiamond.SOIL_DIAMOND) {\n//\t\t\t\t\t\t\tMissionDiamond lScreen = (MissionDiamond) screen;\n//\t\t\t\t\t\t\t((SharpenDiamond)lScreen.mission).remove(i, j);\n//\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (diamondType(screen.logic.grid[i][j]) == IDiamond.BUTTERFLY_DIAMOND) {\n\t\t\t\t\t\t\tinstance.spider.removeButterfly(i * 8 + j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tscreen.inGridFlag[i][j] = 0;\n\t\t\t\t\t\tscreen.logic.grid[i][j] = -1;\n\t\t\t\t\t\tempty++;\n\t\t\t\t\t\t// phan xau chuoi\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (firstDiamond == null) firstDiamond = diamondCur;\n\t\t\t\t\t\tdiamondCur.setPreDiamond(diamondPre);\n\t\t\t\t\t\tif (diamondPre != null) diamondPre.setNextDiamond(diamondCur);\n\t\t\t\t\t\tdiamondPre = diamondCur;\n\t\t\t\t\t\t\n\t\t\t\t\t} else if (flag1 > Effect.EMPTY || dType == IDiamond.ROCK_DIAMOND) {\n\t\t\t\t\t\tempty = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (inGridHead[j] == null) {// chua ton tai danh sach truoc do\n\t\t\t\tinGridHead[j] = firstDiamond;// dau danh sach hien tai la firstDiamond\n\t\t\t\tinGridTail[j] = diamondCur;// cuoi danh sach hien tai la diamondCur\n\t\t\t} else {// ton tai danh sach truoc do\n\t\t\t\tif (firstDiamond != null) {// phai ton tai danh sach hien tai\n\t\t\t\t\tif (firstDiamond.getPosY() < inGridHead[j].getPosY()) {// danh sach hien taio truoc\n\t\t\t\t\t\t// noi o dau danh sach cu\n\t\t\t\t\t\tinGridHead[j].setPreDiamond(diamondCur); \n\t\t\t\t\t\tdiamondCur.setNextDiamond(inGridHead[j]);\n\t\t\t\t\t\t// sua dau\n\t\t\t\t\t\tinGridHead[j] = firstDiamond;\n\t\t\t\t\t} else {// danh sach hien tai o sau\n\t\t\t\t\t\t// noi p duoi danh sach cu\n\t\t\t\t\t\tinGridTail[j].setNextDiamond(firstDiamond);\n\t\t\t\t\t\tfirstDiamond.setPreDiamond(inGridTail[j]);\n\t\t\t\t\t\t// sua duoi\n\t\t\t\t\t\tinGridTail[j] = diamondCur;\n\t\t\t\t\t}\n\t\t\t\t\t// moc noi roi trong vao danh sach roi ngoai\n\t\t\t\t\tif (outGridHead[j] != null) {// ton tai danh sach roi ngoai\n\t\t\t\t\t\toutGridHead[j].setPreDiamond(inGridTail[j]);\n\t\t\t\t\t\tinGridTail[j].setNextDiamond(outGridHead[j]);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }"
] | [
"0.5777915",
"0.5777915",
"0.5772792",
"0.5769662",
"0.562043",
"0.55647427",
"0.5541749",
"0.5539298",
"0.54652256",
"0.544199",
"0.54414046",
"0.540096",
"0.5395217",
"0.5386368",
"0.53787005",
"0.53730094",
"0.5367323",
"0.5345929",
"0.5318678",
"0.52865887",
"0.52854383",
"0.5284303",
"0.52809775",
"0.5279033",
"0.52760017",
"0.5272705",
"0.52685755",
"0.5266784",
"0.52636045",
"0.5262056",
"0.52595705",
"0.52463454",
"0.5244764",
"0.52273214",
"0.521903",
"0.52120525",
"0.5211187",
"0.5201351",
"0.5195663",
"0.51947385",
"0.5183563",
"0.5182098",
"0.51732755",
"0.5166385",
"0.516303",
"0.516271",
"0.5132259",
"0.513107",
"0.51294965",
"0.512535",
"0.5123581",
"0.5117342",
"0.5113773",
"0.5093762",
"0.50936633",
"0.5090667",
"0.5089249",
"0.5087433",
"0.50863254",
"0.5083049",
"0.5082544",
"0.50810784",
"0.5065722",
"0.50602937",
"0.5059199",
"0.5048725",
"0.5048595",
"0.5044317",
"0.50414175",
"0.5041135",
"0.5036081",
"0.50360054",
"0.50215787",
"0.500771",
"0.5003162",
"0.4997694",
"0.49924487",
"0.4983892",
"0.498124",
"0.49781084",
"0.4961834",
"0.49603984",
"0.49582317",
"0.49543914",
"0.49517035",
"0.49493575",
"0.4946508",
"0.4945229",
"0.49393287",
"0.49388546",
"0.4936077",
"0.49336895",
"0.49220017",
"0.49205452",
"0.49204102",
"0.49175376",
"0.4917514",
"0.49164245",
"0.49093392",
"0.49090898"
] | 0.53619057 | 17 |
Returns the originOpposite that the pointer is headed towards, origin if nothing | private GridPiece getOppositeActive() {
/*System.out.println("GS| origin row: " + origin.row);
System.out.println("GS| origin col: " + origin.column);
System.out.println("GS| origin center x,y: " + origin.getCenter());*/
if (game.gridPieces[game.getGridPiece(touchPos)] == origin) {
return origin;
}
float degrees;
// Get degrees
degrees = MathUtils.atan2(touchPos.y - origin.getCenter().y, touchPos.x - origin.getCenter().x);
float quarterPi = 0.78539816339f;
if (!originOpposite.contains(falsePiece)) {
for (GridPiece gridPiece : originOpposite) {
//System.out.println("GS| degrees: " + degrees);
/*System.out.println("GS| gridpiece row: " + gridPiece.row);
System.out.println("GS| gridpiece col: " + gridPiece.column);
System.out.println("GS| gridpiece center x,y: " + gridPiece.getCenter());*/
// Right
if (degrees >= 0 && degrees < quarterPi || degrees < 0 && degrees >= -quarterPi) {
if (gridPiece.row == origin.row && gridPiece.getCenter().x > origin.getCenter().x) {
return gridPiece;
}
}
// Down
else if (degrees <= -quarterPi && degrees > -quarterPi * 3) {
if (gridPiece.column == origin.column && gridPiece.getCenter().y < origin.getCenter().y) {
return gridPiece;
}
}
// Left
else if (degrees > quarterPi * 3 && degrees <= quarterPi * 4
|| degrees < -quarterPi * 3 && degrees >= -quarterPi * 4) {
if (gridPiece.row == origin.row && gridPiece.getCenter().x < origin.getCenter().x) {
return gridPiece;
}
}
// Up
else if (degrees >= quarterPi && degrees < quarterPi * 3) {
if (gridPiece.column == origin.column && gridPiece.getCenter().y > origin.getCenter().y) {
return gridPiece;
}
}
}
}
return origin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PointF getOppositeLocation() {\n PointF exitLocation = new PointF();\n switch (direction) {\n case NORTH:\n exitLocation.y = Constants.GAMEHEIGHT - size;\n exitLocation.x = Constants.GAMEWIDTH / 2;\n break;\n case SOUTH:\n exitLocation.y = size;\n exitLocation.x = Constants.GAMEWIDTH / 2;\n break;\n case EAST:\n exitLocation.y = Constants.GAMEHEIGHT / 2;\n exitLocation.x = size;\n break;\n case WEST:\n exitLocation.y = Constants.GAMEHEIGHT / 2;\n exitLocation.x = Constants.GAMEWIDTH - size;\n break;\n default:\n\n break;\n }\n return exitLocation;\n }",
"public Direction getOpposite() {\n if (equals(Direction.NORTH)) return Direction.SOUTH;\n else if (equals(Direction.EAST)) return Direction.WEST;\n else if (equals(Direction.SOUTH)) return Direction.NORTH;\n else if (equals(Direction.WEST)) return Direction.EAST;\n else return null;\n }",
"N getOrigin();",
"public Vector getAbsPostion()\n {\n return getAbsPosition(Vector.Zero());\n }",
"public Location getOrigin() {\n/* 1094 */ Location origin = (getHandle()).origin;\n/* 1095 */ return (origin == null) ? null : origin.clone();\n/* */ }",
"Point3D getLeftUpperBackCorner();",
"godot.wire.Wire.Vector2 getOrigin();",
"godot.wire.Wire.Vector3 getOrigin();",
"private Point getEnd() {\n if (goal == null) {\n if (target == null) {\n return null;\n }\n return target.getPosition();\n } else {\n return goal;\n }\n }",
"public static Direction shouldBackOff () {\n RobotInfo[] nearby = rc.senseNearbyRobots();\n boolean nearbyEc = false;\n for (RobotInfo ri: nearby) {\n if (ri.team != mTeam && ri.type == RobotType.ENLIGHTENMENT_CENTER) {\n nearbyEc = true;\n break;\n }\n }\n if (!nearbyEc) {\n return null;\n }\n MapLocation sum = rc.getLocation(), curr = sum;\n for (RobotInfo ri: nearby) {\n if (ri.type == RobotType.POLITICIAN && ri.getConviction() > rc.getConviction()) {\n sum = sum.translate(ri.getLocation().x - curr.x, ri.getLocation().y - curr.y);\n }\n }\n if (sum.equals(curr)) {\n return null;\n }\n return sum.directionTo(curr);\n }",
"public PlayerPosition getPrevious() {\n\n\t\tswitch (this) {\n\t\t\tcase BOTTOM:\n\t\t\t\treturn RIGHT;\n\t\t\tcase LEFT:\n\t\t\t\treturn BOTTOM;\n\t\t\tcase TOP:\n\t\t\t\treturn LEFT;\n\t\t\tcase RIGHT:\n\t\t\t\treturn TOP;\n\t\t\tdefault:\n\t\t\t\t// must not happen\n\t\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n public Point getOrigin() {\n return origin;\n }",
"Point3D getRightLowerFrontCorner();",
"public Coords getUpperLeft()\r\n {\r\n return new Coords(x, y);\r\n }",
"public Point getOrigin() {\n checkWidget();\n if (content == null)\n return new Point(0, 0);\n Point location = content.getLocation();\n return new Point(-location.x, -location.y);\n }",
"private int backwardPosition() {\n\t\tif(getPosition() > 0) {\n\t\t\treturn getPosition() - 1;\n\t\t} else {\n\t\t\treturn getMaxPosition();\n\t\t}\n\t}",
"public Position origin(Position ep) throws InvalidPositionException;",
"public Point2D getOrigin() {\n Point2D resultOrigin;\n resultOrigin = new Point2D(this.origin.getX(), this.origin.getY());\n return resultOrigin;\n\n }",
"public Pixel topLeft() {\n if (this.up == null) {\n return null;\n }\n else {\n return this.up.left;\n }\n }",
"public Point getOrigin() {\n return origin;\n }",
"public Vector3d getOrigin() { return mOrigin; }",
"public Bearing leftFrom() {\n return this.get(((this.bearing - 2) + 8) % 8);\n }",
"public static Direction getOppositeDirection ( Direction direction ) \r\n\t{\r\n\t\tswitch ( direction )\r\n\t\t{\r\n\t\t\tcase UP: return Direction.DOWN; \r\n\t\t\tcase DOWN: return Direction.UP; \r\n\t\t\tcase LEFT: return Direction.RIGHT; \r\n\t\t\tcase RIGHT: return Direction.LEFT; \r\n\t\t}\r\n\t\treturn Direction.NONE;\r\n\t}",
"public Pixel topRight() {\n if (this.up == null) {\n return null;\n }\n else {\n return this.up.right;\n }\n }",
"public Coords getLowerRight()\r\n {\r\n return new Coords(x + width, y + height);\r\n }",
"Origin getOrigin();",
"public Vector3 absLocal () {\n return abs(this);\n }",
"protected abstract void calcOrigin();",
"public Position opposite(Position vp, Position ep) throws InvalidPositionException;",
"private boolean isNearToEndPosition() {\n switch (direction) {\n case UP:\n return posY <= endPosition;\n case DOWN:\n return posY >= endPosition;\n case LEFT:\n return posX <= endPosition;\n case RIGHT:\n return posX >= endPosition;\n }\n throw new RuntimeException(\"Unknown position\");\n }",
"public int getYOrigin() {\n return ic.getYOrigin();\n }",
"private ArrayList<GridPiece> getOpposite(GridPiece origin) {\n originOpposite.clear();\n\n //Check for corners\n if (origin.column == 0 && (origin.row == 0 || origin.row == game.gridSizeHeight - 1)) {\n originOpposite.add(falsePiece);\n return originOpposite;\n } else if (origin.column == game.gridSizeWidth - 1 && (origin.row == 0 || origin.row == game.gridSizeHeight - 1)) {\n originOpposite.add(falsePiece);\n return originOpposite;\n }\n\n if (originOpposite.size() > 0) {\n return originOpposite;\n }\n\n // Search Around\n\n boolean canCreateOp;\n\n // Search up\n if (game.gridMap.size() > origin.row + 1) {\n canCreateOp = false;\n\n for (int i = origin.row + 1; i < game.gridSizeHeight; i++) {\n if (game.gridMap.get(i).get(origin.column).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(i).get(origin.column).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(i).get(origin.column));\n break;\n }\n }\n\n\n // Search down\n }\n if (origin.row > 0) {\n canCreateOp = false;\n\n for (int i = origin.row - 1; i >= 0; i--) {\n if (game.gridMap.get(i).get(origin.column).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(i).get(origin.column).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(i).get(origin.column));\n break;\n }\n }\n\n\n // Search right\n }\n if (game.gridMap.get(0).size() > origin.column + 1) {\n canCreateOp = false;\n\n for (int i = origin.column + 1; i < game.gridSizeWidth; i++) {\n if (game.gridMap.get(origin.row).get(i).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(origin.row).get(i).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(origin.row).get(i));\n break;\n }\n }\n\n // Search left\n }\n if (origin.column > 0) {\n canCreateOp = false;\n\n for (int i = origin.column - 1; i >= 0; i--) {\n if (game.gridMap.get(origin.row).get(i).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(origin.row).get(i).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(origin.row).get(i));\n break;\n }\n }\n }\n\n noLine = true;\n\n if (originOpposite.size() == 0) {\n originOpposite.add(falsePiece);\n }\n\n return originOpposite;\n }",
"public Direction getOppositeDirection(Direction d)\n \t{\n \t\tswitch(d)\n \t\t{\n \t\tcase up:\n \t\t\treturn Direction.down;\n \t\tcase down:\n \t\t\treturn Direction.up;\n \t\tcase left:\n \t\t\treturn Direction.right;\n \t\tcase right:\n \t\t\treturn Direction.left;\n \t\tcase topleft:\n \t\t\treturn Direction.botright;\n \t\tcase topright:\n \t\t\treturn Direction.botleft;\n \t\tcase botleft:\n \t\t\treturn Direction.topright;\n \t\tcase botright:\n \t\t\treturn Direction.topleft;\n \t\tdefault:\n \t\t\treturn Direction.none;\n \t\t}\n \t}",
"public Optional<Boolean> isDestinationPositionAfter();",
"public Point getUpperLeft() {\n return this.upperLeft;\n }",
"public Vector3f getOrigin() {\r\n\t\treturn new Vector3f(mOrigin);\r\n\t}",
"public Node getOrigin()\r\n\t{\r\n\t\treturn origin;\r\n\t}",
"boolean hasOrigin();",
"boolean hasOrigin();",
"public int getOrigin() {\r\n\t\treturn origin;\r\n\t}",
"public Vector3f getOccluderPosition();",
"Direction invert() {\n switch (this) {\n case NORTH: return SOUTH;\n case SOUTH: return NORTH;\n case EAST: return WEST;\n case WEST: return EAST;\n case NORTH_EAST: return SOUTH_WEST;\n case NORTH_WEST: return SOUTH_EAST;\n case SOUTH_EAST: return NORTH_WEST;\n case SOUTH_WEST: return NORTH_EAST;\n default: return NULL;\n }\n }",
"String origin();",
"public Coords getUpperRight()\r\n {\r\n return new Coords(x + width, y);\r\n }",
"Point getTopXY();",
"public Point getDelta()\n {\n return this.getPosition().subtract(this.getInitialPosition());\n }",
"private Point findTopLeftCornerPoint() {\n return new Point(origin.getX(), origin.getY() + width);\n }",
"public Point2D getOrigin() {\r\n return new Point2D.Double(originX, originY);\r\n }",
"private Int2D getOpposite(Int2D location, Int2D pLoc){\n\t\t\n\t\tint x = location.getX();\n\t\tint y = location.getY();\n\t\t//UH OH DIRECTION!!!!\n\t\tint sideX1;\n\t\tint sideX2;\n\t\tint sideY1;\n\t\tint sideY2;\n/*****************************************NORTH************************************/\t\t\n\t\t//Assuming facing north\n\t\tif(direct == 0){\n\t\t\t\n\t\t//Peripheral vision\n\t\t\t\n\t\t\t//Left Peripheral\n\t\t\tif(y == pLoc.y && x == world.tx(pLoc.x - 1)){\n\t\t\t\tx = world.tx(pLoc.x + 1);\n\t\t\t\tsideX1 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\tsideX2 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t// Right Peripheral\n\t\t\telse if(y == pLoc.y && x == world.tx(pLoc.x + 1)){\n\t\t\t\tx = world.tx(pLoc.x - 1);\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\tsideX2 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t\n\t\t//Three Frontal Visions and FURTHER VISIONS\n\t\t\t\n\t\t\t//Left Front opposite OR TWO LEFT FURTHER VISIONS\n\t\t\telse if((y == world.ty(pLoc.y+1) && x == world.tx(pLoc.x-1)) || \n\t\t\t\t\t(y == world.ty(pLoc.y+2) && x == world.tx(pLoc.x-2) ||\n\t\t\t\t\t(y == world.ty(pLoc.y+2) && x == world.tx(pLoc.x-1)))){\n\t\t\t\tx = world.tx(pLoc.x + 1);\n\t\t\t\ty = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t//Middle Front Opposite OR FURTHER MIDDLE\n\t\t\telse if((y == world.ty(pLoc.y + 1) && x == world.tx(pLoc.x)) || \n\t\t\t\t\t(y == world.ty(pLoc.y + 2) && x == world.tx(pLoc.x))){\n\t\t\t\ty = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t\n\t\t\t//Right Front or TWO FURTHER RIGHT VISIONS\n\t\t\telse if((y == world.ty(pLoc.y + 1) && x == world.tx(pLoc.x + 1)) ||\n\t\t\t\t\t(y == world.ty(pLoc.y + 2) && x == world.tx(pLoc.x + 1)) ||\n\t\t\t\t\t(y == world.ty(pLoc.y + 2) && x == world.tx(pLoc.x + 2))){\n\t\t\t\tx = world.tx(pLoc.x - 1);\n\t\t\t\ty = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t}\n\t\t}// end of North\n\t\t/*****************************************SOUTH************************************/\t\t\t\t\n\t\t//Facing South\n\t\tif(direct == 1){\n\t\t\t\n\t\t\t//Peripheral vision\n\t\t\t\n\t\t\t//Right Peripheral\n\t\t\tif(y == pLoc.y && x == world.tx(pLoc.x - 1)){\n\t\t\t\tx = world.tx(pLoc.x + 1);\n\t\t\t\tsideX1 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\tsideX2 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t// Left Peripheral\n\t\t\telse if(y == pLoc.y && x == world.tx(pLoc.x + 1)){\n\t\t\t\tx = world.tx(pLoc.x - 1);\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\tsideX2 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t\n\t\t//Three Frontal Visions and FURTHER VISIONS\n\t\t\t\n\t\t\t//Left Front opposite OR TWO LEFT FURTHER VISIONS\n\t\t\telse if((y == world.ty(pLoc.y-1) && x == world.tx(pLoc.x-1)) || \n\t\t\t\t\t(y == world.ty(pLoc.y-2) && x == world.tx(pLoc.x-2) ||\n\t\t\t\t\t(y == world.ty(pLoc.y-2) && x == world.tx(pLoc.x-1)))){\n\t\t\t\tx = world.tx(pLoc.x + 1);\n\t\t\t\ty = world.ty(pLoc.y + 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y);\n\t\t\t}\n\t\t\t//Middle Front Opposite OR FURTHER MIDDLE\n\t\t\telse if((y == world.ty(pLoc.y - 1) && x == world.tx(pLoc.x)) || \n\t\t\t\t\t(y == world.ty(pLoc.y - 2) && x == world.tx(pLoc.x))){\n\t\t\t\ty = world.ty(pLoc.y + 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y + 1);\n\t\t\t}\n\t\t\t\n\t\t\t//Right Front or TWO FURTHER RIGHT VISIONS\n\t\t\telse if((y == world.ty(pLoc.y - 1) && x == world.tx(pLoc.x + 1)) ||\n\t\t\t\t\t(y == world.ty(pLoc.y - 2) && x == world.tx(pLoc.x + 1)) ||\n\t\t\t\t\t(y == world.ty(pLoc.y - 2) && x == world.tx(pLoc.x + 2))){\n\t\t\t\tx = world.tx(pLoc.x - 1);\n\t\t\t\ty = world.ty(pLoc.y + 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x);\n\t\t\t\tsideY2 = world.ty(pLoc.y + 1);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t}\n\t\t}// end of South\n\t\t/*****************************************EAST************************************/\t\n\t\t//East\n\t\tif(direct == 2){\n\t\t\t\n\t\t//Peripheral vision\n\t\t\t\n\t\t\t//Right Peripheral\n\t\t\tif(y == world.ty(pLoc.y + 1) && x == pLoc.x){\n\t\t\t\ty = world.ty(pLoc.y - 1);\n\t\t\t\tsideX1 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\tsideX2 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t// Left Peripheral\n\t\t\telse if(y == world.ty(pLoc.y - 1) && x == pLoc.x){\n\t\t\t\ty = world.ty(pLoc.y + 1);\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\tsideX2 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t\n\t\t//Three Frontal Visions and FURTHER VISIONS\n\t\t\t\n\t\t\t//Left Front opposite OR TWO LEFT FURTHER VISIONS\n\t\t\telse if((y == world.ty(pLoc.y+1) && x == world.tx(pLoc.x+1)) || \n\t\t\t\t\t(y == world.ty(pLoc.y+2) && x == world.tx(pLoc.x+2) ||\n\t\t\t\t\t(y == world.ty(pLoc.y+2) && x == world.tx(pLoc.x+1)))){\n\t\t\t\tx = world.tx(pLoc.x - 1);\n\t\t\t\ty = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t//Middle Front Opposite OR FURTHER MIDDLE\n\t\t\telse if((y == world.ty(pLoc.y) && x == world.tx(pLoc.x + 1)) || \n\t\t\t\t\t(y == world.ty(pLoc.y) && x == world.tx(pLoc.x + 2))){\n\t\t\t\ty = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y + 1);\n\t\t\t}\n\t\t\t\n\t\t\t//Right Front or TWO FURTHER RIGHT VISIONS\n\t\t\telse if((y == world.ty(pLoc.y - 1) && x == world.tx(pLoc.x + 1)) ||\n\t\t\t\t\t(y == world.ty(pLoc.y - 1) && x == world.tx(pLoc.x + 2)) ||\n\t\t\t\t\t(y == world.ty(pLoc.y - 2) && x == world.tx(pLoc.x + 2))){\n\t\t\t\tx = world.tx(pLoc.x - 1);\n\t\t\t\ty = world.ty(pLoc.y + 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x);\n\t\t\t\tsideY2 = world.ty(pLoc.y + 1);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t}\n\t\t}// end of East\n\t\t\n\t\t/*****************************************WEST************************************/\t\n\t\t\n\t\t//WEST\n\t\tif(direct == 2){\n\t\t\t\n\t\t//Peripheral vision\n\t\t\t\n\t\t\t//Left Peripheral\n\t\t\tif(y == world.ty(pLoc.y + 1) && x == pLoc.x){\n\t\t\t\ty = world.ty(pLoc.y - 1);\n\t\t\t\tsideX1 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\tsideX2 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t// Right Peripheral\n\t\t\telse if(y == world.ty(pLoc.y - 1) && x == pLoc.x){\n\t\t\t\ty = world.ty(pLoc.y + 1);\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y + 1);\n\t\t\t\tsideX2 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t\n\t\t//Three Front Visions and FURTHER VISIONS\n\t\t\t\n\t\t\t//Left Front opposite OR TWO LEFT FURTHER VISIONS\n\t\t\telse if((y == world.ty(pLoc.y-1) && x == world.tx(pLoc.x-1)) || \n\t\t\t\t\t(y == world.ty(pLoc.y-2) && x == world.tx(pLoc.x-2) ||\n\t\t\t\t\t(y == world.ty(pLoc.y-2) && x == world.tx(pLoc.x-1)))){\n\t\t\t\tx = world.tx(pLoc.x + 1);\n\t\t\t\ty = world.ty(pLoc.y + 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x);\n\t\t\t\tsideY2 = world.ty(pLoc.y + 1);\n\t\t\t}\n\t\t\t//Middle Front Opposite OR FURTHER MIDDLE\n\t\t\telse if((y == world.ty(pLoc.y) && x == world.tx(pLoc.x + 1)) || \n\t\t\t\t\t(y == world.ty(pLoc.y) && x == world.tx(pLoc.x + 2))){\n\t\t\t\ty = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x - 1);\n\t\t\t\tsideY2 = world.ty(pLoc.y + 1);\n\t\t\t}\n\t\t\t\n\t\t\t//Right Front or TWO FURTHER RIGHT VISIONS\n\t\t\telse if((y == world.ty(pLoc.y + 1) && x == world.tx(pLoc.x + 1)) ||\n\t\t\t\t\t(y == world.ty(pLoc.y + 1) && x == world.tx(pLoc.x + 2)) ||\n\t\t\t\t\t(y == world.ty(pLoc.y + 2) && x == world.tx(pLoc.x + 2))){\n\t\t\t\tx = world.tx(pLoc.x + 1);\n\t\t\t\ty = world.ty(pLoc.y - 1);\n\t\t\t\t\n\t\t\t\tsideX1 = world.tx(pLoc.x + 1);\n\t\t\t\tsideY1 = world.ty(pLoc.y);\n\t\t\t\t\n\t\t\t\tsideX2 = world.tx(pLoc.x);\n\t\t\t\tsideY2 = world.ty(pLoc.y - 1);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t}\n\t\t}// end of West\n\t\treturn new Int2D(x, y);\n\t\t\n\t}",
"private int getRelativeRow() {\n\t\treturn direction == OUT ? -row : row;\n\t}",
"public double direction(){\n return Math.atan2(this.y, this.x);\n }",
"@Override\n public Location getOrigin() {\n return getOwner().getLocation();\n }",
"public Point getEndPoint(){\r\n\t\treturn new Point( this.x, this.y, this.z );\r\n\t}",
"public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }",
"public Position2D getPreviousPosition()\n {\n return previousPosition;\n }",
"public static String getRelativePosition(double nextUserOrientDel){\n\t\tString direction = \"\";\n\t\tif (nextUserOrientDel > 0 && nextUserOrientDel < 20) {\n\t\t\tdirection = \"in front\"; //on the right\n\t\t} else if (nextUserOrientDel >= 20 && nextUserOrientDel < 60) {\n\t\t\tdirection = \"before right\";\n\t\t} else if (nextUserOrientDel >= 60 && nextUserOrientDel < 120) {\n\t\t\tdirection = \"alongside right\";\n\t\t} else if (nextUserOrientDel >= 120 && nextUserOrientDel < 160) {\n\t\t\tdirection = \"behind right\";\n\t\t} else if (nextUserOrientDel >= 160 && nextUserOrientDel <= 180){ \n\t\t\tdirection = \"behind\";\n\t\t} else if (nextUserOrientDel < 0 && nextUserOrientDel > -20) {\n\t\t\tdirection = \"in front\"; //on the left\n\t\t} else if (nextUserOrientDel <= -20 && nextUserOrientDel > -60) {\n\t\t\tdirection = \"before left\";\n\t\t} else if (nextUserOrientDel <= -60 && nextUserOrientDel > -120) {\n\t\t\tdirection = \"alongside left\";\n\t\t} else if (nextUserOrientDel <= -120 && nextUserOrientDel > -160) {\n\t\t\tdirection = \"behind left\";\n\t\t} else if (nextUserOrientDel <= -160 && nextUserOrientDel >= -180){ \n\t\t\tdirection = \"behind\";\n\t\t} \t\t\t\t\t\n\t\treturn direction;\n\t}",
"private Point findBottomRightCornerPoint() {\n return new Point(origin.getX() + width, origin.getY());\n }",
"private Location[] overrunsTop () {\n Location nextLocation;\n Location nextCenter;\n \n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(getX(), 0);\n nextCenter = new Location(getX(), myCanvasBounds.getHeight());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = FULL_TURN_DEGREES - getHeading();\n if (getHeading() < THREE_QUARTER_TURN_DEGREES) {\n angle = -(getHeading() - HALF_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(getX() + getY() / Math.tan(angle), 0);\n nextCenter = new Location(getX() + getY() / Math.tan(angle),\n myCanvasBounds.getHeight());\n \n // eliminates race condition - if next location overruns left/right AND top/bottom it checks\n // to see which is overrun first and corrects\n if (nextLocation.getX() > myCanvasBounds.getWidth())\n // right\n return overrunRight();\n else if (nextLocation.getX() < 0) // left\n return overrunLeft();\n \n return new Location[] { nextLocation, nextCenter };\n }",
"private Point getUpper() {\n int upperX;\n int upperY;\n upperY = (int) (gameCanvas.getHeight() + mapOffsetY * 2);\n upperX = (int) (gameCanvas.getWidth() + mapOffsetX * 2);\n return new Point(upperX, upperY);\n }",
"@Override\n\tpublic double getMyRidingOffset() {\n\t\treturn -0.6D;\n\t}",
"public Direction getOppositeDirection() {\n\t\treturn opposite;\n\t}",
"@Override\r\n default Vector3 getOrigin() {\r\n return Vector3.fromXYZ(getOrgX(), getOrgY(), getOrgZ());\r\n }",
"public void reverseDirection(Position ep) throws InvalidPositionException;",
"public int getAbsoluteY() {\r\n return getAbsoluteTop() - getParent().getAbsoluteTop();\r\n }",
"public FPointType calculateUpperLeft() {\n fRectBound = getBounds2D();\n FPointType fptUpperLeft = new FPointType(fRectBound.x, fRectBound.y);\n calculate(fptUpperLeft);\n \n rotateRadian = 0.0f;\n \n return fptUpperLeft;\n }",
"public Point getUpperPoint() {\n return upper;\n }",
"public static Vector2 GetUp(){\n return new Vector2(0, -1);\n }",
"private Position adjacentPosition(Direction direction, GameObject gameObject) {\n\n switch (direction) {\n case UP:\n return new Position(gameObject.getPosition().getCol(), gameObject.getPosition().getRow() - 1);\n case DOWN:\n return new Position(gameObject.getPosition().getCol(), gameObject.getPosition().getRow() + 1);\n case LEFT:\n return new Position(gameObject.getPosition().getCol() - 1, gameObject.getPosition().getRow());\n case RIGHT:\n return new Position(gameObject.getPosition().getCol() + 1, gameObject.getPosition().getRow());\n default:\n System.out.println(\"something very bad happened!\");\n return null;\n }\n }",
"public Direction reverse()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 2));\n }",
"private Vector3f calculateVectorDirectionBetweenEyeAndCenter() {\n\t\tVector3f br = new Vector3f();\n\n\t\tbr.x = player.getPosition().x - camera.getPosition().x;\n\t\tbr.y = player.getPosition().y - camera.getPosition().y;\n\t\tbr.z = player.getPosition().z - camera.getPosition().z;\n\n\t\treturn br;\n\t}",
"@objid (\"e10bb26d-c5e7-4f7e-b4cb-8c5551328d52\")\n LinkEnd getOpposite();",
"public void unFollowing() {\n\t\tdouble newTargetX, newTargetY, xValue, yValue;\n\t\tdouble slope = (kin.target.y - kin.position.y) / (kin.target.x - kin.position.x);\n\t\t\n\t\t// off to the left of the screen\n\t\tif (kin.position.x < kin.target.x) {\n\t\t\tnewTargetY = (MainPanel.PWIDTH + img.getWidth() - kin.target.x) * slope + kin.target.y;\n\t\t\txValue = MainPanel.PWIDTH + img.getWidth();\n\t\t} else { // off the right of the screen\n\t\t\tnewTargetY = (-kin.target.x - img.getWidth()) * slope + kin.target.y;;\n\t\t\txValue = -img.getWidth();\n\t\t}\n\t\t\n\t\t// off to the top of the screen\n\t\tif (kin.position.y < kin.target.y) {\n\t\t\tnewTargetX = (MainPanel.PHEIGHT + img.getHeight() - kin.target.y) / slope + kin.target.x;\n\t\t\tyValue = MainPanel.PHEIGHT + img.getHeight();\n\t\t} else { // off the bottom of the screen\n\t\t\tnewTargetX = (-kin.target.y - img.getHeight()) / slope + kin.target.x;\n\t\t\tyValue = -img.getHeight();\n\t\t}\n\t\t\n\t\t// compare distances and use the minimum as target\n\t\tif (getDistance(kin.position.x, kin.position.y, xValue, newTargetY) < getDistance(kin.position.x, kin.position.y, newTargetX, yValue)) {\n\t\t\tkin.target = new Vector2d(xValue, newTargetY);\n\t\t} else {\n\t\t\tkin.target = new Vector2d(newTargetX, yValue);\n\t\t} // end else\n\t}",
"Point subtract(Point otherPoint) {\n\t\treturn(new Point(x-otherPoint.x,y-otherPoint.y));\n\t}",
"public Location north()\r\n {\r\n\r\n return new Location(x, y - 1);\r\n }",
"public final int getCursorAbsoluteY() {\n return getAbsoluteY() + cursorY;\n }",
"public double getY() {\n return origin.getY();\n }",
"public int getFinalFacing() {\n MoveStep last = getLastStep();\n if (last != null) {\n return last.getFacing();\n }\n return getEntity().getFacing();\n }",
"protected boolean getMustReverseCoordinates(int faceId, int prevEdgeId, int curEdgeId,\n VPFPrimitiveData.PrimitiveInfo[] edgeInfo)\n {\n\n Orientation o = this.getOrientation(faceId, curEdgeId, edgeInfo);\n if (o == null)\n {\n return false;\n }\n\n switch (o)\n {\n case LEFT:\n return true;\n case RIGHT:\n return false;\n case LEFT_AND_RIGHT:\n return (prevEdgeId > 0) && this.auxiliaryMustReverseCoordinates(prevEdgeId, curEdgeId, edgeInfo);\n default:\n return false;\n }\n }",
"public Vector2 Origin() {\r\n return new Vector2(Animation().FrameWidth() / 2.0f, Animation().FrameHeight());\r\n }",
"public V getOriginator() {\r\n\r\n\t\tV result = null;\r\n\t\tif ((counter <= links.size()) && (counter > 0)) {\r\n\t\t\tresult = predNodes.get(counter - 1);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"@Override\n public MPPointF getOffset() {\n return new MPPointF(-(getWidth() / 2.0f), -getHeight() - (getHeight() / 4.0f));\n }",
"public interface Direction {\n /**\n * @param pos The position to apply the function to\n * @return A new position that was transformed from the passed in position\n */\n public Position apply(Position pos);\n \n /**\n * @return The opposite direction to the direction instance it was called on\n */\n public Direction getOpposite();\n}",
"public int getMouthPosition()\n {\n return (mouthPosition);\n }",
"public int getStoppingPos ()\r\n {\r\n if ((getThickness() >= 2) && !getLine()\r\n .isVertical()) {\r\n return getLine()\r\n .yAt(getStop());\r\n } else {\r\n return getFirstPos() + (getThickness() / 2);\r\n }\r\n }",
"public Place follow() {\n\t\t// Confirm this works...\n\t\tif (this.locked == false)\t\t\t\n\t\t\treturn to;\n\t\t// Locked, return original\n\t\t//System.out.println(\"\\nThat direction is locked. Find the key and use it!\");\n\t\tNetwork.netPrintln(\"\\nThat direction is locked. Find the key and use it!\");\n\t\treturn from;\n\t}",
"public void\nshiftToOrigin()\n{\n\tthis.setLine(0.0, 0.0,\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n}",
"public Point getdownLeft() {\n Point downLeft = new Point(this.upperLeft.getX(), this.upperLeft.getY() + this.getHeight());\n return downLeft;\n }",
"@java.lang.Override\n public godot.wire.Wire.Vector2 getOrigin() {\n return origin_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : origin_;\n }",
"public Integer checkUp()\r\n\t{\r\n\t\treturn this.Y - 1;\r\n\t}",
"public double getDirectionFace();",
"public Location up() {\n return new Location(row - 1, column);\n }",
"public Direction getDirect() {\n \tif(xMoving && yMoving){\n \t\tif(right && down)\n \t\t\tdir = Direction.SOUTHEAST;\n \t\telse if(right && !down)\n \t\t\tdir = Direction.NORTHEAST;\n \t\telse if(!right && down)\n \t\t\tdir = Direction.SOUTHWEST;\n \t\telse\n \t\t\tdir = Direction.NORTHWEST;\n \t}\n \telse if(xMoving){\n \t\tdir = right ? Direction.EAST : Direction.WEST;\n \t}\n \telse if(yMoving){\n \t\tdir = down ? Direction.SOUTH : Direction.NORTH;\n \t}\n \treturn dir;\n }",
"public boolean hasOriginp() {\n return fieldSetFlags()[2];\n }",
"private void remove_opposite_end(Line workingSet, boolean direction) {\n\t\tif (direction == LEFT) {\n\t\t\t// Erase the end of the working set\n\t\t\tworkingSet.getAllPoints().remove(\n\t\t\t\t\tworkingSet.getAllPoints().size() - 1);\n\t\t} else {\n\t\t\t// Erase the beginning of the working set\n\t\t\tworkingSet.getAllPoints().remove(0);\n\t\t}\n\t\tworkingSet.setNum_points(workingSet.getNum_points() - 1);\n\t}",
"public Location getOrigin() {\n return mOrigin;\n }",
"public static Direction getDirection(Tile origin, Tile target) {\n\t\tint x1 = origin.getX();\n\t\tint y1 = origin.getY();\n\t\tint x2 = target.getX();\n\t\tint y2 = target.getY();\n\t\tint dx = x2 - x1;\n\t\tint dy = y2 - y1;\n\n\t\t// cardinal directions\n\t\tif (dx == 0)\n\t\t\tif (y1 < y2)\n\t\t\t\treturn Direction.East;\n\t\t\telse if (y1 > y2)\n\t\t\t\treturn Direction.West;\n\t\tif (dy == 0) {\n\t\t\tif (x1 < x2)\n\t\t\t\treturn Direction.South;\n\t\t\telse if (x1 > x2)\n\t\t\t\treturn Direction.North;\n\t\t}\n\n\t\t// ordinal directions\n\t\tif (dx == dy || dx == -dy) {\n\t\t\tif (x1 < x2)\n\t\t\t\tif (y1 < y2)\n\t\t\t\t\treturn Direction.SouthEast;\n\t\t\t\telse if (y1 > y2)\n\t\t\t\t\treturn Direction.SouthWest;\n\t\t\tif (x1 > x2)\n\t\t\t\tif (y1 < y2)\n\t\t\t\t\treturn Direction.NorthEast;\n\t\t\t\telse if (y1 > y2)\n\t\t\t\t\treturn Direction.NorthWest;\n\t\t}\n\n\t\treturn null;\n\t}",
"double direction (IPoint other);",
"private Point findTrailingPt() {\n\t\tPoint farthestPt = new Point(getDisplayXs()[0], getDisplayYs()[0]);\n\t\tfor (int i = 0; i < getDisplayXs().length; i++) {\n\t\t\tPoint nextPt = new Point(getDisplayXs()[i], getDisplayYs()[i]);\n\t\t\tPoint centerOfMass = Controller.flowArrow.findCenterOfMass();\n\t\t\tif (farthestPt.distance(centerOfMass) < nextPt.distance(centerOfMass)) {\n\t\t\t\tfarthestPt = nextPt; // update fartestPt\n\t\t\t}\n\t\t}\n\t\treturn farthestPt;\n\t}",
"public Bearing rightFrom() {\n return this.get(((this.bearing + 2) + 8) % 8);\n }",
"public Integer getOrigin() {\n\t\treturn new Integer(origin);\n\t}"
] | [
"0.65016925",
"0.61583245",
"0.605383",
"0.5971444",
"0.5953596",
"0.5949916",
"0.5891457",
"0.58137137",
"0.5752215",
"0.56945986",
"0.5687966",
"0.56854486",
"0.5676191",
"0.5663141",
"0.5645689",
"0.56434155",
"0.5633274",
"0.5600874",
"0.5578281",
"0.557383",
"0.55516064",
"0.55439067",
"0.5534077",
"0.5515225",
"0.54998165",
"0.5496318",
"0.5494168",
"0.5489003",
"0.54772097",
"0.5465678",
"0.5450708",
"0.5444736",
"0.5437575",
"0.5429656",
"0.54105914",
"0.54047984",
"0.54001206",
"0.53943616",
"0.53943616",
"0.5378032",
"0.5336537",
"0.5334297",
"0.5334135",
"0.531187",
"0.5311756",
"0.52947724",
"0.5293124",
"0.52881",
"0.5285437",
"0.5283219",
"0.52698547",
"0.5258296",
"0.5240585",
"0.5234301",
"0.52336144",
"0.5233016",
"0.5213399",
"0.5213047",
"0.52107584",
"0.52102876",
"0.5205869",
"0.5204084",
"0.5203387",
"0.5200411",
"0.51840764",
"0.5167617",
"0.5154097",
"0.5151794",
"0.515119",
"0.51489615",
"0.51413524",
"0.51405877",
"0.5139148",
"0.5135311",
"0.5133117",
"0.51236063",
"0.5122605",
"0.511989",
"0.51179624",
"0.5116536",
"0.5114437",
"0.5112422",
"0.5111919",
"0.5111135",
"0.5107908",
"0.51046604",
"0.5096698",
"0.5093724",
"0.5093281",
"0.5091041",
"0.5085579",
"0.5084338",
"0.50840664",
"0.50811696",
"0.5079785",
"0.5078081",
"0.5075418",
"0.50744176",
"0.5067854",
"0.50664264"
] | 0.6291652 | 1 |
gets the 4 adjacent gridpieces to a gridpiece if they exist | private ArrayList<GridPiece> getDirectNeighbors(GridPiece piece) {
neighbors.clear();
//Top
if (game.gridMap.size() > piece.row + 1) {
neighbors.add(game.gridMap.get(piece.row + 1).get(piece.column));
}
//Bottom
if (piece.row > 0) {
neighbors.add(game.gridMap.get(piece.row - 1).get(piece.column));
}
//Right
if (game.gridMap.get(0).size() > piece.column + 1) {
neighbors.add(game.gridMap.get(piece.row).get(piece.column + 1));
}
//Left
if (piece.column > 0) {
neighbors.add(game.gridMap.get(piece.row).get(piece.column - 1));
}
return neighbors;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"pieces getPiece(int position)\n {\n int j ;\n if(position == whiteHorse1.position && whiteHorse1.alive == true ) return whiteHorse1;\n if(position == whiteHorse2.position && whiteHorse2.alive == true) return whiteHorse2;\n if(position == whiteQueen.position && whiteQueen.alive == true ) return whiteQueen;\n if(position == whiteKing.position && whiteKing.alive == true) return whiteKing;\n if(position == whiteCastle1.position && whiteCastle1.alive == true ) return whiteCastle1;\n if(position == whiteCastle2.position && whiteCastle2.alive == true) return whiteCastle2;\n if(position == whiteBishop1.position && whiteBishop1.alive == true) return whiteBishop1;\n if(position == whiteBishop2.position && whiteBishop2.alive == true) return whiteBishop2;\n j=0;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];j++;\n if(position == whitePawn[j].position && whitePawn[j].alive == true) return whitePawn[j];\n \n \n \n if(position == blackHorse1.position && blackHorse1.alive == true ) return blackHorse1;\n if(position == blackHorse2.position && blackHorse2.alive == true) return blackHorse2;\n if(position == blackQueen.position && blackQueen.alive == true ) return blackQueen;\n if(position == blackKing.position && blackKing.alive == true) return blackKing;\n if(position == blackCastle1.position && blackCastle1.alive == true ) return blackCastle1;\n if(position == blackCastle2.position && blackCastle2.alive == true) return blackCastle2;\n if(position == blackBishop1.position && blackBishop1.alive == true) return blackBishop1;\n if(position == blackBishop2.position && blackBishop2.alive == true) return blackBishop2;\n j=0;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];j++;\n if(position == blackPawn[j].position && blackPawn[j].alive == true) return blackPawn[j];\n\n else return null;\n }",
"public void splitBoard(Posn start, int currRows, int currCols) {\n int startRow = start.x;\n int startCol = start.y;\n if (currRows != 1 && currCols != 1) {\n // top left piece\n this.board.get(startCol).get(startRow).down = true; \n\n // top right piece\n this.board.get(startCol + currCols - 1).get(startRow).down = true; \n\n // bottom left right\n this.board.get(startCol).get(startRow + currRows - 1).right = true; \n this.board.get(startCol).get(startRow + currRows - 1).up = true; // bottom left up\n\n // bottom, right, left\n this.board.get(startCol + currCols - 1).get(startRow + currRows - 1).left = true; \n // bottom, right, up\n this.board.get(startCol + currCols - 1).get(startRow + currRows - 1).up = true; \n\n // connect middle pieces on both sides of subgrid\n for (int i = startRow + 1; i < startRow + currRows - 1; i++) { \n this.board.get(startCol).get(i).up = true;\n this.board.get(startCol).get(i).down = true;\n this.board.get(startCol + currCols - 1).get(i).up = true;\n this.board.get(startCol + currCols - 1).get(i).down = true;\n }\n // connect middle pieces on bottom of subgrid\n for (int i = startCol + 1; i < startCol + currCols - 1; i++) { \n this.board.get(i).get(startRow + currRows - 1).left = true;\n this.board.get(i).get(startRow + currRows - 1).right = true;\n }\n }\n\n // grid base cases\n if (this.height == 1) {\n for (ArrayList<GamePiece> p : this.board) {\n if (p.get(0).row == 0) {\n p.get(0).right = true;\n }\n else if (p.get(0).row == this.width - 1) {\n p.get(0).left = true;\n }\n else {\n p.get(0).right = true;\n p.get(0).left = true;\n }\n }\n }\n else if (this.width == 1) {\n for (GamePiece p : this.board.get(0)) {\n if (p.col == 0) {\n p.down = true;\n }\n else if (p.col == this.height - 1) {\n p.up = true;\n }\n else {\n p.down = true;\n p.up = true;\n }\n }\n }\n else if (currRows == 2) {\n for (int i = startCol + 1; i < startCol + currCols - 1; i++) {\n this.board.get(i).get(startRow).down = true;\n this.board.get(i).get(startRow + 1).up = true;\n }\n }\n else if (currRows == 3 && currCols == 3) { // base case for odd grid\n this.board.get(startCol).get(startRow + 1).right = true;\n this.board.get(startCol + 1).get(startRow + 1).left = true;\n this.board.get(startCol + 1).get(startRow + 1).up = true;\n this.board.get(startCol + 1).get(startRow).down = true;\n\n }\n // recur if the grid can be divided into 4 non-overlapping quadrants\n else if (currRows > 3 || currCols > 3) { \n this.splitBoard(new Posn(startRow, startCol), (int) Math.ceil(currRows / 2.0),\n (int) Math.ceil(currCols / 2.0));\n this.splitBoard(new Posn(startRow + (int) Math.ceil(currRows / 2.0), startCol), currRows / 2,\n (int) Math.ceil(currCols / 2.0));\n this.splitBoard(new Posn(startRow + (int) Math.ceil(currRows / 2.0),\n startCol + (int) Math.ceil(currCols / 2.0)), currRows / 2, currCols / 2);\n this.splitBoard(new Posn(startRow, startCol + (int) Math.ceil(currCols / 2.0)),\n (int) Math.ceil(currRows / 2.0), currCols / 2);\n }\n }",
"@Override\r\n public void getRange(ArrayList<Piece> pieces){\r\n this.range.clear();\r\n int pieceX = this.getX(); int pieceY = this.getY(); // X and Y coordinates for the king piece\r\n\r\n // getPiece: 0 = empty; 1 = same color; 2 = opposite color\r\n //Up\r\n if (this.getPiece(pieceX, pieceY+1, pieces) == 0 || this.getPiece(pieceX, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Up-right\r\n if (this.getPiece(pieceX+1, pieceY+1, pieces) == 0 || this.getPiece(pieceX+1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Right\r\n if (this.getPiece(pieceX+1, pieceY, pieces) == 0 || this.getPiece(pieceX+1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Down-right\r\n if (this.getPiece(pieceX+1, pieceY-1, pieces) == 0 || this.getPiece(pieceX+1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down\r\n if (this.getPiece(pieceX, pieceY-1, pieces) == 0 || this.getPiece(pieceX, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down-left\r\n if (this.getPiece(pieceX-1, pieceY-1, pieces) == 0 || this.getPiece(pieceX-1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Left\r\n if (this.getPiece(pieceX-1, pieceY, pieces) == 0 || this.getPiece(pieceX-1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Up-left\r\n if (this.getPiece(pieceX-1, pieceY+1, pieces) == 0 || this.getPiece(pieceX-1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Castling\r\n for (Piece piece : pieces) {\r\n if (piece instanceof Rook) {\r\n if (piece.getColor() == this.getColor()) {\r\n if (validCastling(pieces, (Rook)piece)) {\r\n int targetX = (piece.getX() < getX()) ? (this.getX() - 2) : (this.getX() + 2);\r\n this.range.add(new int[] {targetX, this.getY()});\r\n }\r\n }\r\n }\r\n }\r\n }",
"protected void kingPieces() {\n Row firstRowRed = redBoard.getLastRow();\n Row firstRowWhite = whiteBoard.getLastRow();\n\n for (Space space : firstRowRed) {\n Piece piece = space.getPiece();\n if (piece != null)\n if (piece.getColor() == Piece.COLOR.WHITE) {\n if (piece.getType() == Piece.TYPE.SINGLE) {\n redBoard.kingPiece(firstRowRed.getIndex(), space.getCellIdx());\n whiteBoard.kingPiece(7 - firstRowRed.getIndex(), 7 - space.getCellIdx());\n }\n }\n }\n for (Space space : firstRowWhite) {\n Piece piece = space.getPiece();\n if (piece != null)\n if (piece.getColor() == Piece.COLOR.RED) {\n if (piece.getType() == Piece.TYPE.SINGLE) {\n redBoard.kingPiece(7 - firstRowWhite.getIndex(), 7 - space.getCellIdx());\n whiteBoard.kingPiece(firstRowWhite.getIndex(), space.getCellIdx());\n }\n }\n }\n }",
"public ArrayList<Coordinate> getPossibleMoveCoordinate() {\n ChessBoard board = this.getChessBoard(); // get chess board\n ArrayList<Coordinate> coords = new ArrayList<Coordinate>(); // create return ArrayList\n int x, y;\n /*\n several cases\n 2 3\n 1 4\n\n 5 8\n 6 7\n\n */\n // case1\n x = this.x_coordinate - 2;\n y = this.y_coordinate + 1;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case2\n x = this.x_coordinate - 1;\n y = this.y_coordinate + 2;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case3\n x = this.x_coordinate + 1;\n y = this.y_coordinate + 2;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case4\n x = this.x_coordinate + 2;\n y = this.y_coordinate + 1;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case5\n x = this.x_coordinate - 2;\n y = this.y_coordinate - 1;\n if(x >= 0 && y >= 0 ){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case6\n x = this.x_coordinate - 1;\n y = this.y_coordinate - 2;\n if(x >= 0 && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case7\n x = this.x_coordinate + 1;\n y = this.y_coordinate - 2;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case1\n x = this.x_coordinate + 2;\n y = this.y_coordinate - 1;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n\n\n return coords;\n }",
"private ArrayList<GameSquare> getAdjacentSquares()\n {\n ArrayList<GameSquare> list = new ArrayList<GameSquare>();\n for (int r = row - 1; r <= row + 1; r++)\n {\n if (r >= 0 && r < grid.length)\n {\n for (int c = col - 1; c <= col + 1; c++)\n {\n if (c >= 0 && c < grid[0].length)\n {\n list.add(grid[r][c]);\n }\n }\n }\n }\n return list;\n }",
"public void next(){\n\t\tboolean[][] newBoard = new boolean[rows][columns]; //create a temporary board, same size as real game board\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tnewBoard[i][j] = false; //set all to false\n\t\t\t}\n\t\t}\n\t\tint cellCounter = 0;\n\t\tfor (int i = (rows - 1); i >= 0; i--) {\n\t\t\tfor (int j = (columns - 1); j >= 0; j--) { //iterate through the game board\n\t\t\t\tfor (int k = (i - 1); k < (i + 2); k++) {\n\t\t\t\t\tfor (int m = (j - 1); m < (j + 2); m++) {//iterate around the testable element\n\t\t\t\t\t\tif (!(k == i && m == j)) {\n\t\t\t\t\t\t\tif (!((k < 0 || k > (rows - 1)) || (m < 0 || m > (columns - 1)))) { //if not out of bounds and not the original point\n\t\t\t\t\t\t\t\tif (theGrid[k][m]) {\n\t\t\t\t\t\t\t\t\tcellCounter++; //if a cell is alive at the surrounding point, increase the counter\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (cellCounter == 3 || cellCounter == 2 && theGrid[i][j]) { //if meets the criteria\n\t\t\t\t\tnewBoard[i][j] = true; //create on new board\n\t\t\t\t}\n\t\t\t\tcellCounter = 0; //reset cell counter\n\t\t\t}\n\t\t}\n\t\t//transpose onto new grid\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tif(newBoard[i][j]){ //read temp board, set temp board data on real game board\n\t\t\t\t\ttheGrid[i][j] = true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttheGrid[i][j] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void isFour(String clue, int local, int clueNum)\r\n {\r\n //If top (1) or bottom (3) input\r\n if(local == 1 || local == 3)\r\n {\r\n //Repeat for size of grid\r\n for(int k=0; k<GRID; k++)\r\n {\r\n //If spot in grid is equal to four\r\n if(clue.charAt(k) == '4')\r\n {\r\n //If clue is for top\r\n if(local == 1)\r\n {\r\n int num = 1;\r\n //Fills in all of the boxes bellow in assending order\r\n for(int d=0; d<GRID; d++)\r\n { \r\n puzzle[d][k] = num;\r\n num++;\r\n } \r\n }\r\n //If clue is for bottom\r\n if (local == 3)\r\n {\r\n int num = 4;\r\n //Fills in all of the boxes bellow in assending order\r\n for(int d=0; d<GRID; d++)\r\n { \r\n puzzle[d][k] = num;\r\n num--;\r\n } \r\n }\r\n }\r\n }\r\n }\r\n else if (local == 2)\r\n {\r\n \r\n if(clue.charAt(0) == '4')\r\n {\r\n int num = 1;\r\n //Fills in all of the boxes bellow in assending order\r\n for(int d=0; d<GRID; d++)\r\n { \r\n puzzle[clueNum][d] = num;\r\n num++;\r\n } \r\n }\r\n if(clue.charAt(1) == '4')\r\n {\r\n int num = 4;\r\n for(int d=0; d<GRID; d++)\r\n {\r\n puzzle[clueNum][d] = num;\r\n num--;\r\n }\r\n } \r\n }\r\n }",
"private void placePieces(List<Piece> pieces) {\r\n pieces.forEach(\r\n piece -> {\r\n grid[piece.getPosition()] = piece;\r\n // if key doesn't exist create new with array containing piece\r\n // if it does exist add piece to existing array\r\n this.pieces.merge(\r\n piece.getPlayerColor(),\r\n new ArrayList<>(Collections.singletonList(piece)),\r\n (o, n) -> {\r\n o.add(piece);\r\n return o;\r\n });\r\n });\r\n }",
"List<Tile> getAdjacentTiles();",
"Piece getNextPiece();",
"Piece getPieceAt(int col, int row);",
"public void createPieces(){ \n\t\tfor(int x = 0; x<BOARD_LENGTH; x++){\n\t\t\tfor(int y = 0; y<BOARD_LENGTH; y++){ \n\t\t\t\tif(CHESS_MAP[x][y] != (null)){\n\t\t\t\t\tswitch (CHESS_MAP[x][y]){\n\t\t\t\t\tcase KING:\n\t\t\t\t\t\tpieces[pieceCounter] = new King(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase QUEEN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Queen(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BISHOP:\n\t\t\t\t\t\tpieces[pieceCounter] = new Bishop(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase KNIGHT:\n\t\t\t\t\t\tpieces[pieceCounter] = new Knight(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PAWN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Pawn(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ROOK:\n\t\t\t\t\t\tpieces[pieceCounter] = new Rook(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tsetPieceIconAndName(x, y, CHESS_MAP[x][y]); \t\n\t\t\t\t\tpieceCounter++;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}",
"public int[][] getMovesRook(Piece p) {\n x = p.getX();\n y = p.getY();\n int legalMoves[][] = new int[8][8];\n\n for (int i = x + 1; i < 8; i++) {//Traversing from piece coords, right till end of board.\n if (b.getPieceAt(y, i) != null) {\n if (p.isWhite() == b.getPieceAt(y, i).isWhite()) {\n break;\n } else {\n legalMoves[y][i] = 1;\n break;\n }\n } else {\n legalMoves[y][i] = 1;\n }\n }\n for (int i = x - 1; i > -1; i--) {//Traversing from piece coords, left till end of board.\n if (b.getPieceAt((y), i) != null) {\n if (p.isWhite() == b.getPieceAt((y), i).isWhite()) {\n break;\n } else {\n legalMoves[(y)][i] = 1;\n break;\n }\n } else {\n legalMoves[y][i] = 1;\n }\n }\n for (int i = y - 1; i > -1; i--) { //Traversing from piece coords, downwards till end of board.\n if (b.getPieceAt((i), x) != null) {\n if (p.isWhite() == b.getPieceAt(i, x).isWhite()) {\n break;\n } else {\n legalMoves[i][x] = 1;\n break;\n }\n } else {\n legalMoves[i][x] = 1;\n }\n }\n for (int i = y + 1; i < 8; i++) { //Traversing from piece coords, upwards till end of board.\n if (b.getPieceAt((i), x) != null) {\n if (p.isWhite() == b.getPieceAt(i, x).isWhite()) {\n break;\n } else {\n legalMoves[i][x] = 1;\n break;\n }\n } else {\n legalMoves[i][x] = 1;\n }\n }\n return legalMoves;\n }",
"public List<Piece> inCheck(int kingX, int kingY){ // returns list of attacking pieces.\n // Also have to look for opponent king to avoid moving into check.\n // In this case only care whether or not a check occurs, not how many so breaks still ok\n // for regular check tests, want to know if 1 or 2 checks, cannot have multiple diagonal checks.\n List<Piece> attackers = new ArrayList<>();\n // knights\n int knight = turn == WHITE ? BLACK_KNIGHT : WHITE_KNIGHT;\n knightSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (kingX + dx >= 0 && kingX + dx < 8 && kingY + dy >= 0 && kingY + dy < 8){\n if (board[kingY+dy][kingX+dx] == knight){\n attackers.add(new Piece(knight, kingX+dx, kingY+dy));\n break knightSearch; // can only be checked by 1 knight at a time\n }\n }\n if (kingX + dy >= 0 && kingX + dy < 8 && kingY + dx >= 0 && kingY + dx < 8){\n if (board[kingY+dx][kingX+dy] == knight){\n attackers.add(new Piece(knight, kingX+dy, kingY+dx));\n break knightSearch;\n }\n }\n }\n }\n // bishop/queen/pawn/king\n int pawn = turn == WHITE ? BLACK_PAWN : WHITE_PAWN;\n int bish = turn == WHITE ? BLACK_BISHOP : WHITE_BISHOP;\n int queen = turn == WHITE ? BLACK_QUEEN : WHITE_QUEEN;\n int king = turn == WHITE ? BLACK_KING : WHITE_KING;\n diagSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (kingX + dx*i >= 0 && kingX + dx*i < 8 && kingY + dy*i >= 0 && kingY + dy*i < 8){\n int piece = board[kingY + dy*i][kingX + dx*i];\n if (piece != 0){\n if (piece == bish || piece == queen || (piece == pawn && i == 1 && dy == turn)\n || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX+dx*i, kingY+dy*i));\n break diagSearch;\n }\n break;\n }\n i++;\n }\n }\n }\n // rook/queen/king\n int rook = turn == WHITE ? BLACK_ROOK : WHITE_ROOK;\n straightSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n int i = 1;\n while (kingX + i*dx >= 0 && kingX + i*dx < 8){\n int piece = board[kingY][kingX + dx*i];\n if (piece != 0){\n if (piece == rook || piece == queen || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX+dx*i, kingY));\n break straightSearch;\n }\n break;\n }\n i++;\n }\n i = 1;\n while (kingY + i*dx >= 0 && kingY + i*dx < 8){\n int piece = board[kingY+dx*i][kingX];\n if (piece != 0){\n if (piece == rook || piece == queen || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX, kingY+dx*i));\n break straightSearch;\n }\n break;\n }\n i++;\n }\n }\n return attackers;\n }",
"public List<Grid> getPossibleMoves(Grid g){\n\t\tint i=g.row, j=g.col;\n\t\tif(i>=0 && i<data.length && j>=0 && j<data[i].length){\n\t\t\tList<Grid> list=new ArrayList<>();\n\t\t\tif(isFree(i, j-1)) list.add(new Grid(i,j-1));\n\t\t\tif(isFree(i-1, j-1)) list.add(new Grid(i-1,j-1));\n\t\t\tif(isFree(i-1, j)) list.add(new Grid(i-1,j));\n\t\t\tif(isFree(i-1, j+1)) list.add(new Grid(i-1,j+1));\n\t\t\tif(isFree(i, j+1)) list.add(new Grid(i,j+1));\n\t\t\tif(isFree(i+1, j+1)) list.add(new Grid(i+1,j+1));\n\t\t\tif(isFree(i+1, j)) list.add(new Grid(i+1,j));\n\t\t\tif(isFree(i+1, j-1)) list.add(new Grid(i+1,j-1));\n\t\t\treturn list;\n\t\t}\n\t\treturn null;\n\t}",
"public Puzzle exPuzzle() {\n List<Tile> tiles = new ArrayList<>(9);\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.C, Half.x), new Pic(Pattern.C, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y), new Pic(Pattern.C, Half.y)));\n return new Puzzle(tiles);\n }",
"public int move_diagonally(Square[][] squares, int [] move, Boolean turn) {\n\n /* going down and right = f4 h2 [4,5,6,7] */\n if (move[2] > move[0] && move[3] > move[1]) {\n ////System.out.println(\"Down right\");\n int x = move[0];\n int y = move[1];\n x++;\n y++;\n while (x < move[2] && y < move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x++;\n y++;\n }\n }\n /* going down and left */\n else if (move[2] > move[0] && move[3] < move[1]){\n ////System.out.println(\"Down Left\");\n int x = move[0];\n int y = move[1];\n x++;\n y--;\n while (x < move[2] && y > move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x++;\n y--;\n }\n }\n /* going up and left */\n else if (move[2] < move[0] && move[3] < move[1]){\n ////System.out.println(\"Up Left\");\n int x = move[0];\n int y = move[1];\n x--;\n y--;\n while (x > move[2] && y > move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x--;\n y--;\n }\n }\n /* going up and right c1 f4 [7,2,4,5] */\n else if (move[2] < move[0] && move[3] > move[1]){\n ////System.out.println(\"Up right\");\n int x = move[0];\n int y = move[1];\n x--;\n y++;\n while (x > move[2] && y < move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x--;\n y++;\n }\n }\n return 0;\n }",
"private ArrayList<GridPiece> getOpposite(GridPiece origin) {\n originOpposite.clear();\n\n //Check for corners\n if (origin.column == 0 && (origin.row == 0 || origin.row == game.gridSizeHeight - 1)) {\n originOpposite.add(falsePiece);\n return originOpposite;\n } else if (origin.column == game.gridSizeWidth - 1 && (origin.row == 0 || origin.row == game.gridSizeHeight - 1)) {\n originOpposite.add(falsePiece);\n return originOpposite;\n }\n\n if (originOpposite.size() > 0) {\n return originOpposite;\n }\n\n // Search Around\n\n boolean canCreateOp;\n\n // Search up\n if (game.gridMap.size() > origin.row + 1) {\n canCreateOp = false;\n\n for (int i = origin.row + 1; i < game.gridSizeHeight; i++) {\n if (game.gridMap.get(i).get(origin.column).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(i).get(origin.column).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(i).get(origin.column));\n break;\n }\n }\n\n\n // Search down\n }\n if (origin.row > 0) {\n canCreateOp = false;\n\n for (int i = origin.row - 1; i >= 0; i--) {\n if (game.gridMap.get(i).get(origin.column).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(i).get(origin.column).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(i).get(origin.column));\n break;\n }\n }\n\n\n // Search right\n }\n if (game.gridMap.get(0).size() > origin.column + 1) {\n canCreateOp = false;\n\n for (int i = origin.column + 1; i < game.gridSizeWidth; i++) {\n if (game.gridMap.get(origin.row).get(i).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(origin.row).get(i).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(origin.row).get(i));\n break;\n }\n }\n\n // Search left\n }\n if (origin.column > 0) {\n canCreateOp = false;\n\n for (int i = origin.column - 1; i >= 0; i--) {\n if (game.gridMap.get(origin.row).get(i).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(origin.row).get(i).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(origin.row).get(i));\n break;\n }\n }\n }\n\n noLine = true;\n\n if (originOpposite.size() == 0) {\n originOpposite.add(falsePiece);\n }\n\n return originOpposite;\n }",
"public int[][] getMovesKing(Piece p) {\n x = p.getX();\n y = p.getY();\n int legalMoves[][] = new int[8][8];\n\n //Sjekker alle åtte mulige trekk en konge har.\n if ((x + 1) < 8) {\n if (b.getPieceAt(y, (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt(y, (x + 1)).isWhite()) {\n legalMoves[y][(x + 1)] = 1;\n }\n } else {\n legalMoves[y][(x + 1)] = 1;\n }\n }\n\n if ((x + 1) < 8 && (y + 1) < 8) {\n if (b.getPieceAt((y + 1), (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y + 1), (x + 1)).isWhite()) {\n legalMoves[(y + 1)][(x + 1)] = 1;\n }\n } else {\n legalMoves[(y + 1)][(x + 1)] = 1;\n }\n }\n\n if ((x - 1) > -1 && (y - 1) > -1) {\n if (b.getPieceAt((y - 1), (x - 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y - 1), (x - 1)).isWhite()) {\n legalMoves[(y - 1)][(x - 1)] = 1;\n }\n } else {\n legalMoves[(y - 1)][(x - 1)] = 1;\n }\n }\n\n if ((x + 1) < 8 && (y - 1) > -1) {\n if (b.getPieceAt((y - 1), (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y - 1), (x + 1)).isWhite()) {\n legalMoves[(y - 1)][(x + 1)] = 1;\n }\n } else {\n legalMoves[(y - 1)][(x + 1)] = 1;\n }\n }\n\n if ((x - 1) > -1) {\n if (b.getPieceAt(y, (x - 1)) != null) {\n if (p.isWhite() != b.getPieceAt(y, (x - 1)).isWhite()) {\n legalMoves[y][(x - 1)] = 1;\n }\n } else {\n legalMoves[y][(x - 1)] = 1;\n }\n }\n\n if ((y - 1) > -1) {\n if (b.getPieceAt((y - 1), x) != null) {\n if (p.isWhite() != b.getPieceAt((y - 1), x).isWhite()) {\n legalMoves[(y - 1)][x] = 1;\n }\n } else {\n legalMoves[(y - 1)][x] = 1;\n }\n }\n\n if ((y + 1) < 8) {\n if (b.getPieceAt((y + 1), x) != null) {\n if (p.isWhite() != b.getPieceAt((y + 1), x).isWhite()) {\n legalMoves[(y + 1)][x] = 1;\n }\n } else {\n legalMoves[(y + 1)][x] = 1;\n }\n }\n\n if ((x - 1) > -1 && (y + 1) < 8) {\n if (b.getPieceAt((y + 1), (x - 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y + 1), (x - 1)).isWhite()) {\n legalMoves[(y + 1)][x - 1] = 1;\n\n }\n } else {\n legalMoves[(y + 1)][x - 1] = 1;\n }\n }\n //Sjekker så om passant trekk går.\n if(p.isWhite()){\n \n if(p.getY() == 7 && p.getX() == 4){\n if(b.getPieceAt(7, 6) == null && b.getPieceAt(7, 5) == null){\n if(b.getPieceAt(7,7) instanceof Rook){\n legalMoves[7][7] = 1;\n }\n }\n if(b.getPieceAt(7,3) == null && b.getPieceAt(7, 2) == null && b.getPieceAt(7, 1)==null){\n if(b.getPieceAt(7, 0) instanceof Rook){\n legalMoves[7][0] = 1;\n }\n }\n }\n }\n if(!p.isWhite()){\n if(p.getY() == 0 && p.getX() == 4){\n if(b.getPieceAt(0, 6) == null && b.getPieceAt(0, 5) == null){\n if(b.getPieceAt(0,7) instanceof Rook){\n legalMoves[0][7] = 1;\n }\n }\n if(b.getPieceAt(0,3) == null && b.getPieceAt(0, 2) == null && b.getPieceAt(0, 1)==null){\n if(b.getPieceAt(0, 0) instanceof Rook){\n legalMoves[0][0] = 1;\n }\n }\n }\n }\n\n return legalMoves;\n\n }",
"private static Square[] reachableAdjacentSquares\n (GameBoard board, Square currLoc, int pno, \n int dontCheckMe, int numJumps, boolean adjacentToPlayer) {\n\n // list to store adjacent squares\n List<Square> squareList = new LinkedList<Square>();\n\n // calculate direction bias\n int direction = 0;\n switch (pno) {\n case 0: direction = 86; break;\n case 1: direction = Integer.rotateRight(163,1); break;\n case 2: direction = 171; break;\n case 3: direction = Integer.rotateRight(345, 1); break;\n }\n \n // check each available adajcency\n for ( int i = 0; i < 4; i++ ) {\n \n // calculate the x and y offsets\n int x = ((direction & 8) >> 3) * Integer.signum(direction);\n int y = ((direction & 16) >> 4) * Integer.signum(direction);\n\n // retrieve an adjacent square to compare\n Square checkLoc = board.getSquare(currLoc.getX() + x,\n currLoc.getY() + y);\n\n // modify bits for the next iteration\n direction = Integer.rotateRight(direction,1);\n\n // if check is not an invalid location...\n if ( checkLoc != null ) {\n\n // skip this check if there is a wall in the way\n if ( ( y == 1 && currLoc.getWallBottom() != null) ||\n ( y == -1 && checkLoc.getWallBottom() != null) ||\n ( x == 1 && currLoc.getWallRight() != null ) ||\n ( x == -1 && checkLoc.getWallRight() != null) )\n continue;\n \n // check if there is a player adjacent to where we are\n else if ( adjacentToPlayer && checkLoc.isOccupied() \n && i != dontCheckMe && numJumps < 3 ) {\n // Get the squares from the adjacent player\n Square[] adjToPlayer = reachableAdjacentSquares(board,\n checkLoc, pno, (i+2)%4, numJumps++, adjacentToPlayer);\n // Add the adjacent player's squares to the list\n for ( int j = 0; j < adjToPlayer.length; j++ )\n squareList.add(adjToPlayer[j]);\n } \n\n else\n // add this square to the list\n squareList.add(checkLoc);\n\n adjacentToPlayer = true;\n }\n }\n\n // return the array of adjacent squares\n return squareList.toArray(new Square[squareList.size()]);\n }",
"public ArrayList<ArrayList<Move>> getMoves(int color){//TODO\n \tArrayList<ArrayList<Move>> moves = new ArrayList<ArrayList<Move>>();\n \tboolean jumpsExist = false;\n \t//look for jumps\n \t//search the board for pieces of your color\n for (int i=0; i<8; i++){\n \tfor(int j=0; j<8; j++){\n \t\t//if the piece is the right color\n \t\tif ((gameState.getStateOfSquare(i, j) != 0)&&(gameState.getStateOfSquare(i, j)%2 == color)){\n// \t\t\tSystem.out.println(\"found a piece you own\");\n \t\t\t//find all jumps of that piece\n \t\t\t//get jumps\n \t\t\tArrayList<ArrayList<Move>> jumps = getJumps(color, i, j);\n \t\t\t//if there are jumps return only the jumps\n \t\t\tif (jumps.isEmpty() == false){\n \t\t\t\tmoves.addAll(jumps);\n \t\t\t\tjumpsExist = true;\n \t\t\t}\n \t\t}\n \t}\n }\n if (jumpsExist == false){\n\t //look for diagonals\n\t \t//search the board for pieces of your color\n\t for (int i=0; i<8; i++){\n\t \tfor(int j=0; j<8; j++){\n\t \t\t//if the piece is the right color\n\t \t\tif ((gameState.getStateOfSquare(i, j) != 0)&&(gameState.getStateOfSquare(i, j)%2 == color)){\n//\t \t\t\tSystem.out.println(\"found a piece you own\");\n\t \t\t\t//get diagonals\n\t \t\t\t//try up right\n\t \t\t\tMove tryMove = new Move(i,j,i+1,j+1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t//try up left\n\t \t\t\ttryMove = new Move(i,j,i-1,j+1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t//try down right\n\t \t\t\ttryMove = new Move(i,j,i+1,j-1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t//try down left\n\t \t\t\ttryMove = new Move(i,j,i-1,j-1);\n\t \t\t\tif (attemptMove(tryMove, color)){// if this move is valid add it to moves\n\t \t\t\t\taddMove(tryMove, moves);\n\t \t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t }\n\t }\n if (moves.isEmpty() == true){\n \tnoMoves = true;\n }\n \t\t\t//\n \treturn moves;\n }",
"private void nextPiece() {\n if (_c == M && _r <= M) {\n _c = 1;\n _r++;\n } else if (_r > M) {\n _move = null;\n } else {\n _c++;\n }\n }",
"public Piece getPiece(int xgrid, int ygrid) {\n\t\tfor (int i = 0; i < pieces.size(); i++) {\n\t\t\tif (pieces.get(i).getX() == xgrid && pieces.get(i).getY() == ygrid) {\n\t\t\t\treturn pieces.get(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"boolean findMove(int row, int col, int[][] someStatusBoard) {\n String leftPieces;\n if (_playerOnMove == ORANGE) {\n leftPieces = Game._orangePieces;\n } else {\n leftPieces = Game._violetPieces;\n }\n String trialMove = \"\";\n int numleftPieces = leftPieces.length();\n int l, ori;\n for (l = 0; l < numleftPieces; l++) {\n for (ori = 0; ori < 8; ori++) {\n String piecename = leftPieces.substring(l, l + 1);\n Pieces thispiece = new Pieces();\n int[][] initialPositions = thispiece.getInitialPositions(piecename);\n int[][] finalPositions = thispiece.processPositions(initialPositions, ori);\n int depth = finalPositions.length;\n int length = finalPositions[0].length;\n\n int m, n;\n for (m = 0; m < depth; m++) {\n for (n = 0; n < length; n++) {\n if (finalPositions[m][n] == 1) {\n int newCol = col - 1 - n;\n int newRow = 15 - row - depth;\n if (newCol >= 0 && newRow >= 0) {\n trialMove = piecename + changeBack(newCol) + changeBack(newRow) + ori;\n System.out.println(newCol);\n System.out.println(newRow);\n System.out.println(trialMove);\n if (isLegal(trialMove)) {\n return true;\n }\n }\n }\n }\n }\n }\n }\n return false;\n }",
"public int[][] getMovesBishop(Piece p) {\n x = p.getX();\n y = p.getY();\n int legalMoves[][] = new int[8][8];\n\n for (int i = 1; i < 8; i++) {//Traversing from piece coords, right till end of board.\n if ((x + i) < 8 && (y + i) < 8) {\n if (b.getPieceAt((y + i), (x + i)) != null) {\n if (p.isWhite() == b.getPieceAt((y + i), (x + i)).isWhite()) {\n break;\n } else {\n legalMoves[(y + i)][(x + i)] = 1;\n break;\n }\n } else {\n legalMoves[(y + i)][(x + i)] = 1;\n }\n }\n }\n for (int i = 1; i < 8; i++) {\n if ((x - i) > -1 && (y + i) < 8) {\n if (b.getPieceAt((y + i), (x - i)) != null) {\n if (p.isWhite() == b.getPieceAt((y + i), (x - i)).isWhite()) {\n break;\n } else {\n legalMoves[(y + i)][(x - i)] = 1;\n break;\n }\n } else {\n legalMoves[(y + i)][(x - i)] = 1;\n }\n }\n }\n\n for (int i = 1; i < 8; i++) {\n\n if ((x - i) > -1 && (y - i) > -1) {\n if (b.getPieceAt((y - i), (x - i)) != null) {\n if (p.isWhite() == b.getPieceAt((y - i), (x - i)).isWhite()) {\n break;\n } else {\n legalMoves[(y - i)][(x - i)] = 1;\n break;\n }\n } else {\n legalMoves[(y - i)][(x - i)] = 1;\n }\n }\n }\n\n for (int i = 1; i < 8; i++) {\n\n if ((x + i) < 8 && (y - i) > -1) {\n if (b.getPieceAt((y - i), (x + i)) != null) {\n if (p.isWhite() == b.getPieceAt((y - i), (x + i)).isWhite()) {\n break;\n } else {\n legalMoves[(y - i)][(x + i)] = 1;\n break;\n }\n } else {\n legalMoves[(y - i)][(x + i)] = 1;\n }\n }\n }\n return legalMoves;\n }",
"public int[][] getMovesKnight(Piece p) {\n x = p.getX();\n y = p.getY();\n int[][] legalMoves = new int[8][8];\n\n if ((x + 2) < 8 && (y + 1) < 8) {\n if (b.getPieceAt((y + 1), (x + 2)) != null) {\n if (b.getPieceAt((y + 1), (x + 2)).isWhite() != p.isWhite()) {\n legalMoves[y + 1][x + 2] = 1;\n }\n } else {\n legalMoves[y + 1][x + 2] = 1;\n }\n }\n if ((x + 2) < 8 && (y - 1) > -1) {\n if (b.getPieceAt((y - 1), (x + 2)) != null) {\n if (b.getPieceAt((y - 1), (x + 2)).isWhite() != p.isWhite()) {\n legalMoves[y - 1][x + 2] = 1;\n }\n } else {\n legalMoves[y - 1][x + 2] = 1;\n }\n }\n if ((x - 2) > -1 && (y + 1) < 8) {\n if (b.getPieceAt((y + 1), (x - 2)) != null) {\n if (b.getPieceAt((y + 1), (x - 2)).isWhite() != p.isWhite()) {\n legalMoves[y + 1][x - 2] = 1;\n }\n } else {\n legalMoves[y + 1][x - 2] = 1;\n }\n }\n if ((x - 2) > -1 && (y - 1) > -1) {\n if (b.getPieceAt((y - 1), (x - 2)) != null) {\n if (b.getPieceAt((y - 1), (x - 2)).isWhite() != p.isWhite()) {\n legalMoves[y - 1][x - 2] = 1;\n }\n } else {\n legalMoves[y - 1][x - 2] = 1;\n }\n }\n if ((x + 1) < 8 && (y + 2) < 8) {\n if (b.getPieceAt((y + 2), (x + 1)) != null) {\n if (b.getPieceAt((y + 2), (x + 1)).isWhite() != p.isWhite()) {\n legalMoves[y + 2][x + 1] = 1;\n }\n } else {\n legalMoves[y + 2][x + 1] = 1;\n }\n }\n if ((x - 1) > -1 && (y + 2) < 8) {\n if (b.getPieceAt((y + 2), (x - 1)) != null) {\n if (b.getPieceAt((y + 2), (x - 1)).isWhite() != p.isWhite()) {\n legalMoves[y + 2][x - 1] = 1;\n }\n } else {\n legalMoves[y + 2][x - 1] = 1;\n }\n }\n if ((x - 1) > -1 && (y - 2) > -1) {\n if (b.getPieceAt((y - 2), (x - 1)) != null) {\n if (b.getPieceAt((y - 2), (x - 1)).isWhite() != p.isWhite()) {\n legalMoves[y - 2][x - 1] = 1;\n }\n } else {\n legalMoves[y - 2][x - 1] = 1;\n }\n }\n if ((x + 1) < 8 && (y - 2) > -1) {\n if (b.getPieceAt((y - 2), (x + 1)) != null) {\n if (b.getPieceAt((y - 2), (x + 1)).isWhite() != p.isWhite()) {\n legalMoves[y - 2][x + 1] = 1;\n }\n } else {\n legalMoves[y - 2][x + 1] = 1;\n }\n }\n return legalMoves;\n }",
"public List<Piece> allPieces(){\n List<Piece> pieces = new ArrayList<>();\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n int val = board[y][x];\n if (val != 0){\n pieces.add(new Piece(val,x,y));\n }\n }\n }\n return pieces;\n }",
"private List<Cell> getSurroundingCells(int x, int y) {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = x - 1; i <= x + 1; i++) {\n for (int j = y - 1; j <= y + 1; j++) {\n // Don't include the current position i != x && j != y &&\n if ( isValidCoordinate(i, j)) {\n if (i == x && j == y) {\n continue;\n } else {\n cells.add(gameState.map[j][i]);\n }\n }\n }\n }\n return cells;\n }",
"public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( currentx - 1 >= 0 && currenty - 1 >= 0 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1].isOccupiedByOpponent()) {\t// Diagonol left space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1]);\n\t\t\t}\n\t\t\tif (currentx - 1 >= 0 && currenty + 1 <= 7 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1].isOccupiedByOpponent()) { \t//Diagonol right space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1]);\n\t\t\t}\n\t\t\t\n\t}",
"static Piece getPieceFromXY(float x, float y) {\n\t\t/* Coordinates are relative to the parent and the parent starts at (0,0)\n\t\t * Therefore, the first ImageView has coordinates of (0,0)\n\t\t * The layout of the ImageViews within the parent layout is as follows:\n\t\t * \n\t\t * (0,0)----------(width,0)----------(2*width,0)----------(3*width,0)\n\t\t *\t\t|\t\t\t\t |\t\t\t\t\t |\t\t\t\t\t |\n\t\t *\t\t|\t\t0\t\t |\t\t 1\t\t |\t\t\t2\t\t |\n\t\t *\t\t|\t\t\t\t |\t\t\t\t\t |\t\t\t\t\t |\n\t\t * (0,height)------(width,height)----(2*width,height)------(3*width,height)\n\t\t *\t\t|\t\t\t\t |\t\t\t\t\t |\t\t\t\t\t |\n\t\t *\t\t|\t\t3\t\t |\t\t 4\t\t |\t\t\t5\t\t |\n\t\t *\t\t|\t\t\t\t |\t\t\t\t\t |\t\t\t\t\t |\n\t\t * (0,2*height)---(width,2*height)---(2*width,2*height)---(3*width,2*height)\n\t\t *\t\t|\t\t\t\t |\t\t\t\t\t |\t\t\t\t\t |\n\t\t *\t\t|\t\t6\t\t |\t\t 7\t\t |\t\t\t8\t\t |\n\t\t *\t\t|\t\t\t\t |\t\t\t\t\t |\t\t\t\t\t |\n\t\t * (0,3*height)---(width,3*height)---(2*width,3*height)---(3*width,3*height)\n\t\t * \n\t\t */\n\t\t\n\t\tint i;\n\t\tfor (i=0; i<Play.NUM[TOTAL]; i++) {\n\t\t\tif ( (Play.pieceViewLocations.get(i)[0] == x) && (Play.pieceViewLocations.get(i)[1] == y)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn Play.jigsawPieces.get(i); //return the piece at the corresponding position\n\t}",
"private Container[] generateFourCellsWithOpenLineCircuit() {\n createCells();\n\n cell1.setNeighbourAt( cell2, NeighbourPosition.RIGHT );\n cell2.setNeighbourAt( cell3, NeighbourPosition.BOTTOM );\n\n cell4 = createCell( new HorizontalLine(\"\") );\n cell3.setNeighbourAt( cell4, NeighbourPosition.LEFT );\n cell4.setNeighbourAt( cell1, NeighbourPosition.TOP );\n\n Container[] cells = { cell1, cell2, cell3, cell4 };\n return cells;\n }",
"public static void makePieces() {\n\t\tPiece[] pieces = new Piece[35];\n\t\tfor (int i = 0; i < pieces.length; i++) {\n\t\t\tTile t = new Tile(false, true, 0, 0);\n\t\t\tTile f = new Tile(false, false, 0, 0);\n\t\t\tTile[][] tiles = new Tile[6][6];\n\t\t\tswitch (i) {\n\t\t\tcase 0:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, t, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 34:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpieces[i] = new Piece(tiles);\n\t\t}\n\t\ttry {\n\t\t\tFileOutputStream saveFile = new FileOutputStream(\"pieces.data\");\n\t\t\tObjectOutputStream save = new ObjectOutputStream(saveFile);\n\t\t\tsave.reset();\n\t\t\tsave.writeObject(pieces);\n\t\t\tsave.close();\n\t\t} catch (Exception exc) {\n\t\t\texc.printStackTrace(); // If there was an error, print the info.\n\t\t}\n\t}",
"public static Piece[] findFour(Piece singleBlock){\n\t\t\n\t\t\n\t\treturn null;\n\t}",
"List<MineTile> getSurround(int position) {\n int dimension = getDimension();\n int row = position / dimension;\n int col = position % dimension;\n List<MineTile> surround = new ArrayList<>();\n\n if (row != 0 && col != 0) {\n surround.add(getTiles().get(position - dimension - 1));\n }\n if (row != 0 && col != dimension - 1) {\n surround.add(getTiles().get(position - dimension + 1));\n }\n if (row != 0) {\n surround.add(getTiles().get(position - dimension));\n }\n if (row != dimension - 1 && col != 0) {\n surround.add(getTiles().get(position + dimension - 1));\n }\n if (row != dimension - 1 && col != dimension - 1) {\n surround.add(getTiles().get(position + dimension + 1));\n }\n if (row != dimension - 1) {\n surround.add(getTiles().get(position + dimension));\n }\n if (col != 0) {\n surround.add(getTiles().get(position - 1));\n }\n if (col != dimension - 1) {\n surround.add(getTiles().get(position + 1));\n }\n return surround;\n }",
"public ArrayList<SlidingPuzzleState> getPossibleNextMoves(){\n\t\tArrayList<SlidingPuzzleState> moves = new ArrayList<SlidingPuzzleState>();\n\t\tint holeNum = 0;\n\t\tfor (Coordinate h: _holes){\n\t\t\t\n\t\t\t//for every hole, check if its not on the edges\n\t\t\t//of the puzzle and if his next position is not\n\t\t\t//already a hole\n\t\t\t\n\t\t\tif (h.getI() > 0 && _puzzle[h.getI()-1][h.getJ()]!=0){\n\t\t\t\t\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.UP));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getI() < (_rows-1) && _puzzle[h.getI()+1][h.getJ()]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.DOWN));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() > 0 && _puzzle[h.getI()][h.getJ()-1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.LEFT));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() < (_cols-1) && _puzzle[h.getI()][h.getJ()+1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.RIGHT));\n\t\t\t}\n\t\t\tholeNum++;\n\t\t}\n\t\treturn moves;\n\t}",
"@Override\r\n\tpublic boolean movement(BoardCells[][] chessBoard, Piece targetPiece, int fromX,int fromY,int toX,int toY) {\t\t\r\n\t\t//DEBUG -- System.out.println(\"\"+fromX+fromY+\" \"+toX+toY);\r\n\t\t\r\n\t\tif(fromY == toY){\t\t\t\r\n\t\t\tif(fromX > toX) {\r\n\t\t\t\tfor(int i = fromX-1; i>toX; i--) {\r\n\t\t\t\t\tif(chessBoard[8-fromY][i].getPiece() != null) {\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t} else if (fromX < toX) {\r\n\t\t\t\tfor(int i = fromX+1; i<toX; i++) {\r\n\t\t\t\t\tif(chessBoard[8-fromY][i].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(getPieceID().equals(\"bR\")) {\r\n\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"bKc\")) {\r\n\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"bK\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(getPieceID().equals(\"wR\")) {\r\n\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"wKc\")) {\r\n\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"wK\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\tif(fromX == toX) {\t\t\t\t\r\n\t\t\tif(fromY > toY) {\t\r\n\t\t\t\tfor(int i = fromY-1; i>toY; i--) {\r\n\t\t\t\t\tif(chessBoard[8-i][toX].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} else if (fromY < toY) {\t\t\t\t\r\n\t\t\t\tfor(int i = fromY+1; i<toY; i++) {\t\t\t\t\t\r\n\t\t\t\t\tif(chessBoard[8-i][toX].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(getPieceID().equals(\"bR\")) {\r\n\t\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"bKc\")) {\r\n\t\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"bK\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(getPieceID().equals(\"wR\")) {\r\n\t\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"wKc\")) {\r\n\t\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"wK\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\treturn true;\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn false;\t\t\r\n\t}",
"private Set<Line> getPossibleMoves(Square[][] board, Set<Line> moves, int sides) {\n if (moves.size() >= width || sides > 3) return moves;\n else {\n Set<Square> squares = squaresWithMarkedSides(board, order[sides]);\n for (Square square : squares) {\n for (Line line : square.openLines()) {\n if (moves.size() < width)\n moves.add(line);\n }\n }\n return getPossibleMoves(board, moves, sides+1);\n }\n }",
"public ArrayList<Pair<Coord,Coord>> returnMoves(Board b) {\r\n\t\t//copy Piece grid\r\n\t\tPiece[][] g = b.getGrid();\r\n\t\t\r\n\t\t//return array of all the possible moves\r\n\t\tArrayList<Pair<Coord,Coord>> possibleMoves = new ArrayList<Pair<Coord,Coord>>();\r\n\r\n\t\t//System.out.println(team + \": (\" + c.y + \", \" + c.x + \")\");\r\n\t\t//if the team is moving north (white team)\r\n\t\tif(team) {\r\n\t\t\t//first move, two square pawn advance\r\n\t\t\tif(moves==0 && g[c.y-1][c.x] == null && g[c.y-2][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-2,c.x),null));\r\n\t\t\t\r\n\t\t\t//single square pawn advance\r\n\t\t\tif(g[c.y-1][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally west\r\n\t\t\tif(c.x-1>=0 && c.x-1<=7 && g[c.y-1][c.x-1]!=null && (!g[c.y-1][c.x-1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x-1),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally east\r\n\t\t\tif(c.x+1>=0 && c.x+1<=7 && g[c.y-1][c.x+1]!=null && (!g[c.y-1][c.x+1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x+1),null));\r\n\t\t\t\r\n\t\t\t//en passant west\r\n\t\t\tif(c.x-1>=0 && c.y==3 && g[c.y-1][c.x-1]==null && g[c.y][c.x-1]!=null && !g[c.y][c.x-1].team \r\n\t\t\t\t\t&& g[c.y][c.x-1].toString().equals(\"P\") && g[c.y][c.x-1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x-1),new Coord(c.y, c.x-1)));\r\n\t\t\t\r\n\t\t\t//en passant east\r\n\t\t\tif(c.x+1<=7 && c.y==3 && g[c.y-1][c.x+1]==null && g[c.y][c.x+1]!=null && !g[c.y][c.x+1].team\r\n\t\t\t\t\t&& g[c.y][c.x+1].toString().equals(\"P\") && g[c.y][c.x+1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y-1,c.x+1),new Coord(c.y, c.x+1)));\r\n\t\t\t\r\n\t\t//if the team is moving south (black team)\r\n\t\t} else {\r\n\t\t\t//first move, two square pawn advance\r\n\t\t\tif(moves==0 && g[c.y+1][c.x] == null && g[c.y+2][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+2,c.x),null));\r\n\r\n\t\t\t//single square pawn advance\r\n\t\t\tif(g[c.y+1][c.x] == null)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally west\r\n\t\t\tif(c.x-1>=0 && c.x-1<=7 && g[c.y+1][c.x-1]!=null && (g[c.y+1][c.x-1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x-1),null));\r\n\t\t\t\r\n\t\t\t//capture diagonally east\r\n\t\t\tif(c.x+1>=0 && c.x+1<=7 && g[c.y+1][c.x+1]!=null && (g[c.y+1][c.x+1].team))\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x+1),null));\r\n\t\t\t\r\n\t\t\t//en passant west\r\n\t\t\tif(c.x-1>=0 && c.y==4 && g[c.y+1][c.x-1]==null && g[c.y][c.x-1]!=null && g[c.y][c.x-1].team \r\n\t\t\t\t\t&& g[c.y][c.x-1].toString().equals(\"P\") && g[c.y][c.x-1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x-1),new Coord(c.y, c.x-1)));\r\n\t\t\t\r\n\t\t\t//en passant east\r\n\t\t\tif(c.x+1<=7 && c.y==4 && g[c.y-1][c.x+1]==null && g[c.y][c.x+1]!=null && g[c.y][c.x+1].team \r\n\t\t\t\t\t&& g[c.y][c.x+1].toString().equals(\"P\") && g[c.y][c.x+1].moves==1)\r\n\t\t\t\tpossibleMoves.add(new Pair<Coord, Coord>(new Coord(c.y+1,c.x+1),new Coord(c.y, c.x+1)));\r\n\t\t\t\r\n\t\t}\t\t\r\n\r\n\t\treturn possibleMoves;\r\n\t}",
"public Cell diagonal(UTTTSubBoard board, List<Cell> cells) {\n Iterator iterator = cells.iterator();\n while(iterator.hasNext()) {\n Cell cell = (Cell) iterator.next();\n\n int x = cell.getCell().getRow();\n int y = cell.getCell().getRow();\n\n if ((x + y)%2 == 0){ \n\n if (x == 1 && y == 1){\n int firstXIndexToCheck = ((((x+1)%3)+3)%3);\n int secondXIndexToCheck = ((((x-1)%3)+3)%3);\n\n int firstYIndexToCheck = ((((y+1)%3)+3)%3);\n int secondYIndexToCheck = ((((y-1)%3)+3)%3);\n\n Coords firstCoord = new Coords(firstXIndexToCheck, firstYIndexToCheck);\n Coords secondCoord = new Coords(secondXIndexToCheck, secondYIndexToCheck);\n Coords thirdCoord = new Coords(secondXIndexToCheck, firstYIndexToCheck);\n Coords fourthCoord = new Coords(firstXIndexToCheck, secondYIndexToCheck);\n \n Cell firstCell = board.getCell(firstCoord);\n Cell secondCell = board.getCell(secondCoord);\n Cell thirdCell = board.getCell(thirdCoord);\n Cell fourthCell = board.getCell(fourthCoord);\n\n if (firstCell.getPlayer() == PlayerEnum.ME && secondCell.getPlayer() == PlayerEnum.ME){\n return cell;\n }\n else if (thirdCell.getPlayer() == PlayerEnum.ME && fourthCell.getPlayer() == PlayerEnum.ME){\n return cell;\n }\n // else if (firstCell.getPlayer() == PlayerEnum.ME || secondCell.getPlayer() == PlayerEnum.ME\n // || thirdCell.getPlayer() == PlayerEnum.ME || fourthCell.getPlayer() == PlayerEnum.ME) {\n // matchedCells.add(cell);\n // }\n }\n\n else {\n\n int firstXIndexToCheck = ((((x+1)%3)+3)%3);\n int secondXIndexToCheck = ((((x-1)%3)+3)%3);\n\n int firstYIndexToCheck = ((((y+1)%3)+3)%3);\n int secondYIndexToCheck = ((((y-1)%3)+3)%3);\n\n Coords firstCoord = new Coords(firstXIndexToCheck, firstYIndexToCheck);\n Coords secondCoord = new Coords(secondXIndexToCheck, secondYIndexToCheck);\n\n Cell firstCell = board.getCell(firstCoord);\n Cell secondCell = board.getCell(secondCoord);\n\n if (firstCell.getPlayer() == PlayerEnum.ME && secondCell.getPlayer() == PlayerEnum.ME){\n return cell;\n }\n else if (firstCell.getPlayer() == PlayerEnum.ME || secondCell.getPlayer() == PlayerEnum.ME) {\n matchedCells.add(cell);\n }\n\n }//else\n }\n }\n return null;\n }",
"public static void changepieces(int row, int column, String piecevalue){\n\t\tString oppositepiece;\n\t\tif(piecevalue.equals(\"x\")){\n\t\t\toppositepiece=\"o\";\n\t\t}\n\t\telse if(piecevalue.equals(\"o\")){\n\t\t\toppositepiece=\"x\";\n\t\t}\n\t\telse{\n\t\t\toppositepiece=\"-\";\n\t\t}\n\t\t//R=right, L=left, T=top, B=bottom, and there are diagonals such as TL=top left.\n\t\tboolean foundR=false,foundL=false,foundT=false,foundB=false,foundTL=false,foundTR=false,foundBL=false,foundBR=false;\n\t\tint checkfurtherR=1,checkfurtherL=1,checkfurtherT=1,checkfurtherB=1,checkfurtherTL=1,checkfurtherTR=1,checkfurtherBL=1,checkfurtherBR=1;\n\t\twhile(board[row][column+checkfurtherR].equals(oppositepiece)){\n\t\t\tcheckfurtherR++;\n\t\t}\n\t\tif(board[row][column+checkfurtherR].equals(piecevalue)){\n\t\t\tfoundR=true;\n\t\t}\n\t\t//The board changes the board if a 'connection' has been found in the [right] direction. It makes the connection following the game rules.\n\t\tif(foundR==true){\n\t\tfor(int i=column;i<column+checkfurtherR;i++){\n\t\t\t\tboard[row][i]=(piecevalue);\n\t\t\t}\n\t\t}\n\t\twhile(board[row][column-checkfurtherL].equals(oppositepiece)){\n\t\t\tcheckfurtherL++;\n\t\t}\n\t\tif(board[row][column-checkfurtherL].equals(piecevalue)){\n\t\t\tfoundL=true;\n\t\t}\n\t\t//Again, if something is found in the [left] direction, this block of code will be initialized to change to board array (making that 'connection' on the board).\n\t\tif(foundL==true){\n\t\tfor(int i=column;i>column-checkfurtherL;i--){\n\t\t\t\tboard[row][i]=(piecevalue);\n\t\t\t}\n\t\t}\n\t\twhile(board[row+checkfurtherB][column].equals(oppositepiece)){\n\t\t\tcheckfurtherB++;\n\t\t}\n\t\tif(board[row+checkfurtherB][column].equals(piecevalue)){\n\t\t\tfoundB=true;\n\t\t}\n\t\tif(foundB==true){\n\t\tfor(int i=row;i<row+checkfurtherB;i++){\n\t\t\t\tboard[i][column]=(piecevalue);\n\t\t\t}\n\t\t}\n\t\twhile(board[row-checkfurtherT][column].equals(oppositepiece)){\n\t\t\tcheckfurtherT++;\n\t\t}\n\t\tif(board[row-checkfurtherT][column].equals(piecevalue)){\n\t\t\tfoundT=true;\n\t\t}\n\t\tif(foundT==true){\n\t\tfor(int i=row;i>row-checkfurtherT;i--){\n\t\t\t\tboard[i][column]=(piecevalue);\n\t\t\t}\n\t\t}\n\t\t//Diagonal directions are harder and different from the 4 basic directions\n\t\t//It must use dynamic board to 'mark' the coordinates that it must convert to make a proper 'connection'\n\t\twhile(board[row-checkfurtherTR][column+checkfurtherTR].equals(oppositepiece)){\n\t\t\t//each coordinate that is reached will be recorded on the dynamic board\n\t\t\tdynamicboard[row-checkfurtherTR][column+checkfurtherTR]=1;\n\t\t\tcheckfurtherTR++;\n\t\t}\n\t\tif(board[row-checkfurtherTR][column+checkfurtherTR].equals(piecevalue)){\n\t\t\tfoundTR=true;\n\t\t}\n\t\t//Now the board will be changed if an available move has been found\n\t\tif(foundTR==true){\n\t\t\tfor(int x=row;x>row-checkfurtherTR;x--){\n\t\t\t\tfor(int i=column;i<column+checkfurtherTR;i++){\n\t\t\t\t\t//without the use of the dynamic board, some units of the board that should not be converted, will be converted.\n\t\t\t\t\t//(hard to explain)Example, if coordinate places a piece on the Top right of an available move, the connection and change on the board will be performed but [down] and [right] directions will also be inconveniently converted \n\t\t\t\t\tif(dynamicboard[x][i]==1){\n\t\t\t\t\t\tboard[x][i]=(piecevalue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//dynamicboard must be cleared each time for its next job in 'marking' units in the array to be converted.\n\t\tcleandynamicboard();\n\t\twhile(board[row-checkfurtherTL][column-checkfurtherTL].equals(oppositepiece)){\n\t\t\tdynamicboard[row-checkfurtherTL][column-checkfurtherTL]=1;\n\t\t\tcheckfurtherTL++;\n\t\t}\n\t\tif(board[row-checkfurtherTL][column-checkfurtherTL].equals(piecevalue)){\n\t\t\tfoundTL=true;\n\t\t}\n\t\tif(foundTL==true){\n\t\t\tfor(int x=row;x>row-checkfurtherTL;x--){\n\t\t\t\tfor(int i=column;i>column-checkfurtherTL;i--){\n\t\t\t\t\tif(dynamicboard[x][i]==1){\n\t\t\t\t\t\tboard[x][i]=(piecevalue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcleandynamicboard();\n\t\twhile(board[row+checkfurtherBL][column-checkfurtherBL].equals(oppositepiece)){\n\t\t\tdynamicboard[row+checkfurtherBL][column-checkfurtherBL]=1;\n\t\t\tcheckfurtherBL++;\n\t\t}\n\t\tif(board[row+checkfurtherBL][column-checkfurtherBL].equals(piecevalue)){\n\t\t\tfoundBL=true;\n\t\t}\n\t\tif(foundBL==true){\n\t\t\tfor(int x=row;x<row+checkfurtherBL;x++){\n\t\t\t\tfor(int i=column;i>column-checkfurtherBL;i--){\n\t\t\t\t\tif(dynamicboard[x][i]==1){\n\t\t\t\t\t\tboard[x][i]=(piecevalue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcleandynamicboard();\n\t\twhile(board[row+checkfurtherBR][column+checkfurtherBR].equals(oppositepiece)){\n\t\t\tdynamicboard[row+checkfurtherBR][column+checkfurtherBR]=1;\n\t\t\tcheckfurtherBR++;\n\t\t}\n\t\tif(board[row+checkfurtherBR][column+checkfurtherBR].equals(piecevalue)){\n\t\t\tfoundBR=true;\n\t\t}\n\t\tif(foundBR==true){\n\t\t\tfor(int x=row;x<row+checkfurtherBR;x++){\n\t\t\t\tfor(int i=column;i<column+checkfurtherBR;i++){\n\t\t\t\t\tif(dynamicboard[x][i]==1){\n\t\t\t\t\t\tboard[x][i]=(piecevalue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public List<Move> validMoves(){\n List<Move> results = new LinkedList<>();\n int kingVal = turn == WHITE ? WHITE_KING : BLACK_KING;\n int kingX = 0, kingY = 0;\n List<Piece> checks = null;\n kingSearch:\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n if (board[y][x] == kingVal){\n kingX = x;\n kingY = y;\n checks = inCheck(x,y);\n break kingSearch;\n }\n }\n }\n if (checks.size() > 1){ // must move king\n for (int x = -1; x < 2; x++){\n for (int y = -1; y < 2; y++){\n if (kingX+x >= 0 && kingX + x < 8 && kingY+y >= 0 && kingY+y < 8){\n int val = board[kingY+y][kingX+x];\n if (val == 0 || turn == WHITE && val > WHITE_KING || turn == BLACK && val < BLACK_PAWN){\n // may still be a move into check, must test at end\n results.add(new Move(kingVal, kingX, kingY, kingX+x, kingY+y, val, 0, this));\n }\n }\n }\n }\n } else { // could be in check TODO: split into case of single check and none, identify pin/capture lines\n int queen = turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN;\n int knight = turn == WHITE ? WHITE_KNIGHT : BLACK_KNIGHT;\n int rook = turn == WHITE ? WHITE_ROOK : BLACK_ROOK;\n int bishop = turn == WHITE ? WHITE_BISHOP : BLACK_BISHOP;\n for (int y = 0; y < 8; y++) {\n for (int x = 0; x < 8; x++) {\n int piece = board[y][x];\n if (piece == (turn == WHITE ? WHITE_PAWN : BLACK_PAWN)) { // pawns\n // regular | 2 move\n if (board[y+turn][x] == 0){\n if (y+turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x, y + turn, 0, queen, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, knight, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, rook, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, bishop, this));\n }\n else {\n results.add(new Move(piece, x, y, x, y + turn, 0, 0, this));\n if ((y == (turn == WHITE ? 1 : 6)) && board[y + 2 * turn][x] == 0) { // initial 2 move\n results.add(new Move(piece, x, y, x, y + 2*turn, 0, 0, this));\n }\n }\n }\n // capture\n for (int dx = -1; dx <= 1; dx += 2){\n if (x + dx >= 0 && x + dx < 8) {\n int val = board[y+turn][x+dx];\n if (val > 0 && (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n if (y + turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x+dx, y + turn, val, queen, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, knight, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, rook, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, bishop, this));\n } else {\n results.add(new Move(piece, x, y, x+dx, y + turn, val, 0, this));\n }\n }\n if (val == 0 && y == (turn == WHITE ? 4 : 3) && x+dx == enPassant){ // en passant\n results.add(new Move(piece, x, y, x+dx, y + turn, 0, 0, this));\n }\n }\n }\n\n } else if (piece == knight) { // knights TODO: lookup table\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n if (x+dy >= 0 && x + dy < 8 && y + dx >= 0 && y + dx < 8){\n int val = board[y+dx][x+dy];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dy,y+dx,val,0,this));\n }\n }\n }\n }\n } else if (piece == bishop) { // bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == rook) { // rooks\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN)) { // queens\n // Diagonals - same as bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_KING : BLACK_KING)) { // king\n for (int dx = -1; dx < 2; dx++){\n for (int dy = -1; dy < 2; dy++){\n if ((dx != 0 || dy != 0) && x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n }\n }\n }\n }\n }\n // castle\n if (checks.size() == 0){\n if (turn == WHITE && (castles & 0b11) != 0){//(castles[0] || castles[1])){\n board[0][4] = 0; // remove king to avoid check test collisions with extra king\n if ((castles & WHITE_SHORT) != 0 && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n //if (castles[0] && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 6, 0, 0, 0, this));\n }\n if ((castles & WHITE_LONG) != 0 && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 &&\n inCheck(3,0).size() == 0){\n //if (castles[1] && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 && inCheck(3,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 2, 0, 0, 0, this));\n }\n board[0][4] = WHITE_KING;\n }else if (turn == BLACK && (castles & 0b1100) != 0){//(castles[2] || castles[3])) {\n board[7][4] = 0; // remove king to avoid check test collisions with extra king\n //if (castles[2] && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n if ((castles & BLACK_SHORT) != 0 && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 6, 7, 0, 0, this));\n }\n //if (castles[3] && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 && inCheck(3, 7).size() == 0) {\n if ((castles & BLACK_LONG) != 0 && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 &&\n inCheck(3, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 2, 7, 0, 0, this));\n }\n board[7][4] = BLACK_KING;\n }\n }\n }\n List<Move> fullLegal = new LinkedList<>();\n for (Move m : results){\n makeMove(m);\n turn = -turn;\n if (m.piece == WHITE_KING || m.piece == BLACK_KING){\n if (inCheck(m.toX,m.toY).size() == 0){\n fullLegal.add(m);\n }\n }else if (inCheck(kingX,kingY).size() == 0){\n fullLegal.add(m);\n }\n turn = -turn;\n undoMove(m);\n }\n Collections.sort(fullLegal, (o1, o2) -> o2.score - o1.score); // greatest score treated as least so appears first\n return fullLegal;\n }",
"public Iterable<Board> neighbors() {\n int[] pos = zeroPosition();\n int x = pos[0];\n int y = pos[1];\n\n Stack<Board> q = new Stack<>();\n if (x > 0) {\n q.push(twinBySwitching(x, y, x-1, y));\n }\n\n if (x < dimension() - 1) {\n q.push(twinBySwitching(x, y, x+1, y));\n }\n\n if (y > 0) {\n q.push(twinBySwitching(x, y, x, y-1));\n }\n\n if (y < dimension() - 1) {\n q.push(twinBySwitching(x, y, x, y+1));\n }\n\n return q;\n }",
"public Vector<ChessBoardBlock> getMovablePosition(ChessPiece p) {\r\n\t\tString player = p.chessPlayer;\r\n\t\tString position = p.position;\r\n\t\tchar h = position.charAt(0);\r\n\t\tint v = Integer.parseInt(position.substring(1));\r\n\t\tVector<ChessBoardBlock> tmp = new Vector<ChessBoardBlock>();\r\n\t\ttmp.add(board.get(position));\r\n\t\t\r\n\t\t// Condition for white piece\r\n\t\tif (player.equals(\"white\")) {\r\n\t\t\t\r\n\t\t\t// Condition for not King piece\r\n\t\t\tif (p.getText() == null) {\r\n\t\t\t\tChessBoardBlock br1 = board.get(Character.toString((char)(h+1)) + (v+1));\r\n\t\t\t\tChessBoardBlock br2 = board.get(Character.toString((char)(h+2)) + (v+2));\r\n\t\t\t\t// Condition for upper right to the piece\r\n\t\t\t\tif (br1 != null && piece.get(br1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(br1.position));\r\n\t\t\t\t} else if (br2 != null && piece.get(br1.position).chessPlayer.equals(\"black\") && piece.get(br2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(br2.position));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tChessBoardBlock bl1 = board.get(Character.toString((char)(h-1)) + (v+1));\r\n\t\t\t\tChessBoardBlock bl2 = board.get(Character.toString((char)(h-2)) + (v+2));\r\n\t\t\t\t// Condition for upper left to the piece\r\n\t\t\t\tif (bl1 != null && piece.get(bl1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bl1.position));\r\n\t\t\t\t} else if (bl2 != null && piece.get(bl1.position).chessPlayer.equals(\"black\") && piece.get(bl2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bl2.position));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} \r\n\r\n\t\t\t// Condition for King piece\r\n\t\t\telse {\r\n\t\t\t\tChessBoardBlock bur1 = board.get(Character.toString((char)(h+1)) + (v+1));\r\n\t\t\t\tChessBoardBlock bur2 = board.get(Character.toString((char)(h+2)) + (v+2));\r\n\t\t\t\t// Condition for upper right to the piece\r\n\t\t\t\tif (bur1 != null && piece.get(bur1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bur1.position));\r\n\t\t\t\t} else if (bur2 != null && piece.get(bur1.position).chessPlayer.equals(\"black\") && piece.get(bur2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bur2.position));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tChessBoardBlock bul1 = board.get(Character.toString((char)(h-1)) + (v+1));\r\n\t\t\t\tChessBoardBlock bul2 = board.get(Character.toString((char)(h-2)) + (v+2));\r\n\t\t\t\t// Condition for upper left to the piece\r\n\t\t\t\tif (bul1 != null && piece.get(bul1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bul1.position));\r\n\t\t\t\t} else if (bul2 != null && piece.get(bul1.position).chessPlayer.equals(\"black\") && piece.get(bul2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bul2.position));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tChessBoardBlock bdr1 = board.get(Character.toString((char)(h+1)) + (v-1));\r\n\t\t\t\tChessBoardBlock bdr2 = board.get(Character.toString((char)(h+2)) + (v-2));\r\n\t\t\t\t// Condition for lower right to the piece\r\n\t\t\t\tif (bdr1 != null && piece.get(bdr1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bdr1.position));\r\n\t\t\t\t} else if (bdr2 != null && piece.get(bdr1.position).chessPlayer.equals(\"black\") && piece.get(bdr2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bdr2.position));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tChessBoardBlock bdl1 = board.get(Character.toString((char)(h-1)) + (v-1));\r\n\t\t\t\tChessBoardBlock bdl2 = board.get(Character.toString((char)(h-2)) + (v-2));\r\n\t\t\t\t// Condition for lower left to the piece\r\n\t\t\t\tif (bdl1 != null && piece.get(bdl1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bdl1.position));\r\n\t\t\t\t} else if (bdl2 != null && piece.get(bdl1.position).chessPlayer.equals(\"black\") && piece.get(bdl2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bdl2.position));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Condition for black piece\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// Condition for not King piece\r\n\t\t\tif (p.getText() == null) {\r\n\t\t\t\tChessBoardBlock br1 = board.get(Character.toString((char)(h+1)) + (v-1));\r\n\t\t\t\tChessBoardBlock br2 = board.get(Character.toString((char)(h+2)) + (v-2));\r\n\t\t\t\t// Condition for upper right to the piece\r\n\t\t\t\tif (br1 != null && piece.get(br1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(br1.position));\r\n\t\t\t\t} else if (br2 != null && piece.get(br1.position).chessPlayer.equals(\"white\") && piece.get(br2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(br2.position));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tChessBoardBlock bl1 = board.get(Character.toString((char)(h-1)) + (v-1));\r\n\t\t\t\tChessBoardBlock bl2 = board.get(Character.toString((char)(h-2)) + (v-2));\r\n\t\t\t\t// Condition for upper left to the piece\r\n\t\t\t\tif (bl1 != null && piece.get(bl1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bl1.position));\r\n\t\t\t\t} else if (bl2 != null && piece.get(bl1.position).chessPlayer.equals(\"white\") && piece.get(bl2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bl2.position));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tChessBoardBlock bur1 = board.get(Character.toString((char)(h+1)) + (v+1));\r\n\t\t\t\tChessBoardBlock bur2 = board.get(Character.toString((char)(h+2)) + (v+2));\r\n\t\t\t\t// Condition for upper right to the piece\r\n\t\t\t\tif (bur1 != null && piece.get(bur1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bur1.position));\r\n\t\t\t\t} else if (bur2 != null && piece.get(bur1.position).chessPlayer.equals(\"white\") && piece.get(bur2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bur2.position));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tChessBoardBlock bul1 = board.get(Character.toString((char)(h-1)) + (v+1));\r\n\t\t\t\tChessBoardBlock bul2 = board.get(Character.toString((char)(h-2)) + (v+2));\r\n\t\t\t\t// Condition for upper left to the piece\r\n\t\t\t\tif (bul1 != null && piece.get(bul1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bul1.position));\r\n\t\t\t\t} else if (bul2 != null && piece.get(bul1.position).chessPlayer.equals(\"white\") && piece.get(bul2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bul2.position));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tChessBoardBlock bdr1 = board.get(Character.toString((char)(h+1)) + (v-1));\r\n\t\t\t\tChessBoardBlock bdr2 = board.get(Character.toString((char)(h+2)) + (v-2));\r\n\t\t\t\t// Condition for lower right to the piece\r\n\t\t\t\tif (bdr1 != null && piece.get(bdr1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bdr1.position));\r\n\t\t\t\t} else if (bdr2 != null && piece.get(bdr1.position).chessPlayer.equals(\"white\") && piece.get(bdr2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bdr2.position));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tChessBoardBlock bdl1 = board.get(Character.toString((char)(h-1)) + (v-1));\r\n\t\t\t\tChessBoardBlock bdl2 = board.get(Character.toString((char)(h-2)) + (v-2));\r\n\t\t\t\t// Condition for lower left to the piece\r\n\t\t\t\tif (bdl1 != null && piece.get(bdl1.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bdl1.position));\r\n\t\t\t\t} else if (bdl2 != null && piece.get(bdl1.position).chessPlayer.equals(\"white\") && piece.get(bdl2.position).chessPlayer.equals(\"empty\")) {\r\n\t\t\t\t\ttmp.add(board.get(bdl2.position));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn tmp;\r\n\t}",
"public boolean move(int x, int y, CheckersBoard board) {\n if (whiteTurn == true && team == Constants.TeamId.team1Id) {\n return false;\n }\n if (whiteTurn == false && team == Constants.TeamId.team2Id) {\n return false;\n }\n /**\n * then change the x - y coords of the piece\n * update the UI to remove the highlighted squares then move the piece\n * if chess and shared square you take a piece\n * if checkers you jumped them you take the piece\n * return new x - y components\n *\n * if this is too high up in the tree you can override this implementation or update it\n * to fit specific pieces if its not working for some reason\n */\n if (possible(x, y, gameBoard)) {\n int changex = this.getX()-x;\n int changey = this.getY()-y;\n CheckersPiece temp = gameBoard.boardPositions[getX()][getY()];\n gameBoard.boardPositions[getX()][getY()] = null;\n gameBoard.boardPositions[x][y] = temp;\n if (gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2] != null) {\n System.out.println(\"Here\");\n if (gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2].team != this.team) {\n gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2].imageView.setVisibility(View.GONE);\n gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2] = null;\n }\n }\n this.setX(x);\n this.setY(y);/*\n if (Math.abs(changex) == 2) {\n gameBoard.boardPositions[x + (changex/2)][y + (changey/2)] = null;\n if (team == Constants.TeamId.team1Id) {\n board.numPieces1--;\n } else if (team == Constants.TeamId.team2Id) {\n board.numPieces0--;\n }\n }*/\n\n gameBoard.boardPositions[x][y].imageView.setX(142*x);\n gameBoard.boardPositions[x][y].imageView.setY(142*y);\n // flips after move is\n whiteTurn = !whiteTurn;\n gameBoard.startTimer();\n }\n //setUpUI(gameBoard);\n if (getY() == 7 && team == Constants.TeamId.team2Id) {\n board.crown(this);\n }\n if (getY() == 0 && team == Constants.TeamId.team1Id) {\n board.crown(this);\n }\n return possible(x, y, gameBoard);\n }",
"public static boolean ai_NESW(int[][] gameGrid, int pieceTracker, int colNum) //Minor\n\t{\n\t\tint streakBonus = 0;\n\t\tcounter++; //Used to make variations in the AI move logic\n\t\tint rowNum = 0; //Used to store the row when finding the row we need to check for win condition\n\t\t//The loop below is used to find the row of last piece dropped to find exact position\n\t\tfor (int posTracker = 0; posTracker < ConnectFour.getRows(); posTracker++)\n\t\t{\n\t\t\t\n\t\t\tif (gameGrid[posTracker][colNum] != 0)\n\t\t\t{\n\t\t\t\trowNum = posTracker;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor (int rowTracker = rowNum + 1, colTracker = colNum - 1; colTracker >= 0 && rowTracker < ConnectFour.getRows(); rowTracker++ ,colTracker--)\n\t\t{\t\n\t\t\tif (counter %2 == 0) //Used to make the switch in the AI move logic\n\t\t\t\tbreak;\n\t\t\tif (gameGrid[rowTracker][colTracker] == pieceTracker) //Increments the streak if consecutive pieces are found\n\t\t\t{\n\t\t\t\tstreakBonus++; \n\t\t\t\tif (streakBonus >= 2)\n\t\t\t\t{\n\t\t\t\t\tif (ConnectFour.getFlag()) //Used to prevent same AI move, causing overflow\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (colTracker - 1 > 0) //###\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsetCoords(colTracker-1); //###\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (ConnectFour.getFlag()) //Used to prevent same AI move, causing overflow\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (colTracker - 2 > 0) //###\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsetCoords(colTracker-2); //###\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse \n\t\t\t\tstreakBonus = 0;\n\t\t}\n\t\tfor (int colTracker = colNum + 1, rowTracker = rowNum - 1; colTracker < ConnectFour.getCols() && rowTracker >= 0; rowTracker--, colTracker++)\n\t\t{\n\t\t\tif (gameGrid[rowTracker][colTracker] == pieceTracker) //Increments the streak if consecutive pieces are found\n\t\t\t{\n\t\t\t\tstreakBonus++;\n\t\t\t\tif (streakBonus >= 2)\n\t\t\t\t{\n\t\t\t\t\tif (ConnectFour.getFlag()) //Used to prevent same AI move, causing overflow\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (colTracker + 1 < ConnectFour.getCols()) //###\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsetCoords(colTracker+1); //###\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (ConnectFour.getFlag()) //Used to prevent same AI move, causing overflow\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (colTracker + 2 < ConnectFour.getCols()) //###\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsetCoords(colTracker+2); //###\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse \n\t\t\t\tstreakBonus = 0;\n\t\t}\n\t\treturn false; //if steak is not found\n\t}",
"public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void step() {\n\n if (n8) {\n // Your code here\n \n \n //by here, after your code, the cellsNext array should be updated properly\n }\n\n if (!n8) { // neighbours-4\n // your code here\n\n //by here, after your code, the cellsNext array should be updated properly\n }\n\n // Flip the arrays now.\n stepCounter++;\n\ttmp = cellsNow;\n cellsNow = cellsNext;\n\tcellsNext = tmp;\n\n }",
"private GridPiece getOppositeActive() {\n\n\t\t/*System.out.println(\"GS| origin row: \" + origin.row);\n\t\tSystem.out.println(\"GS| origin col: \" + origin.column);\n\t\tSystem.out.println(\"GS| origin center x,y: \" + origin.getCenter());*/\n\n\n if (game.gridPieces[game.getGridPiece(touchPos)] == origin) {\n return origin;\n }\n float degrees;\n\n // Get degrees\n degrees = MathUtils.atan2(touchPos.y - origin.getCenter().y, touchPos.x - origin.getCenter().x);\n\n float quarterPi = 0.78539816339f;\n\n if (!originOpposite.contains(falsePiece)) {\n for (GridPiece gridPiece : originOpposite) {\n\n //System.out.println(\"GS| degrees: \" + degrees);\n\t\t\t/*System.out.println(\"GS| gridpiece row: \" + gridPiece.row);\n\t\t\tSystem.out.println(\"GS| gridpiece col: \" + gridPiece.column);\n\t\t\tSystem.out.println(\"GS| gridpiece center x,y: \" + gridPiece.getCenter());*/\n\n // Right\n if (degrees >= 0 && degrees < quarterPi || degrees < 0 && degrees >= -quarterPi) {\n if (gridPiece.row == origin.row && gridPiece.getCenter().x > origin.getCenter().x) {\n return gridPiece;\n }\n }\n\n // Down\n else if (degrees <= -quarterPi && degrees > -quarterPi * 3) {\n if (gridPiece.column == origin.column && gridPiece.getCenter().y < origin.getCenter().y) {\n return gridPiece;\n }\n }\n\n // Left\n else if (degrees > quarterPi * 3 && degrees <= quarterPi * 4\n || degrees < -quarterPi * 3 && degrees >= -quarterPi * 4) {\n if (gridPiece.row == origin.row && gridPiece.getCenter().x < origin.getCenter().x) {\n return gridPiece;\n }\n }\n\n // Up\n else if (degrees >= quarterPi && degrees < quarterPi * 3) {\n if (gridPiece.column == origin.column && gridPiece.getCenter().y > origin.getCenter().y) {\n return gridPiece;\n }\n }\n\n }\n }\n return origin;\n }",
"private void createPieces() {\n\t\t// Create and fill up the array, iterating by piece row and piece column.\n\t\tpieces = new ArrayList<CvMat>();\n\t\tfor (int pi = 0; pi < prows; pi++) {\n\t\t\tfor (int pj = 0; pj < pcols; pj++) {\n\t\t\t\tCvMat piece = CvMat.create(pieceHeight, pieceWidth, image.type());\n\t\t\t\tpieces.add(piece);\n\t\t\t\t// Copy pixels from image to piece (as usual, do it by hand rather than OpenCV).\n\t\t\t\tfor (int i = 0; i < pieceHeight; i++) {\n\t\t\t\t\tfor (int j = 0; j < pieceWidth; j++) {\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\t\t\tpiece.put(i, j, c, image.get(i + pi * pieceHeight, j + pj * pieceWidth, c));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void checkForConversions() {\n\n for(int r=0; r<COLUMN_ROW_COUNT; r++) {\n for(int c=0; c<COLUMN_ROW_COUNT; c++) {\n Piece p = cells[r][c];\n if(p == null) continue;\n\n if (p.getType().equals(Type.GUARD)) {\n int surroundingDragons = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c + 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+ 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n\n if (surroundingDragons >= 3) {\n cells[r][c].changeType(Type.DRAGON);\n }\n }\n\n /*\n if(p.getType().equals(Type.KING)) {\n int blockedDirections = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c - 2) >= COLUMN_ROW_COUNT && cells[r][c-2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r - 2) >= COLUMN_ROW_COUNT && cells[r-2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c+1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c + 2) < COLUMN_ROW_COUNT && cells[r][c+2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r + 2) < COLUMN_ROW_COUNT && cells[r+2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if(blockedDirections == 4) {\n //gameOver = true;\n }\n }*/\n }\n }\n }",
"ArrayList<ArrayList<GamePiece>> makeBoard() {\n ArrayList<ArrayList<GamePiece>> row = new ArrayList<ArrayList<GamePiece>>();\n for (int i = 0; i < this.width; i++) {\n ArrayList<GamePiece> column = new ArrayList<GamePiece>();\n for (int j = 0; j < this.height; j++) {\n GamePiece temp = new GamePiece(i, j);\n column.add(temp);\n nodes.add(temp);\n }\n row.add(column);\n }\n return row;\n }",
"static ArrayList<int[]> searcherBottomLeftTiles(ArrayList<int[]> MoveList,int CurrentX, int CurrentY){\n\t\t\n\t\tfor(int j = 1; j <=7 ; j++){\n\t\t\tint [] NewXY = new int[2];\n\t\t\tNewXY[0] = CurrentX - j;\n\t\t\tNewXY[1] = CurrentY + j;\n\t\t\t\n\t\t\tif(NewXY[0] < 0 || NewXY[1] > 7){\n\t\t\t\treturn MoveList;\n\t\t\t}\n\t\t\t\n\n\t\t\tfor(int [] i: aggregateBlacks()){\n\t\t\t\tint[] Coordinate = i;\n\t\t\t\tif(Arrays.equals(Coordinate, NewXY)){\n\t\t\t\t\t//System.out.println(\"We have found a valid blacks piece to kill \" + j + \" tiles bottom left of this bishop\");\n\t\t\t\t\tMoveList.add(NewXY);;\n\t\t\t\t\treturn MoveList;\n\t\t\t\t}\t \t\t\t\t\n\t\t\t}\n\n\t\t\tfor(int [] i: aggregateWhites()){\n\t\t\t\tint[] Coordinate = i;\n\t\t\t\tif(Arrays.equals(Coordinate, NewXY)){\n\t\t\t\t\t//System.out.println(\"We have found a white piece \" + j + \" tiles top of this Queen\");\n\t\t\t\t\treturn MoveList;\n\t\t\t\t}\t\t\n\t\t\t}\t\n\t\t\tMoveList.add(NewXY);\n\t\t\t}\n\t\treturn MoveList;\n\t\t}",
"@Override\n public Collection<Move> calculateLegalMoves(Board board) {\n System.out.println(\"INSIDE Knight: calculateLegalMoves()\");\n System.out.println(\"------------------------------>\\n\");\n\n //ArrayList of moves used to store all possible legal moves.\n final List<Move> legalMoves = new ArrayList<>();\n\n //Iterate the constant class array of piece offsets.\n for(final int currentCandidate : CANDIDATE_MOVE_COORDS){\n //Add the current coordinate of the piece to each offset, storing as a destination coordinate.\n final int candidateDestinationCoord = this.piecePosition + currentCandidate;\n\n //If the destination coordinate is within legal board bounds (between 0 and 64)...\n if(BoardUtils.isValidCoord(candidateDestinationCoord)){\n //Check to see if the piece is in the first column and its destination would move it outside the board.\n if(isfirstColumnExclusion(this.piecePosition, currentCandidate) ||\n isSecondColumnExclusion(this.piecePosition, currentCandidate) ||\n isSeventhColumnExclusion(this.piecePosition, currentCandidate) ||\n isEighthColumnExclusion(this.piecePosition, currentCandidate)){\n continue; //Continue the loop if any of these methods return true\n }\n\n //Store the tile of the destination coordinate.\n final Tile candidateDestinationTile = board.getTile(candidateDestinationCoord);\n\n //If the tile is not marked as occupied by the Tile class...\n if(!candidateDestinationTile.isOccupied()){\n //Add the move to the list of legal moves as a non-attack move.\n legalMoves.add(new MajorMove(board, this, candidateDestinationCoord));\n }\n else{\n //Otherwise, get the type and alliance of the piece at the destination.\n final Piece pieceAtDestination = candidateDestinationTile.getPiece();\n final Alliance pieceAlliance = pieceAtDestination.getPieceAlliance();\n\n //If the piece at the occupied tile's alliance differs...\n if(this.pieceAlliance != pieceAlliance){\n //Add the move to the list of legal moves as an attack move.\n legalMoves.add(new MajorAttackMove(board, this, candidateDestinationCoord, pieceAtDestination));\n }\n }\n }\n }\n\n //Return the list of legal moves.\n return legalMoves;\n }",
"@Test\n\tpublic void threePieceWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(29,80);\n\t\td.set(9,79);\n\t\td.set(33,82);\n\t\td.set(12,94);\n\t\td.set(32,114);\n\t\td.set(32,70);\n\t\td.set(12,92);\n\t\td.set(10,83);\n\t\td.set(12,81);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(81);\n\t\tassertTrue(3==test_arr.get(0).getX() && 6==test_arr.get(0).getY()\n\t\t\t&& 4==test_arr.get(1).getX() && 7==test_arr.get(1).getY()\n\t\t\t&& 2==test_arr.get(2).getX() && 7==test_arr.get(2).getY());\n\t}",
"Iterator<BoardPosition> possibleMovingPositions(BoardPosition from, Game game, Map<BoardPosition, Piece> pieceMap);",
"public void addPieces() {\r\n\t\tboard[0] = 8;\r\n\t\tboard[1] = 1;\r\n\t\tboard[2] = 6;\r\n\t\tboard[3] = 3;\r\n\t\tboard[4] = 5;\r\n\t\tboard[5] = 7;\r\n\t\tboard[6] = 4;\r\n\t\tboard[7] = 9;\r\n\t\tboard[8] = 2;\r\n\t}",
"boolean piecesContiguous(Side player) {\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n if (_pieces[i][j].side() == player) {\n boolean[][] traverse = new boolean[8][8];\n return getCount(player) == contiguousHelp(traverse, i,\n j, player);\n }\n }\n }\n\n }",
"public void nextPiece() {\n\t\tif (currentPiece != null) {\n\t\t\tfor (Loc l : currentPiece.getLocation()) {\n\t\t\t\tif (!l.isOnBoard()) {\n\t\t\t\t\tendGame();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentPiece = piecePlacer.nextPiece();\n\n\t\tdropPiece();\n\t\tnextPiecePanel.setNextPiece();\n\t}",
"private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}",
"static ArrayList<Piece> createPieces (Bitmap image) {\n\t\tint[] picSize = InitDisplay.getPicDimensions();\n\t\tint[] pieceSize = InitDisplay.getPieceDimensions();\n\t\t\n\t\t/* Scale the image to the dynamically calculated values */\n\t\tBitmap imageScaled = Bitmap.createScaledBitmap(image, picSize[WIDTH], picSize[HEIGHT], false);\n\t\t\n\t\t/* The imageScaled bitmap now contains the given image in scaled bitmap form. Break it and\n\t\t * assign it to [rows*cols] small Jigsaw pieces after randomizing their positions and orientations\n\t\t * The image is being broken into a 3x3 grid. i represents rows while j represents columns */\n\t\t\n\t\tArrayList<Piece> pieces = new ArrayList<Piece>(Play.NUM[TOTAL]);\n\t\tBitmap imgPiece = null;\n\t\tint offsetX = 0, offsetY = 0;\n\t\tint pos = 0;\n\t\t\n\t\tfor (int i=0; i<Play.NUM[COLS]; i++) {\n\t\t\t/* offsetX represents the x coordinate while offsetY represents the y coordinate */\n\t\t\toffsetX = 0; //start from (0,0)\n\t\t\tfor (int j=0; j<Play.NUM[ROWS]; j++) {\n\t\t\t\t/* Extract a specific area of the imageScaled bitmap and store it in imgPiece.\n\t\t\t\t * Coordinates for the extraction are specified using offsetX and offsetY */\n\t\t\t\timgPiece = Bitmap.createBitmap\n\t\t\t\t\t\t(imageScaled, offsetX, offsetY, pieceSize[WIDTH], pieceSize[HEIGHT]);\n\t\t\t\t\n\t\t\t\t/* Create a Jigsaw piece and add it to the pieces array */\n\t\t\t\tPiece piece = new Piece (imgPiece); //create a new piece with the extracted bitmap image\n\t\t\t\tpieces.add(pos, piece); //add the piece to the pieces array\n\t\t\t\t\n\t\t\t\toffsetX += pieceSize[WIDTH]; //move to the next x coordinate\n\t\t\t\tpos++;\n\t\t\t}\n\t\t\toffsetY += pieceSize[HEIGHT]; //move to the next y coordinate\n\t\t}\n\t\t\n\t\treturn pieces;\n\t}",
"void makeMove(int row, int col, int nextRow, int nextCol) {\r\n int temp = checks[row][col];\r\n checks[nextRow][nextCol] = temp;\r\n checks[row][col] = 0;\r\n if (Math.abs(nextRow - row) == 2){\r\n removePiece(nextRow, nextCol,row, col);\r\n }\r\n checkKing(nextRow,nextCol);\r\n }",
"public static boolean ai_EW(int[][] gameGrid, int pieceTracker, int colNum)\n\t{\n\t\tcounter++; //Used to make variations in the AI move logic\n\t\tint rowNum = 0; //Used to store the row when finding the row we need to check for win condition\n\t\t//The loop below is used to find the row of last piece dropped to find exact position\n\t\tfor (int posTracker = 0; posTracker < ConnectFour.getRows(); posTracker++)\n\t\t{\n\t\t\t\n\t\t\tif (gameGrid[posTracker][colNum] != 0)\n\t\t\t{\n\t\t\t\trowNum= posTracker;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint streakBonus = 0; \n\t\tfor (int tracker = ConnectFour.getCols()-1; tracker > 0; tracker--) //CHECKS THE LEFT\n\t\t{\n\t\t\tif (counter %2 == 0) //Used to make the switch in the AI move logic\n\t\t\t\tbreak;\n\t\t\tif (gameGrid[rowNum][tracker] == pieceTracker) //Increments the streak if consecutive pieces are found\n\t\t\t{\n\t\t\t\tstreakBonus++;\n\t\t\t\tif (streakBonus >= 2)\n\t\t\t\t{\n\t\t\t\t\tif (ConnectFour.getFlag()) //Used to prevent same AI move, causing overflow\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tsetCoords(tracker-1);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (ConnectFour.getFlag()) //Used to prevent same AI move, causing overflow\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (tracker + 2 < ConnectFour.getCols()) //###\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsetCoords(tracker+1); //###\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse \n\t\t\t\tstreakBonus = 0;\n\t\t}\n\t\tfor (int tracker = 0; tracker < ConnectFour.getCols(); tracker++) //CHECKS THE RIGHT\n\t\t{\n\t\t\t\n\t\t\tif (gameGrid[rowNum][tracker] == pieceTracker) //Increments the streak if consecutive pieces are found\n\t\t\n\t\t\t{\n\t\t\t\tstreakBonus++;\n\t\t\t\tif (streakBonus >= 2)\n\t\t\t\t{\n\t\t\t\t\tif (ConnectFour.getFlag()) //Used to prevent same AI move, causing overflow\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tsetCoords(tracker+1);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (ConnectFour.getFlag()) //Used to prevent same AI move, causing overflow\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (tracker - 2 > 0) //###\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsetCoords(tracker-1);//###\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse \n\t\t\t\tstreakBonus = 0;\n\t\t}\n\t\treturn false; //if steak is not found\n\t}",
"static List<Point> getMoves(Point[] possibleTilePos, int[] rowMoves, int[] colMoves, List<Point> pieceMoves, int length) {\n pieceMoves.clear();\n for (int i = 0; i < length; i++) {\n possibleTilePos[i] = new Point(rowMoves[i], colMoves[i]);\n\n }\n pieceMoves.addAll(Arrays.asList(possibleTilePos));\n return pieceMoves;\n }",
"public ArrayList<PentagoGame> nextPossibleMoves() {\n ArrayList<PentagoGame> children = new ArrayList<>();\n for(int i = 0; i < 6; i++) { // for each row I can place a piece\n for(int j = 0; j < 6; j++) { // for each column\n for(int k = 0; k < 4; k++ ) { // for each board to rotate\n for(int d = 0; d < 2; d ++) {// for each direction to rotate\n boolean leftRotate = false;\n if(d == 0) {\n leftRotate = true;\n }\n Move move = new Move(i, j, k, leftRotate);\n if(validMove(whosTurn(), move)) {\n PentagoGame tempGame = new PentagoGame(this);\n tempGame.playPiece(whosTurn(), move);\n tempGame.rotateBoard(whosTurn(), move);\n tempGame.turnOver();\n move.setGameState(tempGame);\n move.setUtility(calulateUtility(move));\n // todo\n children.add(tempGame);\n }\n }\n }\n }\n }\n\n return children;\n }",
"private void addPieces() {\n gridPane.getChildren().clear();\n Map<Piece, Position> pieces = controller.getAllActivePiecesPositions();\n /* Add the tiles */\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 8; col++) {\n Tile tile = new TileView(new Position(row, col));\n gridPane.add(tile.getRootNode(),\n 1 + tile.getPosition().getCol(),\n 1 + tile.getPosition().getRow());\n GridPane.setHgrow(tile.getRootNode(), Priority.ALWAYS);\n GridPane.setVgrow(tile.getRootNode(), Priority.ALWAYS);\n getTiles()[row][col] = tile;\n tile.getRootNode().setOnMouseClicked(\n tileListener(tile));\n tile.clear();\n tile.setSymbol(\"\");\n }\n }\n /* Add the pieces */\n for (Piece p : pieces.keySet()) {\n Position placeAt = pieces.get(p);\n getTileAt(placeAt).setSymbol(p.getType().getSymbol(p.getSide()));\n }\n /* Add the coordinates around the perimeter */\n for (int i = 1; i <= 8; i++) {\n Text coord1 = new Text((char) (64 + i) + \"\");\n coord1.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord1.setFill(Color.WHITE);\n GridPane.setHalignment(coord1, HPos.CENTER);\n gridPane.add(coord1, i, 0);\n\n Text coord2 = new Text((char) (64 + i) + \"\");\n coord2.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord2.setFill(Color.WHITE);\n GridPane.setHalignment(coord2, HPos.CENTER);\n gridPane.add(coord2, i, 9);\n\n Text coord3 = new Text(\" \" + (9 - i) + \" \");\n coord3.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord3.setFill(Color.WHITE);\n GridPane.setHalignment(coord3, HPos.CENTER);\n gridPane.add(coord3, 0, i);\n\n Text coord4 = new Text(\" \" + (9 - i) + \" \");\n coord4.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord4.setFill(Color.WHITE);\n GridPane.setHalignment(coord4, HPos.CENTER);\n gridPane.add(coord4, 9, i);\n }\n }",
"public static Array<GamePiece> getAllFirstMoves(PlayerArea pa, GameMode.Tile[][] grid){\n int ox = 0, oy = 0;\n\n switch(pa.playerColor){\n case BLUE:\n ox = -1;\n oy = -1;\n break;\n case RED:\n ox = 20;\n oy = -1;\n break;\n case GREEN:\n ox = 20;\n oy = 20;\n break;\n case YELLOW:\n ox = -1;\n oy = 20;\n break;\n }\n\n Array<GamePiece> possibleMoves = new Array<GamePiece>();\n for(GamePiece gp : pa.gamePieces){\n if(gp != null) {\n Piece p = gp.template;\n for (int i = 0; i < p.rotations; i++) {\n for (int j = 0; j < p.corners[i].length; j++) {\n Pair pair = p.corners[i][j];\n int x = ox - pair.x;\n int y = oy - pair.y;\n if (validPartial(p, i, x, y, grid, pa.playerColor)) {\n possibleMoves.add(new GamePiece(x, y, i, p, pa.playerColor));\n }\n }\n }\n }\n }\n return possibleMoves;\n }",
"private void doNextRow(){\n\t\tmove();\n\t\twhile (frontIsClear()){\n\t\t\talternateBeeper();\n\t\t}\n\t\tcheckPreviousSquare();\t\n\t}",
"public int[] getAllPossibleMoves(boolean ignore) {\n int[] validMoves;\n int[] validMovesResized;\n int validMovesIndex = 0;\n int startRow = this.getRow();\n int startCol = this.getCol();\n \n validMoves = new int[28]; // For a bishop, there are a maximum of 14 possible squares it could move to\n\n // First move from the bishops spot up diagonally to the right (ie col++, row++)\n for (int i = startCol+1, j = startRow+1; i<=8 && j<8; i++,j++) {\n validMoves[validMovesIndex] = i; // the col\n validMoves[validMovesIndex + 1] = j; // the row\n validMovesIndex = validMovesIndex + 2;\n }\n\n // Next move from the bishops start spot down diagonally to the right (ie col++, row--)\n for (int i = startCol+1, j = startRow-1; i<=8 && j>0; i++,j--) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n\n // Next move from the bishops start spot down diagonally to the left (ie col--, row--)\n for (int i = startCol-1, j = startRow-1; i>0 && j>0; i--,j--) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n // Next move from the bishops start spot up diagonally to the left (ie col--, row++)\n for (int i = startCol-1, j = startRow+1; i>0 && j<=8; i--,j++) {\n validMoves[validMovesIndex] = i;\n validMoves[validMovesIndex + 1] = j;\n validMovesIndex = validMovesIndex + 2;\n }\n \n // depending on the position of the bishop, the final array of possible moves may not have 14 squares\n // although that is the maximum. Create a new array of the actual size and copy into it.\n validMovesResized = Arrays.copyOf(validMoves, validMovesIndex);\n return validMovesResized;\n }",
"public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\n }",
"private static Square[] reachableAdjacentSquares\n (GameBoard board, Square currLoc, int pno) {\n return reachableAdjacentSquares(board, currLoc, pno, -1, 0,true);\n }",
"public static void validationcheck2(int row, int column, String piecevalue){\n\t\tString oppositepiece;\n\t\tif(piecevalue.equals(\"x\")){\n\t\t\toppositepiece=\"o\";\n\t\t}\n\t\telse if(piecevalue.equals(\"o\")){\n\t\t\toppositepiece=\"x\";\n\t\t}\n\t\telse{\n\t\t\toppositepiece=\"-\";\n\t\t}\n\t\t//R=right, L=left, T=top, B=bottom, and there are diagonals such as TL=top left.\n\t\tboolean foundR=false,foundL=false,foundT=false,foundB=false,foundTL=false,foundTR=false,foundBL=false,foundBR=false;\n\t\tint checkfurtherR=1,checkfurtherL=1,checkfurtherT=1,checkfurtherB=1,checkfurtherTL=1,checkfurtherTR=1,checkfurtherBL=1,checkfurtherBR=1;\n\t\twhile(board[row][column+checkfurtherR].equals(oppositepiece)){\n\t\t\tcheckfurtherR++;\n\t\t}\n\t\tif(board[row][column+checkfurtherR].equals(piecevalue)&&checkfurtherR>1){\n\t\t\tfoundR=true;\n\t\t}\n\t\twhile(board[row][column-checkfurtherL].equals(oppositepiece)){\n\t\t\tcheckfurtherL++;\n\t\t}\n\t\tif(board[row][column-checkfurtherL].equals(piecevalue)&&checkfurtherL>1){\n\t\t\tfoundL=true;\n\t\t}\n\t\twhile(board[row+checkfurtherB][column].equals(oppositepiece)){\n\t\t\tcheckfurtherB++;\n\t\t}\n\t\tif(board[row+checkfurtherB][column].equals(piecevalue)&&checkfurtherB>1){\n\t\t\tfoundB=true;\n\t\t}\n\t\twhile(board[row-checkfurtherT][column].equals(oppositepiece)){\n\t\t\tcheckfurtherT++;\n\t\t}\n\t\tif(board[row-checkfurtherT][column].equals(piecevalue)&&checkfurtherT>1){\n\t\t\tfoundT=true;\n\t\t}\n\t\twhile(board[row-checkfurtherTR][column+checkfurtherTR].equals(oppositepiece)){\n\t\t\tcheckfurtherTR++;\n\t\t}\n\t\tif(board[row-checkfurtherTR][column+checkfurtherTR].equals(piecevalue)&&checkfurtherTR>1){\n\t\t\tfoundTR=true;\n\t\t}\n\t\twhile(board[row-checkfurtherTL][column-checkfurtherTL].equals(oppositepiece)){\n\t\t\tcheckfurtherTL++;\n\t\t}\n\t\tif(board[row-checkfurtherTL][column-checkfurtherTL].equals(piecevalue)&&checkfurtherTL>1){\n\t\t\tfoundTL=true;\n\t\t}\n\t\twhile(board[row+checkfurtherBL][column-checkfurtherBL].equals(oppositepiece)){\n\t\t\tcheckfurtherBL++;\n\t\t}\n\t\tif(board[row+checkfurtherBL][column-checkfurtherBL].equals(piecevalue)&&checkfurtherBL>1){\n\t\t\tfoundBL=true;\n\t\t}\n\t\twhile(board[row+checkfurtherBR][column+checkfurtherBR].equals(oppositepiece)){\n\t\t\tcheckfurtherBR++;\n\t\t}\n\t\tif(board[row+checkfurtherBR][column+checkfurtherBR].equals(piecevalue)&&checkfurtherBR>1){\n\t\t\tfoundBR=true;\n\t\t}\n\t\tif(foundR==true||foundL==true||foundT==true||foundB==true||foundTL==true||foundTR==true||foundBL==true||foundBR==true){\n\t\t\tvalidation=true;\n\t\t}\n\t\telse{\n\t\t\tvalidation=false;\n\t\t}\n\t}",
"public void arrangeBoard(){\n for(int i=0;i<6;i++){\n for(int j=0;j<6;j++){\n if(i==2 && j==0){ //set the target ship.\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.gridwidth = 2;\n targetShip = new JLabel();\n targetShip.setIcon(new ImageIcon(\"design\\\\ships\\\\targetShip.png\"));\n mainPanel.add(targetShip,gbc);\n }\n else if(i==2 && j==1){\n continue;\n }\n else{ //put free spaces in the other places.\n gbc.gridx = j;\n gbc.gridy = i;\n gbc.gridwidth = 1;\n gbc.gridheight = 1;\n freeSpaceButton freeSpace = new freeSpaceButton(new Point(j,i));\n mainPanel.add(freeSpace,gbc);\n }\n }\n }\n }",
"public ArrayList<Cell> getPseudoLegalMoves() {\n\n int[][] offsetMultiplier = {{-1,-1},{-1,1},{1,-1},{1,1}}; //4 directions NW, NE, SW, SE\n int x = getRow(); int y = getColumn();\n\n\n return Piece.slidingPieceMoves(x,y,this.getColor(),offsetMultiplier);\n\n }",
"public void getNewPiece(){\n\t\tthis.next_piece_index= rand.nextInt(18);\n\t\tthis.next_piece_colour= rand.nextInt(10);\n\t\tnext_currentPiece = Pentominoes.Pentomino_array[this.next_piece_index];\n\t\tnext_currentColor = Pentominoes.color_array[this.next_piece_colour];\n\t\tfor(int i = 0; i < next_pieces_array.length; i++){\n\t\t\tfor(int j = 0; j<next_pieces_array[0].length; j++){\n\t\t\t\t\tnext_pieces_array[i][j] = Color.WHITE;\n\t\t\t}\n\t\t}\n\t\tfor(Point p: next_currentPiece){\n\t\t\tnext_pieces_array[p.x + pieceOrigin2.x][p.y + pieceOrigin2.y] = next_currentColor;\n\t\t}\n\t}",
"static ArrayList<int[]> searcherTopLeftTiles(ArrayList<int[]> MoveList,int CurrentX, int CurrentY){\n\t\t\n\t\tfor(int j = 1; j <=7 ; j++){\n\t\t\tint [] NewXY = new int[2];\n\t\t\tNewXY[0] = CurrentX - j;\n\t\t\tNewXY[1] = CurrentY - j;\n\t\t\t\n\t\t\tif(NewXY[0] < 0 || NewXY[1] < 0){\n\t\t\t\treturn MoveList;\n\t\t\t}\n\t\t\t\n\n\t\t\tfor(int [] i: aggregateBlacks()){\n\t\t\t\tint[] Coordinate = i;\n\t\t\t\tif(Arrays.equals(Coordinate, NewXY)){\n\t\t\t\t\t//System.out.println(\"We have found a valid black piece to kill \" + j + \" tiles top left of this bishop\");\n\t\t\t\t\tMoveList.add(NewXY);\n\t\t\t\t\treturn MoveList;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tfor(int [] i: aggregateWhites()){\n\t\t\t\tint[] Coordinate = i;\n\t\t\t\tif(Arrays.equals(Coordinate, NewXY)){\n\t\t\t\t\t//System.out.println(\"We have found a white piece \" + j + \" tiles top of this Queen\");\n\t\t\t\t\treturn MoveList;\n\t\t\t\t}\t\t\n\t\t\t}\t\n\t\t\tMoveList.add(NewXY);\n\t\t}\n\t\treturn MoveList;\n\t}",
"public List<int[][]> evaluate(IBoard board){\n\n int area = board.getHeight() * board.getWidth();\n\n int[][] newArray = new int[area][2];\n\n int k = 0;\n\n while (k < newArray.length) {\n for (int i = 0; i < board.getHeight(); i++) {\n for (int j = 0; j < board.getWidth(); j++) {\n newArray[k][0] = i;\n newArray[k][1] = j;\n k++;\n }\n }\n }\n\n List<int[][]> Allmoves = new ArrayList<>();\n\n int res = newArray.length / board.getHeight();\n\n /*For rows*/\n int q = 0;\n int w = res;\n\n for (int i = 0; i < res; i++) {\n int[][] arr = new int[res][2];\n\n int e = 0;\n\n for (int j = q; j < w; j++) {\n arr[e][0] = newArray[j][0];\n arr[e][1] = newArray[j][1];\n e++;\n }\n\n w += res;\n q += res;\n\n Allmoves.add(arr);\n\n }\n\n /*For columns*/\n int r = 0;\n for (int i = 0; i < res; i++) {\n\n int[][] arr = new int[res][2];\n int e = 0;\n\n for (int j = 0; j < res; j++) {\n arr[e][0] = newArray[r][0];\n arr[e][1] = newArray[r][1];\n\n r += res;\n e++;\n }\n r = 0;\n r += i + 1;\n\n Allmoves.add(arr);\n }\n\n /*For diagonal - 1*/\n int[][] arr = new int[res][2];\n int d1 = res + 1;\n int d = 0;\n int e = 0;\n for (int i = 0; i < res; i++) {\n arr[e][0] = newArray[d][0];\n arr[e][1] = newArray[d][1];\n d += d1;\n e++;\n }\n\n Allmoves.add(arr);\n\n int[][] arr1 = new int[res][2];\n int d2 = res - 1;\n int D = res - 1;\n int p = 0;\n for (int i = 0; i < res; i++) {\n arr1[p][0] = newArray[D][0];\n arr1[p][1] = newArray[D][1];\n D += d2;\n p++;\n }\n\n Allmoves.add(arr1);\n\n return Allmoves;\n\n }",
"@Test\n\tpublic void kingOnThroneBlackPieceLeftWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(29,100);\n\t\td.set(1,103);\n\t\td.set(27,89);\n\t\td.set(5,46);\n\t\td.set(24,58);\n\t\td.set(2,16);\n\t\td.set(24,60);\n\t\td.set(5,27);\n\t\td.set(32,112);\n\t\td.set(5,49);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(49);\n\t\tassertTrue(4==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\t}",
"private static int[] moveIfPossible(ArrayList<CharacterSprite> pieces, CharacterSprite selectedObject,\n boolean whiteTurn, int[] destination) {\n int[] result = new int[]{0, 0};\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(destination[0] * CharacterSprite.size, destination[1] * CharacterSprite.size)) {\n if (whiteTurn) {\n if (sprite.isWhite()) {\n return result;\n }\n } else {\n if (!sprite.isWhite()) {\n return result;\n }\n }\n result[1] = sprite.getPoints();\n pieces.remove(sprite);\n break;\n }\n }\n\n selectedObject.setX(destination[0] * CharacterSprite.size);\n selectedObject.setY(destination[1] * CharacterSprite.size);\n selectedObject.setMoved();\n result[0] = 1;\n int[] position = new int[]{selectedObject.getX(), selectedObject.getY()};\n String value = position[0] + \",\" + position[1] + \"/\" + (destination[0] * CharacterSprite.size) + \",\" + (destination[1] * CharacterSprite.size);\n DatabaseReference dataRef = database.getReference(\"chess/\" + sessionName + \"/chessMove\");\n dataRef.setValue(value);\n return result;\n }",
"@Test\n\tpublic void kingOnThroneBlackPieceRightWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\t//moving pieces out so capture can occur\n\t\td.set(24,68);\n\t\td.set(7,29);\n\t\td.set(36,119);\n\t\td.set(11,106);\n\t\td.set(20,33);\n\t\td.set(4,85);\n\t\td.set(35,118);\n\t\td.set(3,95);\n\t\td.set(25,62);\n\t\td.set(4,63);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(63);\n\t\tassertTrue(6==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\n\t}",
"private static int[][] distanceGrid(final int[][] board) {\n final int numRows = board.length;\n final int numCols = board[0].length;\n\n final int distance = 0;\n\n final int[][] distanceGrid = new int[numRows][numCols];\n for (final int[] row : distanceGrid) {\n Arrays.fill(row, INACCESSABLE_SPACE_DISTANCE);\n }\n // For each space on the board\n for (int r = 0; r < numRows; r++) {\n nextBoardSpace:\n for (int c = 0; c < numCols; c++) {\n ArrayList<int[]> explored = new ArrayList<>();\n Queue<int[]> toExplore = new LinkedList<>();\n Map<String,Integer> dists = new HashMap<>();\n\n // Add the space to the explore queue\n toExplore.add(new int[] {r, c, 0});\n \n // While there is more to explore\n while (!toExplore.isEmpty()) {\n int[] currExplor = toExplore.remove();\n explored.add(currExplor);\n int explRow = currExplor[0];\n int explCol = currExplor[1];\n int explDist = currExplor[2];\n\n String key = Arrays.toString(new int[] {explRow, explCol});\n dists.put(key, 1);\n \n // If the space contains a player's move, add the distance to the \n //distanceGrid, and continue on the next boardspace\n if (board[explRow][explCol] > 0) {\n distanceGrid[r][c] = explDist;\n continue nextBoardSpace;\n }\n \n // Otherwise, if the space is empty, add it's neighbours to the queue\n if (board[explRow][explCol] == 0) {\n ArrayList<int[]> neighbours = Utils.neighbours(explRow, explCol, numRows, numCols);\n for (int[] neighbour : neighbours) {\n int[] temp = new int[] {neighbour[0], neighbour[1], explDist+1};\n if (dists.containsKey(key)) continue;\n toExplore.add(temp);\n }\n }\n }\n\n // If a path to one of our spaces is not found, space is inaccessable\n if (board[r][c] != 0) {\n distanceGrid[r][c] = -1;\n }\n\n }\n }\n return distanceGrid;\n }",
"public void getNeighbors(){\n // North \n if(this.row - this.value>=0){\n this.north = adjacentcyList[((this.row - this.value)*col_size)+col];\n }\n // South\n if(this.row + value<row_size){\n this.south = adjacentcyList[((this.row+this.value)*row_size)+col];\n }\n // East\n if(this.col + this.value<col_size){\n this.east = adjacentcyList[((this.col+this.value)+(this.row)*(col_size))];\n }\n // West\n if(this.col - this.value>=0){\n this.west = adjacentcyList[((this.row*col_size)+(this.col - this.value))];\n }\n }",
"@Test\r\n\tpublic void testAdjacencyWalkways()\r\n\t{\r\n\t\t// Test on top edge of board, two walkway pieces\r\n\t\tSet<BoardCell> testList = board.getAdjList(0, 7);\r\n\t\tassertTrue(testList.contains(board.getCellAt(0, 8)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(1, 7)));\r\n\t\tassertEquals(2, testList.size());\r\n\t\t\r\n\t\t// Test on left edge of board, one walkway piece\r\n\t\ttestList = board.getAdjList(8, 0);\r\n\t\tassertTrue(testList.contains(board.getCellAt(9, 0)));\r\n\t\tassertEquals(1, testList.size());\r\n\r\n\t\t// Test a walkway next to closet, 2 walkway pieces\r\n\t\ttestList = board.getAdjList(12, 9);\r\n\t\tassertTrue(testList.contains(board.getCellAt(12, 10)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(13, 9)));\r\n\t\tassertEquals(2, testList.size());\r\n\r\n\t\t// Test surrounded by 4 walkways\r\n\t\ttestList = board.getAdjList(11,4);\r\n\t\tassertTrue(testList.contains(board.getCellAt(11, 5)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(11, 3)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(12, 4)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(10, 4)));\r\n\t\tassertEquals(4, testList.size());\r\n\t\t\r\n\t\t// Test on bottom edge of board, next to 1 room piece\r\n\t\ttestList = board.getAdjList(24, 18);\r\n\t\tassertTrue(testList.contains(board.getCellAt(23, 18)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(24, 17)));\r\n\t\tassertEquals(2, testList.size());\r\n\t\t\r\n\t\t// Test on right edge of board, next to 1 room piece\r\n\t\ttestList = board.getAdjList(10, 24);\r\n\t\tassertTrue(testList.contains(board.getCellAt(11, 24)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(10, 23)));\r\n\t\tassertEquals(2, testList.size());\r\n\r\n\t\t// Test on walkway next to door that is not in the needed\r\n\t\t// direction to enter\r\n\t\ttestList = board.getAdjList(12, 21);\r\n\t\tassertTrue(testList.contains(board.getCellAt(11, 21)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(13, 21)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(12, 20)));\r\n\t\tassertEquals(3, testList.size());\r\n\t}",
"private boolean tryMove(Shape newPiece, int newX, int newY) {\n for (int i = 0; i < 4; ++i) {\n\n int x = newX + newPiece.x(i);\n int y = newY - newPiece.y(i);\n//if a piece reaches the edge it stops\n if (x < 0 || x >= BOARD_WIDTH || y < 0 || y >= BOARD_HEIGHT) {\n return false;\n }\n//if a piece is adjacent to any fallen tetris pieces it stops\n if (shapeAt(x, y) != Tetrominoe.NoShape) {\n return false;\n }\n }\n\n curPiece = newPiece;\n curX = newX;\n curY = newY;\n\n repaint();\n\n return true;\n }",
"ArrayList<Cell> getChildren(Integer[][] level){\n int[][] values={{0,1},{0,-1},{1,0},{-1,0}};\n ArrayList<Cell> children = new ArrayList<>();\n for (int i = 0; i < values.length; i++){\n if (isLegalMove(this.getI()+values[i][0], this.getJ()+values[i][1],level)){\n children.add(new Cell(this.getI()+values[i][0], this.getJ()+values[i][1]));\n }\n }\n //the code below achieves the same goal; still here for clarity\n\n// if (isLegalMove(this.getI(), this.getJ()+1, level)) {\n// children.add(new Cell(this.getI(), this.getJ()+1));\n// }\n// if (isLegalMove(this.getI(), this.getJ()-1, level)) {\n// children.add(new Cell(this.getI(), this.getJ()-1));\n// }\n// if (isLegalMove(this.getI()+1, this.getJ(), level)) {\n// children.add(new Cell(this.getI()+1, this.getJ()));\n// }\n// if (isLegalMove(this.getI()-1, this.getJ(), level)) {\n// children.add(new Cell(this.getI()-1, this.getJ()));\n// }\n return children;\n }",
"public Space nextUnsolved(){\n for (int i = 0; i < dimensions[0];i++){\n for (int j = 0; j<dimensions[1];j++){\n if (grids[i][j].labeled==false) return grids[i][j];\n }\n }\n return null;\n }",
"List<Point> getPath(int grid[][], Point src, Point dest);",
"int contiguousHelp(boolean[][] traversed, int x, int y, Side player) {\n traversed[x][y] = true;\n result = 1;\n for (int i = x - 1 ; i <= x + 1; i++) {\n for (int j = y - 1; i <= y + 1; j++) {\n if (x < 0 || x > 7 || y < 0 || y > 7) {\n continue;\n } else if (!(traversed[i][j])) {\n traversed[i][j] = true;\n if(_pieces[i][j].side() == player) {\n result += contiguousHelp(traversed i, j, player);\n }\n }\n }\n }\n return result;\n }",
"@Override\n public String[] draw() {\n Piece[][] pieces = solver.getSolution();\n int height = pieces.length;\n int width = pieces[0].length;\n char[][] board = new char[height * 4][width * 4 + 1];\n int totalPieces = pieces.length * pieces[0].length;\n int countPieces = 0;\n // run through each piece and add it to the temp board\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n countPieces++;\n Piece curPiece = pieces[i][j];\n int tempHeight = i * 4 + 1;\n int tempWidth = j * 4 + 2;\n if (curPiece == null) {\n board[tempHeight][tempWidth] = EMPTY;\n board[tempHeight][tempWidth + 1] = EMPTY;\n board[tempHeight][tempWidth + 2] = EMPTY;\n board[tempHeight + 1][tempWidth] = EMPTY;\n board[tempHeight + 1][tempWidth + 1] = EMPTY;\n board[tempHeight + 1][tempWidth + 2] = EMPTY;\n board[tempHeight + 2][tempWidth] = EMPTY;\n board[tempHeight + 2][tempWidth + 1] = EMPTY;\n board[tempHeight + 2][tempWidth + 2] = EMPTY;\n Arrays.fill(board[tempHeight + 3], EMPTY);\n } else {\n char[][] displayPiece = pieceToDisplay(curPiece);\n\n board[tempHeight][tempWidth] = displayPiece[0][0];\n board[tempHeight][tempWidth + 1] = displayPiece[0][1];\n board[tempHeight][tempWidth + 2] = displayPiece[0][2];\n board[tempHeight + 1][tempWidth] = displayPiece[1][0];\n board[tempHeight + 1][tempWidth + 1] = displayPiece[1][1];\n board[tempHeight + 1][tempWidth + 2] = displayPiece[1][2];\n board[tempHeight + 2][tempWidth] = displayPiece[2][0];\n board[tempHeight + 2][tempWidth + 1] = displayPiece[2][1];\n board[tempHeight + 2][tempWidth + 2] = displayPiece[2][2];\n Arrays.fill(board[tempHeight + 3], EMPTY);\n }\n }\n }\n\n // convert the completed char[][] to the final string[]\n return finalBoard(board, totalPieces, totalPieces - countPieces);\n }",
"public void specialMove() {\n\t\tChessSquare initial = getSquare();\n\t\tChessSquare next;\n\t\t\n\t\tif(initial.getNorth() != null){\n\t\t\tnext = initial.getNorth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null && next.getWest().getOccupant() == null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t}\n\t\t\n\t\tif(initial.getSouth() != null){\n\t\t\tnext = initial.getSouth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\t\n\t\t}\n\t\t\n\t\tnext = initial.getEast();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tnext = initial.getWest();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tsetCountdown(9);\n\t}",
"public ArrayList<Move> getPossibleMoves(int startx, int starty, Board b){//String startpos, Board b){\n\t\t//startpos is the position of the current piece,\n\t\t//so we know which one it is on the board\n\t\t\n\t\tArrayList<Move> moves = new ArrayList<Move>();\n\t\t\n\t\t\n\t\t\n\t\t//int startx = Main.converttoMove(String.valueOf(startpos.charAt(0)));\n\t\t//int starty = Integer.valueOf(String.valueOf(startpos.charAt(1)));\n\t\t\t\t\t\n\t\tPosition startpo = b.getElement(startx, starty);\n\t\tString startcol = startpo.getState().getColor();\n\t\tboolean color = true;//color: white is true, black if false\n\t\tif(startcol.equalsIgnoreCase(\"b\")) {\n\t\t\tcolor = false;\n\t\t}\n\t\t\n\t\t\n\t\t//go up and down\n\t\t//Number of spaces to move in X and Y direction\n //int numSpacesYUp = starty+1;//Not sure if this math is correct\n \n\t\tint numSpacesYUp = Math.abs(starty);\n int numSpacesYDown = Math.abs(8-(starty+1));//^\n\t\t\n \n //go left and right\n\t\tint numSpacesXLeft=Math.abs(startx);//TO DO: Add Math\n\t\t//int numSpacesXRight =Math.abs(8-(startx+1)); //old\n\t\tint numSpacesXRight =Math.abs(8-(startx+1));//new\n \n \n \n\t\t//go diagonal upper right\n \n\t\tint numtoTopRightCorner = Math.min(numSpacesXRight, numSpacesYUp);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoTopRightCorner;i++) {\n \tint endx = startx+i;\n \tint endy = starty-(i);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\t//System.out.println(\"\");\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;\n \t}\n \tbreak;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n }\n\t\t\n\t\t\n\t\t\n\t\t//go diagonal upper left\n\t\tint numtoTopLeftCorner = Math.min(numSpacesXLeft, numSpacesYUp);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoTopLeftCorner;i++) {\n \tint endx = startx-(i);\n \tint endy = starty-(i);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;\n \t}\n \tbreak;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n \t\n \t\n }\n \n \n \n\t\t//go diagonal lewer left\n\t\tint numtoLowerLeftCorner = Math.min(numSpacesXLeft, numSpacesYDown);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoLowerLeftCorner;i++) {\n \tint endx = startx-(i);\n \tint endy = starty+(i);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;\n \t}\n \tbreak;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n }\n \n\t\t//go diagonal lower right\n\t\tint numtoLowerRightCorner = Math.min(numSpacesXRight, numSpacesYDown);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoLowerRightCorner;i++) {\n \tint endx = startx+(i);\n \tint endy = starty+(i);\n \t\n \t//System.out.println(\"num spaces x right:\" + numSpacesXRight);\n \t//System.out.println(\"num spaces y down:\" + numSpacesYDown);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;//should break cause you cant go more in that direction\n \t}\n \tbreak;//can't get any more in the lower right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n \t\n \t\n }\n\t\t\n\t\t\n\t\treturn moves;//Return all possible legal moves\n\t}",
"public void initChessBoardAutomaticly() {\r\n\t\tthis.initPieces();\r\n\t\tthis.clearBoard();\r\n\t\tfor (int i=0; i<board.size(); i++) {\r\n\t\t\tChessBoardBlock b = board.get(order[i]);\r\n\t\t\tb.setBorderPainted(false);\r\n\t\t}\r\n\t\tfor (int i = 0, w = 0, b = 0, s = 0; i < 8 * 8; i++) {\r\n\r\n\t\t\t// Assign1, Disable board clickable\r\n\t\t\tChessBoardBlock block = board.get(order[i]);\r\n\t\t\tblock.setEnabled(false);\r\n\r\n\t\t\t// Assign1, Put black pieces and record the position\r\n\t\t\tif (i % 2 != 1 && i >= 8 && i < 16) {\r\n\t\t\t\tChessPiece blackPiece = blackPieces[b];\r\n\t\t\t\tblackPiece.position = order[i];\r\n\t\t\t\tpiece.put(order[i], blackPiece);\r\n\t\t\t\tbody.add(blackPiece);\r\n\t\t\t\tb++;\r\n\t\t\t} else if (i % 2 != 0 && (i < 8 || (i > 16 && i < 24))) {\r\n\t\t\t\tChessPiece blackPiece = blackPieces[b];\r\n\t\t\t\tblackPiece.position = order[i];\r\n\r\n\t\t\t\tpiece.put(order[i], blackPiece);\r\n\t\t\t\tbody.add(blackPiece);\r\n\t\t\t\tb++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Assign1, Put white pieces and record the position\r\n\t\t\telse if (i % 2 != 0 && i > 48 && i < 56) {\r\n\t\t\t\tChessPiece whitePiece = whitePieces[w];\r\n\t\t\t\twhitePiece.position = order[i];\r\n\t\t\t\tpiece.put(order[i], whitePiece);\r\n\t\t\t\tbody.add(whitePiece);\r\n\t\t\t\tw++;\r\n\t\t\t} else if (i % 2 != 1\r\n\t\t\t\t\t&& ((i >= 40 && i < 48) || (i >= 56 && i < 64))) {\r\n\t\t\t\tChessPiece whitePiece = whitePieces[w];\r\n\t\t\t\twhitePiece.position = order[i];\r\n\t\t\t\t\r\n\t\t\t\tpiece.put(order[i], whitePiece);\r\n\t\t\t\tbody.add(whitePiece);\r\n\t\t\t\tw++;\r\n\t\t\t}\r\n\r\n\t\t\t// Assign1, Put empty pieces on the board\r\n\t\t\t// Actually, empty pieces will not display on the board, they are\r\n\t\t\t// not existing\r\n\t\t\t// to chess players, just for calculation\r\n\t\t\telse {\r\n\t\t\t\tChessPiece spacePiece = spacePieces[s];\r\n\t\t\t\tspacePiece.position = order[i];\r\n\t\t\t\tbody.add(spacePiece);\r\n\t\t\t\tpiece.put(order[i], spacePiece);\r\n\t\t\t\tspacePiece.setVisible(false);\r\n\t\t\t\ts++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tt.setText(\"Chess Board has been initialized automatically\");\r\n\t\tthis.startGame();\r\n\t}",
"@Test \n\tpublic void kingNotOnThroneBlackPieceLeftWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(1,15);\n\t\td.set(5,16);\n\t\td.set(9,104);\n\t\td.set(2,49);\n\t\td.set(0,91);\n\t\td.set(24,60);\n\t\td.set(2,59);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(59);\n\t\tassertTrue(4==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\n\t}",
"private ArrayList<PossibleBoard> getPossibleNextBoards(PossibleBoard possibleBoard, Icon icon) {\n ArrayList<PossibleBoard> possibleNextBoards = new ArrayList<PossibleBoard>();\n BoardSpace[][] board = possibleBoard.board;\n\n for (int row = 0; row < board.length; row++) {\n for (int col = 0; col < board[0].length; col++) {\n if (board[row][col].getIcon() == Icon.EMPTY) {\n PossibleBoard newPosBoard = new PossibleBoard();\n BoardSpace[][] newBoard;\n newPosBoard.coor = new Coordinate(row, col);\n \n // Cloning\n newBoard = boardClone(board);\n newPosBoard.board = newBoard;\n\n newBoard[row][col].setIcon(icon, false);\n\n // If the icon used is the players icon, then we get a bonus to our score\n // If the icon belongs to the opposing player, then we subtract the bonus\n int scoreBonus = (icon == getIcon() ? 1 : -1);\n for (int r = 0; r < TicTacToeModel.BOARD_DIMENSION; r++) {\n newPosBoard.rowScore[r] = possibleBoard.rowScore[r];\n if (row == r) newPosBoard.rowScore[row] += scoreBonus;\n }\n\n for (int c = 0; c < TicTacToeModel.BOARD_DIMENSION; c++) {\n newPosBoard.colScore[c] = possibleBoard.colScore[c];\n if (col == c) newPosBoard.colScore[col] += scoreBonus;;\n }\n\n newPosBoard.leftDiagScore = possibleBoard.leftDiagScore;\n if (row == col) newPosBoard.leftDiagScore += scoreBonus;\n newPosBoard.rightDiagScore = possibleBoard.rightDiagScore;\n if (row + col == TicTacToeModel.BOARD_DIMENSION - 1) newPosBoard.rightDiagScore += scoreBonus;\n newPosBoard.freeSpace = possibleBoard.freeSpace - 1;\n\n possibleNextBoards.add(newPosBoard);\n\n }\n }\n }\n\n return possibleNextBoards;\n }",
"public void CaptuePiece(int i , int j , int k , int l){\r\n if(GameBoard.get(i,j).getColour() != GameBoard.get(k,l).getColour()){\r\n pos.setPosition(k,l);\r\n GameBoard.get(i,j).capture(pos);\r\n GameBoard.get(k,l).captured();\r\n \r\n\r\n //We need a method to null the (k,l) cell in GameBoard\r\n pos.setPosition(k,l);\r\n GameBoard.setNull(pos);\r\n GameBoard.get(i,j).move(pos); //to move the killer in new cell\r\n\r\n\r\n\r\n }\r\n }",
"public Cell[] getNeighbors(Cell cell) {\n int index = 0;\n Cell neighbors[] = new Cell[4];\n //check top neighbour\n if (cell.getRow() > 0) {\n neighbors[index] = cells[cell.getRow() - 1][cell.getColumn()];\n index++;\n }\n //check left neighbor\n if (cell.getColumn() > 0) {\n neighbors[index] = cells[cell.getRow()][cell.getColumn()-1];\n index++;\n }\n //check bottom neighbor\n if (cell.getRow() < height - 1) {\n neighbors[index] = cells[cell.getRow() + 1][cell.getColumn()];\n index++;\n }\n //check right neighbor\n if (cell.getColumn() < width - 1) {\n neighbors[index] = cells[cell.getRow()][cell.getColumn()+1];\n index++;\n }\n\n //if there are only 3 neighbor cells, copy cells into smaller array\n if (index == 3) {\n Cell neighbors2[] = new Cell[3];\n for (int i = 0; i < neighbors2.length; i++) {\n neighbors2[i] = neighbors[i];\n }\n return neighbors2;\n //if there are only 2 neighbor cells, copy cells into smaller array\n } else if (index == 2) {\n Cell neighbors2[] = new Cell[2];\n for (int i = 0; i < neighbors2.length; i++) {\n neighbors2[i] = neighbors[i];\n }\n return neighbors2;\n }\n return neighbors;\n }",
"private void setNeighbors()\r\n {\r\n for (int x = 0; x < length+2; ++x)\r\n {\r\n for (int y = 0; y < width+2; ++y)\r\n {\r\n // North\r\n if (!this.board[x][y].northwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y-1]);\r\n }\r\n // South\r\n if (!this.board[x][y].southwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y+1]);\r\n }\r\n // East\r\n if (!this.board[x][y].eastwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x+1][y]);\r\n }\r\n // West\r\n if (!this.board[x][y].westwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x-1][y]);\r\n }\r\n }\r\n }\r\n }",
"private vPiece find_vPiece(ArrayList<vPiece> pieces, Move theMove){\n\t\tfor(vPiece thePiece : pieces){\n\t\t\tif(thePiece.getxLoc() == theMove.i){\n\t\t\t\tif(thePiece.getyLoc() == theMove.j){\n\t\t\t\t\treturn thePiece;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new vPiece(0,0);\n\t}",
"private ArrayList<Move> generatePossibleMovesFor(Player player) {\n ArrayList<Point> selfStonePlacements = new ArrayList<>();\n ArrayList<Point> opponentStonePlacements = new ArrayList<>();\n for (int x = 0; x < field.length; x++)\n for (int y = 0; y < field[x].length; y++) {\n if (field[x][y] == null)\n continue;\n if (field[x][y] == this.color)\n selfStonePlacements.add(new FieldPoint(x, y));\n if (field[x][y] == opponent.getColor())\n opponentStonePlacements.add(new FieldPoint(x, y));\n }\n\n ArrayList<Move> possibleMoves = new ArrayList<>();\n\n // Check if player is in set phase or only has three stones left\n if (!player.isDoneSetting()) {\n // Every free field is a possible move\n for (Point point : pointsOfMovement) {\n if (opponentStonePlacements.contains(point) || selfStonePlacements.contains(point))\n continue;\n possibleMoves.add(new StoneMove(null, point));\n }\n } else if (player.isDoneSetting() && getCountOfStonesFor(player) > 3) {\n // Move is only possible if the neighbour field of a stone is free\n for (Point point : player == opponent ? opponentStonePlacements : selfStonePlacements) {\n for (Point neighbour : neighbourPoints.get(point)) {\n if (opponentStonePlacements.contains(neighbour) || selfStonePlacements.contains(neighbour))\n continue;\n possibleMoves.add(new StoneMove(point, neighbour));\n }\n }\n } else {\n for (Point point : player == opponent ? opponentStonePlacements : selfStonePlacements) {\n for (Point another : pointsOfMovement) {\n if (opponentStonePlacements.contains(point) || selfStonePlacements.contains(point))\n continue;\n possibleMoves.add(new StoneMove(point, another));\n }\n }\n }\n\n Collections.shuffle(possibleMoves);\n return possibleMoves;\n }",
"public void populateLists() {\n\t\tfor (int row = 0; row < 8; row++) {\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tif (board[row][col] != null && board[row][col].isWhite())\n\t\t\t\t\twhitePieces.add(board[row][col]);\n\t\t\t\t\t//whitePieces.add(board[row][col]);\n\t\t}\n\t\tfor (int row = 0; row < 8; row++) {\n\t\t\tfor (int col = 0; col < 8; col++){\n\t\t\t\tif (board[row][col] != null && !board[row][col].isWhite())\n\t\t\t\t\tblackPieces.add(board[row][col]);}\n\t\t\t\n\t\t}\n\t}"
] | [
"0.6684161",
"0.65953857",
"0.6414051",
"0.62562937",
"0.6254552",
"0.6245127",
"0.62255883",
"0.61811614",
"0.6180158",
"0.61622965",
"0.6129569",
"0.60992116",
"0.60808367",
"0.6011215",
"0.5988882",
"0.5968714",
"0.58901924",
"0.58787566",
"0.5871139",
"0.5858358",
"0.58418256",
"0.5832997",
"0.58253014",
"0.5812233",
"0.5811638",
"0.5801495",
"0.57802445",
"0.5774328",
"0.5769973",
"0.5754526",
"0.57377523",
"0.5736967",
"0.57284766",
"0.5725885",
"0.57256943",
"0.57231176",
"0.57055247",
"0.5701299",
"0.5700143",
"0.56980634",
"0.56960374",
"0.56942147",
"0.56911105",
"0.5682372",
"0.56799614",
"0.56752044",
"0.56714714",
"0.5670478",
"0.5663986",
"0.564104",
"0.561965",
"0.56164926",
"0.56074333",
"0.560716",
"0.5597753",
"0.5597631",
"0.5594847",
"0.5589242",
"0.5579429",
"0.5579263",
"0.5578326",
"0.5566104",
"0.5564867",
"0.5562342",
"0.55612594",
"0.5552154",
"0.5551527",
"0.55491936",
"0.5533935",
"0.55326307",
"0.55307865",
"0.5530276",
"0.552454",
"0.5515046",
"0.5513545",
"0.5512366",
"0.5511185",
"0.55070746",
"0.5506136",
"0.5497624",
"0.5496728",
"0.5496185",
"0.54867506",
"0.5485555",
"0.54854685",
"0.54833055",
"0.546775",
"0.5465695",
"0.5464752",
"0.5458567",
"0.5458429",
"0.54545087",
"0.5450481",
"0.5447993",
"0.5447082",
"0.5442176",
"0.54375064",
"0.5437289",
"0.5431018",
"0.5426886"
] | 0.66121054 | 1 |
If a piece is temp or noTouch this sets them to be what they should | private void clearStragglers() {
for (int i = 0; i < game.gridPieces.length; i++) {
GridPiece piece = game.gridPieces[i];
if (piece.state == game.STATE_TEMP) {
piece.restoreState();
//restoreState(piece);
} else if (piece.state == game.STATE_TEMP_NOTOUCH) {
piece.setState(game.STATE_FINAL);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnOnHeat(Double temp){\n\n this.selectedTrain.setHeat(1); // turn on heat\n this.selectedTrain.setAC(0); // turn off heat\n\n if (temp == null){ this.selectedTrain.setThermostat(60.0); } // set to default heat\n else{ this.selectedTrain.setThermostat(temp); }\n\n this.operatingLogbook.add(\"Heat Set: \" + temp.toString());\n this.printOperatingLogs();\n }",
"public void setPiece(Tetrimino piece)\n {\n this.piece = piece;\n }",
"public void setPiece(Piece piece){\n this.piece = piece;\n this.pieceName = piece.pieceName;\n this.pieceColor = piece.pieceColor;\n this.firstMove = piece.firstMove;\n this.Enpassant = piece.Enpassant;\n }",
"public void setTemp(int temp) {\n \tthis.temperature = temp;\n }",
"private void setThePieces(){\n for(int i = 0; i<HEIGHT;i++){\n for(int j = 0; j<WIDTH;j++){\n if(piecesToSwap[i][j]==null){\n \n }else{\n m_Pieces[i][j]=piecesToSwap[i][j];\n \n }\n }\n }\n }",
"protected void onSetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void setPieces(float piecesProduced){\r\n pieces = ( piecesProduced <= 0 ) ? 0 : piecesProduced; \r\n }",
"public void setToOriginals(){\n\t\t//set all occupied nodes as empty\n\t\tif(nodeStatus == Status.occupied){\n\t\t\tsetAsEmpty();\n\t\t}\n\t\t//if the node had a unit end on it, reset that value\n\t\tif(ended == true){\n\t\t\tended=false;\n\t\t}\n\t\tf=0;\n\t\tg=0;\n\t\th=0;\n\t}",
"@SuppressWarnings(\"ResultOfObjectAllocationIgnored\")\n public void checkSpawnTemp() {\n\n int xStart = playingField.getXyhome() - 1;\n int yStart = playingField.getXyhome() - 1;\n int home = playingField.getXyhome();\n boolean changed = false;\n\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n\n if (xStart + i != home || yStart + j != home) {\n try {\n String tmp;\n if (playingField.getPlayingField()[xStart + i][yStart + j].getAgent() != null) {\n tmp = playingField.getPlayingField()[xStart + i][yStart + j].getAgent().getName();\n } else {\n tmp = \"SoWirdSichKeinSpielerNennen123\";\n }\n\n if (!agentsOnSpawn[i][j].equals(tmp)) {\n changed = true;\n }\n agentsOnSpawn[i][j] = tmp;\n\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n\n }\n\n }\n }\n\n if (!changed) {\n playingField.setSpawnTemperature(playingField.getSpawnTemperature() + 1);\n //System.out.println(\"Temperature raised to \" + spawnTemp);\n } else {\n playingField.setSpawnTemperature(0);\n //System.out.println(\"Temperature normal, set to 0\");\n }\n\n if (playingField.getSpawnTemperature() >= 10) {\n if (dialog.getSoundBox().isSelected()) {\n new SoundClip(\"BallReset\", -1);\n }\n System.out.println(\"Temperature too hot, explosion\");\n playingField.setSpawnTemperature(0);\n\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n if (xStart + i != home || yStart + j != home) {\n IAgent agent = playingField.getPlayingField()[xStart + i][yStart + j].getAgent();\n if (agent != null) {\n playingField.spreadAgent(agent);\n }\n }\n\n }\n }\n\n }\n\n }",
"private void setHeatTemp(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setHeatTemp\n\n String tempStr = this.heatTempTextField.getText();\n if (Double.parseDouble(tempStr) < 60.0 || Double.parseDouble(tempStr) > 80.0 ){\n\n System.out.println(\"Error. Please set a temperature between 60.0 - 80.0\");\n }else{\n // turn on heat and transmit the temp\n this.setTemp = Double.parseDouble(tempStr);\n this.turnOnHeat(Double.parseDouble(tempStr));\n }\n }",
"public boolean handleTempChange(int temp)\r\n\t{\r\n\t\tif (temp > 100) {\r\n\t\t\tSystem.out.print(\"Subsection \" + getName() + \" turning heater OFF due to hight temparture: \" + temp + \"\\n\");\r\n\t\t}\r\n\t\telse if (temp < 60) {\r\n\t\t\tSystem.out.print(\"Subsection \" + getName() + \" turning heater ON due to low temparture: \" + temp + \"\\n\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"private void automaticModeChecks(){\n // turn on lights if underground\n if (this.isUnderground()){ this.selectedTrain.setLights(1);}\n // set heat\n if (this.selectedTrain.getTemp() <= 40.0){this.selectedTrain.setThermostat(60.0);}\n else if (this.selectedTrain.getTemp() >= 80){ this.selectedTrain.setThermostat(50.0);}\n }",
"boolean testIsTouchingIGamePiece(Tester t) {\n return t.checkExpect(los2.isTouching(ship2), false)\n && t.checkExpect(los3.isTouching(bullet8), true)\n && t.checkExpect(lob2.isTouching(ship2), true)\n && t.checkExpect(lob3.isTouching(ship11), false)\n && t.checkExpect(lob3.isTouching(ship3), true)\n && t.checkExpect(mt.isTouching(ship6), false);\n }",
"public void ApplyMovement() {\n long currTime = SystemClock.uptimeMillis();\n if(currTime - lastUpdateTime < 16){\n return;\n }\n lastUpdateTime = currTime;\n\n\n double tl_power_raw = movement_y-movement_turn+movement_x*1.5;\n double bl_power_raw = movement_y-movement_turn- movement_x*1.5;\n double br_power_raw = -movement_y-movement_turn-movement_x*1.5;\n double tr_power_raw = -movement_y-movement_turn+movement_x*1.5;\n\n\n\n\n //find the maximum of the powers\n double maxRawPower = Math.abs(tl_power_raw);\n if(Math.abs(bl_power_raw) > maxRawPower){ maxRawPower = Math.abs(bl_power_raw);}\n if(Math.abs(br_power_raw) > maxRawPower){ maxRawPower = Math.abs(br_power_raw);}\n if(Math.abs(tr_power_raw) > maxRawPower){ maxRawPower = Math.abs(tr_power_raw);}\n\n //if the maximum is greater than 1, scale all the powers down to preserve the shape\n double scaleDownAmount = 1.0;\n if(maxRawPower > 1.0){\n //when max power is multiplied by this ratio, it will be 1.0, and others less\n scaleDownAmount = 1.0/maxRawPower;\n }\n tl_power_raw *= scaleDownAmount;\n bl_power_raw *= scaleDownAmount;\n br_power_raw *= scaleDownAmount;\n tr_power_raw *= scaleDownAmount;\n\n\n //now we can set the powers ONLY IF THEY HAVE CHANGED TO AVOID SPAMMING USB COMMUNICATIONS\n topLeft.setPower(tl_power_raw);\n bottomLeft.setPower(bl_power_raw);\n bottomRight.setPower(br_power_raw);\n topRight.setPower(tr_power_raw);\n }",
"protected void onSetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"Piece (Piece original) {\n this.isWhite = original.isWhite();\n this.type = original.getType();\n this.pawnHasJustMoved2 = original.isPawnHasJustMoved2();\n }",
"@SuppressLint(\"ClickableViewAccessibility\")\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n int row, col; //used for storing the location of the space that the user tapped\n\n //don't do anything if we don't have the current piece placements\n if (this.myPieces == null) {\n return false;\n }\n\n //Don't do anything when dragging or lifting touch\n if (event.getAction() != MotionEvent.ACTION_UP) {\n return true;\n }\n\n //get the row and column of the tapped space\n row = (int) ((event.getY() - ShogiGui.topLeftY) / (ShogiGui.space));\n col = (int) ((event.getX() - ShogiGui.topLeftX) / (ShogiGui.space));\n System.out.print(\"col: \" + col + \" row: \" + row);\n\n\n //don't do anything if the user tapped outside the board\n if (row >= 9 || col >= 9) {\n return false;\n } else if (row < 0 || col < 0) {\n return false;\n }\n\n if (amDropping && toDrop != null && myPieces[row][col] == null) {\n row = (int) ((event.getY() - ShogiGui.topLeftY) / (ShogiGui.space));\n col = (int) ((event.getX() - ShogiGui.topLeftX) / (ShogiGui.space));\n game.sendAction(new ShogiDropAction(this, toDrop, row, col));\n MediaPlayer drop = MediaPlayer.create(topView.getContext(),R.raw.drop);\n drop.start();\n amDropping = false;\n droppedThisTurn = true;\n //remove the dropped piece\n gui.invalidate();\n }\n\n //when a piece on the board is currently selected\n if (havePieceSelected && !amDropping) {\n\n if (state.getWhoseMove() == 0) {\n if (myPieces[row][col] != null && myPieces[row][col].getPlayer() == 0) {\n\n if (myPieces[row][col].getSelected()) {\n myPieces[row][col].setSelected(false);\n gui.pieceIsSelected = false;\n havePieceSelected = false;\n } else {\n\n //find and deselect the currently selected piece\n for (int i = 1; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (myPieces[i][j] != null) {\n if (myPieces[i][j].getSelected()) {\n myPieces[i][j].setSelected(false);\n }\n }\n }\n }\n\n //select the newly tapped piece\n myPieces[row][col].setSelected(true);\n gui.pieceIsSelected = true;\n rowSel = row;\n colSel = col;\n MediaPlayer pick = MediaPlayer.create(topView.getContext(),R.raw.pickup);\n pick.start();\n }\n }\n\n //check if the tapped space is a legal move for the currently selected piece.\n // If it is, move the piece\n else if (myPieces[rowSel][colSel].legalMove(myPieces, row, col)) {\n\n game.sendAction(new ShogiMoveAction(this, myPieces[rowSel][colSel],\n row, col, rowSel, colSel));\n MediaPlayer drop = MediaPlayer.create(topView.getContext(),R.raw.drop);\n drop.start();\n\n //reset\n havePieceSelected = false;\n rowSel = 0;\n colSel = 0;\n } else { return true; }\n\n } else {\n if (myPieces[row][col] != null && myPieces[row][col].getPlayer() == 1) {\n\n if (myPieces[row][col].getSelected()) {\n myPieces[row][col].setSelected(false);\n gui.pieceIsSelected = false;\n havePieceSelected = false;\n }\n\n //select the other tapped piece\n else {\n\n //find and deselect the currently selected piece\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (myPieces[i][j] != null) {\n if (myPieces[i][j].getSelected()) {\n myPieces[i][j].setSelected(false);\n }\n }\n }\n }\n\n //select the newly tapped piece\n myPieces[row][col].setSelected(true);\n gui.pieceIsSelected = true;\n rowSel = row;\n colSel = col;\n MediaPlayer pick = MediaPlayer.create(topView.getContext(),R.raw.pickup);\n pick.start();\n }\n }\n\n\n //move the piece\n else if (myPieces[rowSel][colSel].legalMove(myPieces, row, col)) {\n game.sendAction(new ShogiMoveAction(this, myPieces[rowSel][colSel],\n row, col, rowSel, colSel));\n MediaPlayer drop = MediaPlayer.create(topView.getContext(),R.raw.drop);\n drop.start();\n droppedThisTurn = false;\n //reset\n havePieceSelected = false;\n rowSel = -1;\n colSel = -1;\n }\n\n //if a piece is selected and the tapped space is not a legal move,\n //then leave everything as it is\n else {\n Log.d(\"ShogiHP\", \"flash\");\n\n try {\n flashButton();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n //super.setToFlash(false);\n\n return true;\n }\n\n }\n }\n //when no piece is currently selected\n else {\n\n //when the tapped space is not empty and contains a piece\n //that belongs to the human player\n if (state.getWhoseMove() == 0) {\n if (myPieces[row][col] != null && myPieces[row][col].getPlayer() == 0) {\n this.myPieces[row][col].setSelected(true);\n havePieceSelected = true;\n rowSel = row;\n colSel = col;\n }\n } else {\n if (myPieces[row][col] != null && myPieces[row][col].getPlayer() == 1) {\n this.myPieces[row][col].setSelected(true);\n havePieceSelected = true;\n rowSel = row;\n colSel = col;\n }\n }\n }\n droppedThisTurn = false;\n //redraw board with pieces updated\n gui.invalidate();\n //done\n return true;\n }",
"public void affectPiece(Piece piece){\r\n this.piece = piece;\r\n this.piece.affect();\r\n }",
"private synchronized void doSetWiperTiles()\n {\n // Setup tiling paths\n if((bWiperAvailable) && (bNetworkPvdEnabled != true))\n {\n // create the XPS instance, passing in our Context\n if (Config.LOGV) Log.v(TAG,\"Wiper Setting Tiles\");\n\n if((null==szUsername) ||(null==szRealm))\n {\n Log.e(TAG,\"Username /Realm not set\");\n bWiperAvailable = false;\n }\n }\n else\n {\n if(Config.LOGD) Log.d(TAG,\"Skip Tile Setup\");\n }\n }",
"private void refreshHeat(){\n\n if (this.selectedTrain.getHeat() == 1){\n\n this.heatOnRadioButton.setSelected(true);\n // update heat until set heat\n if (this.selectedTrain.getTemp() <= this.setTemp){ this.selectedTrain.updateTemp();}\n }\n else if (this.selectedTrain.getHeat() == 0){ this.heatOffRadioButton.setSelected(true);}\n else if (this.selectedTrain.getHeat() == -1){ this.heatFailureRadioButton.setSelected(true); }\n }",
"void drawCurrentToTemp() {\n for (int r = 0; r < currentPiece.height; ++r)\n for (int c = 0; c < currentPiece.width; ++c)\n if (currentPiece.blocks[r][c] == 1)\n board.addTempBlock(new Block(currentPiece.color), r + currentRow, c + currentColumn);\n }",
"public void setTemperatureNeededToCookAt(double t) {\r\n temp = t;\r\n }",
"public boolean setUnit(Unit u) //this method is for creating new units or called from territories move unit method\r\n {\r\n//\t\tSystem.out.println(\"Set unit called \" + u);\r\n \tTile old = u.getTile();\r\n boolean test = false;\r\n if(u != null) //this line is mostly useless now but i'm keeping it.\r\n {\r\n \tif(!(u instanceof Capital))\r\n \t{\r\n \t\tif(!(u instanceof Castle))\r\n \t\t{\r\n\t \t\tif(u.canMove())\r\n\t \t\t{\r\n\t\t\t if(Driver.currentPlayer.equals(player))\r\n\t\t\t {\r\n\t\t\t if(hasUnit())\r\n\t\t\t {\r\n\t\t\t if(u instanceof Peasant)\r\n\t\t\t {\r\n\t\t\t \tif(!(unit instanceof Capital) && !(unit instanceof Castle))\r\n\t\t\t \t{\r\n\t\t\t\t int curProtect = unit.getStrength();\r\n\t\t\t\t switch(curProtect) //for upgrading with a peasant.\r\n\t\t\t\t {\r\n\t\t\t\t case 1: newUnitTest(old, u);\r\n\t\t\t\t unit = new Spearman(this);\r\n\t\t\t\t unit.move(false);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t case 2: newUnitTest(old, u);\r\n\t\t\t\t unit = new Knight(this);\r\n\t\t\t\t unit.move(false);;\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t case 3:\t\tnewUnitTest(old, u);\r\n\t\t\t\t unit = new Baron(this);\r\n\t\t\t\t unit.move(false);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t break;\r\n\t\t\t\t default:\r\n\t\t\t\t \t//possibly put a noise or alert here\r\n\t\t\t\t// \t\tAlert a = new Alert(AlertType.WARNING);\r\n\t\t\t\t// \t\ta.setTitle(\"Warning\"); \r\n\t\t\t\t \t\ttest = false;\r\n\t\t\t\t }\r\n\t\t\t \t}\r\n\t\t\t \telse\r\n\t\t\t \t{\r\n\t\t\t \t\t//play a noise or something\r\n\t\t\t \t}\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \t//possibly put a noise or sumting.\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \tnewUnitTest(old, u);\r\n\t\t\t\t unit = u;\r\n\t\t\t\t u.setTile(this);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t \t//As of now the only time that this case (setting unit to enemy tile) is used is when called by territories move unit method.\r\n\t\t\t\t \t\t//This means that when you build a new unit (in this case a peasant) you have to put them on your territory before moving them to another players tile.\r\n\t\t\t\t \t\tif(old != null)\r\n\t\t\t\t \t\t{\r\n\t\t\t\t \t\t\tunit = u;\r\n\t\t\t\t \t\t\tu.setTile(this);\r\n\t\t\t\t setAdjacentProtection();\r\n\t\t\t\t test = true;\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\telse\r\n\t\t\t\t \t\t{\r\n\t\t\t\t \t\t\t//maybe make a noise or something\r\n\t\t\t\t \t\t}\r\n\t\t\t\t }\r\n\t \t\t}\r\n\t \t\telse\r\n\t \t\t{\r\n\t \t\t\t//maybe play a noise or something\r\n\t \t\t}\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif(!hasUnit())\r\n \t\t\t{\r\n\t \t\t\tunit = u;\r\n\t u.setTile(this);\r\n\t setAdjacentProtection();\r\n\t test = true;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\tunit = u;\r\n u.setTile(this);\r\n setAdjacentProtection();\r\n test = true;\r\n \t}\r\n } \r\n\t return test;\r\n\t \r\n}",
"public void pressureToFire() {\n fire1.set(true);\n fire2.set(FFM);\n }",
"public void setStartConditions() {\r\n\t\tplayer1.relocate(0, 0);\r\n\t\tgamemap.setPlayerLocation(1, 1);\r\n\t\tgamemap.setEnemyLocation(20, 10);\r\n\t\tenemy1.relocate(19*46, 9*85);\r\n\t\tportal1.relocate(9*46, 9*85);\r\n\t\tportal2.relocate(9*46, 0*85);\r\n\t\tspikes1.relocate(5*46,0*85);\r\n\t\tspikes2.relocate(5*46,1*85);\r\n\t\tspikes3.relocate(5*46,2*85);\r\n\t\tspikes4.relocate(5*46,7*85);\r\n\t\tspikes5.relocate(5*46,8*85);\r\n\t\tspikes6.relocate(5*46,9*85);\r\n\t\tspikes7.relocate(10*46,2*85);\r\n\t\tspikes8.relocate(10*46,3*85);\r\n\t\tspikes9.relocate(10*46,4*85);\r\n\t\tspikes10.relocate(10*46,5*85);\r\n\t\tspikes11.relocate(10*46,6*85);\r\n\t\tspikes12.relocate(10*46,7*85);\r\n\t\tspikes13.relocate(15*46,0*85);\r\n\t\tspikes14.relocate(15*46,1*85);\r\n\t\tspikes15.relocate(15*46,2*85);\r\n\t\tspikes16.relocate(15*46,7*85);\r\n\t\tspikes16.relocate(15*46,8*85);\r\n\t\tspikes17.relocate(15*46,9*85);\r\n\t\tRandom randomObj = new Random();\r\n\t\tint randomX = randomObj.nextInt(20);\r\n\t\tint randomY = randomObj.nextInt(10);\r\n\t\tcoins1.relocate(randomX*46, randomY*85);\r\n\t\tgamemap.setLootLocation(randomX + 1, randomY + 1);\r\n\t\t//coins1.relocate(10*46,5*85);\r\n\t\t//gamemap.setLootLocation(11, 6);\r\n\t}",
"public HitWall() {\n\t\ttouch_r = Settings.TOUCH_R;\n\t\ttouch_l = Settings.TOUCH_L;\n\t\tpilot = Settings.PILOT;\n\t}",
"public void setSpawns() {\n List<Tile> spawns = this.board.getSpawns();// get all the possible spawns from board\n List<Tile> usedSpawns = new ArrayList<Tile>();// empty list used to represent all the spawns that have been used so no playerPiece gets the same spawn\n for (PlayerPiece playerPiece : this.playerPieces) { // for each playerPiece\n boolean hasSpawn = false; // boolean to represent whether the playerPiece has a spawn and used to initiate and stop the following while loop.\n while (!hasSpawn) { // while hasSpawn is false.\n int random_int = (int) (Math.random() * spawns.size());// get random number with max number of the total possible tiles the pieces can spawn from\n Tile spawn = spawns.get(random_int); // get spawn from spawns list using the random int as an index\n if (!usedSpawns.contains(spawn)) {// if the spawn isn't in the usedSpawn list\n playerPiece.setLocation(spawn);// set the location of the playerPiece to the spawn\n usedSpawns.add(spawn);//add the spawn to usedSpawns\n hasSpawn = true; // set the variable to true so the while loop stops.\n }\n }\n }\n }",
"public void setToPlaceTowerState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Grass) {\n cells.set(i, CellState.ToPlaceTower);\n } else if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n }\n }\n }",
"public void makesNotHere(){this.piece.unAffect();}",
"public void resetCoordinates(){\n pos=0;\n if(this.pIndex<2){\n this.coordinates[0]=TILE_SIZE*15-DICE_SIZE;}\n else{\n this.coordinates[0]=0;}\n if(this.pIndex%3==0){\n this.coordinates[1]=0;}\n else{\n this.coordinates[1]=TILE_SIZE*15-DICE_SIZE;} \n }",
"public void setPiece(Piece p) {\n\tpiece = p;\n }",
"public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\n }",
"public void mousePressed() //transport mode selected\n{\n if (mouseButton == LEFT)\n {\n if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65 && mouseY <= ly+65+bl)\n {\n tm[0] =! tm[0];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+2*bl && mouseY <= ly+65+3*bl)\n { \n tm[1] =! tm[1];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+4*bl && mouseY <= ly+65+5*bl)\n {\n tm[2] =! tm[2];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+6*bl && mouseY <= ly+65+7*bl)\n {\n tm[3] =! tm[3];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+8*bl && mouseY <= ly+65+9*bl)\n {\n tm[4] =! tm[4];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+10*bl && mouseY <= ly+65+11*bl)\n {\n tm[5] =! tm[5];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+12*bl && mouseY <= ly+65+13*bl)\n {\n tm[6] =! tm[6];\n }\n }\n}",
"public void setInitialPosition()\n {\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.a2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.b2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.c2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.d2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.e2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.f2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.g2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.h2);\n //Se colocan los peones negros en la séptima fila\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.a7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.b7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.c7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.d7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.e7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.f7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.g7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.h7);\n //Se colocan las torres blancas en a1 y h1\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.a1);\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.h1);\n //Se colocan las torres negras en a8 y h9\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.a8);\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.h8);\n //Se colocan los caballos blancos en b1 y g1\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.b1);\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.g1);\n //Se colocan los caballos negros en b8 y g8\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.b8);\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.g8);\n //Se colocan los alfiles blancos en c1 y f1\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.c1);\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.f1);\n //Se colocan los alfiles negros en c8 y f8\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.c8);\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.f8);\n //Se coloca la dama blanca en d1\n putGenericPiece(GenericPiece.QUEEN,Colour.WHITE,Square.d1);\n //Se coloca la dama negra en d8\n putGenericPiece(GenericPiece.QUEEN,Colour.BLACK,Square.d8);\n //Se coloca el rey blanco en e1\n putGenericPiece(GenericPiece.KING,Colour.WHITE,Square.e1);\n //Se coloca el rey negro en e8\n putGenericPiece(GenericPiece.KING,Colour.BLACK,Square.e8);\n \n //Se permiten los enroques para ambos jugadores\n setCastlingShort(Colour.WHITE,true);\n setCastlingShort(Colour.BLACK,true);\n setCastlingLong(Colour.WHITE,true);\n setCastlingLong(Colour.BLACK,true);\n \n //Se da el turno a las blancas\n setTurn(Colour.WHITE);\n \n gamePositionsHash.clear();\n gamePositionsHash.put(zobristKey.getKey(), 1);\n }",
"private void setTemp(int temperature) {\n\t\tthis.temperature.setValue(temperature);\n\t}",
"public void setPiece(PieceIF p);",
"public void setNewPiece(){\n\t\tcurrentPiece = Pentominoes.Pentomino_array[this.next_piece_index];\n\t\tcurrentColor = Pentominoes.color_array[this.next_piece_colour];\n\t\tpieceOrigin = new Point(6, 2);\n\t}",
"public final void setPiece(String piece){\r\n switch (piece) {\r\n case \"black King\":\r\n {\r\n this.piece = new King(\"black King\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Rook\":\r\n {\r\n this.piece = new Rook(\"black Rook\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Knight\":\r\n {\r\n this.piece = new Knight(\"black Knight\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Bishop\":\r\n {\r\n this.piece = new Bishop(\"black Bishop\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Queen\":\r\n {\r\n this.piece = new Queen(\"black Queen\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Pawn\":\r\n {\r\n this.piece = new Pawn(\"black Pawn\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white King\":\r\n {\r\n this.piece = new King(\"white King\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Rook\":\r\n {\r\n this.piece = new Rook(\"white Rook\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Knight\":\r\n {\r\n this.piece = new Knight(\"white Knight\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Bishop\":\r\n {\r\n this.piece = new Bishop(\"white Bishop\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Queen\":\r\n {\r\n this.piece = new Queen(\"white Queen\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Pawn\":\r\n {\r\n this.piece = new Pawn(\"white Pawn\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n default:\r\n {\r\n this.piece = new Empty(\" \");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n this.piece.color=\"empty\";\r\n this.piece.imageName=\"empty\";\r\n break;\r\n }\r\n }\r\n }",
"@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t\ttarget = pointEntity(caster,50);\r\n\t\tif (target == null) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\trefund = true;\r\n\t\t\tdead = true;\r\n\t\t\tif (refined)\r\n\t\t\t\tsteprange = 240;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tplaySound(Sound.BLOCK_CONDUIT_DEACTIVATE,caster.getLocation(),5,2F);\r\n\t\t\tplaySound(Sound.BLOCK_CONDUIT_ACTIVATE,caster.getLocation(),5,2F);\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tdist = target.getLocation().distance(caster.getLocation());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public void reset() {\n // White Pieces\n placePiece(new Rook(Player.White), new Position(\"a1\"));\n placePiece(new Knight(Player.White), new Position(\"b1\"));\n placePiece(new Bishop(Player.White), new Position(\"c1\"));\n placePiece(new Queen(Player.White), new Position(\"d1\"));\n placePiece(new King(Player.White), new Position(\"e1\"));\n placePiece(new Bishop(Player.White), new Position(\"f1\"));\n placePiece(new Knight(Player.White), new Position(\"g1\"));\n placePiece(new Rook(Player.White), new Position(\"h1\"));\n placePiece(new Pawn(Player.White), new Position(\"a2\"));\n placePiece(new Pawn(Player.White), new Position(\"b2\"));\n placePiece(new Pawn(Player.White), new Position(\"c2\"));\n placePiece(new Pawn(Player.White), new Position(\"d2\"));\n placePiece(new Pawn(Player.White), new Position(\"e2\"));\n placePiece(new Pawn(Player.White), new Position(\"f2\"));\n placePiece(new Pawn(Player.White), new Position(\"g2\"));\n placePiece(new Pawn(Player.White), new Position(\"h2\"));\n\n // Black Pieces\n placePiece(new Rook(Player.Black), new Position(\"a8\"));\n placePiece(new Knight(Player.Black), new Position(\"b8\"));\n placePiece(new Bishop(Player.Black), new Position(\"c8\"));\n placePiece(new Queen(Player.Black), new Position(\"d8\"));\n placePiece(new King(Player.Black), new Position(\"e8\"));\n placePiece(new Bishop(Player.Black), new Position(\"f8\"));\n placePiece(new Knight(Player.Black), new Position(\"g8\"));\n placePiece(new Rook(Player.Black), new Position(\"h8\"));\n placePiece(new Pawn(Player.Black), new Position(\"a7\"));\n placePiece(new Pawn(Player.Black), new Position(\"b7\"));\n placePiece(new Pawn(Player.Black), new Position(\"c7\"));\n placePiece(new Pawn(Player.Black), new Position(\"d7\"));\n placePiece(new Pawn(Player.Black), new Position(\"e7\"));\n placePiece(new Pawn(Player.Black), new Position(\"f7\"));\n placePiece(new Pawn(Player.Black), new Position(\"g7\"));\n placePiece(new Pawn(Player.Black), new Position(\"h7\"));\n }",
"public void changePiece() {\n if (piece == 1) {\n piece = 2;\n } else {\n piece = 1;\n }\n //System.out.println(\"Nu ben ik piece \" + piece);\n }",
"public void update() {\n\n if (!isSelected){\n goalManagement();\n }\n\n if (chair != null){ // si une chaise lui est désigné\n if (!hasAGoal && !isSelected){ // et qu'il n'a pas d'objectif\n setSit(true);\n position.setX(chair.getX());\n }\n\n if (isSit){\n chair.setChairState(Chair.ChairState.OCCUPIED);\n }else {\n chair.setChairState(Chair.ChairState.RESERVED);\n }\n }\n\n if (tired > 0 ){\n tired -= Constants.TIRED_LOSE;\n }\n\n if (isSit && comfort>0){\n comfort -= Constants.COMFORT_LOSE;\n }\n\n if (isSitOnSofa && comfort<100){\n comfort += Constants.COMFORT_WIN;\n }\n\n if (!hasAGoal && moveToCoffee && coffeeMachine!=null){\n moveToCoffee = false;\n tired=100;\n\n coffeeMachine.setCoffeeTimer(new GameTimer()) ;\n coffeeMachine.getCoffeeTimer().setTimeLimit(Constants.COFFEE_TIME_TO_AVAILABLE);\n coffeeMachine = null;\n backToSpawn();\n }\n\n if (!hasAGoal && moveToSofa){\n moveToSofa = false;\n isSitOnSofa = true;\n dir = 0 ;\n position.setY(position.getY()-Constants.TILE_SIZE);\n }\n\n if (isSelected){\n flashingColor ++;\n if (flashingColor > 2 * flashingSpeed){\n flashingColor = 0;\n }\n }\n\n }",
"public void touchToScatter() {\n for (int i = 0; i < pointCount; i++) {\n int speedX = random.nextInt(2 * speedXBarrier) - speedXBarrier;\n int speedY = random.nextInt(2 * speedYBarrier) - speedYBarrier;\n points.get(i).setSpeedX(speedX);\n points.get(i).setSpeedY(speedY);\n }\n }",
"public void setFire(float xTile, float yTile)\r\n/* 171: */ {\r\n/* 172:194 */ if (tileWalkable(xTile, yTile)) {\r\n/* 173:196 */ this.fire[((int)xTile)][((int)yTile)] = 1;\r\n/* 174: */ }\r\n/* 175: */ }",
"public void calculateThreats(Piece piece, Piece[][] board) {\n Location one = new Location(piece.getLocation().getX() + 1, piece.getLocation().getY() - 2);\n Location two = new Location(piece.getLocation().getX() + 2, piece.getLocation().getY() - 1);\n Location three = new Location(piece.getLocation().getX() + 2, piece.getLocation().getY() + 1);\n Location four = new Location(piece.getLocation().getX() + 1, piece.getLocation().getY() + 2);\n Location five = new Location(piece.getLocation().getX() - 1, piece.getLocation().getY() + 2);\n Location six = new Location(piece.getLocation().getX() - 2, piece.getLocation().getY() + 1);\n Location seven = new Location(piece.getLocation().getX() - 2, piece.getLocation().getY() - 1);\n Location eight = new Location(piece.getLocation().getX() - 1, piece.getLocation().getY() - 2);\n\n if (one.isLegalIndex() && board[one.getX()][one.getY()] != null && board[one.getX()][one.getY()].getColor() != piece.getColor()) {\n // Sets the pieces point to half\n board[one.getX()][one.getY()].setPoint();\n // Sets the pieces threatened situation is true.\n // So, we do not calculate point again for this piece\n board[one.getX()][one.getY()].isThreatened = true;\n }\n if (two.isLegalIndex() && board[two.getX()][two.getY()] != null && board[two.getX()][two.getY()].getColor() != piece.getColor()) {\n board[two.getX()][two.getY()].setPoint();\n board[two.getX()][two.getY()].isThreatened = true;\n }\n if (three.isLegalIndex() && board[three.getX()][three.getY()] != null && board[three.getX()][three.getY()].getColor() != piece.getColor()) {\n board[three.getX()][three.getY()].setPoint();\n board[three.getX()][three.getY()].isThreatened = true;\n }\n if (four.isLegalIndex() && board[four.getX()][four.getY()] != null && board[four.getX()][four.getY()].getColor() != piece.getColor()) {\n board[four.getX()][four.getY()].setPoint();\n board[four.getX()][four.getY()].isThreatened = true;\n }\n if (five.isLegalIndex() && board[five.getX()][five.getY()] != null && board[five.getX()][five.getY()].getColor() != piece.getColor()) {\n board[five.getX()][five.getY()].setPoint();\n board[five.getX()][five.getY()].isThreatened = true;\n }\n if (six.isLegalIndex() && board[six.getX()][six.getY()] != null && board[six.getX()][six.getY()].getColor() != piece.getColor()) {\n board[six.getX()][six.getY()].setPoint();\n board[six.getX()][six.getY()].isThreatened = true;\n }\n if (seven.isLegalIndex() && board[seven.getX()][seven.getY()] != null && board[seven.getX()][seven.getY()].getColor() != piece.getColor()) {\n board[seven.getX()][seven.getY()].setPoint();\n board[seven.getX()][seven.getY()].isThreatened = true;\n }\n if (eight.isLegalIndex() && board[eight.getX()][eight.getY()] != null && board[eight.getX()][eight.getY()].getColor() != piece.getColor()) {\n board[eight.getX()][eight.getY()].setPoint();\n board[eight.getX()][eight.getY()].isThreatened = true;\n }\n }",
"public void setTempCollision( boolean b ) {\n\t\tthis.tempCheckForCollision = b;\n\t}",
"void regroupTouches() {\n\t\tint s=mTouchPoints.size();\n\t\tif (s>0) {\n\t\t\tif (mMainTouch == null) {\n\t\t\t\tif (mPinchTouch != null) {\n\t\t\t\t\tmMainTouch=mPinchTouch;\n\t\t\t\t\tmPinchTouch=null;\n\t\t\t\t} else {\n\t\t\t\t\tmMainTouch=getUnboundPoint();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (s>1) {\n\t\t\t\tif (mPinchTouch == null) {\n\t\t\t\t\tmPinchTouch=getUnboundPoint();\n\t\t\t\t\tstartZoom();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"boolean testIsTouchingILoGamePieceShip(Tester t) {\n return t.checkExpect(ship2.isTouching(los2), false)\n && t.checkExpect(ship2.isTouching(lob2), true)\n && t.checkExpect(ship3.isTouching(lob3), true)\n && t.checkExpect(ship3.isTouching(mt), false);\n }",
"private void setAirCondTemp(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setAirCondTemp\n\n String tempStr = this.acTempTextField.getText();\n System.out.println(tempStr);\n // make sure the user doesnt set an unreasonable temp\n if (Double.parseDouble(tempStr) < 40.0 || Double.parseDouble(tempStr) > 60.0 ){\n System.out.println(\"Error. Please set a temperature between 40.0 - 60.0\");\n\n }else{\n this.setTemp = Double.parseDouble(tempStr);\n this.turnOnAC(Double.parseDouble(tempStr));\n }\n }",
"public void turnOnAC(Double temp){\n\n this.selectedTrain.setAC(1); // turn on heat\n this.selectedTrain.setHeat(0); // turn off heat\n\n if (temp == null){ this.selectedTrain.setThermostat(40.0); } // set to default heat\n else{ this.selectedTrain.setThermostat(temp); }\n\n this.operatingLogbook.add(\"AC Set: \" + temp.toString());\n this.printOperatingLogs();\n }",
"public void setPiece(Piece newPiece) {\n this.piece = newPiece;\n }",
"void TakeFood(){\r\n if (plateau[this.x][this.y]!='0' && this.charge=='0'){\r\n this.charge+=this.plateau[this.x][this.y];\r\n this.plateau[this.x][this.y]='0';\r\n }\r\n }",
"public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }",
"public void setTouched(boolean touched) {\n this.touched = touched;\n }",
"@Test\n\tpublic void testSetTemp_1()\n\t\tthrows Exception {\n\t\tSaveScenarioAction fixture = SaveScenarioActionFactory.createInstance();\n\t\tfloat temp = 1.0f;\n\n\t\tfixture.setTemp(temp);\n\n\t\t// add additional test code here\n\t}",
"public void releasePressureToShooter() {\n fire1.set(false);\n fire2.set(false);\n }",
"@Override\n\tpublic boolean isTemp() {\n\t\treturn heldObj.isTemp();\n\t}",
"private boolean movePiece(Tile fromTile) {\r\n\t\tgetBoard().setToTile(tile);\r\n\t\tmakeBackup();\r\n\r\n\t\ttile.setPiece(fromTile.getPiece());\r\n\r\n\t\t// League wins the game if the piece carrying the flag returns to its territory\r\n\t\tif (tile.getPiece().getHasEnemyFlag() == true && tile.getPiece().getLEAGUE().toString().toLowerCase()\r\n\t\t\t\t.equals(tile.getTer().territoryName().toLowerCase())) {\r\n\t\t\tGame.getInstance().setGameOver(true);\r\n\t\t}\r\n\r\n\t\t// reset the old position\r\n\t\tfromTile.setPiece(null);\r\n\t\tgetBoard().setFromTile(null);\r\n\r\n\t\t// reset the selection\r\n\t\tgetBoard().setPieceSelected(false);\r\n\r\n\t\t// fromTile = null;\r\n\t\tgetBoard().setToTile(null);\r\n\r\n\t\treturn true;\r\n\t}",
"private void processMove() {\n\t\tCoord chipEndPos = new Coord(0, 0);\n\t\tArrayList<Coord> targets = new ArrayList<Coord>();\n\n\t\tif (legalMove()) {\n\t\t\tif (player.isValid(tilePath, userChip, targets)) {\n\n\t\t\t\tchipEndPos = mBoard\n\t\t\t\t\t\t.getTileCenter(tilePath.get(tilePath.size() - 1));\n\n\t\t\t\tif (player.isRobot()) {\n\t\t\t\t\tuserChip.setNextCoord(chipEndPos);\n\t\t\t\t} else\n\t\t\t\t\tuserChip.setCoords(chipEndPos);\n\n\t\t\t\t// update tiles\n\t\t\t\tmBoard.setTileHasNothing(tilePath.get(0));\n\t\t\t\tmBoard.setTileChipIndex(tilePath.get(0), 0);\n\n\t\t\t\tif (userChip.isRed()) {\n\t\t\t\t\tmBoard.setTileHasRed(tilePath.get(tilePath.size() - 1));\n\t\t\t\t\tmBoard.setTileChipIndex(tilePath.get(tilePath.size() - 1),\n\t\t\t\t\t\t\tuserChip.getId());\n\t\t\t\t} else {\n\t\t\t\t\tmBoard.setTileHasYellow(tilePath.get(tilePath.size() - 1));\n\t\t\t\t\tmBoard.setTileChipIndex(tilePath.get(tilePath.size() - 1),\n\t\t\t\t\t\t\tuserChip.getId());\n\t\t\t\t}\n\n\t\t\t\tif (player.isBonus(tilePath, userChip) && targets.size() > 0) {\n\t\t\t\t\tendTurn = false;\n\t\t\t\t\ttake(targets);\n\t\t\t\t\tif (player.score >= 13)\n\t\t\t\t\t\tgameWon();\n\t\t\t\t} else\n\t\t\t\t\tendTurn = true;\n\n\t\t\t} else {\n\t\t\t\tchipEndPos = mBoard.getTileCenter(tilePath.get(0));\n\t\t\t\tuserChip.setCoords(chipEndPos);\n\t\t\t}\n\t\t} else {\n\t\t\tif (tilePath.size() > 0) {\n\t\t\t\tdebug(\"something's null... chipEndPos = \" + chipEndPos.getX()\n\t\t\t\t\t\t+ \", \" + chipEndPos.getY());\n\t\t\t\tdebug(\"tilePath.get(0) is \" + tilePath.get(0).getX() + \", \"\n\t\t\t\t\t\t+ tilePath.get(0).getY());\n\t\t\t\tdebug(\"userchip is \" + userChip.getCenterX() + \", \"\n\t\t\t\t\t\t+ userChip.getCenterY());\n\n\t\t\t\tchipEndPos = mBoard.getTileCenter(tilePath.get(0));\n\t\t\t\tuserChip.setCoords(chipEndPos);\n\t\t\t}\n\n\t\t}\n\n\t\t// after move stuff\n\t\tfor (int j = 0; j < tilePath.size(); ++j) {\n\t\t\tdebug(\"tilePath \" + j + \" is \" + tilePath.get(j).x + \", \"\n\t\t\t\t\t+ tilePath.get(j).y);\n\t\t}\n\t\tdebug(\"Score is now: \" + player.getScore());\n\t\tdisplayBoardStatus();\n\t\ttilePath.clear();\n\t\tuserChip = null;\n\n\t\tif (endTurn) {\n\t\t\tdebug(\"Reached end of Turn!\");\n\t\t\ttake(targets);\n\t\t\tif (player.score >= 13)\n\t\t\t\tgameWon();\n\t\t\telse {\n\t\t\t\tif (player.isHet) {\n\t\t\t\t\tplayer = homPlay;\n\n\t\t\t\t} else {\n\t\t\t\t\tplayer = hetPlay;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tendTurn = false;\n\t\t}\n\n\t\t// end of giant pain in the ass function \"processMove\"\n\t}",
"public void setTemp(double currentTemp) {\n\t\tthis.currentTemp = currentTemp;\n\t}",
"boolean testTouching(Tester t) {\n return t.checkExpect(this.p5.touching(p6, 8), false)\n && t.checkExpect(new MyPosn(13, 6).touching(new MyPosn(6, 6), 7), true)\n && t.checkExpect(new MyPosn(6, 13).touching(new MyPosn(6, 6), 7), true)\n && t.checkExpect(new MyPosn(5, 6).touching(new MyPosn(6, 6), 5), true)\n && t.checkExpect(new MyPosn(6, 3).touching(new MyPosn(6, 6), 8), true)\n && t.checkExpect(new MyPosn(6, 6).touching(new MyPosn(13, 6), 7), true)\n && t.checkExpect(new MyPosn(6, 6).touching(new MyPosn(6, 13), 7), true);\n }",
"private void resetUnitSprite() {\r\n\t\tswitch (GameManager.getInstance().getSelectedUnit()) {\r\n\t\tcase 0:\r\n\t\t\tGameManager.getInstance().setSelectedUnit(3);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 1:\r\n\t\t\tUnit1SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 2:\r\n\t\t\tUnit2SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(2);\r\n\t\tcase 3:\r\n\t\t\tUnit3SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(3);\r\n\t\tcase 4:\r\n\t\t\tUnit4SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 5:\r\n\t\t\tUnit5SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 6:\r\n\t\t\tUnit6SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\t}\r\n\t}",
"public void onTouch(Player player) {\n\t\tif (!isPickedUp()) {\n\t\t\tsetPickedUp(true);\n\t\t\tsetPassableEnemy(true);\n\t\t\tplayer.setBlueKeys(player.getBlueKeys() + 1);\n\t\t\tsetImage(new Image(\"/floor.png\"));\n\t\t}\n\t}",
"public void planted(){\r\n\t\tenable = false; \r\n\t\tcount = 0; \r\n\t}",
"@Override\n\tprotected void updateTiles() {\n\n\t\tfinal byte tileId = getPlanetType().mainTileId;\n\n\t\tfor (int i = 0; i < tiles.length; i++) {\n\t\t\t// if (random.NextDouble() > 0.95f)\n\t\t\t// tiles[i] = 0;\n\t\t\t// else\n\t\t\ttiles[i] = tileId;\n\t\t}\n\t}",
"public void setRemainingToScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tgrid[i][j]=new Scenery(i*grid[0].length+j);\n\t\t\t}\n\t\t}\n\t}",
"public void setToDefualts(){\n\t\tchangeInPlayerHealth = 0;\n\t\tchangeInPlayerScore = 0;\n\t\tchangInBatteryCharge = 0;\n\t\tpuaseForAnimation = false;\n\t}",
"public void sleutelWaarde(){\n if(sleutel100.getX() == speler.getX() && sleutel100.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel100.getWaarde());\n }\n else if(sleutel1002.getX() == speler.getX() && sleutel1002.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel1002.getWaarde());\n }\n else if(sleutel200.getX() == speler.getX() && sleutel200.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel200.getWaarde());\n }\n else if(sleutel300.getX() == speler.getX() && sleutel300.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel300.getWaarde());\n }\n }",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"private void startWork() {\n String destSensor = destination.get(\"sensorUri\");\n if (destSensor.contains(\"temp\")) {\n System.out.println(\"Turn on Heater\");\n workType.set(\"TEMP\");\n } else if (destSensor.contains(\"soil\")) {\n System.out.println(\"Watering\");\n workType.set(\"WATER\");\n } else if (destSensor.contains(\"light\")) {\n System.out.println(\"Turn on Shield\");\n workType.set(\"LIGHT\");\n }\n }",
"public static void setPieceTest2() {\n\t\t\t\tOthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);\n\t\t\t \tBoard.setBoard();\n\t\t\t\tBoard.decPieceCount();\n\t\t\t \tSystem.out.println(Board.getPieceCount());\t\n\t\t\t\tSystem.out.println(Board.move(\n\t\t\t\t\t\tTEST_MOVE_X1, TEST_MOVE_Y1, Board.WHITE_PIECE));\n\t\t\t\tBoard.m_Pieces[TEST_PIECE_X][TEST_PIECE_Y]=Board.WHITE_PIECE;\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tBoard.checkWin();\n\t\t\t\tSystem.out.println(\"Valid inputs\");\n\t\t\t\tSystem.out.println(\"OthelloBoard.clearPieces() - Begin\");\n\t\t\t\tSystem.out.println(\"Expected output: Throws exception\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t}catch(UnsupportedOperationException e){\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\");\n\t\t}",
"public static void setPieceTest() {\n\t\tOthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);\n\t\tBoard.setBoard();\n\t\tBoard.decPieceCount();\n\t\tSystem.out.println(Board.getPieceCount());\n\t\tSystem.out.println(Board.move(\n\t\t\t\tTEST_MOVE_X1, TEST_MOVE_Y1, Board.WHITE_PIECE));\n\t\tBoard.m_Pieces[TEST_PIECE_X][TEST_PIECE_Y]=Board.WHITE_PIECE;\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"\");\n\t\tBoard.checkWin();\n\t\tSystem.out.println(\"Valid inputs\");\n\t\tSystem.out.println(\"OthelloBoard.setPiece() - Begin\");\n\t\tSystem.out.println(\"Expected output: true\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Actual output: \" + \n\t\tBoard.setPiece(\n\t\t\t\tOUTPUT_SETPIECE_TEST_X,OUTPUT_SETPIECE_TEST_Y,Board.BLACK_PIECE));\n\t\tSystem.out.println(\"\");\n\t}",
"public TilePiece(){\n\t\t\n\t\tiColour = null;\n\t\tiShape = null;\n\t}",
"public void reset() {\n\t\txD = x;\n\t\tyD = y;\n\t\taction = 0;\n\t\tdir2 = dir;\n\t\tvisibleToEnemy = false;\n\t\tselected = false;\n\t\t\n\t\tif (UNIT_R == true) {\n\t\t\t// dir = 0;\n\t\t} else if (UNIT_G == true) {\n\t\t\t// dir = 180 / 2 / 3.14;\n\t\t}\n\t}",
"public void setupPiece() {\n if(this.material == null) {\n this.setupMaterial();\n }\n\n if(this.cylinder == null) {\n this.setupCylinder(false);\n }\n\n if(this.isKing && this.kingCylinder == null) {\n this.setupCylinder(true);\n }\n\n this.cylinderContainer.getChildren().clear();\n\n if(this.isKing) {\n this.cylinderContainer.getChildren().addAll(this.cylinder, this.kingCylinder);\n return;\n }\n\n this.cylinderContainer.getChildren().add(this.cylinder);\n }",
"public void setPieces(List<Piece> pieces) {\n\t\tthis.pieces = pieces;\n\t}",
"public void areaEffect(Player player){\n if(object.getProperties().containsKey(\"endLevel\")) {\n System.out.println(\"Fin du level\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n PlayScreen.setEndLevel();\n }\n\n if(object.getProperties().containsKey(\"startBossFight\")) {\n\n System.out.println(\"Start Boss Fight\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 9, cell);\n\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 9, cell);\n\n PlayScreen.cameraChangeBoss(true);\n setCategoryFilterFixture(GameTest.GROUND_BIT, PlayScreen.getFixtureStartBoss());\n\n }\n\n if(object.getProperties().containsKey(\"blueKnight\")) {\n System.out.println(\"Changement en bleu\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"blue\");\n }\n\n if(object.getProperties().containsKey(\"greyKnight\")) {\n System.out.println(\"Changement en gris\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"grey\");\n }\n\n if(object.getProperties().containsKey(\"redKnight\")) {\n System.out.println(\"Changement en rouge\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"red\");\n }\n\n }",
"public void panic() {\n energy = 0;\n redBull = 0;\n gun = 1;\n target = 2;\n }",
"private void updateTemperatureImage(float temperature) {\n \t\t\n \t\t//determine which drawable to use\n \t\tif(temperature < maxColdTemp) {\n \t\t\tif(coldTempDrawable == null) {\n \t\t\t\tcoldTempDrawable = getResources().getDrawable(R.drawable.temperature_cold);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(coldTempDrawable);\n \t\t} else if(temperature > minHotTemp) {\n \t\t\tif(hotTempDrawable == null) {\n \t\t\t\thotTempDrawable = getResources().getDrawable(R.drawable.temperature_hot);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(hotTempDrawable);\n \t\t} else {\n \t\t\tif(warmTempDrawable == null) {\n \t\t\t\twarmTempDrawable = getResources().getDrawable(R.drawable.temperature_warm);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(warmTempDrawable);\n \t\t}\n \t}",
"public void attack(int x, int y, int xx, int yy) {\n int result = ((MovablePiece)(controller.getBoard().getPiece(x, y))).attack(controller.getBoard().getPiece(xx,yy));\n int player;\n \n if(result < 4) {\n mc.playMusic(\"sounds\\\\Bomb.wav\");\n }\n \n if(result == 1) {\n controller.getPlayer(controller.getTurn()).getMyGraveyard().setPiece(controller.getBoard().getPiece(xx, yy));\n controller.getBoard().setPiece(controller.getBoard().getPiece(x, y), xx, yy);\n controller.getBoard().deletePiece(x, y);\n Cell[xx][yy].setIcon(new ImageIcon(\"pieces\\\\\" + this.getName()));\n } else if(result == 2) {\n controller.getPlayer(controller.getTurn()).getMyGraveyard().setPiece(controller.getBoard().getPiece(xx, yy));\n controller.getPlayer(prevTurn).getMyGraveyard().setPiece(controller.getBoard().getPiece(x, y));\n controller.getBoard().deletePiece(xx,yy);\n controller.getBoard().deletePiece(x, y);\n Cell[xx][yy].setIcon(null);\n Cell[xx][yy].setBackground(Color.white);\n } else if(result == 3){\n controller.getPlayer(prevTurn).getMyGraveyard().setPiece(controller.getBoard().getPiece(x, y));\n controller.getBoard().deletePiece(x, y);\n } else if(result == 5) {\n mc.playMusic(\"sounds\\\\Sorceress.wav\");\n try {\n Thread.sleep(4000);\n } catch (InterruptedException ex) {\n Logger.getLogger(Graphics.class.getName()).log(Level.SEVERE, null, ex);\n }\n piece = controller.getBoard().getTable()[xx][yy];\n if(piece.getLevel()< controller.getBoard().getPiece(x, y).getLevel() && piece.getLevel() != 0 ) {\n if(piece.getColour() == 'R') {\n piece.setColour('B');\n piece.setName(piece.getName().replace(\"R\", \"B\"));\n } else {\n piece.setColour('R');\n piece.setName(piece.getName().replace(\"B\", \"R\"));\n }\n piece.setIcon(piece.getName());\n }\n } else {\n /* NOTHING IS CHARGED */\n }\n Cell[x][y].setIcon(null);\n Cell[x][y].setBackground(Color.white);\n for(int i = 0; i < 12; i++) {\n RGrave[i].setToolTipText(controller.getPlayer(2).getMyGraveyard().getQuantity(i) + \"/\" + (new Collection('R')).getQuantity(i));\n BGrave[i].setToolTipText(controller.getPlayer(1).getMyGraveyard().getQuantity(i) + \"/\" + (new Collection('B')).getQuantity(i));\n }\n }",
"public boolean heatPotion() \n\t{\n\t\tint count=0;\n\t\tfor (int i=0; i < ingredients.length(); i++) \n\t\t{\n\t\t\tif (ingredients.charAt(i)=='w') \n\t\t\t{\n\t\t\t\t//take out the water and count that it was there\n\t\t\t\tingredients = ingredients.replace(\"w\", \"\");\n\t\t\t\tcount+=1;\n\t\t\t}\n\t\t}\n\t\t//check that there was water in the potion in order to have it properly heated\n\t\tif (count > 0) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean shooting(){\n\t\t\tif(x==tmp || x==tmp1 || x==tmp2 || x == tmp3){\n\t\t\t\treturn true; \n\t\t\t}\n\t\t\telse \n\t\t\t\treturn false; \n\t}",
"public void setPieces(HashMap<Integer, Piece> pieces) {\n this.pieces = pieces;\n }",
"public void set_AllSpreadIndexToOne(){\r\n\t//test to see if the fuel moistures are greater than 33 percent.\r\n\t//if they are, set their index value to 1\r\n\tif ((FFM>33)){ // fine fuel greater than 33?\r\n\t\tGRASS=0; \r\n\t\tTIMBER=0;\r\n\t}else{\r\n\t\tTIMBER=1;\r\n\t}\r\n}",
"private void checkHeatLevels()\n {\n // Computer is switched on and has power reserves.\n if (this.isPowered() && this.isRedstonePowered())\n {\n if (this.getEnergyStored(ForgeDirection.UNKNOWN) <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN))\n {\n // Running computer consumes energy from internal reserve.\n this.consumeInternalEnergy(this.getEnergyConsumeRate());\n }\n\n // Running computer generates heat with excess energy it wastes.\n if (!this.isHeatAboveZero() && worldObj.getWorldTime() % 5L == 0L)\n {\n if (!this.isOverheating() && !this.isHeatedPastTriggerValue())\n {\n // Raise heat randomly from zero to five if we are not at optimal temperature.\n this.setHeatLevelValue(this.getHeatLevelValue() + worldObj.rand.nextInt(10));\n }\n else if (!this.isOverheating() && this.isHeatedPastTriggerValue() && this.getFluidAmount() > FluidContainerRegistry.BUCKET_VOLUME)\n {\n // Computer has reached operating temperature and has water to keep it cool.\n this.setHeatLevelValue(this.getHeatLevelValue() + worldObj.rand.nextInt(2));\n }\n else if (!this.isOverheating() && this.getFluidAmount() <= FluidContainerRegistry.BUCKET_VOLUME)\n {\n // Computer is running but has no water to keep it cool.\n this.setHeatLevelValue(this.getHeatLevelValue() + worldObj.rand.nextInt(5));\n }\n }\n }\n\n // Water acts as coolant to keep running computer components cooled.\n if (!this.isHeatAboveZero() && !this.isFluidTankEmpty() && this.isPowered() && this.isRedstonePowered() && worldObj.getWorldTime() % 16L == 0L)\n {\n if (this.getHeatLevelValue() <= this.getHeatLevelMaximum() && this.isHeatAboveZero())\n {\n // Some of the water evaporates in the process of cooling off the computer.\n // Note: water is drained in amount of heat computer has so hotter it gets\n // the faster it will consume water up to rate of one bucket\n // every few ticks.\n if (this.getFluidAmount() >= this.getHeatLevelValue())\n {\n // The overall heat levels of the computer drop so long as there is water though.\n this.removeFluidAmountExact(this.getHeatLevelValue() / 4);\n this.decreaseHeatValue();\n }\n }\n }\n else if (this.isHeatAboveZero() && worldObj.getWorldTime() % 8L == 0L)\n {\n // Computer will slowly dissipate heat while powered off but nowhere near as fast with coolant.\n this.decreaseHeatValue();\n }\n }",
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n if (!gameOn) return false;\n\n if (selectedObject != null) {\n // We clicked while having a piece already chosen, check if we can move here\n CharacterSprite newSelectedObject = null;\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding((int) event.getX(), (int) event.getY())) {\n // Newly selected object is another piece\n newSelectedObject = sprite;\n break;\n }\n }\n if (newSelectedObject == null) {\n for (CharacterSprite sprite : board) {\n if (sprite.isColliding((int) event.getX(), (int) event.getY())) {\n // Newly selected object is a field\n newSelectedObject = sprite;\n break;\n }\n }\n }\n if (newSelectedObject == null) {\n for (CharacterSprite field : selected) {\n if (field.isColliding(selectedObject.getX(), selectedObject.getY())) {\n // User touched outside the board, deselecting previous field and quitting\n field.setVisible(false);\n selectedObject = null;\n break;\n }\n }\n return false;\n }\n\n // position && destination == [x,y] coordinates list in range <1-8>\n int[] position = {selectedObject.getX() / CharacterSprite.size, selectedObject.getY() / CharacterSprite.size};\n int[] destination = {newSelectedObject.getX() / CharacterSprite.size, newSelectedObject.getY() / CharacterSprite.size};\n boolean moved = false; // if true then a correct move was performed\n boolean isSomethingInTheWay = false;\n\n // board positions, xy\n // 11 21 31 41 51 61 71 81\n // 12 22 32 42 52 62 72 82\n // 13 23 33 43 53 63 73 83\n // 14 24 34 44 54 64 74 84\n // 15 25 35 45 55 65 75 85\n // 16 26 36 46 56 66 76 86\n // 17 27 37 47 57 67 77 87\n // 18 28 38 48 58 68 78 88\n\n // pieces logic\n switch (selectedObject.getType()) {\n case PAWN_BLACK: {\n // move forward\n if (destination[0] == position[0] && destination[1] == position[1] + 1) {\n if (!anyObstacles(pieces, position, destination, moveMode.Y_AXIS, true)) {\n selectedObject.setY(selectedObject.getY() + CharacterSprite.size);\n sendMoveToDB(position, destination);\n\n // user can move black pawn one field\n moved = true;\n selectedObject.setMoved();\n }\n }\n\n // move forward two spaces\n else if (!selectedObject.didMove() && destination[0] == position[0]\n && destination[1] == position[1] + 2) {\n if (!anyObstacles(pieces, position, destination, moveMode.Y_AXIS, true)) {\n selectedObject.setY(selectedObject.getY() + CharacterSprite.size * 2);\n sendMoveToDB(position, destination);\n // user can move black pawn two fields\n moved = true;\n selectedObject.setMoved();\n }\n }\n\n // capture\n else if ((destination[0] == position[0] - 1 && destination[1] == position[1] + 1)\n || (destination[0] == position[0] + 1 && destination[1] == position[1] + 1)) {\n int[] result = moveIfPossible(pieces, selectedObject, whiteTurn, destination);\n moved = result[0] == 1;\n points[whiteTurn ? 0 : 1] += result[1];\n sendMoveToDB(position, destination);\n }\n\n // promote to queen if reached the end of the board\n if (selectedObject.getY() == CharacterSprite.size * 8) {\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inScaled = false;\n pieces.add(new CharacterSprite(BitmapFactory.decodeResource(getResources(),\n R.drawable.queen_black, o), selectedObject.getX(), 880, objType.QUEEN_BLACK, 1));\n pieces.remove(selectedObject);\n }\n break;\n }\n\n case PAWN_WHITE: {\n // move forward\n if (destination[0] == position[0] && destination[1] == position[1] - 1) {\n if (!anyObstacles(pieces, position, destination, moveMode.Y_AXIS, true)) {\n selectedObject.setY(selectedObject.getY() - CharacterSprite.size);\n //int[] origin = new int[]{selectedObject.getX(), selectedObject.getY()};\n //int[] destinationDB= new int[]{selectedObject.getX() / CharacterSprite.size, selectedObject.getY() / CharacterSprite.size};\n sendMoveToDB(position, destination);\n\n // user can move white pawn one field\n moved = true;\n selectedObject.setMoved();\n }\n }\n\n // move forward two spaces\n else if (!selectedObject.didMove() && destination[0] == position[0]\n && destination[1] == position[1] - 2) {\n if (!anyObstacles(pieces, position, destination, moveMode.Y_AXIS, true)) {\n selectedObject.setY(selectedObject.getY() - CharacterSprite.size * 2);\n sendMoveToDB(position, destination);\n // user can move white pawn two fields\n moved = true;\n selectedObject.setMoved();\n }\n }\n\n // capture\n else if ((destination[0] == position[0] - 1 && destination[1] == position[1] - 1)\n || (destination[0] == position[0] + 1 && destination[1] == position[1] - 1)) {\n int[] result = moveIfPossible(pieces, selectedObject, whiteTurn, destination);\n moved = result[0] == 1;\n points[whiteTurn ? 0 : 1] += result[1];\n sendMoveToDB(position, destination);\n }\n\n // promote to queen if reached the end of the board\n if (selectedObject.getY() == CharacterSprite.size) {\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inScaled = false;\n pieces.add(new CharacterSprite(BitmapFactory.decodeResource(getResources(),\n R.drawable.queen_white, o), selectedObject.getX(), 110, objType.QUEEN_WHITE, 1));\n pieces.remove(selectedObject);\n }\n break;\n }\n\n case ROOK_WHITE:\n case ROOK_BLACK: {\n // move on Y axis (up/down)\n if (destination[0] == position[0] && destination[1] != position[1]) {\n if (!anyObstacles(pieces, position, destination, moveMode.Y_AXIS, false)) {\n int[] result = moveIfPossible(pieces, selectedObject, whiteTurn, destination);\n moved = result[0] == 1;\n points[whiteTurn ? 0 : 1] += result[1];\n sendMoveToDB(position, destination);\n }\n\n }\n // move on X axis (left/right)\n else if (destination[1] == position[1] && destination[0] != position[0]) {\n if (!anyObstacles(pieces, position, destination, moveMode.X_AXIS, false)) {\n int[] result = moveIfPossible(pieces, selectedObject, whiteTurn, destination);\n moved = result[0] == 1;\n points[whiteTurn ? 0 : 1] += result[1];\n sendMoveToDB(position, destination);\n }\n }\n break;\n }\n\n case KNIGHT_BLACK:\n case KNIGHT_WHITE: {\n if ((destination[0] == position[0] - 2 && destination[1] == position[1] - 1)\n || (destination[0] == position[0] - 2 && destination[1] == position[1] + 1)\n || (destination[0] == position[0] - 1 && destination[1] == position[1] + 2)\n || (destination[0] == position[0] - 1 && destination[1] == position[1] - 2)\n || (destination[0] == position[0] + 1 && destination[1] == position[1] - 2)\n || (destination[0] == position[0] + 1 && destination[1] == position[1] + 2)\n || (destination[0] == position[0] + 2 && destination[1] == position[1] - 1)\n || (destination[0] == position[0] + 2 && destination[1] == position[1] + 1)) {\n int[] result = moveIfPossible(pieces, selectedObject, whiteTurn, destination);\n moved = result[0] == 1;\n points[whiteTurn ? 0 : 1] += result[1];\n sendMoveToDB(position, destination);\n }\n break;\n }\n\n case BISHOP_BLACK:\n case BISHOP_WHITE: {\n if (abs(destination[0] - position[0]) == abs(destination[1] - position[1])) {\n if (!anyObstacles(pieces, position, destination, moveMode.DIAGONAL, false)) {\n int[] result = moveIfPossible(pieces, selectedObject, whiteTurn, destination);\n moved = result[0] == 1;\n points[whiteTurn ? 0 : 1] += result[1];\n sendMoveToDB(position, destination);\n }\n }\n break;\n }\n\n case KING_BLACK:\n case KING_WHITE: {\n // castle\n if (!selectedObject.didMove() && (destination[0] == position[0] - 4 && destination[1] == position[1])\n || (destination[0] == position[0] + 3 && destination[1] == position[1])) {\n int o;\n // o-o-o\n if (destination[0] == position[0] - 4) {\n o = -1;\n }\n // o-o\n else {\n o = 1;\n }\n\n for (int i = position[0] + o; i > destination[0]; i += o) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(i * CharacterSprite.size, destination[1] * CharacterSprite.size)) {\n isSomethingInTheWay = true;\n break;\n }\n }\n if (isSomethingInTheWay) {\n break;\n }\n }\n\n if (!isSomethingInTheWay) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(destination[0] * CharacterSprite.size,\n destination[1] * CharacterSprite.size)) {\n if (whiteTurn) {\n if (sprite.getType() != objType.ROOK_WHITE || sprite.didMove()) {\n break;\n }\n } else {\n if (sprite.getType() != objType.ROOK_BLACK || sprite.didMove()) {\n break;\n }\n }\n selectedObject.setMoved();\n moved = true;\n sprite.setMoved();\n if (o == -1) {\n selectedObject.setX(3 * CharacterSprite.size);\n sprite.setX(4 * CharacterSprite.size);\n } else {\n selectedObject.setX(7 * CharacterSprite.size);\n sprite.setX(6 * CharacterSprite.size);\n }\n\n }\n }\n }\n } else if (abs(destination[0] - position[0]) == 1 || abs(destination[1] - position[1]) == 1) {\n int[] result = moveIfPossible(pieces, selectedObject, whiteTurn, destination);\n moved = result[0] == 1;\n points[whiteTurn ? 0 : 1] += result[1];\n sendMoveToDB(position, destination);\n }\n break;\n }\n\n case QUEEN_BLACK:\n case QUEEN_WHITE: {\n // move on Y axis\n if (destination[0] == position[0] && destination[1] != position[1]) {\n isSomethingInTheWay = anyObstacles(pieces, position, destination, moveMode.Y_AXIS,\n false);\n }\n // move on X axis\n else if (destination[0] != position[0] && destination[1] == position[1]) {\n isSomethingInTheWay = anyObstacles(pieces, position, destination, moveMode.X_AXIS,\n false);\n }\n // move diagonally\n else if (abs(destination[0] - position[0]) == abs(destination[1] - position[1])) {\n isSomethingInTheWay = anyObstacles(pieces, position, destination, moveMode.DIAGONAL,\n false);\n }\n\n if (!isSomethingInTheWay) {\n int[] result = moveIfPossible(pieces, selectedObject, whiteTurn, destination);\n moved = result[0] == 1;\n points[whiteTurn ? 0 : 1] += result[1];\n sendMoveToDB(position, destination);\n }\n break;\n }\n }\n\n // Uncheck previous field\n for (CharacterSprite field : selected) {\n field.setVisible(false);\n }\n // Switch players if the correct move was performed\n if (moved) {\n whiteTurn = !whiteTurn;\n // end game if mate\n if (isMate(pieces, whiteTurn)) {\n gameOn = false;\n }\n }\n // Deselect object\n selectedObject = null;\n } else {\n // We clicked and we DO NOT have a piece already chosen\n for (CharacterSprite sprite : pieces) {\n if (sprite.isWhite() == whiteTurn && sprite.isColliding((int) event.getX(), (int) event.getY())) {\n selectedObject = sprite;\n for (CharacterSprite field : selected) {\n if (field.isColliding((int) event.getX(), (int) event.getY())) {\n field.setVisible(true);\n break;\n }\n }\n }\n }\n }\n return false;\n }",
"@Override\n protected void resetVariables(){\n super.resetVariables();\n pointUp = false;\n }",
"public void setBoard(){\n \n\t m_Pieces[3][3]= WHITE_PIECE;\n m_Pieces[4][4]= WHITE_PIECE;\n m_Pieces[3][4]= BLACK_PIECE;\n m_Pieces[4][3]= BLACK_PIECE;\n for(int x=0;x<WIDTH;x++){\n for(int y=0;y<HEIGHT;y++){\n if(m_Pieces[x][y]==null){\n m_Pieces[x][y]=NONE_PIECE;\n }\n }\n }\n }",
"public void setLowUnit(TempUnit lowUnit) {\n this.lowUnit = lowUnit;\n }",
"private void setPoints () {\n\t\tArrayList<Point> emptySpot = new ArrayList<Point>();\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\tif (maze[i][j] == 0) {\n\t\t\t\temptySpot.add(new Point (i, j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.shuffle(emptySpot);\n\t\tthis.goal = emptySpot.get(0);\n\t\tdouble goalRange = this.goal.getX() + this.goal.getY();\n\t\tfor (int i = 1; i < emptySpot.size(); i++) {\n\t\t\tPoint playerStart = emptySpot.get(i);\n\t\t\tdouble playerRange = playerStart.getX() + playerStart.getY();\n\t\t\tif (Math.abs(playerRange - goalRange) > width/2)\n\t\t\tthis.playerStart = playerStart;\n\t\t}\n\t}",
"private static void hold(int piece){\n\t\tholdPiece = piece;\n\t\tMain.hold();\n\t}",
"public void setBoard() {\n bestPieceToMove = null;\n bestPieceFound = false;\n bestMoveDirectionX = 0;\n bestMoveDirectionY = 0;\n bestMoveFound = false;\n killAvailable = false;\n lightCounter = 12;\n darkCounter = 12;\n for (int y = 0; y < boardSize; y++) {\n for (int x = 0; x < boardSize; x++) {\n board[y][x] = new Field(x, y);\n if (y < 3 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.DARK, PieceType.MEN));\n } else if (y > 4 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.LIGHT, PieceType.MEN));\n }\n }\n }\n }",
"void DropFood(){\r\n if (plateau[this.x][this.y]!='0' && this.charge!='0'){\r\n this.plateau[this.x][this.y]+=this.charge;\r\n this.charge=0;\r\n \r\n } \r\n }",
"public void resetgamestate() {\n \tthis.gold = STARTING_GOLD;\n \tthis.crew = STARTING_FOOD;\n \tthis.points = 0;\n \tthis.masterVolume = 0.1f;\n this.soundVolume = 0.5f;\n this.musicVolume = 0.5f;\n \n this.ComputerScience = new Department(COMP_SCI_WEPS.getWeaponList(), COMP_SCI_UPGRADES.getRoomUpgradeList(), this);\n this.LawAndManagement = new Department(LMB_WEPS.getWeaponList(), LMB_UPGRADES.getRoomUpgradeList(), this);\n this.Physics = new Department(PHYS_WEPS.getWeaponList(), PHYS_UPGRADES.getRoomUpgradeList(), this);\n \n this.playerShip = STARTER_SHIP.getShip();\n this.playerShip.setBaseHullHP(700);\n this.playerShip.repairHull(700);\n this.combatPlayer = new CombatPlayer(playerShip);\n }",
"public void bumpersIntake(double intakeSpeed){\n\t\tintake1.set(intakeSpeed); \t\t//set speed of motor\n\t\tintake2.set(intakeSpeed); \t\t//set speed of motor\n\t\tif(BumperISLeft.get() && BumperISRight.get()){ \t\t//getting boolean value if pressed or not\n\t\t\tintake1.set(0); \t\t//set speed of motor\n\t\t\tintake2.set(0);\t\t//set speed to 0\n\t\t}\n\t}",
"private void setThrusts() {\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\tPlayer player = players[i];\n\t\t\t\n\t\t\t// Apply drag always\n\t\t\ttanks[i].acceleration = tanks[i].velocity\n\t\t\t\t\t.scalarProduct(-tankDrag);\n\t\t\ttanks[i].angularAcceleration = -tanks[i].angularVelocity * tankSteeringDrag;\n\t\t\t\n\t\t\t// Skip if dead\n\t\t\tif (!tanks[i].isAlive()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Get skid steer button presses\n\t\t\tboolean leftPressed = player.getButton(BUTTON_LEFT).isPressed();\n\t\t\tboolean rightPressed = player.getButton(BUTTON_RIGHT).isPressed();\n\t\t\t\n\t\t\tif (leftPressed) {\n\t\t\t\tif (rightPressed) {\n\t\t\t\t\t// Forward\n\t\t\t\t\ttanks[i].acceleration.add(new Vector2D(tankThrust, tanks[i].angle, true));\n\t\t\t\t} else {\n\t\t\t\t\t// Left\n\t\t\t\t\t// tanks[i].angle -= Math.PI / stepsPerHalfTurn;\n\t\t\t\t\ttanks[i].angularAcceleration -= tankSteeringAccel;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (rightPressed) {\n\t\t\t\t\t// Right\n\t\t\t\t\t// tanks[i].angle += Math.PI / stepsPerHalfTurn;\n\t\t\t\t\ttanks[i].angularAcceleration += tankSteeringAccel;\n\t\t\t\t} else {\n\t\t\t\t\t// Stop\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Rotate velocity so that the tanks can't slide sideways\n\t\t\t/*Vector2D unit = new Vector2D(1d, tanks[i].angle, true);\n\t\t\tdouble velocityMagnitude = tanks[i].velocity.dotProduct(unit);\n\t\t\ttanks[i].velocity = new Vector2D(velocityMagnitude, tanks[i].angle, true);*/\n\t\t\ttanks[i].velocity.setAngle(tanks[i].angle);\n\t\t}\n\t}",
"private void pieceDropped() {\n for (int i = 0; i < 4; ++i) {\n\n int x = curX + curPiece.x(i);\n int y = curY - curPiece.y(i);\n board[(y * BOARD_WIDTH) + x] = curPiece.getShape();\n }\n//check if any lines can be removed\n removeFullLines();\n//creates a new piece when a piece finished falling\n if (!isFallingFinished) {\n newPiece();\n }\n }",
"protected abstract boolean setTemperatureSetting2(byte[] edt);",
"public void setSensorOn() {\n\n }",
"private void swhFieldConditions() {\n\n gameScreenBackground.setImageResource(com.ryansplayllc.ryansplay.R.drawable.baseball_field);\n\n swhImageView.setSelected(false);\n baseHitImageView.setSelected(false);\n\n lfTextView.setSelected(false);\n rfTextView.setSelected(false);\n cfTextView.setSelected(false);\n cTextView.setSelected(false);\n pTextView.setSelected(false);\n oneBTextView.setSelected(false);\n twoBTextView.setSelected(false);\n threeBTextView.setSelected(false);\n ssTextView.setSelected(false);\n\n leftFieldPoints.setVisibility(View.GONE);\n rightFieldpoints.setVisibility(View.GONE);\n centerFieldPoints.setVisibility(View.GONE);\n\n hideAllFieldPosBadges();\n swhLabel.setVisibility(View.GONE);\n\n homeRunImageView.setEnabled(true);\n runScore.setEnabled(true);\n possiblePoints.setText(\"0 / 0\");\n baseHitImageView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.base_hit);\n\n positionsEnable();\n\n //disable basehit\n baseHitImageView.setEnabled(false);\n baseHitImageView.setAlpha((float) 0.6);\n\n //enable swh\n swhImageView.setEnabled(true);\n swhImageView.setAlpha((float) 1.0);\n\n\n }"
] | [
"0.58969754",
"0.5893056",
"0.5633815",
"0.557364",
"0.5540008",
"0.5510824",
"0.5480297",
"0.54702157",
"0.54520273",
"0.5442085",
"0.5433499",
"0.54256195",
"0.5409548",
"0.5391393",
"0.5383548",
"0.53521776",
"0.535003",
"0.53398985",
"0.5313673",
"0.53120875",
"0.53006804",
"0.5289326",
"0.5284291",
"0.52511466",
"0.5233944",
"0.5218758",
"0.52120847",
"0.51953375",
"0.51798755",
"0.5179001",
"0.51751935",
"0.51668787",
"0.51555663",
"0.51553905",
"0.51535374",
"0.51470274",
"0.5141818",
"0.5134339",
"0.5116897",
"0.5116847",
"0.5116726",
"0.509832",
"0.50981367",
"0.5094534",
"0.5094525",
"0.5093049",
"0.5090933",
"0.5090746",
"0.5088259",
"0.5084173",
"0.50746715",
"0.5073422",
"0.50673133",
"0.504903",
"0.5048689",
"0.50215673",
"0.5007315",
"0.4990288",
"0.499013",
"0.49892896",
"0.49857414",
"0.49846858",
"0.49832085",
"0.49826682",
"0.4980843",
"0.49806345",
"0.49695167",
"0.49523005",
"0.49491253",
"0.49484226",
"0.49469876",
"0.49458063",
"0.4944857",
"0.49245614",
"0.4922877",
"0.49199885",
"0.49181125",
"0.49145082",
"0.49144855",
"0.49143136",
"0.49136728",
"0.48958138",
"0.48902738",
"0.48858708",
"0.4885184",
"0.4884966",
"0.48840526",
"0.48804173",
"0.48804078",
"0.48771045",
"0.4875236",
"0.48696506",
"0.4869536",
"0.4865172",
"0.48636913",
"0.48544097",
"0.48531067",
"0.48504433",
"0.4845392",
"0.48446497"
] | 0.490397 | 81 |
Try to send aliyun OSS a request. | public static void trySendReqOSS()
{
Auth auth = new Auth();
String authorization = generateOSSAuthHeader(auth.getId(), auth.getSecret(), "GET", "/xeduo/index.html");
String date = getDateGMT();
HttpRequest request = HttpUtil.createRequest(Method.GET, "http://xeduo.oss-cn-hongkong.aliyuncs.com/index.html");
request.header("Authorization", authorization);
request.header("Date",date);
HttpResponse response = request.execute();
System.out.println(request);
System.out.println(response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean sendRequest(com.webobjects.appserver.WORequest request){\n return false; //TODO codavaj!!\n }",
"private void doRequest() {\n\n try {\n JsonObject request = new JsonObject()\n .put(\"action\", Math.random() < 0.5 ? \"w\" : \"r\")\n .put(\"timeOfRequest\", System.currentTimeMillis());\n\n if (request.getString(\"action\") == \"w\") {\n request.put(\"data\", new JsonObject()\n .put(\"key\", \"value\")\n );\n logger.debug(\"requesting write: \" + request.toString());\n eb.send(\"storage-write-address\", request, new DeliveryOptions().setSendTimeout(1000), this);\n } else {\n Random random = new Random();\n List<String> keys = new ArrayList<String>(map.keySet());\n String randomKey = keys.get(random.nextInt(keys.size()));\n request.put(\"id\", randomKey);\n logger.debug(\"waiting for read: \" + request.toString());\n eb.send(\"storage-read-address\", request, new DeliveryOptions().setSendTimeout(1000), this);\n }\n } catch (Exception e) {\n logger.warn(\"Error\");\n makeRequest();\n }\n\n }",
"private String sendRequest(String requestUrl) throws Exception {\n\t\t \n\t\tURL url = new URL(requestUrl);\n\t\tHttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n\t\tconnection.setRequestMethod(\"GET\");\n\t\tconnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0\");\n \n\t\tBufferedReader in = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(connection.getInputStream(), \"UTF-8\"));\n\t\t\n\t\tString responseCode = Integer.toString(connection.getResponseCode());\n\t\tif(responseCode.startsWith(\"2\")){\n\t\t\tString inputLine;\n\t\t\tStringBuffer response = new StringBuffer();\n \n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tresponse.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\t\t\tconnection.disconnect();\n\t\t\treturn response.toString();\n \t} else {\n \t\tSystem.out.println(\"Unable to connect to \"+requestUrl+\n \t\t\". Please check whether the instance is up and also the security group settings\"); \n\t\t\tconnection.disconnect();\n \t\treturn null;\n\t \t} \n\t}",
"private void sendRequest() throws IOException {\n\t\tHttpURLConnection urlConnection = getHttpURLConnection2(request.getServerUrl());\n\t\t\n\t\ttry {\n\t\t\tInputStream responseStream = null;\n\t final int serverResponseCode = urlConnection.getResponseCode();\n\t if (serverResponseCode / 100 == 2) {\n\t \tresponseStream = urlConnection.getInputStream();\n\t } else { // getErrorStream if the response code is not 2xx\n\t \tresponseStream = urlConnection.getErrorStream();\n\t }\n\t \n\t uploadLstener.onCompleted(uploadId, serverResponseCode, getResponseBodyAsString(responseStream));\n\t responseStream.close();\n\t\t} finally {\n\t\t\turlConnection.disconnect();\n\t\t}\n\t}",
"private void sendRequest(Request request) {\n\t\tif (url==null) {\n\t\t\trequest.response(false, null);\n\t\t\treturn;\n\t\t}\n\t\tif (request.cmd==null) {\n\t\t\t// allows running custom request in Postman thread\n\t\t\trequest.response(false, null);\n\t\t\treturn;\n\t\t}\n\t\tif (request.requiresServerToken && this.serverToken==null) {\n\t\t\trequest.response(false, null);\n\t\t\treturn;\n\t\t}\n\t\tJSONObject answer = null;\n\t\ttry {\n\t\t\tHttpURLConnection conn = createHttpURLConnection(url);\n\t\t\tconn.setUseCaches(false);\n\t\t\tconn.setRequestProperty(\"connection\", \"close\"); // disable keep alive\n\t\t\tconn.setRequestMethod(\"POST\");\n\t\t\tif (serverToken!=null) {\n\t\t\t\tconn.setRequestProperty(\"X-EPILOG-SERVER-TOKEN\", serverToken);\n\t\t\t}\n\t\t\tconn.setRequestProperty(\"X-EPILOG-COMMAND\", request.cmd);\n\t\t\tconn.setRequestProperty(\"X-EPILOG-VERSION\", this.plugin.version);\n\t\t\tconn.setRequestProperty(\"X-EPILOG-TIME\", \"\"+System.currentTimeMillis());\n\t\t\tJSONObject info = request.info;\n\t\t\tinfo.put(\"logSendLimit\", this.logSendLimit);\n\t\t\tinfo.put(\"logCacheSize\", this.logQueue.size() + this.pendingLogs.size());\n\t\t\tinfo.put(\"nLogs\", request.data==null ? 0 : request.data.size());\n\t\t\tconn.setRequestProperty(\"X-EPILOG-INFO\", info.toString());\n\t\t\tconn.setDoOutput(true);\n\t\t\t\n\t\t\tGZIPOutputStream out = new GZIPOutputStream(conn.getOutputStream());\n\t\t\tif (request.data!=null) {\n\t\t\t\tfor (JSONObject json : request.data) {\n\t\t\t\t\tout.write(json.toString().getBytes());\n\t\t\t\t\tout.write(0xA); // newline\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.close();\n\t\t\t\n\t\t\tInputStream in = conn.getInputStream();\n\t\t\tString response = convertStreamToString(in);\n\t\t\tin.close();\n\t\t\tconn.disconnect();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tanswer = new JSONObject(response);\n\t\t\t\thandleRequestResponse(answer);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthis.plugin.getLogger().warning(\"invalid server response\");\n\t\t\t\tthis.plugin.getLogger().log(Level.INFO, response);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tboolean success = answer!=null;\n\t\tif (success) {\n\t\t\tString status = answer.optString(\"status\");\n\t\t\tif (!status.equalsIgnoreCase(\"ok\")) {\n\t\t\t\tsuccess = false;\n\t\t\t\tthis.plugin.getLogger().warning(\"server error\");\n\t\t\t\tthis.plugin.getLogger().log(Level.INFO, answer.toString());\n\t\t\t}\n\t\t}\n\t\trequest.response(success, answer);\n\t}",
"@Override\n\tpublic void send(SendRequest req) {\n\t\tSystem.out.println(req);\n\t\t// send in s1.onentry\n\t\tif (\"This is some content!\".equals(req.getContent())) {\n\t\t\treturnEvent(new Event(\"received1\"));\n\t\t\treturn;\n\t\t}\n\t\t// send in s2.onentry\n\t\tif (req.getParams().containsKey(\"foo\")\n\t\t\t\t&& \"bar\".equals(req.getParams().get(\"foo\").get(0).getAtom())) {\n\t\t\treturnEvent(new Event(\"received2\"));\n\t\t\treturn;\n\t\t}\n\t\t// send in s3\n\t\tif (req.getXML().length() > 0) {\n\t\t\ttry {\n\t\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory\n\t\t\t\t\t\t.newInstance();\n\t\t\t\tDocument doc = factory.newDocumentBuilder().parse(\n\t\t\t\t\t\tnew InputSource(new StringReader(req.getXML())));\n\t\t\t\tSystem.out.println(\"Root element :\"\n\t\t\t\t\t\t+ doc.getDocumentElement().getNodeName());\n\t\t\t\tif (\"this\".equals(doc.getDocumentElement().getNodeName())) {\n\t\t\t\t\treturnEvent(new Event(\"received3\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (ParserConfigurationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (SAXException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}",
"private String requesttosend() throws IOException {\n\t\tsender.sendMsg(Constants.REQSEND);\r\n\t\t//等待接收的返回状态\r\n\t\treturn sender.getMsg();\r\n\t}",
"void sendRequest(IRequest request)\n throws ConnectionFailedException;",
"public Response sendRequest(Request request) {\n return null;\n }",
"private static String executeRequest(String url) throws IOException {\n\n\t\tLog.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t\n\t\tSocket s = new Socket(IP, PORT);\n\t\tPrintStream ps = new PrintStream(s.getOutputStream());\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"PS OPENED\");\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(\n\t\t\t\ts.getInputStream()));\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"BR OPENED\");\n\t\tps.println(url);\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"URL PRNTED\");\n\t\tString response = r.readLine();\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"RESPONSE: \" + response);\n\t\treturn response;\n\n\t\t// boolean unsuccessful = true;\n\t\t// int tries = 0;\n\t\t// String response = \"\";\n\t\t// while(unsuccessful && tries != 3){\n\t\t// unsuccessful = false;\n\t\t// URL requestUrl = new URL(url);\n\t\t// HttpsURLConnection connection = (HttpsURLConnection)\n\t\t// requestUrl.openConnection();\n\t\t// try{\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t// connection.setRequestMethod(\"GET\");\n\t\t// connection.getResponseCode();\n\t\t//\n\t\t// //connection.\n\t\t//\n\t\t// connection.connect();\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\t// //Needs error checking on connection\n\t\t//\n\t\t// InputStream in = new\n\t\t// BufferedInputStream(connection.getInputStream());\n\t\t// BufferedReader reader = new BufferedReader(new\n\t\t// InputStreamReader(in));\n\t\t// StringBuffer buffer = new StringBuffer();\n\t\t// String line;\n\t\t//\n\t\t// //reads response in and appends it to buffer\n\t\t// do{\n\t\t// line = reader.readLine();\n\t\t// buffer.append(line);\n\t\t// }while (line != null);\n\t\t//\n\t\t// //disconnects the HttpURLConnection so other requests can be made\n\t\t// connection.disconnect();\n\t\t// //Log.d(RiotJsonRequest.class.getSimpleName() , \"RECEIVED: \" +\n\t\t// buffer.toString());\n\t\t// response = buffer.toString();\n\t\t// }catch(Exception e){\n\t\t// String code = Integer.toString(connection.getResponseCode());\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , \"CODE: \" + code);\n\t\t// if(code.equals(\"404\")){\n\t\t// return code;\n\t\t// }\n\t\t// unsuccessful = true;\n\t\t// tries++;\n\t\t// connection.disconnect();\n\t\t// connection = null;\n\t\t// requestUrl = null;\n\t\t// try {\n\t\t// Thread.sleep(1000);\n\t\t// } catch (InterruptedException e1) {\n\t\t// e1.printStackTrace();\n\t\t// }\n\t\t// }\n\t\t// }\n\t\t// return response;\n\t}",
"abstract void request() throws IOException;",
"public void test_001_Stream() throws Throwable {\n\n final String RESOURCE_URI = \"asimov_it_test_001_SP_PROXYING\";\n String uri = createTestResourceUri(RESOURCE_URI);\n\n HttpRequest request = createRequest().setUri(uri).addHeaderField(\"Cache-Control\" ,\"max-age=500\").getRequest();\n PrepareResourceUtil.prepareResource(uri, false);\n\n //miss\n sendRequest2(request, 10);\n //R1.2 miss\n checkMiss(request, 2, VALID_RESPONSE);\n }",
"@Test\n public void doRequestURL() throws IOException, NoSuchAlgorithmException, KeyManagementException {\n doRequest(\"https://login.cloud.huawei.com/oauth2/v2/token\");\n\n\n //doRequestWithOutHttps(\"https://124.74.46.118:7012/business/service\");\n //doRequestWithOutHttpsPool(\"https://124.74.46.118:7012/business/service\");\n }",
"public ApiResponse<Source> putPresenceSource(ApiRequest<Source> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<Source>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Source> response = (ApiResponse<Source>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Source> response = (ApiResponse<Source>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"private void doGetRequest(SSLSocket finalSocket) throws IOException {\n String msg = \"GET /v1/gifs/search?q=signal&api_key=dc6zaTOxFJmzC HTTP/1.1\\r\\n\" +\n \"Host: api.giphy.com\\r\\n\" +\n \"Connection: Upgrade, HTTP2-Settings\\r\\n\" +\n \"Upgrade: h2c\\r\\n\\r\\n\";\n\n finalSocket.getOutputStream().write(msg.getBytes());\n finalSocket.getOutputStream().flush();\n }",
"private static String sendPUT(final Wine wine) {\n return \"\";\r\n }",
"public void sendHttp() {\n String url = \"https://openwhisk.ng.bluemix.net/api/v1/namespaces/1tamir198_tamirSpace/actions/testing_trigger\";\n //api key that i got from blumix EndPoins\n String apiKey = \"530f095a-675e-4e1c-afe0-4b421201e894:0HriiSRoYWohJ4LGOjc5sGAhHvAka1gwASMlhRN8kA5eHgNu8ouogt8BbmXtX21N\";\n try {\n //JSONObject jsonObject = new JSONObject().put(\"openwhisk.ng.bluemix.net\" ,\"c1165fd1-f4cf-4a62-8c64-67bf20733413:hdVl64YRzbHBK0n2SkBB928cy2DUO5XB3yDbuXhQ1uHq8Ir0dOEwT0L0bqMeWTTX\");\n String res = (new HttpRequest(url)).prepare(HttpRequest.Method.POST).withData(apiKey).sendAndReadString();\n //String res = new HttpRequest(url).prepare(HttpRequest.Method.POST).withData(jsonObject.toString()).sendAndReadString();\n System.out.println( res + \"***********\");\n\n } catch ( IOException exception) {\n exception.printStackTrace();\n System.out.println(exception + \" some some some\");\n System.out.println(\"catched error from response ***********\");\n }\n }",
"private void sendRequest(Action action) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n request.setLanguage(new SLCodec().getName());\n request.setOntology(MobilityOntology.getInstance().getName());\n try {\n getContentManager().fillContent(request, action);\n request.addReceiver(action.getActor());\n send(request);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"@Api(1.1)\n public Response execute() throws HaloNetException {\n return mBuilder.mClient.request(mRequest);\n }",
"public void sendRequestInternal(JRequest request, int timeout) {\n Logger.m1418dd(TAG, \"Action - sendRequestInternal - connection:\" + NetworkingClient.sConnection.get() + \", timeout:\" + timeout + \", threadId:\" + Thread.currentThread().getId());\n Logger.m1428v(TAG, request.toString());\n Long rid = request.getHead().getRid();\n boolean isImPushCommand = false;\n if (request.getCommand() == 100 && ServiceHelper.isImPushCommand(((IMRequest) request).getIMProtocol().getCommand())) {\n isImPushCommand = true;\n }\n Requesting requesting = new Requesting(request, timeout);\n if (!isImPushCommand) {\n this.mRequestingCache.put(rid, requesting);\n }\n if (timeout > 10000) {\n startRequestTimeout(requesting);\n }\n preProcessRequests(request);\n if (NetworkingClient.sCloseSoon.get() || !this.mLoggedIn) {\n Logger.m1424i(TAG, \"Not logged in currently. Give up to send now.\");\n this.mRequestingQueue.offerLast(requesting);\n return;\n }\n requesting.retryAgain();\n sendCommandWithLoggedIn(requesting);\n }",
"public void request() {\n }",
"private void makeAction(JSONObject request, DataOutputStream clientStream) throws IOException, ParseException {\n\t\tGossip_action_message.Action action = Gossip_parser.getClientAction(request);\n\t\tString sender = Gossip_parser.getClientName(request);\n\t\tString receiver = Gossip_parser.getClientReceiver(request);\n\n\t\ttry {\n\t\t\tswitch(action) {\n\t\t\t\n\t\t\t\tcase LOOKUP_OP: {\n\t\t\t\t\tif (data.searchUser(receiver) == true)\n\t\t\t\t\t\tsendReply(new Gossip_userinfo_message(Gossip_success_message.successMsg.USERINFO, data.getUser(receiver)), clientStream);\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase FRIENDSHIP_OP: {\n\t\t\t\t\tif (!data.addFriendship(sender, receiver))\n\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.FRIENDALREADY), clientStream);\n\t\t\t\t\telse\n\t\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.SUCCESS_OP), clientStream);\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase RM_FRIENDSHIP_OP: {\n\t\t\t\t\tif (!data.removeFriendship(sender, receiver))\n\t\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.FAIL_OP), clientStream);\n\t\t\t\t\telse\n\t\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.SUCCESS_OP), clientStream);\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase MSG_FRIEND_OP: {\n\t\t\t\t\t//non è permesso scambiare messaggi tra utenti non amici\n\t\t\t\t\tif (!data.getFriends(sender).contains(data.getUser(receiver)))\n\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.OPNOTALLOWED), clientStream);\n\t\t\t\t\telse {\n\t\t\t\t\t\tGossip_text_notification_message notification;\n\t\t\t\t\t\tString text = Gossip_parser.getText(request);\n\t\t\t\t\t\tString senderLang = Gossip_parser.getLang(data.getUser(sender).getLanguage());\n\t\t\t\t\t\tString receiverLang = Gossip_parser.getLang(data.getUser(receiver).getLanguage());\n\t\t\t\t\t\t//traduco testo\n\t\t\t\t\t\tString translatedText = Gossip_translator.translate(text, senderLang, receiverLang);\n\t\t\t\t\t\tSocket receiver_socket;\n\t\t\t\t\t\t//se la traduzione mi restituisce null, invio il testo non tradotto\n\t\t\t\t\t\tif (translatedText == null)\n\t\t\t\t\t\t\tnotification = new Gossip_text_notification_message(sender, text);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnotification = new Gossip_text_notification_message(sender, translatedText);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t//recupero il socket per le notifiche al client\n\t\t\t\t\t\t\treceiver_socket = data.getUser(receiver).getMessageSocket();\n\t\t\t\t\t\t\tsynchronized(receiver_socket) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//invio notifica\n\t\t\t\t\t\t\t\tsendReply(notification, new DataOutputStream(receiver_socket.getOutputStream()));\n\t\t\t\t\t\t\t\t//invio risposta\n\t\t\t\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.SUCCESS_OP), clientStream);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (FriendOfflineException e) {\n\t\t\t\t\t\t\t//amico offline\n\t\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.FRIENDOFFLINE), clientStream);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase FILE_FRIEND_OP: {\n\t\t\t\t\t//non è permesso inviare file a utenti che non sono amici\n\t\t\t\t\tif (!data.getFriends(sender).contains(data.getUser(receiver)))\n\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.OPNOTALLOWED), clientStream);\n\t\t\t\t\telse {\n\t\t\t\t\t\tString filename = Gossip_parser.getFilename(request);\n\t\t\t\t\t\tSocket receiver_socket;\n\t\t\t\t\t\tGossip_file_notification_message notification = new Gossip_file_notification_message(sender, filename);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t//recupero socket per le notificihe\n\t\t\t\t\t\t\treceiver_socket = data.getUser(receiver).getMessageSocket();\n\t\t\t\t\t\t\tsynchronized (receiver_socket) {\n\t\t\t\t\t\t\t\tsendReply(notification, new DataOutputStream(receiver_socket.getOutputStream()));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//ridirigo quello che scrive il receiver verso il mittente (hostname e porta per ricevere il file)\n\t\t\t\t\t\t\t\tclientStream.writeUTF(new DataInputStream(new BufferedInputStream(receiver_socket.getInputStream())).readUTF());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (FriendOfflineException e) {\n\t\t\t\t\t\t\t//friend offline\n\t\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.FRIENDOFFLINE), clientStream);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t}\n\t\t} catch (NodeNotFoundException e) {\n\t\t\t//utente non registrato\n\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.NICKUNKNOWN), clientStream);\n\t\t}\n\t}",
"private synchronized String execute(final HttpUriRequest request) {\n request.setParams(params);\n\n // Set the request's headers\n for (Entry<String, String> header : headers.entrySet()) {\n request.setHeader(header.getKey(), header.getValue());\n }\n\n // Execute the request and get it's content\n HttpResponse response;\n String content;\n try {\n\n // Execute the request\n response = getClient().execute(request);\n\n // Get the response content\n content = EntityUtils.toString(response.getEntity(), charset);\n } catch (IOException e) {\n throw new JsogClientException(\"Get request failed.\", e);\n }\n\n // Check the response code\n StatusLine sl = response.getStatusLine();\n if (sl.getStatusCode() != 200) {\n throw new Non200ResponseCodeException(\n sl.getStatusCode(),\n sl.getReasonPhrase(),\n content);\n }\n\n return content;\n }",
"public ApiResponse<Source> postPresenceSources(ApiRequest<Source> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<Source>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Source> response = (ApiResponse<Source>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Source> response = (ApiResponse<Source>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"@Override\r\n\t\t\tpublic void onFailure(Request arg0, IOException arg1) {\n\t\t\t\tsToast(\"失败\");\r\n\t\t\t}",
"private static OSS getClient(){\n ClientConfiguration conf = new ClientConfiguration();\n conf.setConnectionTimeout(15 * 1000); // connction time out default 15s\n conf.setSocketTimeout(15 * 1000); // socket timeout,default 15s\n conf.setMaxConcurrentRequest(5); // synchronous request number,default 5\n conf.setMaxErrorRetry(2); // retry,default 2\n OSSLog.enableLog(); //write local log file ,path is SDCard_path\\OSSLog\\logs.csv\n\n // using STS, safer method\n// OSSCredentialProvider credentialProvider = new\n//// OSSStsTokenCredentialProvider(\"LTAI4FcJvJqKBATQSHtdBWLQ\",\n//// \"Q6ocdnZ211qGhyrSJq2c5jMEMugoor\",\n//// \"<StsToken.SecurityToken>\");\n // deprecated method\n OSSCredentialProvider credentialProvider = new\n OSSPlainTextAKSKCredentialProvider(ACS_KEY_ID, ACS_KEY_SCT);\n\n OSS oss = new OSSClient(Factory.app(), END_POINT, credentialProvider, conf);\n return oss;\n }",
"@Override\r\n\t\t\t\t\tpublic void onFailure(Request arg0, IOException arg1) {\n\t\t\t\t\t\tsToast(\"失败\");\r\n\t\t\t\t\t}",
"public void testSendRequest() {\n\t\ttry {\n\t\t\tRequest invite = createTiInviteRequest(null, null, null);\n\t\t\tRequestEvent receivedRequestEvent = null;\n\t\t\tClientTransaction tran = null;\n\t\t\ttry {\n\t\t\t\ttran = tiSipProvider.getNewClientTransaction(invite);\n\t\t\t\teventCollector.collectRequestEvent(riSipProvider);\n\t\t\t\ttran.sendRequest();\n\t\t\t\twaitForMessage();\n\t\t\t\treceivedRequestEvent =\n\t\t\t\t\teventCollector.extractCollectedRequestEvent();\n\t\t\t\tassertNotNull(\n\t\t\t\t\t\"The sent request was not received by the RI!\",\n\t\t\t\t\treceivedRequestEvent);\n\t\t\t\tassertNotNull(\n\t\t\t\t\t\"The sent request was not received by the RI!\",\n\t\t\t\t\treceivedRequestEvent.getRequest());\n\t\t\t} catch (TransactionUnavailableException exc) {\n\t\t\t\tthrow new TiUnexpectedError(\n\t\t\t\t\t\"A TransactionUnavailableException was thrown while trying to \"\n\t\t\t\t\t\t+ \"create a new client transaction\",\n\t\t\t\t\texc);\n\t\t\t} catch (SipException exc) {\n\t\t\t\texc.printStackTrace();\n\t\t\t\tfail(\"The SipException was thrown while trying to send the request.\");\n\t\t\t} catch (TooManyListenersException exc) {\n\t\t\t\tthrow new TckInternalError(\n\t\t\t\t\t\"A TooManyListenersException was thrown while trying \"\n\t\t\t\t\t\t+ \"to add a SipListener to an RI SipProvider\",\n\t\t\t\t\texc);\n\t\t\t}\n\t\t} catch (Throwable exc) {\n\t\t\texc.printStackTrace();\n\t\t\tfail(exc.getClass().getName() + \": \" + exc.getMessage());\n\t\t}\n\n\t\tassertTrue(new Exception().getStackTrace()[0].toString(), true);\n\n\t}",
"private String gatewayRequestCmd(String url) {\n final ProgressDialog pDialog = new ProgressDialog(mCtx);\n pDialog.setMessage(\"Sending...\");\n pDialog.show();\n\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.GET,\n url, null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response\");\n Log.d(TAG, response.toString());\n pDialog.hide();\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Error: \" + error.getMessage());\n // hide the progress dialog\n pDialog.hide();\n }\n });\n HttpHandler.getInstance(mCtx).addToRequestQueue(jsonObjReq);\n return \"\";\n\n }",
"public void beginExecute(WebRequest request) throws Exception {\r\n request.addParameter(\"aid\", \"123\");\r\n }",
"public void sendYo (String username){\n try {\n URL obj = new URL(\"http://api.justyo.co/yo/\");\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n con.setRequestMethod(\"POST\");\n String urlParameters = \"api_token=9831429c-5e02-4175-b0d1-c5cbe958e09a&username=\" + username;\n con.setDoOutput(true);\n DataOutputStream wr = new DataOutputStream(con.getOutputStream());\n wr.writeBytes(urlParameters);\n wr.flush();\n wr.close();\n int responseCode = con.getResponseCode();\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n }\n catch(Exception e){\n System.out.println(\"Error\");\n }\n }",
"public String issueGetRequest(String query) {\n URL url;\n String result = \"\";\n\n return \"valid\";\n /**\n * Todo: When server API is up and running uncomment this.\n *\n * try { url = new URL(server + \"?\" + query); BufferedReader br = new\n * BufferedReader(new InputStreamReader(url.openStream())); String\n * strTemp = \"\";\n * \n * while (null != (strTemp = br.readLine())) { result = strTemp; }\n * \n * } catch (Exception e) { e.printStackTrace(); }\n * \n * return result;\n */\n }",
"public String send(SenderSource source, String id, Object o) {\n\t\tURL url;\n \tHttpURLConnection connection = null; \n \ttry {\n\t\t\t\n \t\t//Create connection\n\t\t\tFinn.getLogger().fine(\"Sending to endpoint=\"+this.endpoint);\n \t\turl = new URL(this.endpoint);\n \t\tconnection = (HttpURLConnection)url.openConnection();\n \t\tconnection.setUseCaches (false);\n \t\tconnection.setDoInput(true);\n \t\tconnection.setDoOutput(true);\n\n\t\t\tbyte[] data = source.getData(id,o);\n\t\t\tconnection.setRequestMethod(\"POST\");\n \t\tconnection.setRequestProperty(\"Content-Type\", \n \t\t\t\"application/x-www-form-urlencoded\");\n \t\tconnection.setRequestProperty(\"Content-Length\", \"\" + \n Integer.toString( data.length ));\n\t\t connection.setRequestProperty(\"Content-Language\", \"en-US\"); \n\t\t\t\n\t\t\t//Send request\n\t\t\tDataOutputStream stream = new DataOutputStream (connection.getOutputStream ());\n\t\t\tstream.write( data );\n \t\tstream.flush ();\n \t\tstream.close ();\n\n \t\t//Get Response\t\n\t\t\tif ( source.needsResponse() ) {\n \t\t\tInputStream is = connection.getInputStream();\n \t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is));\n \t\t\tString line;\n \t\t\tStringBuffer response = new StringBuffer(); \n \t\t\twhile((line = rd.readLine()) != null) {\n \t\t\tresponse.append(line);\n \t\t\tresponse.append('\\r');\n \t\t\t}\n \t\t\trd.close();\n\t\t\t\tString r = response.toString();\n \t\t\tFinn.getLogger().fine(\"Got response: \" + response.toString());\n\t\t\t\treturn r;\n\t\t\t} else {\n\t\t\t\treturn \"\";\n\t\t\t}\n\n \t} catch (Exception e) {\n\n\t\t\tthrow new RuntimeException(e);\n \t} finally {\n\n \t\tif(connection != null) {\n \t\tconnection.disconnect(); \n \t\t}\n \t}\n\t}",
"public static void main(String[] args) throws IOException {\n OSS client = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);\n\n\n// String objectName = \"community/c14deaec-7827-4fb1-bac9-eeba7a5ba59b.png\";\n//\n//// 创建OSSClient实例。\n// OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);\n//\n//// 删除文件。\n// ossClient.deleteObject(bucketName, objectName);\n//\n//// 关闭OSSClient。\n// ossClient.shutdown();\n\n try {\n /*\n * Batch put objects into the bucket\n */\n final String content = \"Thank you for using Aliyun Object Storage Service\";\n final String keyPrefix = \"MyObjectKey\";\n String objects = \"community/01378488-592b-443c-984f-4cbc12c8cd82.png\" +\n \",community/01394c05-3bc8-41ee-b47f-2caddfbf27f2.png\" +\n \",community/0139e96b-97a7-4270-9bad-3cc25c335184_1080x1430.png\" +\n \",community/013a938c-6486-4abb-bf96-aa5d066472cc.png\" +\n \",community/013b2de1-ef57-4204-92f8-9a2fdf1ab1c0.png\" +\n \",community/013cd7e5-ab1f-4058-a2b6-4e33c283c9b3.png\" +\n \",community/01426305-b2ef-430c-9cfe-8daf4e382b72.png\" +\n \",community/01426539-5fda-44b1-8aca-eb2c744b67ee_1080x1923.png\" +\n \",community/014c400c-e516-4c9e-adf8-a26b63729db5.png\" +\n \",community/014d3126-4b61-499e-b2a4-060d5c565ee3.png\" +\n \",community/014d4e83-9c56-4470-ae54-57387896139b.png\" +\n \",community/02038488-3867-475f-9c05-6e552ca4da70_1080x1439.png\" +\n \",community/0205bd60-49bf-412f-b04a-6c8c00b19f6c.png\" +\n \",community/02084b3b-7acb-4be0-a40c-a1245e805c85_1080x1448.png\" +\n \",community/02099953-c48c-4f22-ab5c-87449d449502_348x464.png\" +\n \",community/020d48bd-9745-4087-8ab5-7298f57a1f30_1080x1563.png\" +\n \",community/0212046c-3167-42a9-850c-788eed176526.png\" +\n \",community/0213caf3-0866-426e-8fea-797c8d533451.png\" +\n \",community/021480ff-4dcd-4b56-95e3-46a094baa742.png\" +\n \",community/01f015d8-1358-48da-bb37-07e270a27667.png\" +\n \",community/01f0a3ca-f0fa-41e5-8126-e0c5e4346d8e.png\" +\n \",community/01f0ed1c-9472-4002-b896-216c95dc214b_720x950.png\" +\n \",community/01f143c2-f8ba-4ee3-8fec-de9b0c106fd2.png\" +\n \",community/01f15f7d-6bee-41e1-9bc9-85409087f5bf.png\" +\n \",community/01f1742c-20b6-4f85-9847-2a4d85801165.png\" +\n \",community/01f32f3f-b0ce-4d9d-aef8-a75be07b655a.png\" +\n \",community/01f42d98-1994-4e3f-b025-d94a849a33a8.png\" +\n \",community/01f7c1e4-5b80-400d-8dd7-0df9a1c88601.png\" +\n \",community/01f8cd29-f527-43c6-a438-d3751663ec37.png\" +\n \",community/01fa914a-66cc-471e-af15-2bd10d34a45e_348x464.png\" +\n \",community/01fad182-2290-4b47-ab3c-ee10dff2fb86.png\" +\n \",community/0201c344-c893-4da6-a564-b4ef70ae38d6_1080x1749.png\" +\n \",community/01d7e8e6-0336-4d18-ae98-2cd2f407c46f.png\" +\n \",community/01d7ecfb-9feb-4db6-8d55-4c87cb050b4d.png\" +\n \",community/01d86f24-8589-4e60-b797-6b4b2f4330b5.png\" +\n \",community/01d96558-4bb2-4763-a7c4-ca2910f73ab1.png\" +\n \",community/01d9f15d-3555-4831-bc18-95cbe4634873_1440x2019.png\" +\n \",community/01daaccc-a3b5-4ef9-a5ce-57dfa803006b_315x420.png\" +\n \",community/01dbcbb8-dd5e-4911-8094-467ae90cf414.png\" +\n \",community/01de101b-e7f0-4d44-8a0c-6b6eb8e86e21.png\" +\n \",community/01e82423-a17b-439b-a804-5e6f898906b2.png\" +\n \",community/01be382c-4447-416c-8905-449a5d2f66a8.png\" +\n \",community/01bfb933-afd3-4529-944d-2e432731b6f8.png\" +\n \",community/01c07f89-8fab-481b-a497-ff5ea1013f5c_1080x1922.png\" +\n \",community/01c965cb-d991-4424-bdec-89634240dd51.png\" +\n \",community/01ca2e7c-f4be-40d7-a05a-7e20a02c14ac.png\" +\n \",community/01ca99ef-c34e-4a8f-a823-82c70eb96f81_720x1025.png\" +\n \",community/01d22b53-b451-4cbe-8555-0c6ea02eb255.png\" +\n \",community/01d40f28-dfdb-4972-869b-75e154817ba4.png\" +\n \",community/01d4d7a4-ffeb-4743-90b5-a4a7d5249d27_1080x1439.png\" +\n \",community/01a8cca4-eb88-4660-9404-ebb7f16d82a6_315x420.png\" +\n \",community/01aaa39a-a562-43de-97cd-d48c7fd28fdd.png\" +\n \",community/01b16c8c-14f3-4357-8c30-2638565141c9.png\" +\n \",community/01b1bc11-09fd-49b0-96ed-ed47e743faf0.png\" +\n \",community/01b35a88-e0c6-4221-8aa5-32d96069fbc3_348x464.png\" +\n \",community/01b634d1-8199-4915-aa47-947a0af5466b.png\" +\n \",community/01b841df-1bb4-44b3-af79-142c4834fd46.png\" +\n \",community/01b9660f-b57f-415c-a619-f10bd76cd860.png\" +\n \",community/01ba2a69-db78-4b4b-ad6b-31a2e715182f.png\" +\n \",community/0190b32e-60be-4a49-8cf7-e0d9ce039997.png\" +\n \",community/0191665a-67c0-4ed8-bf01-7b26f5ba1248_1080x1439.png\" +\n \",community/01972534-37fa-433e-ac22-bcceadd2a3fe.png\" +\n \",community/01981657-5340-4cf9-8c90-176c5d465173_348x464.png\" +\n \",community/019f7fdf-f8b0-4086-b2cc-9cd7d7e199b1.png\" +\n \",community/01a0bcc9-d351-4200-be1a-e9c8f322deb1.png\" +\n \",community/01a2a06d-0b31-419d-8d31-66d6e842b806.png\" +\n \",community/017dfb30-469e-401f-becb-e23c647059f1_315x420.png\" +\n \",community/01834f9a-0596-47e1-80b3-ccfd19d12127.png\" +\n \",community/01856873-80bf-4780-9ead-9968aedd8e15_1080x1563.png\" +\n \",community/0186d337-215d-478f-a657-4c0a04f6d028.png\" +\n \",community/0187db31-4c8f-4689-9f6e-500b5f39f6c3.png\" +\n \",community/018c8d90-35a3-4010-9ecc-c943e72a0745_1080x1657.png\" +\n \",community/018cb9ce-756a-4c23-8a7c-aeb85e393ec8.png\" +\n \",community/016a0bfc-3abf-46e9-b4ee-4b6c73562524.png\" +\n \",community/016be936-bca6-4827-bb7e-84b0c496b7e7_1080x1426.png\" +\n \",community/016c40f3-fb9b-49b7-ad93-bc84f4875d6c.png\" +\n \",community/016c51c6-e3dd-4903-962a-8f24c33e6547_348x464.png\" +\n \",community/016e417e-760b-4e3e-bc9b-7db6fe77d5a2_315x420.png\" +\n \",community/01731219-8bdf-4a10-9982-fe347622d877.png\" +\n \",community/0173e603-5a5f-4c2d-a3e7-f92c1b2fa50c.png\" +\n \",community/0177c179-402f-4ff7-8032-e6e4ae21431f.png\" +\n \",community/01785d9d-d5cc-4e38-b990-395ef92c13c0.png\" +\n \",community/0179b793-b92a-4926-ab88-04dd4f434b15.png\" +\n \",community/017afe9f-02d2-4004-ad9e-8afed066e99c.png\" +\n \",community/017b74df-8b8a-440a-9938-9c8b7e43bb8c_348x464.png\" +\n \",community/017d0cbb-e918-466b-a1e7-633d54c7d5b2.png\" +\n \",community/014e9713-3027-4040-b07a-9d6827e527c1_1080x1439.png\" +\n \",community/014eaafd-0702-47ff-87a1-c3cac9a1769a.png\" +\n \",community/0152e9e6-fcde-404e-9fb6-d75a5b265008.png\" +\n \",community/0154b399-ca4d-4c36-98d3-22aed2e28ed9.png\" +\n \",community/0154f316-3833-4c4b-a406-8f54c01ed121.png\" +\n \",community/01559349-89d4-4010-84da-9f3892f21b27.png\" +\n \",community/01575492-8b54-4729-9be5-ade62bb6be54.png\" +\n \",community/0157e449-b041-404c-b05c-442174c33ca1.png\" +\n \",community/015843a0-d566-42b4-b72c-b51901b4da65.png\" +\n \",community/015a1183-c580-4241-8e03-08b6b7e36703.png\" +\n \",community/015addf7-d725-4a32-bc14-12f6526bf1f6.png\" +\n \",community/015b6646-1359-4ca1-a5a1-914db80285f4.png\" +\n \",community/01641ba3-504f-4dfe-aa33-3e4a689eaa0b.png\" +\n \",community/0166b12a-9e1c-4b4e-a527-8f473faddb43_1080x1774.png\" +\n \",community/0167ec5d-b7c9-4d06-a2c8-819682546723_1080x1563.png\";\n String[] arr = objects.split(\",\");\n List<String> keys = Arrays.asList(arr);\n// for (int i = 0; i < 100; i++) {\n// String key = keyPrefix + i;\n// InputStream instream = new ByteArrayInputStream(content.getBytes());\n// client.putObject(bucketName, key, instream);\n// System.out.println(\"Succeed to put object \" + key);\n// keys.add(key);\n// }\n System.out.println();\n\n /*\n * Delete all objects uploaded recently under the bucket\n */\n System.out.println(\"\\nDeleting all objects:\");\n DeleteObjectsResult deleteObjectsResult = client.deleteObjects(\n new DeleteObjectsRequest(bucketName).withKeys(keys));\n List<String> deletedObjects = deleteObjectsResult.getDeletedObjects();\n for (String object : deletedObjects) {\n System.out.println(\"\\t\" + object);\n }\n System.out.println();\n\n } catch (OSSException oe) {\n System.out.println(\"Caught an OSSException, which means your request made it to OSS, \"\n + \"but was rejected with an error response for some reason.\");\n System.out.println(\"Error Message: \" + oe.getErrorCode());\n System.out.println(\"Error Code: \" + oe.getErrorCode());\n System.out.println(\"Request ID: \" + oe.getRequestId());\n System.out.println(\"Host ID: \" + oe.getHostId());\n } catch (ClientException ce) {\n System.out.println(\"Caught an ClientException, which means the client encountered \"\n + \"a serious internal problem while trying to communicate with OSS, \"\n + \"such as not being able to access the network.\");\n System.out.println(\"Error Message: \" + ce.getMessage());\n } finally {\n /*\n * Do not forget to shut down the client finally to release all allocated resources.\n */\n client.shutdown();\n }\n }",
"public void test_002_Stream() throws Throwable {\n\n final String RESOURCE_URI = \"asimov_it_test_002_SP_PROXYING\";\n String uri = createTestResourceUri(RESOURCE_URI);\n\n HttpRequest request = createRequest().setUri(uri).addHeaderField(\"Cache-Control\" ,\"max-age=500\").getRequest();\n PrepareResourceUtil.prepareResource(uri, false);\n\n //miss, cached by RFC\n sendRequest2(request, 0);\n // R1.2 hit\n checkHit(request, 2, VALID_RESPONSE);\n }",
"private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }",
"private Response makeRequest(String url) throws IOException, IllegalStateException {\n // Make the request\n Request req = new Request.Builder()\n .url(url)\n .addHeader(\"token\", NOAA.KEY)\n .build();\n Response res = client.newCall(req).execute();\n return res;\n }",
"private static void writeNotFound(\n final ChannelHandlerContext ctx,\n final FullHttpRequest request) {\n\n writeErrorResponse(ctx, request, HttpResponseStatus.NOT_FOUND);\n }",
"public void send(String request){\n try {\n streamOut.writeUTF(request);\n streamOut.flush();\n connected = true;\n System.out.println(clientID+\": send: \"+request);\n } catch (IOException ioe) {\n System.out.println(ioe);\n System.out.println(clientID+\": failedToSend: \"+request+\": IOException: \"+ioe);\n }\n }",
"private void sendRequest(String orign,String destin) {\n stopTask();\n\n if (orign.isEmpty()) {\n Toast.makeText(this, \"Por favor ingrese la dirección de origen!\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (destin.isEmpty()) {\n Toast.makeText(this, \"Por favor ingrese la dirección de destino!\", Toast.LENGTH_SHORT).show();\n return;\n }\n try {\n new DirectionFinder(this, orign, destin).execute();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }",
"protected boolean sendRequest(int type) throws IOException {\n boolean returnValue = false;\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n int bodyLength = -1;\n byte[] headerArray = OBEXHelper.createHeader(requestHeaders, true);\n if (privateOutput != null) {\n bodyLength = privateOutput.size();\n }\n\n /*\n * Determine if there is space to add a body request. At present\n * this method checks to see if there is room for at least a 17\n * byte body header. This number needs to be at least 6 so that\n * there is room for the header ID and length and the reply ID and\n * length, but it is a waste of resources if we can't send much of\n * the body.\n */\n if ((BASE_PACKET_LENGTH + headerArray.length) > maxPacketSize) {\n int end = 0;\n int start = 0;\n // split & send the headerArray in multiple packets.\n\n while (end != headerArray.length) {\n //split the headerArray\n end = OBEXHelper.findHeaderEnd(headerArray, start, maxPacketSize\n - BASE_PACKET_LENGTH);\n // can not split\n if (end == -1) {\n isDone = true;\n abort();\n // isDone = true;\n exceptionMessage = \"Header larger then can be sent in a packet\";\n isClosed = true;\n\n if (privateInput != null) {\n privateInput.close();\n }\n\n if (privateOutput != null) {\n privateOutput.close();\n }\n throw new IOException(\"OBEX Packet exceeds max packet size\");\n }\n\n byte[] sendHeader = new byte[end - start];\n System.arraycopy(headerArray, start, sendHeader, 0, sendHeader.length);\n if (!parent.sendRequest(type, sendHeader, replyHeaders, privateInput)) {\n return false;\n }\n\n if (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE) {\n return false;\n }\n\n start = end;\n }\n\n if (bodyLength > 0) {\n return true;\n } else {\n return false;\n }\n } else {\n out.write(headerArray);\n }\n\n if (bodyLength > 0) {\n /*\n * Determine if I can send the whole body or just part of\n * the body. Remember that there is the 3 bytes for the\n * response message and 3 bytes for the header ID and length\n */\n if (bodyLength > (maxPacketSize - headerArray.length - 6)) {\n returnValue = true;\n\n bodyLength = maxPacketSize - headerArray.length - 6;\n }\n\n byte[] body = privateOutput.readBytes(bodyLength);\n\n /*\n * Since this is a put request if the final bit is set or\n * the output stream is closed we need to send the 0x49\n * (End of Body) otherwise, we need to send 0x48 (Body)\n */\n if ((privateOutput.isClosed()) && (!returnValue) && (!isEndOfBodySent)\n && ((type & 0x80) != 0)) {\n out.write(0x49);\n isEndOfBodySent = true;\n } else {\n out.write(0x48);\n }\n\n bodyLength += 3;\n out.write((byte)(bodyLength >> 8));\n out.write((byte)bodyLength);\n\n if (body != null) {\n out.write(body);\n }\n }\n\n if (outputStreamOpened && bodyLength <= 0 && !isEndOfBodySent) {\n // only 0x82 or 0x83 can send 0x49\n if ((type & 0x80) == 0) {\n out.write(0x48);\n } else {\n out.write(0x49);\n isEndOfBodySent = true;\n\n }\n\n bodyLength = 3;\n out.write((byte)(bodyLength >> 8));\n out.write((byte)bodyLength);\n }\n\n if (out.size() == 0) {\n if (!parent.sendRequest(type, null, replyHeaders, privateInput)) {\n return false;\n }\n return returnValue;\n }\n if ((out.size() > 0)\n && (!parent.sendRequest(type, out.toByteArray(), replyHeaders, privateInput))) {\n return false;\n }\n\n // send all of the output data in 0x48,\n // send 0x49 with empty body\n if ((privateOutput != null) && (privateOutput.size() > 0))\n returnValue = true;\n\n return returnValue;\n }",
"private void getAUTH_REQUEST() throws Exception {\n\t\t\n\t\tboolean status = true;\n\t\tboolean status2 = false;\n\t\tString msg = \"\";\n\t\t\n\t\t//File filePK = new File(\"identity\");\n\t\n\t\ttry {\n\t\t\t\n\t\t\tmsg = br.readLine();\n\t\t\tGetTimestamp(\"Received Authorization Request from Client: \" + msg);\n\t\t\t\n\t\t\tJSONObject REQUEST = (JSONObject) parser.parse(msg);\n\t String identity = REQUEST.get(\"identity\").toString();\n\t\t\t\n\t\t\t\n\t if((identity.contains(\"aaron@krusty\"))) {\n\n\t \tGetTimestamp(\"Authorization Request from Client is approved: \");\n\n\t \tGetTimestamp(\"Client Publickey is stored: \" ) ;\n\n\t \tString tosend = encrypt1(getSharedKey(), getClientPublicKey());\n\n\t \tGetTimestamp(\"Server sharedkey is being encrypted with Client's publickey to be sent: \") ;\n\n\t \tJSONObject RESPONSE = new JSONObject();\n\t \tRESPONSE.put(\"command\",\"AUTH_RESPONSE\");\n\t \tRESPONSE.put(\"AES128\", tosend);\n\t \tRESPONSE.put(\"status\", status);\n\t \tRESPONSE.put(\"message\", \"public key found\");\n\n\t \tStringWriter out = new StringWriter();\n\t \tRESPONSE.writeJSONString(out);\n\n\t \tString AUTH_RESPONSE = out.toString();\n\t \tSystem.out.println(AUTH_RESPONSE);\n\n\t \tGetTimestamp(\"Sending Authorization Response to Client: \");\n\n\t \tpw.println(AUTH_RESPONSE);\n\t \tpw.flush();\n\n\n\n\t }\n\t else {\n\n\t \tSystem.out.println(\"Client \" + REQUEST.get(\"identity\") + \" has been rejected\");\n\n\t \tJSONObject RESPONSE = new JSONObject();\n\t \tRESPONSE.put(\"command\",\"AUTH_RESPONSE\");\n\t \tRESPONSE.put(\"status\", status2);\n\t \tRESPONSE.put(\"message\", \"public key not found\");\n\n\t \tStringWriter out = new StringWriter();\n\t \tRESPONSE.writeJSONString(out);\n\n\t \tString AUTH_RESPONSE = out.toString();\n\t \tSystem.out.println(AUTH_RESPONSE);\n\n\t \tpw.println(AUTH_RESPONSE);\n\t \tpw.flush();\n\n\t \tcloseConnection();\n\t }\n\t\t\t\t\n\t\t\t\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\tif (msg.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"Client has signed out!\");\n\t\t\tcloseConnection();\n\n\t\t} else {\t\n\t\t\tgetMessage();\n\t\t}\n\t}",
"public ApiResponse<Source> getPresenceSource(ApiRequest<Void> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<Source>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Source> response = (ApiResponse<Source>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Source> response = (ApiResponse<Source>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"@Test\n void sendGetRequest() {\n try {\n String response = HttpUtils.sendGet();\n assertFalse(response.contains(\"404\"));\n } catch (IOException e) {\n e.printStackTrace();\n fail();\n }\n }",
"@Override\n\tprotected void check() throws SiDCException, Exception {\n\t\tif (entity == null) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal.\");\n\t\t}\n\t\tif (StringUtils.isBlank(entity.getToken())) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(token).\");\n\t\t}\n\t\tif (entity.getStatus() < 0) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(status).\");\n\t\t}\n\t\tif (!StringUtils.isBlank(entity.getTex()) && entity.getTex().length() > 30) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(tex length).\");\n\t\t}\n\t\tif (!StringUtils.isBlank(entity.getAddress()) && entity.getTex().length() > 150) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(address length).\");\n\t\t}\n\t\tif (!StringUtils.isBlank(entity.getEmail())) {\n\t\t\tif (entity.getEmail().length() > 150) {\n\t\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(email length).\");\n\t\t\t}\n\t\t\tif (!entity.getEmail().matches(\"[\\\\w\\\\.\\\\-]+@([\\\\w\\\\-]+\\\\.)+[\\\\w\\\\-]+\")) {\n\t\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(email format).\");\n\t\t\t}\n\t\t}\n\t\tif (entity.getList() == null || entity.getList().isEmpty()) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(list).\");\n\t\t}\n\t\tfor (final ShopLangBean langEntity : entity.getList()) {\n\t\t\tif (StringUtils.isBlank(langEntity.getName())) {\n\t\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(name).\");\n\t\t\t}\n\t\t\tif (StringUtils.isBlank(langEntity.getLangcode())) {\n\t\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(lang code).\");\n\t\t\t}\n\t\t\tif (langEntity.getName().length() > 50) {\n\t\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(name length).\");\n\t\t\t}\n\t\t\tif (langEntity.getLangcode().length() > 5) {\n\t\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(lang code length).\");\n\t\t\t}\n\t\t\tif (!StringUtils.isBlank(langEntity.getDescription()) && langEntity.getDescription().length() > 2048) {\n\t\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"request illegal(description length).\");\n\t\t\t}\n\t\t}\n\t}",
"public synchronized void intentionSell(String goodId) {\n\t\tGood goodToSell = goods.get(goodId);\n\t\tif (goodToSell == null) {\n\t\t\tSystem.err.println(\"ERROR: Good not found!\");\n\t\t\tSystem.out.println(\"Result: FALSE\\n------------------\");\n\t\t\treturn;\n\t\t}\n\n\t\t//writer increments timestamp\n\t\tfinal int writeTimeStamp = goodToSell.getWriteTimestamp() + 1;\n\n\t\tif (verbose) {\n\t\t\tSystem.out.println(\"WriteTimeStamp: \" + writeTimeStamp);\n\t\t}\n\n\t\tConcurrentHashMap<String, Result> acksList = new ConcurrentHashMap<>();\n\t\tConcurrentHashMap<String, Result> failedAcksList = new ConcurrentHashMap<>();\n\n\t\tCountDownLatch awaitSignal = new CountDownLatch((NUM_NOTARIES + NUM_FAULTS) / 2 + 1);\n\n\t\tint test = 0;\n\t\tAtomicInteger demo4 = new AtomicInteger(0);\n\n\t\t// if demo is Read while Write, delay two writes\n\t\t// if demo is Byzantine Client, send one wrong value to notaries each IntentionToSell\n\t\tfor (String notaryID : notaryServers.keySet()) {\n\t\t\tNotaryInterface notary = notaryServers.get(notaryID);\n\t\t\tif (demo == 2) {\n\t\t\t\ttest++;\n\t\t\t\ttry {\n\n\t\t\t\t\tif (test == 1) {\n\t\t\t\t\t\tSystem.out.println(\"Sleeping\");\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t} else if (test == 3) {\n\t\t\t\t\t\tSystem.out.println(\"Sleeping\");\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tservice.execute(() -> {\n\n\t\t\t\ttry {\n\t\t\t\t\t//send signed message\n\t\t\t\t\tboolean modify = false;\n\t\t\t\t\tif(demo == 4) {\n\t\t\t\t\t\tmodify = demo4.incrementAndGet() == 2;\n\t\t\t\t\t\tSystem.out.println(\"Sending wrong timeStamp\");\n\t\t\t\t\t}\n\n\t\t\t\t\tString nonce = notary.getNonce(this.id);\n\t\t\t\t\tString cnonce = cryptoUtils.generateCNonce();\n\t\t\t\t\tString data = nonce + cnonce + this.id + goodId + writeTimeStamp;\n\t\t\t\t\tResult result = notary.intentionToSell(this.id, goodId, modify ? 1000 : writeTimeStamp, cnonce,\n\t\t\t\t\t\tcryptoUtils.signMessage(data));\n\n\t\t\t\t\t//verify signature of receive message\n\t\t\t\t\tif (!cryptoUtils\n\t\t\t\t\t\t.verifySignature(notaryID, data + result.getContent().hashCode(),\n\t\t\t\t\t\t\tresult.getSignature())) {\n\t\t\t\t\t\tthrow new InvalidSignatureException(notaryID);\n\t\t\t\t\t}\n\t\t\t\t\tif (verbose) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"Received WriteTimeStamp: \" + result.getWriteTimestamp());\n\t\t\t\t\t}\n\n\t\t\t\t\t//check if timestamp matches\n\t\t\t\t\tif ((Boolean) result.getContent()\n\t\t\t\t\t\t&& result.getWriteTimestamp() == writeTimeStamp) {\n\t\t\t\t\t\tacksList.put(notaryID, result);\n\t\t\t\t\t\tawaitSignal.countDown();\n\t\t\t\t\t\tif (verbose) {\n\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\"NotaryID: \" + notaryID + \"\\nResult: \" + (Boolean) result\n\t\t\t\t\t\t\t\t\t.getContent());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfailedAcksList.put(notaryID,\n\t\t\t\t\t\t\tnew Result(new Boolean(false), cryptoUtils.signMessage(\"false\")));\n\t\t\t\t\t\tawaitSignal.countDown();\n\t\t\t\t\t\tSystem.out.println(\"Result: Invalid good\");\n\t\t\t\t\t}\n\n\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\trebind();\n\t\t\t\t} catch (InvalidSignatureException e) {\n\t\t\t\t\tfailedAcksList.put(notaryID,\n\t\t\t\t\t\tnew Result(new Boolean(false), cryptoUtils.signMessage(\"false\")));\n\t\t\t\t\tawaitSignal.countDown();\n\t\t\t\t}\n\t\t\t});\n\n\t\t}\n\n\t\t//waits for notaries replies\n\t\ttry {\n\t\t\tawaitSignal.await(TIMEOUT, TimeUnit.SECONDS);\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.out.println(\"Result: FALSE\\n------------------\");\n\t\t\treturn;\n\t\t}\n\n\t\t// checks if quorum was reached\n\t\tif (acksList.size() + failedAcksList.size() > (NUM_NOTARIES + NUM_FAULTS) / 2) {\n\t\t\tif (verbose) {\n\t\t\t\tSystem.out.println(\"--> AcksList: \" + acksList.size());\n\t\t\t}\n\t\t\tSystem.out.println(\"--> Quorum Reached\");\n\n\t\t\tif (acksList.size() > failedAcksList.size()) {\n\t\t\t\tgoods.get(goodId).setForSale();\n\t\t\t\tgoodToSell.setWriteTimestamp(writeTimeStamp);\n\t\t\t\tSystem.out.println(\"Result: TRUE\\n------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Result: FALSE\\n------------------\");\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"--> Quorum not reached...\");\n\t\t\tSystem.out.println(\"Result: FALSE\\n------------------\");\n\n\t\t}\n\t}",
"void sendRequest(String message);",
"@Override\n\tpublic int sendRequest(CharSequence username1, CharSequence username2) throws AvroRemoteException {\n\t\tif (this.getRequest(username1, username2) != null) {\n\t\t\treturn 4;\n\t\t}\n\t\t\n\t\tif (this.clients.containsKey(username2.toString())) {\n\t\t\tthis.requests.add(new Request(username1.toString(), username2.toString(), RequestStatus.PENDING));\n\t\t\tthis.clients.get(username2.toString()).proxy.receiveMessage(\"\\n > You have received a private chat request from \" + username1.toString() + \".\");\n\t\t\treturn 0;\n\t\t}\n\n\t\t// if user does not exist, return error value\n\t\treturn 3;\n\t}",
"public void sendInformation() throws IOException {\n\t\tURL url = new URL(\"http://localhost:8082/EmergencyWebService/addAlert/\" + this.localisation.x + \"/\" + this.localisation.y + \"/\" + this.range); \n\t\tHttpURLConnection connection = (HttpURLConnection) url.openConnection(); \n\t\tconnection.setRequestMethod(\"POST\"); \n\t\tconnection.setRequestProperty(\"Content-Type\", \"application/json; charset=UTF-8\"); \n\t\tconnection.setDoOutput(true); \n\t\t\n\t\tOutputStream os = connection.getOutputStream(); \n\t\tOutputStreamWriter osw = new OutputStreamWriter(os, \"UTF-8\"); \n\t\tosw.write(Tools.toJsonString(this.alerte)); \n\t\tosw.flush(); \n\t\tosw.close();\n\t\t\n\t\tconnection.getInputStream();\n\t\t\n\t\tBufferedReader in = new BufferedReader( new InputStreamReader(connection.getInputStream()));\n\t\tString inputLine;\n\t\tStringBuffer response = new StringBuffer(); \n\t\twhile ((inputLine = in.readLine()) != null) { \n\t\t\tresponse.append(inputLine); \n\t\t} \n\t\tin .close();\n\t\t\n\n\n\t}",
"void onRequest(HttpServletRequest request, HttpServletResponse response) throws IOException {\n mTransport.onRequest(request, response);\n\n if (mUpgrading.get() && mTransport.isWritable() && mWriteBuffer.isEmpty()) {\n mTransport.send(PAYLOAD_NOOP);\n }\n }",
"void sendData(String request) throws IOException {\n if (mmDevice == null) {\n Log.d(TAG, \"No device set\");\n }\n\n Log.d(TAG, \"Request is \" + request);\n if (mmOutputStream != null){\n mmOutputStream.write(request.getBytes(Charset.forName(\"UTF-8\")));\n }\n\n if (false && request.contains(\"travel\")) {\n closeBT();\n openBT();\n }\n }",
"public static HttpResponse uploadFileAliyun(File file, String aliyunAddress, String pathtofile, String contentType)\n {\n // String authorization = generateOSSAuthHeader(ACCESSKEY_ID, accessKeySecret, \"POST\", \"/xeduo?uploads\");\n String date = getDateGMT();\n Auth auth = new Auth();\n HttpRequest request = HttpUtil.createPost(aliyunAddress);\n // String policy;\n String policy = \"{\\\"expiration\\\": \\\"2120-01-01T12:00:00.000Z\\\",\"\n + \"\\\"conditions\\\": [{\\\"bucket\\\":\\\"xeduo\\\"}]}\";\n String encodePolicy = new String(Base64.getEncoder().encode(policy.getBytes()));\n request.header(\"Date\",date);\n //add form\n request.form(\"key\", pathtofile+file.getName());\n request.form(\"OSSAccessKeyId\", auth.getId());\n request.form(\"Policy\", encodePolicy);//needs to be encoded as well.\n request.form(\"Signature\", generateOSSSignature(auth.getSecret(), encodePolicy));\n request.form(\"Content-Disposition\",\"attachment; filename=\"+file.getName());\n request.form(\"file\", file);\n request.form(\"x-oss-meta-uuid\",UUID.fastUUID());\n request.form(\"submit\",\"Upload to OSS\");\n if(!StrUtil.isBlank(contentType))\n {\n request.form(\"Content-Type\",contentType);\n }\n HttpResponse response = request.execute();\n System.out.println(request);\n System.out.println(response);\n return response;\n }",
"public void performHttpRequest(Request request) throws Exception {\n LOGGER.debug(\"Performing HTTP request with these parameters: {}\", request);\n\n try (Response response = invokeHttpRequest(request, null)) {\n validateResponse(response);\n } catch (ProcessingException | IOException e) {\n LOGGER.debug(\"HTTP request failed!\", e);\n throw e;\n }\n }",
"private SingleResponse sendOcspRequest(X509Certificate cert)\n throws InvalidKeyException, NoSuchAlgorithmException,\n X509ExtensionException, OCSPException, CodingException, IOException,\n NoSuchProviderException, SignatureException, CertificateException {\n\n OcspMiniServer.setup();\n \n /* Build the request */\n OCSPRequest req = buildOcspRequest(cert);\n\n /* Send request to the OCSP server */\n OCSPResponse resp = OcspMiniServer.processRequest(req);\n\n /* Extract the basic response from the OCSPResponse */\n BasicOCSPResponse basicOcspResp = (BasicOCSPResponse) resp.getResponse();\n\n /* Get the requested certificate */\n ReqCert req_cert = new ReqCert(ReqCert.pKCert, cert);\n\n /* Get the response for the certificate */\n SingleResponse singleResponse = basicOcspResp.getSingleResponse(req_cert);\n\n System.err.println(new Fingerprint(cert) + \" has OCSP status: \"\n + singleResponse.getCertStatus());\n\n return singleResponse;\n }",
"public String susi(String query) throws Exception {\n\n \t\tthis.query = query;\n \t\tif (this.query != \"\") {\n \t\t\tString url = this.susiUrl + \"?q=\" +this.query;\n\n \t\t\tURL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n con.setRequestMethod(\"GET\");\n\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n String response = \"\";\n\t\t\tif (responseCode == 200) {\n response = buildReponse(con);\n\t\t\t} else {\n\t\t response = \"{'error': 'Looks like there is a problem in susi replying.'}\";\n\t\t\t}\n\n\t\t\treturn response;\n \t\t} else {\n \t\t\treturn \"{'error': 'Please ask susi something.'}\";\n \t\t}\n \t}",
"public static Boolean sentGPGHttpClient(String ipURL, String json) {\n OkHttpClient client = new OkHttpClient.Builder()\n .connectTimeout(5, TimeUnit.MINUTES) // connect timeout\n .writeTimeout(5, TimeUnit.MINUTES) // write timeout\n .readTimeout(5, TimeUnit.MINUTES) // read timeout\n .build();\n Boolean statue = false;\n MediaType mediaType = MediaType.parse(\"application/json;charset=utf-8\");\n RequestBody body = RequestBody.create(mediaType, json);\n Request request = new Request.Builder()\n .url(\"http://172.10.18.88:5590\" + ipURL)\n .post(body)\n .addHeader(\"Content-Type\", \"application/json;charset=utf-8\")\n .addHeader(\"cache-control\", \"no-cache\")\n .addHeader(\"Postman-Token\", \"b1ae3565-90ff-4345-8980-1d124141b9e2\")\n .addHeader(\"Connection\", \"Keep-Alive\")\n .build();\n\n try {\n Response response = client.newCall(request).execute();\n if (!response.isSuccessful()) {\n throw new IOException(\"Unexpected code \" + response);\n }\n String responseBody = response.body().string();\n log.info(responseBody);\n if(responseBody.equals(\"yes\")){\n statue = true;\n }\n\n log.info(response.toString());\n } catch (IOException e) {\n log.error(e.toString());\n// }finally {\n// if (response != null && response.body() != null) {\n// response.body().close();\n// }\n// }\n }\n return statue;\n }",
"@Override\n public void onRequestError(RequestError requestError) {\n offerwallIntent = null;\n Log.d(TAG, \"OW: Something went wrong with the request: \" + requestError.getDescription());\n Toast.makeText(MainActivity.this, \"OW: Something went wrong with the request:\", Toast.LENGTH_SHORT).show();\n }",
"@Test\n void testGivenFaultyRequestWithNoQueryString_thenSuccess() throws Exception {\n URL u = new URL(\"http://localhost:8080/sentry-servlet/fault\");\n HttpURLConnection conn = (HttpURLConnection)u.openConnection();\n int rc = conn.getResponseCode();\n assertThat(rc)\n .isEqualTo(200);\n }",
"private void makeChatOp(JSONObject request, DataOutputStream clientStream) throws IOException {\n\t\tGossip_chat_message.ChatOp op = Gossip_parser.getChatAction(request);\n\t\tString sender = Gossip_parser.getClientName(request);\n\t\tString chatname = Gossip_parser.getChatName(request);\n\t\ttry {\n\t\t\tswitch(op) {\n\t\t\t\tcase CREATE_CHAT_OP: {\n\t\t\t\t\tdata.addChat(chatname, sender);\n\t\t\t\t\tsendReply(new Gossip_chat_info_message(data.getChat(chatname)), clientStream);\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase ADDME_OP: {\n\t\t\t\t\tboolean ret = data.addMember(chatname, sender);\n\t\t\t\t\tif (ret == false)\n\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.NICKALREADY), clientStream);\n\t\t\t\t\telse\n\t\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.SUCCESS_OP), clientStream);\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase REMOVEME_OP: {\n\t\t\t\t\tdata.removeMember(chatname, sender);\n\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.SUCCESS_OP), clientStream);\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase CLOSE_CHAT_OP: {\n\t\t\t\t\tif (data.removeChat(chatname, sender) == true)\n\t\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.SUCCESS_OP), clientStream);\n\t\t\t\t\telse\n\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.OPNOTALLOWED), clientStream);\n\t\t\t\t} break;\n\t\t\t}\n\t\t}//utente non registrato\n\t\t catch (NodeNotFoundException e) {\n\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.NICKUNKNOWN), clientStream);\n\t\t }\n\t\t //nome chat già in uso\n\t\t catch (ChatAlreadyException e) {\n\t\t\t sendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.CHATALREADY), clientStream);\n\t\t }\n\t\t //chat non esistente\n\t\t catch (ChatNotFoundException e) {\n\t\t\t sendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.CHATUNKNOWN), clientStream);\n\t\t }\n\t\tcatch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.FAIL_OP), clientStream);\n\t\t}\n\t\t//errore nella creazione di una chat\n\t\tcatch (PortNotFoundException e) {\n\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.FAIL_OP), clientStream);\n\t\t}\n\t}",
"@Override\n\tprotected void check() throws SiDCException, Exception {\n\t\tif (entity == null) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"illegal of request.\");\n\t\t}\n\t\tif (StringUtils.isBlank(entity.getStatus())) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"illegal of status.\");\n\t\t}\n\t\tif (StringUtils.isBlank(entity.getLangcode())) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"illegal of lang code.\");\n\t\t}\n\t}",
"protected void checkForFirstRequest() throws IOException {\n if(firstRequest) {\n while (!connected || (serveResponse = in.readLine()).isEmpty());\n firstRequest = false;\n }\n }",
"void sendRequest(String invocationId, HttpRequest request);",
"public void sendRRequests() {\n\n }",
"public synchronized void sendUnknown(final String _req) {\r\n\t\tbeginMessage();\r\n\t\tsend(ServerConst.ANS + ServerConst.ANS_UNKNOWN + _req);\r\n\t\tendMessage();\r\n\t}",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the Guardian JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"public static String sendLiveRequest(){\n\n // The following line initializes the HttpGet Object with the URL in order to send a request\n HttpGet get = new HttpGet(BASE_URL + ENDPOINT + \"?access_key=\" + ACCESS_KEY);\n\n try {\n CloseableHttpResponse response = httpClient.execute(get);\n HttpEntity entity = response.getEntity();\n\n // the following line converts the JSON Response to an equivalent Java Object\n JSONObject exchangeRates = new JSONObject(EntityUtils.toString(entity));\n \n Date timeStampDate = new Date((long)(exchangeRates.getLong(\"timestamp\")*1000)); \n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = dateFormat.format(timeStampDate);\n \n String USDUAH = \"1 \" + exchangeRates.getString(\"source\") + \" in UAH : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDUAH\") + \" (Date: \" + formattedDate + \")\";\n String USDEUR = \"1 \" + exchangeRates.getString(\"source\") + \" in EUR : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDEUR\") + \" (Date: \" + formattedDate + \")\"; \n String USDGBP = \"1 \" + exchangeRates.getString(\"source\") + \" in GBP : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDGBP\") + \" (Date: \" + formattedDate + \")\";\n String USDJPY = \"1 \" + exchangeRates.getString(\"source\") + \" in JPY : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDJPY\") + \" (Date: \" + formattedDate + \")\";\n return USDUAH+\"\\n\"+USDEUR+\"\\n\"+USDGBP+\"\\n\"+USDJPY;\n } catch (ClientProtocolException e) { \n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n } catch (IOException e) {\n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n }\n\t\treturn null;\n }",
"public String sendGongRequest(String request) {\r\n return processGongRequest(request);\r\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"@Override\n\t\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\t\t\t\t\t\n\t\t\t\t}",
"public void sendYo(final SuccessCallback callback, final String username, final String url) throws NoApiKeyException {\n if (app.getApiKey() == null) {\n throw new NoApiKeyException();\n }\n new Thread(new Runnable() {\n @Override\n public void run() {\n sendGenericApiRequest(\"https://api.justyo.co/yo/\", app.getApiKey(), username, url, callback);\n }\n }).start();\n }",
"private OCSPResp performRequest(String urlString)\n throws IOException, OCSPException, URISyntaxException\n {\n OCSPReq request = generateOCSPRequest();\n URL url = new URI(urlString).toURL();\n HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();\n try\n {\n httpConnection.setRequestProperty(\"Content-Type\", \"application/ocsp-request\");\n httpConnection.setRequestProperty(\"Accept\", \"application/ocsp-response\");\n httpConnection.setRequestMethod(\"POST\");\n httpConnection.setDoOutput(true);\n try (OutputStream out = httpConnection.getOutputStream())\n {\n out.write(request.getEncoded());\n }\n\n int responseCode = httpConnection.getResponseCode();\n if (responseCode == HttpURLConnection.HTTP_MOVED_TEMP ||\n responseCode == HttpURLConnection.HTTP_MOVED_PERM ||\n responseCode == HttpURLConnection.HTTP_SEE_OTHER)\n {\n String location = httpConnection.getHeaderField(\"Location\");\n if (urlString.startsWith(\"http://\") &&\n location.startsWith(\"https://\") &&\n urlString.substring(7).equals(location.substring(8)))\n {\n // redirection from http:// to https://\n // change this code if you want to be more flexible (but think about security!)\n LOG.info(\"redirection to \" + location + \" followed\");\n return performRequest(location);\n }\n else\n {\n LOG.info(\"redirection to \" + location + \" ignored\");\n }\n }\n if (responseCode != HttpURLConnection.HTTP_OK)\n {\n throw new IOException(\"OCSP: Could not access url, ResponseCode \"\n + httpConnection.getResponseCode() + \": \"\n + httpConnection.getResponseMessage());\n }\n // Get response\n try (InputStream in = (InputStream) httpConnection.getContent())\n {\n return new OCSPResp(in);\n }\n }\n finally\n {\n httpConnection.disconnect();\n }\n }",
"@Test\n\tpublic void testEsempio() throws UnirestException {\n\t\tHttpResponse<String> response = Unirest.get(\"http://localhost:8080/TrackingVehicle/tracking/tracking/cercaveicolo/QWE123456\")\n\t\t\t\t .header(\"Cache-Control\", \"no-cache\")\n\t\t\t\t .header(\"Postman-Token\", \"b0269d33-a6e2-40f3-9c86-99b27e9ecaee\")\n\t\t\t\t .asString();\n\t}",
"public Response execute(Request request) throws RestException {\n\n try {\n Log.i(\"Request\", request.toString());\n\n // Se a conexao nao esta online nao faz requisicao\n if (!NetworkUtil.isNetworkAvailable(AmadorfcApplication.getInstance())) {\n throw new RestException(\"Internet indísponivel, sua mensagem será enviada assim que a rede normalizar.\");\n }\n\n String json = JsonHelper.toJson(request);\n JSONObject jo = new JSONObject(json); //\n\n Map<String, Object> map = new HashMap();\n Iterator keys = jo.keys();\n String parametros=\"\";\n\n if (keys !=null){\n parametros = parametros.concat(\"?\");\n }\n\n while (keys.hasNext()) {\n String key = (String) keys.next();\n parametros = parametros.concat(key).concat(\"=\");\n parametros = parametros.concat(jo.get(key).toString()).concat(\"&\");\n map.put(key, fromJson(jo.get(key)));\n }\n\n String responseString = get(getURL().getUrl().concat(parametros));\n\n Response response = JsonHelper.fromJson(responseString, getResponseClass());\n\n Log.i(\"Request\", response.toString());\n\n if (response == null) {\n throw new RestException(\"Serviço indísponivel, por favor, tente novamente dentro de alguns instantes.\");\n }\n\n return response;\n\n } catch (RestException re) {\n throw re;\n } catch (Exception e) {\n throw new RestException(\"Serviço indísponivel, por favor, tente novamente dentro de alguns instantes.\");\n }\n\n }",
"@Override\n\t\t\tpublic Boolean execute() throws EvrythngException {\n\t\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\t\ttry {\n\t\t\t\t\t// Execute request (response status code will be automatically checked):\n\t\t\t\t\treturn command.execute(client) != null;\n\t\t\t\t} finally {\n\t\t\t\t\tcommand.shutdown(client);\n\t\t\t\t}\n\t\t\t}",
"private void send(String jsonRequest) throws NotConnectedException {\n Packet request = new GcmPacketExtension(jsonRequest).toPacket();\n connection.sendPacket(request);\n }",
"private void executePut() throws NetworkException, IOException,\n StreamException {\n StreamClientMetrics.begin(session);\n try {\n putMethod = new PutMethod(session.getURI());\n try {\n utils.setHeaders(putMethod, session.getHeaders());\n putMethod.setRequestEntity(this);\n switch (utils.execute(putMethod)) {\n case 200:\n break;\n case 400:\n final StreamErrorResponse errorResponse = utils.readErrorResponse(putMethod);\n throw new StreamException(errorResponse.isRecoverable(),\n \"Could not upload stream. {0}:{1}{2}{3}\",\n putMethod.getStatusCode(),\n putMethod.getStatusLine(), \"\\n\\t\",\n putMethod.getStatusText());\n case 503: // service unavailable\n utils.wait(utils.getRetryAfter(putMethod));\n case 500: // internal server error\n case 504: // gateway timeout\n utils.writeError(putMethod);\n throw new StreamException(Boolean.TRUE,\n \"Could not upload stream. {0}:{1}{2}{3}\",\n putMethod.getStatusCode(),\n putMethod.getStatusLine(), \"\\n\\t\",\n putMethod.getStatusText());\n default:\n utils.writeError(putMethod);\n throw new StreamException(\n \"Could not upload stream. {0}:{1}{2}{3}\",\n putMethod.getStatusCode(),\n putMethod.getStatusLine(), \"\\n\\t\",\n putMethod.getStatusText());\n }\n } catch (final UnknownHostException uhx) {\n utils.writeError(putMethod);\n throw new NetworkException(uhx);\n } catch (final SocketException sx) {\n utils.writeError(putMethod);\n throw new NetworkException(sx);\n } catch (final SocketTimeoutException stx) {\n utils.writeError(putMethod);\n throw new NetworkException(stx);\n } catch (final HttpException hx) {\n utils.writeError(putMethod);\n throw new NetworkException(hx);\n } catch (final IOException iox) {\n /* an io exception can be thrown with a network exception cause\n * by the stream's http connection object; and since we want to\n * differentiate between network and local io errors we examine\n * the causality */\n utils.writeError(putMethod);\n if (isNetworkException(iox.getCause())) {\n throw (NetworkException) iox.getCause();\n } else {\n throw iox;\n }\n } finally {\n putMethod.releaseConnection();\n }\n } finally {\n StreamClientMetrics.end(\"PUT\", session);\n }\n }",
"public static String doHttpURLConnectionAction(String envoyURL, String action) throws MalformedURLException, IOException{\n URL url = null;\n BufferedReader reader = null;\n StringBuilder stringBuilder;\n String responseMessage = \"\";\n\n try {\n // create the HttpURLConnection\n url = new URL(envoyURL);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\n // set the HTTP request method here\n conn.setRequestMethod(action);\n\n // conn.setRequestProperty(\"\", \"\");\n\n System.out.println(\"Request Method \" + conn.getRequestMethod());\n\n // give envoy admin server 15 seconds to respond\n conn.setReadTimeout(15*1000);\n conn.connect();\n\n // read the output from the server\n responseMessage = conn.getResponseMessage();\n reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n stringBuilder = new StringBuilder();\n\n String line = null;\n while ((line = reader.readLine()) != null) {\n stringBuilder.append(line + \"\\n\");\n }\n System.out.println(stringBuilder.toString());\n\n System.out.println(\"Status Code: \" + conn.getResponseCode());\n\n } catch (MalformedURLException error) {\n // output expected MalformedURLExceptions.\n Logging.log(error);\n // throw new AssertionError(error);\n } catch (Exception exception) {\n // output unexpected Exceptions.\n Logging.log(exception, false);\n }\n return responseMessage;\n }",
"@Override\n\tprotected JSONObject doJSONRequest(JSONObject request) throws JSONRPCException {\n\t\ttry {\n\n\t\t\tString data = request.toString();\n\t\t\tsocket.sendData(data.getBytes());\n\t\t\t\n\t\t\tJSONObject result = new JSONObject();\n\t\t\tJSONObject resultOK = new JSONObject();\n\t\t\tresultOK.put(\"result\", \"OK\");\n\t\t\tresult.put(JSONRPCConstants.RESULT_KEY, resultOK);\n\t\t\t\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\tthrow new JSONRPCException(e.getMessage());\n\t\t}\n\t}",
"public String sendGongRequest(String request, String param1, String param2) {\r\n return processGongRequest(request, new String[] { param1, param2 });\r\n }",
"@Override\n public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {\n Log.i(\"doRequest\", \"doRequest failed\");\n\n }",
"public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"@Override\n public void onFailure(Request request, IOException e) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }",
"public static void main(String[] args) {\n EosApi api = EosApiFactory.create(\"https://api.jungle.alohaeos.com\");\n //EosApi api = EosApiFactory.create(\"https://jungle.cryptolions.io\");\n //EosApi api = EosApiFactory.create(\"https://eos.newdex.one\");\n //System.out.println(api.getChainInfo());\n //buyRam(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"bihuexwallet\",15000);\n //delegate(api, \"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\", \"carilking111\", \"carilking444\",\"1.5000 EOS\",\"1.5000 EOS\");\n //updateAuth(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\",\"carilking444\",\"EOS82Psyaqk86jbSdSmGzonNCUHsBp1Xj42q37g6UkiA1UhzLe57j\",\"active\");\n //updateAuth(api,\"5JrTcSsUmzoLDxsNFcpGBRt2Wd488qTmHp5yfBPy71MbxaqSJ4g\",\"carilking555\",\"EOS5X6Sbmbc2zaJ8EHNZmdSnA26DsuTim59pdUNiNd34HugzvTp5m\",\"active\");\n //transfer(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\", \"carilking444\",\"carilking111\",BigDecimal.valueOf(0.01),\"喵喵喵~\");\n //Object obj=api.getTransaction(new TransactionRequest(\"e5aeee319e8c767cdda35a3b6d460328f958833e58723bc18581765494018700\"));\n //System.out.println(obj);\n List<String> accounts = new ArrayList<>();\n accounts.add(\"carilking111\");\n accounts.add(\"carilking444\");\n //updateMultipleAuth(api, \"5JPNqMSZ8M567hgDGW9CmD9vr2RaDm1eWpJqHaHa2S5xKTMmFKm\", \"heydoojqgege\", 2, accounts, \"active\");\n //proposeTransfer(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"firstmsig152\", \"heydoojqgege\", \"carilking222\", BigDecimal.valueOf(0.2), \"test1\", accounts);\n //approveTransfer(api,\"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\",\"carilking111\",\"bihuexwallet\",\"firstmsig151\");\n //execPropose(api,\"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\",\"bihuexwallet\",\"bihuexwallet\",\"firstmsig151\");\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String JSONResponse = null;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(Constants.URL_REQUEST_METHOD);\n urlConnection.setReadTimeout(Constants.URL_READ_TIME_OUT);\n urlConnection.setConnectTimeout(Constants.URL_CONNECT_TIME_OUT);\n urlConnection.connect();\n\n if (urlConnection.getResponseCode() == Constants.URL_SUCCESS_RESPONSE_CODE) {\n inputStream = urlConnection.getInputStream();\n JSONResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Response code : \" + urlConnection.getResponseCode());\n // If received any other code(i.e 400) return null JSON response\n JSONResponse = null;\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error Solving JSON response : makeHttpConnection() block\");\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n // Input stream throws IOException when trying to close, that why method signature\n // specify about IOException\n }\n }\n return JSONResponse;\n }",
"public void sendRequest() {\r\n\t\t\r\n\t\tclient.join(this, isHost, gameCode, playerName, playerNumber);\r\n\t\t\r\n\t}",
"@Override\n protected void executeLowLevelRequest() {\n doPutItem();\n }",
"public static Response doGetRequest(String url) throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException, KeyManagementException {\n try {\n Request request = new Request.Builder()\n .url(url).addHeader(\"Content-Type\", \"text/plain\")\n .build();\n Response response = client.newCall(request).execute();\n return response;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }",
"CompletableFuture<Void> sendRequestOneWay(HttpRequest request);",
"public static int executeHttpRequest(HttpRequest request) {\n try {\n HttpResponse<String> response = client.send(request, HttpResponse.BodyHandler.asString());\n System.out.println(\"Status code: \" + response.statusCode());\n System.out.println(response.body());\n return response.statusCode();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n return -1;\n }",
"static String request(String requestMethod, String input, String endURL)\n {\n StringBuilder result;\n result = new StringBuilder();\n try\n {\n String targetURL = firstURL + endURL;\n URL ServiceURL = new URL(targetURL);\n HttpURLConnection httpConnection = (HttpURLConnection) ServiceURL.openConnection();\n httpConnection.setRequestMethod(requestMethod);\n httpConnection.setRequestProperty(\"Content-Type\", \"application/json; charset=UTF-8\");\n httpConnection.setDoOutput(true);\n\n switch (requestMethod) {\n case \"POST\":\n\n httpConnection.setDoInput(true);\n OutputStream outputStream = httpConnection.getOutputStream();\n outputStream.write(input.getBytes());\n outputStream.flush();\n\n result = new StringBuilder(\"1\");\n break;\n case \"GET\":\n\n BufferedReader responseBuffer = new BufferedReader(new InputStreamReader((httpConnection.getInputStream())));\n String tmp;\n while ((tmp = responseBuffer.readLine()) != null) {\n result.append(tmp);\n }\n break;\n }\n\n if (httpConnection.getResponseCode() != 200)\n throw new RuntimeException(\"HTTP GET Request Failed with Error code : \" + httpConnection.getResponseCode());\n\n httpConnection.disconnect();\n\n } catch (IOException exception) {\n exception.printStackTrace();\n }\n return result.toString();\n }",
"@Test\n public void testHttp200AuthorRequest() {\n final NioEventLoopGroup bootGroup = new NioEventLoopGroup(1);\n final NioEventLoopGroup processGroup = new NioEventLoopGroup();\n final String json = \"{\\\"action\\\":\\\"ping\\\"}\";\n final ByteBuf content = Unpooled.copiedBuffer(json, StandardCharsets.UTF_8);\n\n final ChannelFuture serverChannel = runServer(bootGroup, processGroup);\n runClient(HttpMethod.POST, content, \"/author\");\n\n serverChannel.awaitUninterruptibly();\n bootGroup.shutdownGracefully();\n processGroup.shutdownGracefully();\n\n final String expected = \"{\\\"action\\\":\\\"author\\\",\\\"content\\\":\\\"Dmitriy Shishmakov, https://github.com/DmitriySh\\\",\\\"status\\\":\\\"200 OK\\\"}\";\n final String actual = buffer.toString();\n logger.info(\"Expected result: {}\", expected);\n logger.info(\"Actual result: {}\", actual);\n Assert.assertEquals(\"Haven't received info about author\", expected, actual);\n }",
"protected String processGongRequest(String request) {\r\n // Get a new handler\r\n ScriptHandler scriptHandler = getScriptHandler(request, null);\r\n if (scriptHandler == null) {\r\n try {\r\n Fault fault = Message.newFault(\"\", \"NanoGong is busy at the moment.\");\r\n return fault.toString();\r\n } catch (Exception e) {}\r\n }\r\n\r\n // Execute the request\r\n scriptHandler.execute();\r\n \r\n // Return the fault if there is any\r\n String response;\r\n Fault fault = (Fault) scriptHandler.getFault();\r\n if (fault != null)\r\n response = fault.toString();\r\n else\r\n response = scriptHandler.getResponse().toString();\r\n\r\n // Clear the handler\r\n clearScriptHandler();\r\n\r\n return response;\r\n }",
"public void updateRequest() {\n isProcessing = true;\n // prepare the Request\n JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n isConnected = true;\n try {\n\n JSONObject variables = response.getJSONObject(\"variables\");\n int tuneMode = variables.getInt(\"tune_mode\");\n int gear = variables.getInt(\"gear\");\n String deviceName = response.getString(\"name\");\n deviceName += \" \";\n deviceName += response.getString(\"id\");\n device = deviceName;\n char pos = (char) gear;\n String serial = variables.getString(\"sn\");\n\n if (tuneMode == 255) {\n tvTune.setText(\"TUNE: E\");\n } else {\n tvTune.setText(\"TUNE: \" + tuneMode);\n }\n tvGear.setText(\"GEAR: \" + pos);\n\n proVersion.setText(deviceName);\n serialNum.setText(serial);\n\n\n } catch (JSONException mE) {\n mE.printStackTrace();\n }\n isProcessing = false;\n }\n },\n new Response.ErrorListener()\n\n {\n @Override\n public void onErrorResponse(VolleyError error) {\n isConnected = false;\n\n new SweetAlertDialog(SettingsActivity.this, SweetAlertDialog.WARNING_TYPE)\n .setTitleText(\"No Connection\")\n .setContentText(\"Your are not connected to a GDP device. Retry by \" +\n \"tapping 'Retry' or check your wifi settings by tapping \" +\n \"'Connect'.\")\n .setCancelText(\"Retry\")\n .setConfirmText(\"Connect\")\n .showCancelButton(true)\n .setCancelClickListener(new SweetAlertDialog.OnSweetClickListener() {\n @Override\n public void onClick(SweetAlertDialog sDialog) {\n sendRequest();\n sDialog.dismiss();\n }\n })\n .setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {\n @Override\n public void onClick(SweetAlertDialog sDialog) {\n startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));\n }\n })\n .show();\n\n isProcessing = false;\n }\n }\n );\n // add it to the RequestQueue\n queue.add(getRequest);\n }",
"private static String makeHTTPRequest(URL url) throws IOException {\n\n // Create an empty json string\n String jsonResponse = \"\";\n\n //IF url is null, return early\n if (url == null) {\n return jsonResponse;\n }\n\n // Create an Http url connection, and an input stream, making both null for now\n HttpURLConnection connection = null;\n InputStream inputStream = null;\n\n try {\n\n // Try to open a connection on the url, request that we GET info from the connection,\n // Set read and connect timeouts, and connect\n connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setReadTimeout(10000 /*Milliseconds*/);\n connection.setConnectTimeout(15000 /*Milliseconds*/);\n connection.connect();\n\n // If response code is 200 (aka, working), then get and read from the input stream\n if (connection.getResponseCode() == 200) {\n\n Log.v(LOG_TAG, \"Response code is 200: Aka, everything is working great\");\n inputStream = connection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n\n } else {\n // if response code is not 200, Log error message\n Log.v(LOG_TAG, \"Error Response Code: \" + connection.getResponseCode());\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error making http request: \" + e);\n } finally {\n // If connection and inputStream are NOT null, close and disconnect them\n if (connection != null) {\n connection.disconnect();\n }\n\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies that an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n\n return jsonResponse;\n }",
"void execute(HttpServletRequest req, HttpServletResponse resp,\n\t\t\tboolean withHmac) throws IOException {\n\t\tif (withHmac) {\n\t\t\texecute(req, resp);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\thandle(req, resp);\n\t\t\t\tresp.setStatus(HttpServletResponse.SC_OK); // API executed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// successfully\n\t\t\t} catch (ApiException e) {\n\t\t\t\tresp.setStatus(HttpServletResponse.SC_BAD_REQUEST); // API\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// failed on\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// validation\n\t\t\t\tresp.getOutputStream().write(\n\t\t\t\t\t\tInteger.toString(e.error).getBytes());\n\t\t\t\tinfo(e, \"API error %s\", e.getMessage()); // TODO:delete\n\t\t\t} catch (Exception e) {\n\t\t\t\tresp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); // Unknown\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// error\n\t\t\t\tinfo(e, \"unknow API error %s\", e.getMessage());\n\t\t\t\te.printStackTrace(new PrintWriter(resp.getOutputStream())); // TODO:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// remove\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// me\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// when\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// release\n\n\t\t\t}\n\t\t}\n\n\t}",
"private ResponseEntity<?> onPost(RequestEntity<String> requestEntity)\n throws IOException, ExecutionException, InterruptedException, InvalidKeyException,\n BadPaddingException, IllegalBlockSizeException, NoSuchAlgorithmException,\n NoSuchPaddingException, ShortBufferException, InvalidKeySpecException,\n InvalidAlgorithmParameterException, NoSuchProviderException {\n\n getLogger().info(requestEntity.toString());\n\n final String authorization = requestEntity.getHeaders().getFirst(HttpHeaders.AUTHORIZATION);\n final UUID sessionId;\n final To2DeviceSessionInfo session;\n final AuthToken authToken;\n\n try {\n authToken = new AuthToken(authorization);\n sessionId = authToken.getUuid();\n session = getSessionStorage().load(sessionId);\n\n } catch (IllegalArgumentException | NoSuchElementException e) {\n return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();\n }\n\n // if any instance is corrupted/absent, the session data is unavailable, so terminate the\n // connection.\n if (null != session && (!(session.getMessage41Store() instanceof Message41Store)\n || (null == session.getMessage41Store())\n || !(session.getMessage45Store() instanceof Message45Store)\n || (null == session.getMessage45Store())\n || !(session.getDeviceCryptoInfo() instanceof DeviceCryptoInfo)\n || null == session.getDeviceCryptoInfo())) {\n return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();\n }\n\n final String requestBody = null != requestEntity.getBody() ? requestEntity.getBody() : \"\";\n\n final ByteBuffer xb =\n new KexParamCodec().decoder().apply(CharBuffer.wrap(session.getMessage45Store().getXb()));\n final To2CipherContext cipherContext =\n new To2CipherContextFactory(getKeyExchangeDecoder(), getSecureRandom())\n .build(session.getMessage41Store(), xb.duplicate());\n\n final EncryptedMessageCodec encryptedMessageCodec = new EncryptedMessageCodec();\n final EncryptedMessage deviceEncryptedMessage =\n encryptedMessageCodec.decoder().apply(CharBuffer.wrap(requestBody));\n final ByteBuffer decryptedBytes = cipherContext.read(deviceEncryptedMessage);\n final CharBuffer decryptedText = US_ASCII.decode(decryptedBytes);\n getLogger().info(decryptedText.toString());\n\n final To2NextDeviceServiceInfo nextDeviceServiceInfo =\n new To2NextDeviceServiceInfoCodec().decoder().apply(decryptedText);\n\n final OwnershipProxy proxy = new OwnershipProxyCodec.OwnershipProxyDecoder()\n .decode(CharBuffer.wrap(session.getMessage41Store().getOwnershipProxy()));\n if (null == proxy) {\n throw new SdoProtocolException(new SdoError(SdoErrorCode.MessageRefused,\n nextDeviceServiceInfo.getType(), \"OwnershipVoucher must not be null\"));\n }\n\n for (Object serviceInfoObject : getServiceInfoModules()) {\n\n if (serviceInfoObject instanceof ServiceInfoSink) {\n final ServiceInfoSink sink = (ServiceInfoSink) serviceInfoObject;\n\n for (ServiceInfoEntry entry : nextDeviceServiceInfo.getDsi()) {\n sink.putServiceInfo(entry);\n }\n\n } else if (serviceInfoObject instanceof ServiceInfoMultiSink) {\n final ServiceInfoMultiSink sink = (ServiceInfoMultiSink) serviceInfoObject;\n final ServiceInfo serviceInfos = new ServiceInfo();\n for (ServiceInfoEntry entry : nextDeviceServiceInfo.getDsi()) {\n serviceInfos.add(entry);\n }\n sink.putServiceInfo(proxy.getOh().getG(), serviceInfos);\n\n }\n }\n\n String responseBody;\n final OwnershipProxy newProxy;\n int nn = nextDeviceServiceInfo.getNn() + 1;\n if (nn < session.getMessage45Store().getNn()) {\n final StringWriter writer = new StringWriter();\n final To2GetNextDeviceServiceInfo getNextDeviceServiceInfo =\n new To2GetNextDeviceServiceInfo(nn, new PreServiceInfo());\n new To2GetNextDeviceServiceInfoCodec().encoder().apply(writer, getNextDeviceServiceInfo);\n newProxy = null;\n responseBody = writer.toString();\n\n } else {\n\n final OwnershipProxy currentProxy = proxy;\n final Setup devSetup =\n setupDeviceService.setup(currentProxy.getOh().getG(), currentProxy.getOh().getR());\n final To2SetupDeviceNoh setupDeviceNoh = new To2SetupDeviceNoh(devSetup.r3(), devSetup.g3(),\n new Nonce(CharBuffer.wrap(session.getMessage45Store().getN7())));\n\n final StringWriter bo = new StringWriter();\n new To2SetupDeviceNohCodec().encoder().apply(bo, setupDeviceNoh);\n\n final SignatureBlock noh =\n signatureServiceFactory.build(proxy.getOh().getG()).sign(bo.toString()).get();\n\n final OwnerServiceInfoHandler ownerServiceInfoHandler =\n new OwnerServiceInfoHandler(getServiceInfoModules(), proxy.getOh().getG());\n final int osinn = ownerServiceInfoHandler.getOwnerServiceInfoEntryCount();\n\n final To2SetupDevice setupDevice = new To2SetupDevice(osinn, noh);\n final StringWriter writer = new StringWriter();\n final PublicKeyCodec.Encoder pkEncoder =\n new PublicKeyCodec.Encoder(currentProxy.getOh().getPe());\n final SignatureBlockCodec.Encoder sgEncoder = new SignatureBlockCodec.Encoder(pkEncoder);\n new To2SetupDeviceCodec.Encoder(sgEncoder).encode(writer, setupDevice);\n responseBody = writer.toString();\n\n final OwnershipProxyHeader currentOh = currentProxy.getOh();\n final OwnershipProxyHeader newOh = new OwnershipProxyHeader(currentOh.getPe(), devSetup.r3(),\n devSetup.g3(), currentOh.getD(), noh.getPk(), currentOh.getHdc());\n newProxy = new OwnershipProxy(newOh, new HashMac(MacType.NONE, ByteBuffer.allocate(0)),\n currentProxy.getDc(), new LinkedList<>());\n }\n getLogger().info(responseBody);\n\n // if the CTR nonce is null, it means that the session's IV has been lost/corrupted. For CBC, it\n // should have been all 0s, while for CTR, it should contain the current nonce.\n if (null != session.getDeviceCryptoInfo().getCtrNonce()) {\n final ByteBuffer nonce = new ByteArrayCodec().decoder()\n .apply(CharBuffer.wrap(session.getDeviceCryptoInfo().getCtrNonce()));\n cipherContext.setCtrNonce(nonce.array());\n cipherContext.setCtrCounter(session.getDeviceCryptoInfo().getCtrCounter());\n } else {\n throw new SdoProtocolException(new SdoError(SdoErrorCode.MessageRefused,\n nextDeviceServiceInfo.getType(), \"no cipher initialization vector found\"));\n }\n final ByteBuffer responseBodyBuf = US_ASCII.encode(responseBody);\n final EncryptedMessage ownerEncryptedMessage = cipherContext.write(responseBodyBuf);\n\n final StringWriter writer = new StringWriter();\n encryptedMessageCodec.encoder().apply(writer, ownerEncryptedMessage);\n responseBody = writer.toString();\n\n final StringWriter opWriter = new StringWriter();\n if (null != newProxy) {\n new OwnershipProxyCodec.OwnershipProxyEncoder().encode(opWriter, newProxy);\n }\n final StringWriter ctrNonceWriter = new StringWriter();\n new ByteArrayCodec().encoder().apply(ctrNonceWriter,\n ByteBuffer.wrap(cipherContext.getCtrNonce()));\n\n final DeviceCryptoInfo deviceCryptoInfo =\n new DeviceCryptoInfo(ctrNonceWriter.toString(), cipherContext.getCtrCounter());\n final Message47Store message47Store = new Message47Store(opWriter.toString());\n final To2DeviceSessionInfo to2DeviceSessionInfo = new To2DeviceSessionInfo();\n to2DeviceSessionInfo.setMessage47Store(message47Store);\n to2DeviceSessionInfo.setDeviceCryptoInfo(deviceCryptoInfo);\n getSessionStorage().store(sessionId, to2DeviceSessionInfo);\n\n ResponseEntity<?> responseEntity =\n ResponseEntity.ok().header(HttpHeaders.AUTHORIZATION, authorization)\n .contentType(MediaType.APPLICATION_JSON).body(responseBody);\n\n getLogger().info(responseEntity.toString());\n return responseEntity;\n }",
"@Override\n\tpublic String RequestToString() throws APIException \n\t{\n\t\tfor (Listener listen : listeners1)\n\t\t\tlisten.beforeRequestToString();\n\t\tString requesttoString=\"\";\n\t\ttry\n\t\t{\n\t\t\tapi.RequestToString();\n\t\t}\n\t\tcatch(APIException e)\n\t\t{\n\t\t\tfor (Listener listen : listeners1)\n\t\t\t\tlisten.onError(e);\n\t\t\tthrow new APIException(e);\n\t\t}\n\t\tfor (Listener listen : listeners1)\n\t\t\tlisten.afterRequestToString();\n\t\treturn requesttoString;\n\t}",
"@Override\n\tpublic String respondToRequest(HttpExchange exchange) {\n\t\tMonopolyRequest request = (new Gson()).fromJson(body, MonopolyRequest.class);\n\n\t\ttry {\n\t\t\tMonopolyCommand command = new MonopolyCommand(server, gameID, request.getPlayerIndex(),\n\t\t\t\t\trequest.findResource(request.getResource()));\n\t\t\treturn executeCommand(command);\n\t\t}\n\t\tcatch (InvalidActionException e) {\n\t\t\tresponseCode = RESPONSE_FAIL;\n\t\t\treturn e.message;\n\t\t}\n\t}",
"private void sendSupportRequest()\n {\n if (HelperHttp.isNetworkAvailable(getActivity()))\n {\n //Add parameters to request in arraylist\n ArrayList<Parameter> parameterList = new ArrayList<Parameter>();\n parameterList.add(new Parameter(\"userHash\", DataManager.getInstance().user.getUserHash(), String.class));\n parameterList.add(new Parameter(\"ticketType\", selectedRequestId, Integer.class));\n parameterList.add(new Parameter(\"ticketTitle\", edTitle.getText().toString(), String.class));\n parameterList.add(new Parameter(\"ticketDetails\", edDescription.getText().toString(), String.class));\n\n //create web service inputs\n DataInObject inObj = new DataInObject();\n inObj.setMethodname(\"LogNewSupportRequest\");\n inObj.setNamespace(Constants.TEMP_URI_NAMESPACE);\n inObj.setSoapAction(Constants.TEMP_URI_NAMESPACE + \"IPlannerService/LogNewSupportRequest\");\n inObj.setUrl(Constants.PLANNER_WEBSERVICE_URL);\n inObj.setParameterList(parameterList);\n\n //Network call\n showProgressDialog();\n new WebServiceTask(getActivity(), inObj, true, new TaskListener()\n {\n @Override\n public void onTaskComplete(Object response)\n {\n //Added by Asmita on 24th Jan 2017 as client asked to temporary hide the functionality due to server side error\n try\n {\n SoapObject outer = (SoapObject) response;\n SoapObject inner = (SoapObject) outer.getPropertySafely(\"Success\");\n successMessage = inner.getPropertySafelyAsString(\"Message\", \"0\");\n planTaskId = Integer.parseInt(inner.getPropertySafelyAsString(\"PlanTaskID\", \"0\"));\n\n if (imageDragableGridView.getUpdatedImageListWithoutPlus().size() >= 1)\n {\n for (int i = 0; i < imageDragableGridView.getUpdatedImageListWithoutPlus().size(); i++)\n {\n uploadDocFiles();\n }\n\n } else\n {\n hideProgressDialog();\n CustomDialogManager.showOkDialog(getActivity(), successMessage, new DialogListener()\n {\n @Override\n public void onButtonClicked(int type)\n {\n hideProgressDialog();\n if (getFragmentManager().getBackStackEntryCount() != 0)\n {\n getFragmentManager().popBackStack();\n } else\n {\n getActivity().finish();\n }\n }\n });\n }\n\n } catch (Exception e)\n {\n hideProgressDialog();\n e.printStackTrace();\n }\n\n }\n }).execute();\n } else\n {\n CustomDialogManager.showOkDialog(getActivity(), getString(R.string.no_internet_connection));\n }\n }",
"private void sendNoSuchMethod(HttpRequest request, HttpResponse response) {\n\t\tresponse.clearContent();\n\t\tresponse.setStatus( HttpResponse.STATUS_NOT_FOUND );\n\t\tresponse.setContentType( \"text/plain\" );\n\t\tresponse.println ( \"The method you requested is not known to this service!\" );\n\t\tconnector.logError(\"Invocation request \" + request.getPath() + \" for unknown service method\");\n\t}"
] | [
"0.58615196",
"0.5781062",
"0.55903816",
"0.5571555",
"0.54107153",
"0.53227806",
"0.53040785",
"0.5297512",
"0.52761406",
"0.5251516",
"0.5231212",
"0.5222861",
"0.5220676",
"0.5205843",
"0.51984495",
"0.51756775",
"0.5170586",
"0.5133101",
"0.51223487",
"0.5112107",
"0.5095235",
"0.5088974",
"0.5024483",
"0.5019255",
"0.50172377",
"0.5014134",
"0.4995905",
"0.49892756",
"0.4984998",
"0.4980319",
"0.49780998",
"0.49745345",
"0.4964386",
"0.49407592",
"0.49084875",
"0.48959",
"0.488283",
"0.48791236",
"0.48721382",
"0.4869927",
"0.48612234",
"0.4849933",
"0.48467982",
"0.4846608",
"0.4840008",
"0.48385942",
"0.48263773",
"0.4817137",
"0.48160422",
"0.48154485",
"0.4810242",
"0.48086804",
"0.48083985",
"0.48039722",
"0.48021525",
"0.47779146",
"0.4776786",
"0.47744322",
"0.47729373",
"0.4770402",
"0.47698867",
"0.47681397",
"0.4764619",
"0.47639328",
"0.47576484",
"0.4753559",
"0.4752993",
"0.47479555",
"0.4742361",
"0.47395864",
"0.47332674",
"0.47293448",
"0.47220886",
"0.47165784",
"0.47145012",
"0.47085622",
"0.47057018",
"0.47030926",
"0.4702771",
"0.46869436",
"0.46840394",
"0.46778107",
"0.4675887",
"0.46733475",
"0.46719593",
"0.4664575",
"0.46631005",
"0.4661369",
"0.46583432",
"0.465796",
"0.4657036",
"0.46557757",
"0.46533668",
"0.46530822",
"0.46491453",
"0.46481678",
"0.4645463",
"0.46453974",
"0.46418715",
"0.4638474"
] | 0.7579649 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.