query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Return the flags associated with the given type (would be equivalent to IMember.getFlags()), or 1 if this information wasn't cached on the hierarchy during its computation. | int getCachedFlags(IType type); | [
"long getFlags();",
"int getFlags();",
"public int getFlagsNumber ()\r\n {\r\n return flagsNumber;\r\n }",
"public org.apache.axis.types.UnsignedInt getFlags() {\n return flags;\n }",
"protected static Flag flagFor(Class<?> type, int ordinal) {\n Flag obj;\n String name;\n \n obj = (Flag) getRegisteredConstant(type, ordinal);\n \n /*\n * In many circumstances, Flags are used like enums, and so the\n * returned value will match one of the cardinal values. Too easy:\n */\n \n if (obj != null) {\n return obj;\n }\n \n /*\n * Otherwise, we need a new one to represent this bit pattern.\n */\n \n if (ordinal == 0) {\n name = \"UNSET\";\n } else {\n name = null;\n for (int i = 1; i != 0; i <<= 1) {\n if ((ordinal & i) != 0) {\n Constant c = enumFor(type, i);\n name = (name == null ? \"\" : name + \"|\") + c.nickname;\n }\n }\n }\n \n obj = createFlag(type, ordinal, name);\n return obj;\n }",
"int getBitness();",
"int getFlag();",
"public boolean hasType() {\n return fieldSetFlags()[3];\n }",
"public boolean hasType() {\n return fieldSetFlags()[2];\n }",
"public abstract Set<FSAFlags> getFlags();",
"public FlagStates getFlags() {\n return this.flagStates;\n }",
"long getType();",
"public Integer getInfoType() {\n return infoType;\n }",
"public static int mapInternalTypeAndOrderToContactChangeFlag(int type, int order) {\r\n \r\n int flags = ContactChange.FLAG_NONE;\r\n \r\n if (order == ContactDetail.ORDER_PREFERRED) {\r\n \r\n flags |= ContactChange.FLAG_PREFERRED;\r\n }\r\n \r\n if (type == ContactDetail.DetailKeyTypes.CELL.ordinal()\r\n || type == ContactDetail.DetailKeyTypes.MOBILE.ordinal()) {\r\n \r\n flags |= ContactChange.FLAG_CELL;\r\n } else if (type == ContactDetail.DetailKeyTypes.HOME.ordinal()) {\r\n \r\n flags |= ContactChange.FLAG_HOME;\r\n } else if (type == ContactDetail.DetailKeyTypes.WORK.ordinal()) {\r\n \r\n flags |= ContactChange.FLAG_WORK;\r\n } else if (type == ContactDetail.DetailKeyTypes.BIRTHDAY.ordinal()) {\r\n \r\n flags |= ContactChange.FLAG_BIRTHDAY;\r\n } else if (type == ContactDetail.DetailKeyTypes.FAX.ordinal()) {\r\n \r\n flags |= ContactChange.FLAG_FAX;\r\n }\r\n \r\n return flags;\r\n }",
"Flag getFlag();",
"public static Flags getInstance() {\n \t\treturn instance;\n \t}",
"public EnumSet<GoreProperty> getGoreFlags();",
"public byte getBitDepth();",
"private static native Flag createFlag(Class<?> type, int ordinal, String nickname);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a list of available TestLink project names | public List<String> getTestLinkProjects() {
logger.info("Getting TestLink projects...");
List<TestLinkMetricMeasurement> measurements = getAllTestLinkMetricObjects();
List<String> projects = new ArrayList<>();
for (TestLinkMetricMeasurement testLinkMetricMeasurement : measurements) {
String project = testLinkMetricMeasurement.getName();
if (!projects.contains(project)) {
projects.add(project);
}
}
return projects;
} | [
"public static Collection<String> getProjectNames() {\n\t\tsynchronized (projects) {\n\t\t\treturn new TreeSet<String>(projectNames);\n\t\t\t//return new TreeSet<String>(projects.keySet());\n\t\t}\n\t}",
"@Test\n public void testGetProjectList() throws ClientAPIException {\n LOGGER.info(\"ClientAPIServerTest.getProjectList\");\n ClientAPIContext clientAPIContext = ClientAPIFactory.createClientAPIContext();\n clientAPIContext.setUserName(USERNAME);\n clientAPIContext.setPassword(PASSWORD);\n clientAPIContext.setServerIPAddress(SERVER_IP_ADDRESS);\n clientAPIContext.setPort(SERVER_PORT);\n ClientAPI instance = ClientAPIFactory.createClientAPI(clientAPIContext);\n String expResult = TestHelper.getTestProjectName();\n instance.login();\n List<String> result = instance.getProjectList();\n assertTrue(!result.isEmpty());\n assertEquals(expResult, result.get(0));\n }",
"List<Project> listAccessibleProjects();",
"@Test\n\tpublic void checkProjectList(){\n\t\t\t\n\t}",
"List<Project> getProjectList();",
"public List<Project> getAllProjects();",
"List<Project> getAllProjects(String workspaceName);",
"public String getProjectName();",
"Iterable<String> getModuleNames();",
"String getProjectName();",
"public String[] getProjectsNames(){\n\t\tCollection<String> listNames = new ArrayList<String>();\n\t\tfor( Project project : m_Projects){\n\t\t\tlistNames.add(project.m_Name);\n\t\t}\n\t\t\n\t\tString[] names = new String[listNames.size()]; \n\t\tnames = listNames.toArray(names);\n\t\treturn names;\t\t\n\t}",
"java.lang.String getProjectName();",
"Set<Project> getProjects(Long testplanID);",
"public List<WalletFactoryProject> getProjectsReadyToPublish() throws CantGetWalletFactoryProjectException;",
"@Test\n public void testGetWorkloadNames_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n\n String result = fixture.getWorkloadNames();\n\n assertEquals(\"\", result);\n }",
"public List<String[]> getAllProject() {\n String url = Host.getSonar() + \"api/projects/index\";\n String json = null;\n try {\n Object[] response = HttpUtils.sendGet(url, Authentication.getBasicAuth(\"sonar\"));\n if (Integer.parseInt(response[0].toString()) == 200) {\n json = response[1].toString();\n }\n } catch (Exception e) {\n logger.error(\"Get sonar project list: GET request error.\", e);\n }\n if (json == null) {\n logger.warn(\"Get sonar project list: response empty.\");\n return null;\n }\n List<Map<String, Object>> projects = JSONArray.fromObject(json);\n if (projects.size() == 0) {\n logger.warn(\"Get sonar project list: empty list.\");\n return null;\n }\n List<String[]> result = new ArrayList<>();\n for (Map<String, Object> oneProject : projects) {\n result.add(new String[]{oneProject.get(\"nm\").toString(), oneProject.get(\"k\").toString()});\n }\n return result;\n }",
"public abstract KenaiProject[] getDashboardProjects(boolean onlyOpened);",
"public List<String> getProductModuleNames(final String projectId) throws GrapesCommunicationException, IOException {\n final Client client = getClient();\n final WebResource resource = client.resource(serverURL).path(RequestUtils.getProjectModuleNames(projectId));\n final ClientResponse response = resource\n .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);\n\n client.destroy();\n if(ClientResponse.Status.OK.getStatusCode() != response.getStatus()){\n final String message = \"Failed to get project module names\";\n LOG.error(message + \". Http status: \" + response.getStatus());\n throw new GrapesCommunicationException(message, response.getStatus());\n }\n\n return response.getEntity(new GenericType<List<String>>(){});\n\n }",
"public List<TestInfo> getAllTestInfosForTestName(String testName) {\n ArrayList<TestInfo> ret = new ArrayList<TestInfo>();\n for (BuildInfo build: getBuilds()) {\n TestInfo testInfo = build.getTest(testName);\n if(testInfo != null){\n \tret.add(testInfo);\n }\n \t\n }\n return ret;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recursively check whether the left JSON object is a proper subset of the right JSON object | public static boolean isJsonObjectProperSubsetOf(String leftObject, String rightObject,
boolean checkValues, boolean allowExtra, boolean isOrdered) throws IOException
{
return isProperSubsetOf(APIHelper.deserialize(leftObject), APIHelper.deserialize(rightObject),
checkValues, allowExtra, isOrdered);
} | [
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n public static boolean isProperSubsetOf(Map<String, Object> leftTree, Map<String, Object> rightTree, \r\n boolean checkValues, boolean allowExtra, boolean isOrdered)\r\n {\r\n for (Iterator<String> iterator = leftTree.keySet().iterator(); iterator.hasNext();) {\r\n String key = iterator.next();\r\n Object leftVal = leftTree.get(key);\r\n Object rightVal = rightTree.get(key);\r\n\r\n // Check if key exists\r\n if(!rightTree.containsKey(key))\r\n return false;\r\n if(leftVal instanceof Map) {\r\n // If left value is tree, right value should be be tree too\r\n if (rightVal instanceof Map) {\r\n if(!isProperSubsetOf(\r\n (Map<String, Object>) leftVal, \r\n (Map<String, Object>) rightVal, \r\n checkValues, allowExtra, isOrdered)) {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n // Value comparison if checkValues \r\n if(checkValues) {\r\n // If left value is a primitive, check if it equals right value\r\n if(leftVal == null) {\r\n if(rightVal != null) {\r\n return false;\r\n }\r\n } else if(leftVal instanceof List) {\r\n if(!(rightVal instanceof List))\r\n return false;\r\n // If both lists are empty then move on\r\n if (((List) leftVal).isEmpty() && (((List) rightVal).isEmpty()))\r\n continue;\r\n if(((List) leftVal).get(0) instanceof Map) {\r\n if(!isArrayOfJsonObjectsProperSubsetOf(\r\n (List<LinkedHashMap<String, Object>>)leftVal, \r\n (List<LinkedHashMap<String, Object>>)rightVal, \r\n checkValues, allowExtra, isOrdered))\r\n return false;\r\n } else {\r\n if(!isListProperSubsetOf(\r\n (List<Object>)leftVal, \r\n (List<Object>)rightVal, \r\n allowExtra, isOrdered))\r\n return false;\r\n }\r\n } else if(!leftVal.equals((rightTree).get(key))&&leftVal!=nullString) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n }",
"public static boolean compareJSON(JsonElement first, JsonElement second){\n\n boolean isEqual = true;\n // Check whether both jsonElement are not null\n if(first !=null && second !=null) {\n\n // Check whether both jsonElement are JSONobjects\n if (first.isJsonObject() && second.isJsonObject()) {\n Set<Map.Entry<String, JsonElement>> entrySet1 = ((JsonObject) first).entrySet();\n Set<Map.Entry<String, JsonElement>> entrySet2 = ((JsonObject) second).entrySet();\n JsonObject json2obj = (JsonObject) second;\n if (entrySet1 != null && entrySet2 != null && (entrySet2.size() == entrySet1.size())) {\n // Iterate JSON Elements with Key values\n for (Map.Entry<String, JsonElement> element : entrySet1) {\n isEqual = isEqual && compareJSON(element.getValue() , json2obj.get(element.getKey()));\n }\n } else {\n return false;\n }\n }\n\n // Check whether both jsonElement are arrays\n else if (first.isJsonArray() && second.isJsonArray()) {\n JsonArray jarr1 = first.getAsJsonArray();\n JsonArray jarr2 = second.getAsJsonArray();\n if(jarr1.size() != jarr2.size()) {\n return false;\n } else {\n int i = 0;\n // Iterate JSON Array to JSON Elements\n for (JsonElement je : jarr1) {\n isEqual = isEqual && compareJSON(je , jarr2.get(i));\n i++;\n }\n }\n }\n\n // Check whether both jsonElement are null\n else if (first.isJsonNull() && second.isJsonNull()) {\n return true;\n }\n\n // Check whether both jsonElements are made up of only primitive data types\n else if (first.isJsonPrimitive() && second.isJsonPrimitive()) {\n return first.equals(second);\n } else {\n return false;\n }\n } else return first == null && second == null;\n return isEqual;\n }",
"private static boolean haveSameSkeleton(JsonObject object1, JsonObject object2){\n\t\tboolean res = (object1.entrySet().size() == object2.entrySet().size());\n\t\tSystem.err.println(res);\n\t\tif (res){\n\t\t\tfor(java.util.Map.Entry<String, JsonElement> entry : object1.entrySet()){\n\t\t\t\tif (!object2.has(entry.getKey())) return false;\n\t\t\t}\n\t\t\treturn true;\t\t\t\n\t\t}\n\t\telse return false;\n\t}",
"public static boolean compara(JsonElement json1, JsonElement json2)\n\t{\n\t\tboolean isEqual = true;\n\n\t\t// Check whether both jsonElement are not null\n\t\tif (json1 != null && json2 != null)\n\t\t{\n\t\t\t// Check whether both jsonElement are objects\n\t\t\tif (json1.isJsonObject() && json2.isJsonObject())\n\t\t\t{\n\t\t\t\tSet<Entry<String, JsonElement>> ens1 = ((JsonObject) json1).entrySet();\n\t\t\t\tSet<Entry<String, JsonElement>> ens2 = ((JsonObject) json2).entrySet();\n\t\t\t\tJsonObject json2obj = (JsonObject) json2;\n\t\t\t\t\n\t\t\t\tif (ens1 != null && ens2 != null && (ens2.size() == ens1.size()))\n\t\t\t\t{\n\t\t\t\t\t// Iterate JSON Elements with Key values\n\t\t\t\t\tfor (Entry<String, JsonElement> en : ens1)\n\t\t\t\t\t{\n\t\t\t\t\t\tisEqual = isEqual && compara(en.getValue(), json2obj.get(en.getKey()));\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\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check whether both jsonElement are arrays\n\t\t\telse if (json1.isJsonArray() && json2.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray jarr1 = json1.getAsJsonArray();\n\t\t\t\tJsonArray jarr2 = json2.getAsJsonArray();\n\t\t\t\t\n\t\t\t\tif (jarr1.size() != jarr2.size())\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint i = 0;\n\t\t\t\t\t\n\t\t\t\t\t// Iterate JSON Array to JSON Elements\n\t\t\t\t\tfor (JsonElement je : jarr1)\n\t\t\t\t\t{\n\t\t\t\t\t\tisEqual = isEqual && compara(je, jarr2.get(i));\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check whether both jsonElement are null\n\t\t\telse if (json1.isJsonNull() && json2.isJsonNull())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Check whether both jsonElement are primitives\n\t\t\telse if (json1.isJsonPrimitive() && json2.isJsonPrimitive())\n\t\t\t{\n\t\t\t\tif (json1.equals(json2))\n\t\t\t\t{\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\treturn false;\n\t\t\t\t}\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} \n\t\telse if (json1 == null && json2 == null)\n\t\t{\n\t\t\treturn true;\n\t\t} \n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn isEqual;\n\t}",
"@Test\n\tpublic void testCopyJSONObjectInput() throws IllegalArgumentException, ParseException\n\t{\n\t\tJSONObject copy = new JSONObject();\n\t\tJSONOperations.copy(json, copy, \"A\", \"B\", \"C\", \"d\");\n\n\t\tif (\n\t\t\t\t(copy.containsKey(\"A\")) && \n\t\t\t\t(copy.containsKey(\"B\")) && \n\t\t\t\t(copy.containsKey(\"B\")) &&\n\t\t\t\t!(copy.containsKey(\"D\")))\n\t\t\tassertTrue(true);\n\t\telse\n\t\t\tassertTrue(false);\n\t}",
"@Test\r\n public void testIsSubset1() {\r\n Assert.assertEquals(false, set1.isSubset(set2));\r\n }",
"@Test\r\n\tpublic void checkJSONResponseGivenTwoJSONBase64AreEqual() {\r\n\t\ttry {\r\n\t\t\tString expectedIsEqualResult = new String(Files\r\n\t\t\t\t\t.readAllBytes(FileSystems.getDefault().getPath(INPUT_PATH_TESTING_FILES, \"isEqualTrueJson.txt\")));\r\n\t\t\tCompareJSONsUtil businessLogicTemp = new CompareJSONsUtil();\r\n\r\n\t\t\t// Same JSON Value encoded in Base64\r\n\t\t\tassertEquals(expectedIsEqualResult, businessLogicTemp.compareJSONs(\"bnVsbA==\", \"bnVsbA==\").toString());\r\n\r\n\t\t\t// Same JSON Array encoded in Base64\r\n\t\t\tassertEquals(expectedIsEqualResult, businessLogicTemp.compareJSONs(\r\n\t\t\t\t\t\"W3siaWQiOiIwMDAxIiwidHlwZSI6ImRvbnV0IiwibmFtZSI6IkNha2UiLCJwcHUiOjAuNTUsImJhdHRlcnMiOnsiYmF0dGVyIjpbeyJpZCI6IjEwMDEiLCJ0eXBlIjoiUmVndWxhciJ9LHsiaWQiOiIxMDAyIiwidHlwZSI6IkNob2NvbGF0ZSJ9LHsiaWQiOiIxMDAzIiwidHlwZSI6IkJsdWViZXJyeSJ9LHsiaWQiOiIxMDA0IiwidHlwZSI6IkRldmlsJ3NGb29kIn1dfSwidG9wcGluZyI6W3siaWQiOiI1MDAxIiwidHlwZSI6Ik5vbmUifSx7ImlkIjoiNTAwMiIsInR5cGUiOiJHbGF6ZWQifSx7ImlkIjoiNTAwNSIsInR5cGUiOiJTdWdhciJ9LHsiaWQiOiI1MDA3IiwidHlwZSI6IlBvd2RlcmVkU3VnYXIifSx7ImlkIjoiNTAwNiIsInR5cGUiOiJDaG9jb2xhdGV3aXRoU3ByaW5rbGVzIn0seyJpZCI6IjUwMDMiLCJ0eXBlIjoiQ2hvY29sYXRlIn0seyJpZCI6IjUwMDQiLCJ0eXBlIjoiTWFwbGUifV19LHsiaWQiOiIwMDAyIiwidHlwZSI6ImRvbnV0IiwibmFtZSI6IlJhaXNlZCIsInBwdSI6MC41NSwiYmF0dGVycyI6eyJiYXR0ZXIiOlt7ImlkIjoiMTAwMSIsInR5cGUiOiJSZWd1bGFyIn1dfSwidG9wcGluZyI6W3siaWQiOiI1MDAxIiwidHlwZSI6Ik5vbmUifSx7ImlkIjoiNTAwMiIsInR5cGUiOiJHbGF6ZWQifSx7ImlkIjoiNTAwNSIsInR5cGUiOiJTdWdhciJ9LHsiaWQiOiI1MDAzIiwidHlwZSI6IkNob2NvbGF0ZSJ9LHsiaWQiOiI1MDA0IiwidHlwZSI6Ik1hcGxlIn1dfSx7ImlkIjoiMDAwMyIsInR5cGUiOiJkb251dCIsIm5hbWUiOiJPbGRGYXNoaW9uZWQiLCJwcHUiOjAuNTUsImJhdHRlcnMiOnsiYmF0dGVyIjpbeyJpZCI6IjEwMDEiLCJ0eXBlIjoiUmVndWxhciJ9LHsiaWQiOiIxMDAyIiwidHlwZSI6IkNob2NvbGF0ZSJ9XX0sInRvcHBpbmciOlt7ImlkIjoiNTAwMSIsInR5cGUiOiJOb25lIn0seyJpZCI6IjUwMDIiLCJ0eXBlIjoiR2xhemVkIn0seyJpZCI6IjUwMDMiLCJ0eXBlIjoiQ2hvY29sYXRlIn0seyJpZCI6IjUwMDQiLCJ0eXBlIjoiTWFwbGUifV19XQ\",\r\n\t\t\t\t\t\"W3siaWQiOiIwMDAxIiwidHlwZSI6ImRvbnV0IiwibmFtZSI6IkNha2UiLCJwcHUiOjAuNTUsImJhdHRlcnMiOnsiYmF0dGVyIjpbeyJpZCI6IjEwMDEiLCJ0eXBlIjoiUmVndWxhciJ9LHsiaWQiOiIxMDAyIiwidHlwZSI6IkNob2NvbGF0ZSJ9LHsiaWQiOiIxMDAzIiwidHlwZSI6IkJsdWViZXJyeSJ9LHsiaWQiOiIxMDA0IiwidHlwZSI6IkRldmlsJ3NGb29kIn1dfSwidG9wcGluZyI6W3siaWQiOiI1MDAxIiwidHlwZSI6Ik5vbmUifSx7ImlkIjoiNTAwMiIsInR5cGUiOiJHbGF6ZWQifSx7ImlkIjoiNTAwNSIsInR5cGUiOiJTdWdhciJ9LHsiaWQiOiI1MDA3IiwidHlwZSI6IlBvd2RlcmVkU3VnYXIifSx7ImlkIjoiNTAwNiIsInR5cGUiOiJDaG9jb2xhdGV3aXRoU3ByaW5rbGVzIn0seyJpZCI6IjUwMDMiLCJ0eXBlIjoiQ2hvY29sYXRlIn0seyJpZCI6IjUwMDQiLCJ0eXBlIjoiTWFwbGUifV19LHsiaWQiOiIwMDAyIiwidHlwZSI6ImRvbnV0IiwibmFtZSI6IlJhaXNlZCIsInBwdSI6MC41NSwiYmF0dGVycyI6eyJiYXR0ZXIiOlt7ImlkIjoiMTAwMSIsInR5cGUiOiJSZWd1bGFyIn1dfSwidG9wcGluZyI6W3siaWQiOiI1MDAxIiwidHlwZSI6Ik5vbmUifSx7ImlkIjoiNTAwMiIsInR5cGUiOiJHbGF6ZWQifSx7ImlkIjoiNTAwNSIsInR5cGUiOiJTdWdhciJ9LHsiaWQiOiI1MDAzIiwidHlwZSI6IkNob2NvbGF0ZSJ9LHsiaWQiOiI1MDA0IiwidHlwZSI6Ik1hcGxlIn1dfSx7ImlkIjoiMDAwMyIsInR5cGUiOiJkb251dCIsIm5hbWUiOiJPbGRGYXNoaW9uZWQiLCJwcHUiOjAuNTUsImJhdHRlcnMiOnsiYmF0dGVyIjpbeyJpZCI6IjEwMDEiLCJ0eXBlIjoiUmVndWxhciJ9LHsiaWQiOiIxMDAyIiwidHlwZSI6IkNob2NvbGF0ZSJ9XX0sInRvcHBpbmciOlt7ImlkIjoiNTAwMSIsInR5cGUiOiJOb25lIn0seyJpZCI6IjUwMDIiLCJ0eXBlIjoiR2xhemVkIn0seyJpZCI6IjUwMDMiLCJ0eXBlIjoiQ2hvY29sYXRlIn0seyJpZCI6IjUwMDQiLCJ0eXBlIjoiTWFwbGUifV19XQ\")\r\n\t\t\t\t\t.toString());\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace(); // this should never happen\r\n\t\t}\r\n\t}",
"protected abstract void shouldCompareSerialisedAndDeserialisedObjects(final T obj, final T deserialised);",
"private static boolean subTree(TreeNode r1, TreeNode r2) {\n if (r1 == null) {\n return false; // big tree empty & subtree still not found.\n } else if (r1.data == r2.data && matchTree(r1,r2)) {\n return true;\n }\n return subTree(r1.left, r2) || subTree(r1.right, r2);\n }",
"public static void compareJson(Response r1, Response r2){\n //Compare in response\n r1.editableUntil = r1.editableUntil .equals(r2.editableUntil ) ? r1.editableUntil : r2.editableUntil ;\n r1.dislikes = r1.dislikes == r2.dislikes ? r1.dislikes : r2.dislikes ;\n r1.numReports = r1.numReports == r2.numReports ? r1.numReports : r2.numReports ;\n r1.likes = r1.likes == r2.likes ? r1.likes : r2.likes ;\n r1.message = r1.message .equals(r2.message ) ? r1.message : r2.message ;\n r1.id = r1.id .equals(r2.id ) ? r1.id : r2.id ;\n r1.createdAt = r1.createdAt .equals(r2.createdAt ) ? r1.createdAt : r2.createdAt ;\n r1.media = r1.media .equals(r2.media ) ? r1.media : r2.media ;\n r1.isSpam = r1.isSpam .equals(r2.isSpam ) ? r1.isSpam : r2.isSpam ;\n r1.isDeletedByAuthor = r1.isDeletedByAuthor.equals(r2.isDeletedByAuthor) ? r1.isDeletedByAuthor : r2.isDeletedByAuthor;\n r1.isDeleted = r1.isDeleted .equals(r2.isDeleted ) ? r1.isDeleted : r2.isDeleted ;\n\n try{\n r1.parent = r1.parent .equals(r2.parent ) ? r1.parent : r2.parent ;\n } catch(NullPointerException e){\n r1.parent = r2.parent != null ? r2.parent: r1.parent;\n }\n\n r1.isApproved = r1.isApproved .equals(r2.isApproved ) ? r1.isApproved : r2.isApproved ;\n r1.isFlagged = r1.isFlagged .equals(r2.isFlagged ) ? r1.isFlagged : r2.isFlagged ;\n r1.rawMessage = r1.rawMessage .equals(r2.rawMessage ) ? r1.rawMessage : r2.rawMessage ;\n r1.isHighlighted = r1.isHighlighted .equals(r2.isHighlighted ) ? r1.isHighlighted : r2.isHighlighted ;\n r1.canVote = r1.canVote .equals(r2.canVote ) ? r1.canVote : r2.canVote ;\n r1.thread = r1.thread .equals(r2.thread ) ? r1.thread : r2.thread ;\n r1.forum = r1.forum .equals(r2.forum ) ? r1.forum : r2.forum ;\n r1.points = r1.points .equals(r2.points ) ? r1.points : r2.points ;\n r1.moderationLabels = r1.moderationLabels .equals(r2.moderationLabels ) ? r1.moderationLabels : r2.moderationLabels ;\n r1.isEdited = r1.isEdited .equals(r2.isEdited ) ? r1.isEdited : r2.isEdited ;\n r1.sb = r1.sb .equals(r2.sb ) ? r1.sb : r2.sb ;\n\n //Compare in Author\n r1.author.profileUrl = r1.author.profileUrl .equals(r2.author.profileUrl ) ? r1.author.profileUrl : r2.author.profileUrl ;\n\n try{\n r1.author.disable3rdPartyTrackers = r1.author.disable3rdPartyTrackers .equals(r2.author.disable3rdPartyTrackers) ? r1.author.disable3rdPartyTrackers : r2.author.disable3rdPartyTrackers;\n } catch(NullPointerException e){\n r1.author.disable3rdPartyTrackers = r2.author.disable3rdPartyTrackers != null ? r2.author.disable3rdPartyTrackers: r1.author.disable3rdPartyTrackers;\n }\n\n try{\n r1.author.joinedAt = r1.author.joinedAt .equals(r2.author.joinedAt ) ? r1.author.joinedAt : r2.author.joinedAt ;\n } catch(NullPointerException e){\n r1.author.joinedAt = r2.author.joinedAt != null ? r2.author.joinedAt: r1.author.joinedAt;\n }\n\n try{\n r1.author.about = r1.author.about .equals(r2.author.about ) ? r1.author.about : r2.author.about ;\n } catch(NullPointerException e){\n r1.author.about = r2.author.about != null ? r2.author.about: r1.author.about;\n }\n\n try{\n r1.author.isPrivate = r1.author.isPrivate .equals(r2.author.isPrivate ) ? r1.author.isPrivate : r2.author.isPrivate ;\n } catch(NullPointerException e){\n r1.author.isPrivate = r2.author.isPrivate != null ? r2.author.isPrivate: r1.author.isPrivate;\n }\n\n r1.author.url = r1.author.url .equals(r2.author.url ) ? r1.author.url : r2.author.url ;\n r1.author.isAnonymous = r1.author.isAnonymous .equals(r2.author.isAnonymous ) ? r1.author.isAnonymous : r2.author.isAnonymous ;\n\n try{\n r1.author.isPowerContributor = r1.author.isPowerContributor .equals(r2.author.isPowerContributor ) ? r1.author.isPowerContributor : r2.author.isPowerContributor ;\n } catch(NullPointerException e){\n r1.author.isPowerContributor = r2.author.isPowerContributor != null ? r2.author.isPowerContributor: r1.author.isPowerContributor;\n }\n\n try{\n r1.author.isPrimary = r1.author.isPrimary .equals(r2.author.isPrimary ) ? r1.author.isPrimary : r2.author.isPrimary ;\n } catch(NullPointerException e){\n r1.author.isPrimary = r2.author.isPrimary != null ? r2.author.isPrimary: r1.author.isPrimary;\n }\n\n r1.author.name = r1.author.name .equals(r2.author.name ) ? r1.author.name : r2.author.name ;\n\n try{\n r1.author.location = r1.author.location .equals(r2.author.location ) ? r1.author.location : r2.author.location ;\n } catch(NullPointerException e){\n r1.author.location = r2.author.location != null ? r2.author.location: r1.author.location;\n }\n\n try{\n r1.author.id = r1.author.id .equals(r2.author.id ) ? r1.author.id : r2.author.id ;\n } catch(NullPointerException e){\n r1.author.id = r2.author.id != null ? r2.author.id: r1.author.id;\n }\n r1.author.signedUrl = r1.author.signedUrl .equals(r2.author.signedUrl ) ? r1.author.signedUrl : r2.author.signedUrl ;\n\n try{\n r1.author.username = r1.author.username .equals(r2.author.username ) ? r1.author.username : r2.author.username ;\n } catch(NullPointerException e){\n r1.author.username = r2.author.username != null ? r2.author.username: r1.author.username;\n }\n\n //Compare in Avatar\n r1.author.avatar.cache = r1.author.avatar.cache .equals(r2.author.avatar.cache ) ? r1.author.avatar.cache : r2.author.avatar.cache ;\n\n try{\n r1.author.avatar.isCustom = r1.author.avatar.isCustom .equals(r2.author.avatar.isCustom ) ? r1.author.avatar.isCustom : r2.author.avatar.isCustom ;\n } catch(NullPointerException e){\n r1.author.avatar.isCustom = r2.author.avatar.isCustom != null ? r2.author.avatar.isCustom: r1.author.avatar.isCustom;\n }\n\n r1.author.avatar.permalink = r1.author.avatar.permalink .equals(r2.author.avatar.permalink) ? r1.author.avatar.permalink : r2.author.avatar.permalink;\n\n //Compare Small\n r1.author.avatar.small.cache = r1.author.avatar.small.cache .equals(r2.author.avatar.small.cache ) ? r1.author.avatar.small.cache : r2.author.avatar.small.cache ;\n r1.author.avatar.small.permalink = r1.author.avatar.small.permalink .equals(r2.author.avatar.small.permalink ) ? r1.author.avatar.small.permalink : r2.author.avatar.small.permalink ;\n\n //Compare Large\n r1.author.avatar.large.cache = r1.author.avatar.large.cache .equals(r2.author.avatar.large.cache ) ? r1.author.avatar.large.cache : r2.author.avatar.large.cache ;\n r1.author.avatar.large.permalink = r1.author.avatar.large.permalink .equals(r2.author.avatar.large.permalink ) ? r1.author.avatar.large.permalink : r2.author.avatar.large.permalink ;\n }",
"private boolean similar(JSONObject expect, JSONObject got) {\n try {\n if (!expect.keySet().equals(got.keySet())) {\n return false;\n }\n\n for (String key : expect.keySet()) {\n Object valueExpect = expect.get(key);\n Object valueGot = got.get(key);\n\n if (valueExpect == valueGot) {\n continue;\n }\n\n if (valueExpect == null) {\n return false;\n }\n\n if (valueExpect instanceof JSONObject) {\n return similar((JSONObject) valueExpect, (JSONObject) valueGot);\n } else if (valueExpect instanceof JSONArray) {\n // Equal JSONArray have the same length and one contains the other.\n JSONArray expectArray = (JSONArray) valueExpect;\n JSONArray gotArray = (JSONArray) valueGot;\n\n if (expectArray.length() != gotArray.length()) {\n return false;\n }\n\n for (int i = 0; i < expectArray.length(); i++) {\n boolean gotContainsSimilar = false;\n for (int j = 0; j < gotArray.length(); j++) {\n if (similar((JSONObject) expectArray.get(i),\n (JSONObject) gotArray.get(j))) {\n gotContainsSimilar = true;\n break;\n }\n }\n if (!gotContainsSimilar) {\n return false;\n }\n }\n } else if (!valueExpect.equals(valueGot)) {\n return false;\n }\n }\n\n } catch (JSONException e) {\n Log.d(TAG, \"Could not compare JSONObjects: \" + e);\n return false;\n }\n return true;\n }",
"public static boolean compore(String obj1,String obj2) {\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t\t\r\n\t\tSystem.out.println(\"NECATI-------------------\"+obj1 +\"\\n\"+ obj2 );\r\n\t\torg.codehaus.jackson.JsonNode tree1 = null;\r\n\t\torg.codehaus.jackson.JsonNode tree2 = null;\r\n\t\ttry {\r\n\t\t\ttree1 = mapper.readTree(obj1);\r\n\t\t\ttree2 = mapper.readTree(obj2);\r\n\t\t}catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn tree1.equals(tree2);\r\n\t}",
"@Test\r\n\tpublic void checkJSONResponseGivenTwoNonEqualJSONBase64HavingEqualSize() {\r\n\t\ttry {\r\n\t\t\tString sample1ExpectedResult = new String(Files.readAllBytes(FileSystems.getDefault()\r\n\t\t\t\t\t.getPath(INPUT_PATH_TESTING_FILES, \"isEqualFalseIsEqualSizeTrue_Json_Sample1.txt\")));\r\n\t\t\tString sample2ExpectedResult = new String(Files.readAllBytes(FileSystems.getDefault()\r\n\t\t\t\t\t.getPath(INPUT_PATH_TESTING_FILES, \"isEqualFalseIsEqualSizeTrue_Json_Sample2.txt\")));\r\n\t\t\tCompareJSONsUtil businessLogicTemp = new CompareJSONsUtil();\r\n\r\n\t\t\t// Two non equal JSON Base64 encoded with same size (this should return the\r\n\t\t\t// diffs)\r\n\t\t\tassertEquals(sample1ExpectedResult,\r\n\t\t\t\t\tbusinessLogicTemp.compareJSONs(\"eyJ1c2VyVHlwZSI6ImFkbWluIiwiaWQiOjEyM30=\",\r\n\t\t\t\t\t\t\t\"eyJ1c2VyVHlwZSI6InVzZXIiLCJpZCI6MTIzfQ==\").toString());\r\n\r\n\t\t\t// Two non equal JSON Base64 encoded with same size (this should return the\r\n\t\t\t// diffs)\r\n\t\t\tassertEquals(sample2ExpectedResult, businessLogicTemp.compareJSONs(\r\n\t\t\t\t\t\"eyJ1c2VyVHlwZSI6ImFkbWluIiwiY3JlZGl0Q2FyZE51bWJlciI6NDY0NywiZW1haWwiOiJlbWFpbEBnbWFpbC5jb20iLCJpZCI6MTIzfQ==\",\r\n\t\t\t\t\t\"eyJ1c2VyVHlwZSI6ImFkbWluIiwiY3JlZGl0Q2FyZE51bWJlciI6NDQ0MywiZW1haWwiOiJlbWFpbEBnbWFpbC5jb20iLCJpZCI6MTIzfQ==\")\r\n\t\t\t\t\t.toString());\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace(); // this should never happen\r\n\t\t}\r\n\t}",
"@Test\n public void testIsSubSet() {\n System.out.println(\"isSubSet\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(10);\n arr2.add(23);\n Collections.sort(arr1);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n boolean expResult = true;\n boolean result = instance.isSubSet();\n assertEquals(expResult, result);\n }",
"private boolean compareStructure(BinaryNode<AnyType> t) //main calls this\n {\n if(t == null && isEmpty())\n {\n return true; //empty trees have the same structure (both being none)\n }\n else if(t == null|| isEmpty())\n {\n return false; //only one of the trees are empty\n }\n else\n {\n return compareStructure(t, root); //neither tree is empty\n }\n }",
"@Test\r\n\tpublic void checkJSONResponseGivenTwoNonJSONBase64Encoded() {\r\n\t\ttry {\r\n\t\t\tString isEqualFalseIsBase64FalseResult = new String(Files.readAllBytes(\r\n\t\t\t\t\tFileSystems.getDefault().getPath(INPUT_PATH_TESTING_FILES, \"isEqualFalseIsBase64False_Json.txt\")));\r\n\t\t\tCompareJSONsUtil businessLogicTemp = new CompareJSONsUtil();\r\n\r\n\t\t\t// Two non equal non Base64 Strings\r\n\t\t\tassertEquals(isEqualFalseIsBase64FalseResult, businessLogicTemp\r\n\t\t\t\t\t.compareJSONs(\"khjgkjgkjhgkjashhshshsah=\", \"uuwy736363ywywywwyyyw88iui==\").toString());\r\n\r\n\t\t\t// Two non equal non Base64 Strings\r\n\t\t\tassertEquals(isEqualFalseIsBase64FalseResult,\r\n\t\t\t\t\tbusinessLogicTemp.compareJSONs(\r\n\t\t\t\t\t\t\t\"{\\\"userType\\\":\\\"admin\\\",\\\"creditCardNumber\\\":0,\\\"email\\\":\\\"email@gmail.com\\\",\\\"id\\\":123}\",\r\n\t\t\t\t\t\t\t\"{\\\"userType\\\":\\\"admin\\\",\\\"creditCardNumber\\\":0,\\\"email\\\":\\\"email@waes.com\\\",\\\"id\\\":123}\")\r\n\t\t\t\t\t\t\t.toString());\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace(); // this should never happen\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic boolean CompareTreeStructure(TreeEntity root1, TreeEntity root2) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif (root1 == null && root2 == null) {\r\n\t\t\treturn true;\r\n\t\t} else if (root1 == null || root2 == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn CompareTreeStructure(root1.getLeft(), root2.getLeft())\r\n\t\t\t\t&& CompareTreeStructure(root1.getRight(), root2.getRight());\r\n\t}",
"@Test\r\n\tpublic void checkJSONResponseGivenTwoNonEqualJSONBase64HavingNonEqualSize() {\r\n\t\ttry {\r\n\t\t\tString isEqualFalseIsEqualSizeFalseResult = new String(Files.readAllBytes(FileSystems.getDefault()\r\n\t\t\t\t\t.getPath(INPUT_PATH_TESTING_FILES, \"isEqualFalseIsEqualSizeFalse_Json.txt\")));\r\n\t\t\tCompareJSONsUtil businessLogicTemp = new CompareJSONsUtil();\r\n\r\n\t\t\t// Two non equal JSON Base64 encoded with different size\r\n\t\t\tassertEquals(isEqualFalseIsEqualSizeFalseResult,\r\n\t\t\t\t\tbusinessLogicTemp.compareJSONs(\"dHJ1ZQ==\", \"ZmFsc2U\").toString());\r\n\r\n\t\t\t// Two non equal JSON Base64 encoded with different size\r\n\t\t\tassertEquals(isEqualFalseIsEqualSizeFalseResult, businessLogicTemp.compareJSONs(\r\n\t\t\t\t\t\"eyJ1c2VyVHlwZSI6ImFkbWluIiwiY3JlZGl0Q2FyZE51bWJlciI6MCwiZW1haWwiOiJlbWFpbEBnbWFpbC5jb20iLCJpZCI6MTIzfQ\",\r\n\t\t\t\t\t\"W3siaWQiOiIwMDAxIiwidHlwZSI6ImRvbnV0IiwibmFtZSI6IkNha2UiLCJwcHUiOjAuNTUsImJhdHRlcnMiOnsiYmF0dGVyIjpbeyJpZCI6IjEwMDEiLCJ0eXBlIjoiUmVndWxhciJ9LHsiaWQiOiIxMDAyIiwidHlwZSI6IkNob2NvbGF0ZSJ9LHsiaWQiOiIxMDAzIiwidHlwZSI6IkJsdWViZXJyeSJ9LHsiaWQiOiIxMDA0IiwidHlwZSI6IkRldmlsJ3NGb29kIn1dfSwidG9wcGluZyI6W3siaWQiOiI1MDAxIiwidHlwZSI6Ik5vbmUifSx7ImlkIjoiNTAwMiIsInR5cGUiOiJHbGF6ZWQifSx7ImlkIjoiNTAwNSIsInR5cGUiOiJTdWdhciJ9LHsiaWQiOiI1MDA3IiwidHlwZSI6IlBvd2RlcmVkU3VnYXIifSx7ImlkIjoiNTAwNiIsInR5cGUiOiJDaG9jb2xhdGV3aXRoU3ByaW5rbGVzIn0seyJpZCI6IjUwMDMiLCJ0eXBlIjoiQ2hvY29sYXRlIn0seyJpZCI6IjUwMDQiLCJ0eXBlIjoiTWFwbGUifV19LHsiaWQiOiIwMDAyIiwidHlwZSI6ImRvbnV0IiwibmFtZSI6IlJhaXNlZCIsInBwdSI6MC41NSwiYmF0dGVycyI6eyJiYXR0ZXIiOlt7ImlkIjoiMTAwMSIsInR5cGUiOiJSZWd1bGFyIn1dfSwidG9wcGluZyI6W3siaWQiOiI1MDAxIiwidHlwZSI6Ik5vbmUifSx7ImlkIjoiNTAwMiIsInR5cGUiOiJHbGF6ZWQifSx7ImlkIjoiNTAwNSIsInR5cGUiOiJTdWdhciJ9LHsiaWQiOiI1MDAzIiwidHlwZSI6IkNob2NvbGF0ZSJ9LHsiaWQiOiI1MDA0IiwidHlwZSI6Ik1hcGxlIn1dfSx7ImlkIjoiMDAwMyIsInR5cGUiOiJkb251dCIsIm5hbWUiOiJPbGRGYXNoaW9uZWQiLCJwcHUiOjAuNTUsImJhdHRlcnMiOnsiYmF0dGVyIjpbeyJpZCI6IjEwMDEiLCJ0eXBlIjoiUmVndWxhciJ9LHsiaWQiOiIxMDAyIiwidHlwZSI6IkNob2NvbGF0ZSJ9XX0sInRvcHBpbmciOlt7ImlkIjoiNTAwMSIsInR5cGUiOiJOb25lIn0seyJpZCI6IjUwMDIiLCJ0eXBlIjoiR2xhemVkIn0seyJpZCI6IjUwMDMiLCJ0eXBlIjoiQ2hvY29sYXRlIn0seyJpZCI6IjUwMDQiLCJ0eXBlIjoiTWFwbGUifV19XQ\")\r\n\t\t\t\t\t.toString());\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace(); // this should never happen\r\n\t\t}\r\n\t}",
"protected boolean checkHetro(ISchemaType t0, ISchemaType t1) {\n\n if ((t0 instanceof SchemaFlatType && t1 instanceof SchemaNestedType)\n || (t0 instanceof SchemaNestedType && t1 instanceof SchemaFlatType)\n || (t0 instanceof SchemaNestedType && t1 instanceof SchemaNestedType && t0 != t1))\n return true;\n\n return false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XCastedExpression__TypeAssignment_1_1" $ANTLR start "rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18836:1: rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2 : ( ( ruleValidID ) ) ; | public final void rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18840:1: ( ( ( ruleValidID ) ) )
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18841:1: ( ( ruleValidID ) )
{
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18841:1: ( ( ruleValidID ) )
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18842:1: ( ruleValidID )
{
if ( state.backtracking==0 ) {
before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0());
}
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18843:1: ( ruleValidID )
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18844:1: ruleValidID
{
if ( state.backtracking==0 ) {
before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_0_0_0_2_0_1());
}
pushFollow(FOLLOW_ruleValidID_in_rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_237906);
ruleValidID();
state._fsp--;
if (state.failed) return ;
if ( state.backtracking==0 ) {
after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_0_0_0_2_0_1());
}
}
if ( state.backtracking==0 ) {
after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_1_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18950:1: ( ( ( ruleValidID ) ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18951:1: ( ( ruleValidID ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18951:1: ( ( ruleValidID ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18952:1: ( ruleValidID )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18953:1: ( ruleValidID )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18954:1: ruleValidID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_1_2_0_1()); \r\n }\r\n pushFollow(FOLLOW_ruleValidID_in_rule__XMemberFeatureCall__FeatureAssignment_1_1_238126);\r\n ruleValidID();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_1_2_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_1_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17834:1: ( ( ( ruleValidID ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17835:1: ( ( ruleValidID ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17835:1: ( ( ruleValidID ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17836:1: ( ruleValidID )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17837:1: ( ruleValidID )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17838:1: ruleValidID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_1_2_0_1()); \r\n }\r\n pushFollow(FOLLOW_ruleValidID_in_rule__XMemberFeatureCall__FeatureAssignment_1_1_236019);\r\n ruleValidID();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_1_2_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17724:1: ( ( ( ruleValidID ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17725:1: ( ( ruleValidID ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17725:1: ( ( ruleValidID ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17726:1: ( ruleValidID )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17727:1: ( ruleValidID )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17728:1: ruleValidID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_0_0_0_2_0_1()); \r\n }\r\n pushFollow(FOLLOW_ruleValidID_in_rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_235799);\r\n ruleValidID();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_0_0_0_2_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30706:1: ( ( ( ruleValidID ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30707:1: ( ( ruleValidID ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30707:1: ( ( ruleValidID ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30708:1: ( ruleValidID )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30709:1: ( ruleValidID )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30710:1: ruleValidID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_0_0_0_2_0_1()); \r\n }\r\n pushFollow(FOLLOW_ruleValidID_in_rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_261767);\r\n ruleValidID();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_0_0_0_2_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_1_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30816:1: ( ( ( ruleValidID ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30817:1: ( ( ruleValidID ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30817:1: ( ( ruleValidID ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30818:1: ( ruleValidID )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30819:1: ( ruleValidID )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30820:1: ruleValidID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_1_2_0_1()); \r\n }\r\n pushFollow(FOLLOW_ruleValidID_in_rule__XMemberFeatureCall__FeatureAssignment_1_1_261987);\r\n ruleValidID();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_1_1_2_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12589:1: ( ( ( RULE_ID ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12590:1: ( ( RULE_ID ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12590:1: ( ( RULE_ID ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12591:1: ( RULE_ID )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12592:1: ( RULE_ID )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12593:1: RULE_ID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementIDTerminalRuleCall_1_1_2_0_1()); \n }\n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__XMemberFeatureCall__FeatureAssignment_1_1_225267); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementIDTerminalRuleCall_1_1_2_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12479:1: ( ( ( RULE_ID ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12480:1: ( ( RULE_ID ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12480:1: ( ( RULE_ID ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12481:1: ( RULE_ID )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12482:1: ( RULE_ID )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12483:1: RULE_ID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementIDTerminalRuleCall_1_0_0_0_2_0_1()); \n }\n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_225047); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementIDTerminalRuleCall_1_0_0_0_2_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15545:1: ( ( ( ruleFeatureCallID ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15546:1: ( ( ruleFeatureCallID ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15546:1: ( ( ruleFeatureCallID ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15547:1: ( ruleFeatureCallID )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15548:1: ( ruleFeatureCallID )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15549:1: ruleFeatureCallID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_0_0_0_2_0_1()); \n }\n pushFollow(FOLLOW_ruleFeatureCallID_in_rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_231287);\n ruleFeatureCallID();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_0_0_0_2_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17430:1: ( ( ( ruleFeatureCallID ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17431:1: ( ( ruleFeatureCallID ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17431:1: ( ( ruleFeatureCallID ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17432:1: ( ruleFeatureCallID )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17433:1: ( ruleFeatureCallID )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17434:1: ruleFeatureCallID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_0_0_0_2_0_1()); \n }\n pushFollow(FOLLOW_ruleFeatureCallID_in_rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_235110);\n ruleFeatureCallID();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_0_0_0_2_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16397:1: ( ( ( ruleFeatureCallID ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16398:1: ( ( ruleFeatureCallID ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16398:1: ( ( ruleFeatureCallID ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16399:1: ( ruleFeatureCallID )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16400:1: ( ruleFeatureCallID )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16401:1: ruleFeatureCallID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_0_0_0_2_0_1()); \n }\n pushFollow(FOLLOW_ruleFeatureCallID_in_rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_233020);\n ruleFeatureCallID();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_0_0_0_2_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15655:1: ( ( ( ruleFeatureCallID ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15656:1: ( ( ruleFeatureCallID ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15656:1: ( ( ruleFeatureCallID ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15657:1: ( ruleFeatureCallID )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15658:1: ( ruleFeatureCallID )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15659:1: ruleFeatureCallID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_1_2_0_1()); \n }\n pushFollow(FOLLOW_ruleFeatureCallID_in_rule__XMemberFeatureCall__FeatureAssignment_1_1_231507);\n ruleFeatureCallID();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_1_2_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16507:1: ( ( ( ruleFeatureCallID ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16508:1: ( ( ruleFeatureCallID ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16508:1: ( ( ruleFeatureCallID ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16509:1: ( ruleFeatureCallID )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16510:1: ( ruleFeatureCallID )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16511:1: ruleFeatureCallID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_1_2_0_1()); \n }\n pushFollow(FOLLOW_ruleFeatureCallID_in_rule__XMemberFeatureCall__FeatureAssignment_1_1_233240);\n ruleFeatureCallID();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_1_2_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17540:1: ( ( ( ruleFeatureCallID ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17541:1: ( ( ruleFeatureCallID ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17541:1: ( ( ruleFeatureCallID ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17542:1: ( ruleFeatureCallID )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17543:1: ( ruleFeatureCallID )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17544:1: ruleFeatureCallID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_1_2_0_1()); \n }\n pushFollow(FOLLOW_ruleFeatureCallID_in_rule__XMemberFeatureCall__FeatureAssignment_1_1_235330);\n ruleFeatureCallID();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_1_2_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_1_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17785:1: ( ( ( ruleFeatureCallID ) ) )\r\n // InternalDroneScript.g:17786:2: ( ( ruleFeatureCallID ) )\r\n {\r\n // InternalDroneScript.g:17786:2: ( ( ruleFeatureCallID ) )\r\n // InternalDroneScript.g:17787:3: ( ruleFeatureCallID )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \r\n }\r\n // InternalDroneScript.g:17788:3: ( ruleFeatureCallID )\r\n // InternalDroneScript.g:17789:4: ruleFeatureCallID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_0_0_0_2_0_1()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleFeatureCallID();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementFeatureCallIDParserRuleCall_1_0_0_0_2_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_0_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XMemberFeatureCall__Group_1_1_1_2__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10744:1: ( ( ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1 ) ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10745:1: ( ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1 ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10745:1: ( ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1 ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10746:1: ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getTypeArgumentsAssignment_1_1_1_2_1()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10747:1: ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1 )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10747:2: rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1_in_rule__XMemberFeatureCall__Group_1_1_1_2__1__Impl21882);\r\n rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getTypeArgumentsAssignment_1_1_1_2_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XAssignment__FeatureAssignment_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18466:1: ( ( ( ruleValidID ) ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18467:1: ( ( ruleValidID ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18467:1: ( ( ruleValidID ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18468:1: ( ruleValidID )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getFeatureJvmIdentifiableElementCrossReference_0_1_0()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18469:1: ( ruleValidID )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18470:1: ruleValidID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_0_1_0_1()); \r\n }\r\n pushFollow(FOLLOW_ruleValidID_in_rule__XAssignment__FeatureAssignment_0_137136);\r\n ruleValidID();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAssignmentAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_0_1_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAssignmentAccess().getFeatureJvmIdentifiableElementCrossReference_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XMemberFeatureCall__Group_1_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10618:1: ( ( ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_1 ) ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10619:1: ( ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_1 ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10619:1: ( ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_1 ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10620:1: ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getTypeArgumentsAssignment_1_1_1_1()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10621:1: ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_1 )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10621:2: rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_1\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_1_in_rule__XMemberFeatureCall__Group_1_1_1__1__Impl21635);\r\n rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getTypeArgumentsAssignment_1_1_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XAssignment__FeatureAssignment_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17354:1: ( ( ( ruleValidID ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17355:1: ( ( ruleValidID ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17355:1: ( ( ruleValidID ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17356:1: ( ruleValidID )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getFeatureJvmIdentifiableElementCrossReference_0_1_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17357:1: ( ruleValidID )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17358:1: ruleValidID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_0_1_0_1()); \r\n }\r\n pushFollow(FOLLOW_ruleValidID_in_rule__XAssignment__FeatureAssignment_0_135037);\r\n ruleValidID();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAssignmentAccess().getFeatureJvmIdentifiableElementValidIDParserRuleCall_0_1_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAssignmentAccess().getFeatureJvmIdentifiableElementCrossReference_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XMemberFeatureCall__Group_1_1_1_2__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6886:1: ( ( ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6887:1: ( ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6887:1: ( ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6888:1: ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getTypeArgumentsAssignment_1_1_1_2_1()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6889:1: ( rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6889:2: rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1_in_rule__XMemberFeatureCall__Group_1_1_1_2__1__Impl14228);\n rule__XMemberFeatureCall__TypeArgumentsAssignment_1_1_1_2_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getTypeArgumentsAssignment_1_1_1_2_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
La forma correcta de crear el edificio va aca dentro: | protected abstract Edificio crearEdificio(); | [
"public abstract Anuncio creaAnuncioTematico();",
"public abstract Anuncio creaAnuncioGeneral();",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"Compuesta createCompuesta();",
"protected Edificio crearEdificioRequerido() {\n\t\t// Si no hay requerido, no redefinir\n\t\tthrow new RuntimeException();\n\t}",
"@Override\n public String crearExpediente(SolicitudGenerica solicitud) throws GestorDocumentalServiceException {\n if(solicitud.solicitante == null)\n throw new NullPointerException();\n \n if(solicitud.solicitante.isPersonaFisica() && solicitud.solicitante.representado != null && solicitud.solicitante.representado && solicitud.solicitante.representante == null){\n throw new NullPointerException();\n }\n \n if(solicitud.solicitante.isPersonaJuridica() && solicitud.solicitante.representantes == null){\n throw new NullPointerException();\n }\n \n String expediente = solicitud.expedienteAed.asignarIdAed();\n File folder = getExpedienteFolder(expediente);\n try {\n FileUtils.forceMkdir(folder);\n }catch(IOException e){\n throw new GestorDocumentalServiceException(\"Error al crear la carpeta \" + folder.getAbsolutePath());\n }\n return expediente;\n }",
"public void crearFichero() {\r\n try {\r\n fos = new FileOutputStream(ficheroDatos);\r\n oos = new ObjectOutputStream(fos);\r\n System.out.println(\"\\n<- CREANDO FICHERO DE INFORMACIÓN ->\\n\");\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"void Cadastro( char tipo, float preco, int cod, int qtdestoque, String nome, String editora, int mes, int ano){\n\n /* Adiciona a nova Revista no vetor de produtos */\n produtos.add( new Revista( tipo, preco, cod, qtdestoque, nome, editora, mes, ano));\n System.out.println(\"Sucesso Revista Adicionado\\n\");\n\n }",
"Secuencia createSecuencia();",
"protected void creaCampi() {\n /* variabili e costanti locali di lavoro */\n Campo unCampo;\n\n try { // prova ad eseguire il codice\n /* invoca il metodo sovrascritto della superclasse */\n super.creaCampi();\n\n /* elimina il campo della superclasse link al conto */\n /* se non esiste, non fa nulla */\n unCampo = (Campo)this.getCampiModello().get(PCSottoconto.CAMPO_CONTO);\n this.getCampiModello().remove(unCampo);\n\n /* campo link conto (piano dei conti albergo) */\n unCampo = CampoFactory.comboLinkPop(AlbSottoconto.CAMPO_ALB_CONTO);\n unCampo.setNomeModuloLinkato(AlbConto.NOME_MODULO);\n unCampo.setAzioneDelete(Db.Azione.cascade);\n unCampo.setVisibileVistaDefault();\n unCampo.decora().obbligatorio();\n unCampo.setUsaNuovo(true);\n unCampo.decora().etichetta(TESTO_CONTO);\n unCampo.decora().estrattoSotto(AlbConto.Estratto.descrizione);\n this.addCampo(unCampo);\n\n// /* campo disponibile per addebito fisso */\n// unCampo = CampoFactory.checkBox(AlbSottoconto.CAMPO_FISSO);\n// unCampo.setVisibileVistaDefault();\n// unCampo.decora().legenda(\"disponibile per addebiti fissi\");\n// this.addCampo(unCampo);\n\n// /* campo tipo di prezzo (solo per addebito fisso) */\n// unCampo = CampoFactory.radioInterno(\n// AlbSottoconto.CAMPO_TIPO_PREZZO);\n// unCampo.setVisibileVistaDefault();\n// unCampo.setValoriInterni(AlbSottoconto.Tipo.getElenco());\n// unCampo.setInit(\n// InitFactory.intero(AlbSottoconto.Tipo.camera.getCodice()));\n// unCampo.decora().etichetta(\"tipo di prezzo\");\n// this.addCampo(unCampo);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"Documento createDocumento();",
"RespuestaCreacion crear(Alquiler alquiler);",
"Negacion createNegacion();",
"public void guardarAtributoModificado() {\n\n newAttributeBox.closeNewAttributeBox();\n if (newAttributeBox.getCerradoCorrecto()) {\n newAttributeBox.dispose();\n String valor = ((NewAttributeBox) newAttributeBox).getValor();\n boolean incluirFH = ((NewAttributeBox) newAttributeBox).getCBincluirFH();\n //si desea incluir la fecha y la hora lo añado\n if (incluirFH) {\n String horaIni = ((NewAttributeBox) newAttributeBox).getHoraIni();\n Date fecha = ((NewAttributeBox) newAttributeBox).getFechaIni();\n java.sql.Date feIni = new java.sql.Date(fecha.getTime());\n String horaFin;\n java.sql.Date feFin;\n if (((NewAttributeBox) newAttributeBox).getRBselectedTemp().equals(\"punto\")) {\n horaFin = ((NewAttributeBox) newAttributeBox).getHoraFin();\n feFin = feIni;\n } else {\n horaFin = ((NewAttributeBox) newAttributeBox).getHoraFin();\n fecha = ((NewAttributeBox) newAttributeBox).getFechaFin();\n feFin = new java.sql.Date(fecha.getTime());\n }\n panel.insertarEnTablaModAtrib(valor, \"\" + feIni, horaIni, \"\" + feFin, horaFin, this.getElementoSeleccionado());\n\n } else { //si no, no\n panel.insertarEnTablaModAtrib(valor, null, \"\", null, \"\", this.getElementoSeleccionado());\n }\n newAttributeBox = null;\n }\n\n }",
"public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }",
"public void testCrearDispositivo() {\n\t\tString referencia = \"A0021R\";\n\t\tString nombre = \"Motorola G primera generacion\";\n\t\tString descripcion = \"1 GB de RAM\";\n\t\tint tipo = 1;\n\t\tString foto = \"url\";\n\t\tString emailAdministrador = \"sebasj14@gmail.com\";\n\t\ttry {\n\t\t\tdispositivoBL.crearDispositivo(referencia, nombre, descripcion, tipo, foto, emailAdministrador);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public int crearPropiedadApto(int CantidadDormitorios, int CantidadBanios, String DireccionPropiedad, float PrecioPropiedad,\r\n float MetrosConstruidosPropiedad, float MetrosTerrenoPropiedad, int NumeroPadronPropiedad, boolean EnAlquiler, boolean EnVenta, int IdUsuario){\r\n Propiedad propiedad = new Inmueble(EnumTipoInmueble.Apartamento,CantidadDormitorios, CantidadBanios, DireccionPropiedad,\r\n PrecioPropiedad, MetrosConstruidosPropiedad, MetrosTerrenoPropiedad, NumeroPadronPropiedad,\r\n EnumEstadoPropiedad.Privada, EnAlquiler, EnVenta);\r\n try{\r\n Usuario usr = cUsr.GetUsuario(IdUsuario);\r\n propiedad.setUsuarioPropiedad(usr);\r\n return mProp.CrearPropiedad(propiedad);\r\n }catch(NullPointerException ex){}\r\n return -1;\r\n }",
"Vaisseau_ordonneeLaPlusBasse createVaisseau_ordonneeLaPlusBasse();",
"Long crear(Prestamo prestamo);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Ceffective__Group__4" $ANTLR start "rule__Ceffective__Group__4__Impl" InternalCeffective.g:806:1: rule__Ceffective__Group__4__Impl : ( '}' ) ; | public final void rule__Ceffective__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalCeffective.g:810:1: ( ( '}' ) )
// InternalCeffective.g:811:1: ( '}' )
{
// InternalCeffective.g:811:1: ( '}' )
// InternalCeffective.g:812:2: '}'
{
before(grammarAccess.getCeffectiveAccess().getRightCurlyBracketKeyword_4());
match(input,23,FOLLOW_2);
after(grammarAccess.getCeffectiveAccess().getRightCurlyBracketKeyword_4());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Ceffective__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:799:1: ( rule__Ceffective__Group__4__Impl )\n // InternalCeffective.g:800:2: rule__Ceffective__Group__4__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Ceffective__Group__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Ceffective__Group_3__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:853:1: ( rule__Ceffective__Group_3__1__Impl )\n // InternalCeffective.g:854:2: rule__Ceffective__Group_3__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Ceffective__Group_3__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Ceffective__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:691:1: ( rule__Ceffective__Group__0__Impl rule__Ceffective__Group__1 )\n // InternalCeffective.g:692:2: rule__Ceffective__Group__0__Impl rule__Ceffective__Group__1\n {\n pushFollow(FOLLOW_3);\n rule__Ceffective__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Ceffective__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Ceffective__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:772:1: ( rule__Ceffective__Group__3__Impl rule__Ceffective__Group__4 )\n // InternalCeffective.g:773:2: rule__Ceffective__Group__3__Impl rule__Ceffective__Group__4\n {\n pushFollow(FOLLOW_5);\n rule__Ceffective__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Ceffective__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Activity__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:595:1: ( ( '}' ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:596:1: ( '}' )\n {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:596:1: ( '}' )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:597:1: '}'\n {\n before(grammarAccess.getActivityAccess().getRightCurlyBracketKeyword_4()); \n match(input,14,FollowSets000.FOLLOW_14_in_rule__Activity__Group__4__Impl1187); \n after(grammarAccess.getActivityAccess().getRightCurlyBracketKeyword_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Ceffective__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:730:1: ( ( 'Ceffective' ) )\n // InternalCeffective.g:731:1: ( 'Ceffective' )\n {\n // InternalCeffective.g:731:1: ( 'Ceffective' )\n // InternalCeffective.g:732:2: 'Ceffective'\n {\n before(grammarAccess.getCeffectiveAccess().getCeffectiveKeyword_1()); \n match(input,21,FOLLOW_2); \n after(grammarAccess.getCeffectiveAccess().getCeffectiveKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Ceffective__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:745:1: ( rule__Ceffective__Group__2__Impl rule__Ceffective__Group__3 )\n // InternalCeffective.g:746:2: rule__Ceffective__Group__2__Impl rule__Ceffective__Group__3\n {\n pushFollow(FOLLOW_5);\n rule__Ceffective__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Ceffective__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__GenComponent__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:23993:1: ( ( '}' ) )\n // InternalDsl.g:23994:1: ( '}' )\n {\n // InternalDsl.g:23994:1: ( '}' )\n // InternalDsl.g:23995:2: '}'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getGenComponentAccess().getRightCurlyBracketKeyword_4()); \n }\n match(input,68,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getGenComponentAccess().getRightCurlyBracketKeyword_4()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Ceffective__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:703:1: ( ( () ) )\n // InternalCeffective.g:704:1: ( () )\n {\n // InternalCeffective.g:704:1: ( () )\n // InternalCeffective.g:705:2: ()\n {\n before(grammarAccess.getCeffectiveAccess().getCeffectiveAction_0()); \n // InternalCeffective.g:706:2: ()\n // InternalCeffective.g:706:3: \n {\n }\n\n after(grammarAccess.getCeffectiveAccess().getCeffectiveAction_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Ceffective__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:784:1: ( ( ( rule__Ceffective__Group_3__0 )? ) )\n // InternalCeffective.g:785:1: ( ( rule__Ceffective__Group_3__0 )? )\n {\n // InternalCeffective.g:785:1: ( ( rule__Ceffective__Group_3__0 )? )\n // InternalCeffective.g:786:2: ( rule__Ceffective__Group_3__0 )?\n {\n before(grammarAccess.getCeffectiveAccess().getGroup_3()); \n // InternalCeffective.g:787:2: ( rule__Ceffective__Group_3__0 )?\n int alt7=2;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0==24) ) {\n alt7=1;\n }\n switch (alt7) {\n case 1 :\n // InternalCeffective.g:787:3: rule__Ceffective__Group_3__0\n {\n pushFollow(FOLLOW_2);\n rule__Ceffective__Group_3__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getCeffectiveAccess().getGroup_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Component__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:4161:1: ( ( '}' ) )\n // InternalMyDsl.g:4162:1: ( '}' )\n {\n // InternalMyDsl.g:4162:1: ( '}' )\n // InternalMyDsl.g:4163:2: '}'\n {\n before(grammarAccess.getComponentAccess().getRightCurlyBracketKeyword_4()); \n match(input,41,FOLLOW_2); \n after(grammarAccess.getComponentAccess().getRightCurlyBracketKeyword_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__GenCodeStatement__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:29463:1: ( rule__GenCodeStatement__Group__3__Impl )\n // InternalDsl.g:29464:2: rule__GenCodeStatement__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__GenCodeStatement__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Ceffective__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:718:1: ( rule__Ceffective__Group__1__Impl rule__Ceffective__Group__2 )\n // InternalCeffective.g:719:2: rule__Ceffective__Group__1__Impl rule__Ceffective__Group__2\n {\n pushFollow(FOLLOW_4);\n rule__Ceffective__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Ceffective__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Objective__Group_3__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8739:1: ( ( '}' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8740:1: ( '}' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8740:1: ( '}' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8741:1: '}'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getObjectiveAccess().getRightCurlyBracketKeyword_3_2()); \r\n }\r\n match(input,68,FOLLOW_68_in_rule__Objective__Group_3__2__Impl18268); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getObjectiveAccess().getRightCurlyBracketKeyword_3_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Component__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24183:1: ( ( '}' ) )\n // InternalDsl.g:24184:1: ( '}' )\n {\n // InternalDsl.g:24184:1: ( '}' )\n // InternalDsl.g:24185:2: '}'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getComponentAccess().getRightCurlyBracketKeyword_6()); \n }\n match(input,68,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getComponentAccess().getRightCurlyBracketKeyword_6()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__GenLnCodeStatement__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:29625:1: ( rule__GenLnCodeStatement__Group__3__Impl )\n // InternalDsl.g:29626:2: rule__GenLnCodeStatement__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__GenLnCodeStatement__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Component__Group__7__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24209:1: ( ( '}' ) )\n // InternalDsl.g:24210:1: ( '}' )\n {\n // InternalDsl.g:24210:1: ( '}' )\n // InternalDsl.g:24211:2: '}'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getComponentAccess().getRightCurlyBracketKeyword_7()); \n }\n match(input,68,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getComponentAccess().getRightCurlyBracketKeyword_7()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Service__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2960:1: ( ( '}' ) )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2961:1: ( '}' )\n {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2961:1: ( '}' )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2962:1: '}'\n {\n before(grammarAccess.getServiceAccess().getRightCurlyBracketKeyword_4()); \n match(input,33,FOLLOW_33_in_rule__Service__Group__4__Impl5975); \n after(grammarAccess.getServiceAccess().getRightCurlyBracketKeyword_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Component__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:4150:1: ( rule__Component__Group__4__Impl )\n // InternalMyDsl.g:4151:2: rule__Component__Group__4__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Component__Group__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the fixture for this Course Of Action test case. | @Override
protected CourseOfAction getFixture() {
return (CourseOfAction)fixture;
} | [
"@Override\n\tprotected TestIdentityAction getFixture() {\n\t\treturn (TestIdentityAction)fixture;\n\t}",
"@Override\n\tprotected CompositeActivityAction getFixture() {\n\t\treturn (CompositeActivityAction) fixture;\n\t}",
"protected Composite getFixture() {\n\t\treturn fixture;\n\t}",
"protected ICooker getFixture() {\n\t\treturn fixture;\n\t}",
"protected Meta getFixture() {\r\n\t\treturn fixture;\r\n\t}",
"protected AbstractExercisePart getFixture() {\n\t\treturn fixture;\n\t}",
"protected ResourceType getFixture() {\n\t\treturn fixture;\n\t}",
"protected StudyInstance getFixture() {\n\t\treturn fixture;\n\t}",
"@Override\n\tprotected uCourses getFixture() {\n\t\treturn (uCourses)fixture;\n\t}",
"private ActividadAbstracta getFixture() {\r\n\t\treturn (ActividadAbstracta)fixture;\r\n\t}",
"@Override\n\tprotected Action getFixture() {\n\t\treturn (Action)fixture;\n\t}",
"protected SaveParameters getFixture() {\n\t\treturn fixture;\n\t}",
"protected PassiveResource getFixture() {\n\t\treturn fixture;\n\t}",
"protected Role getFixture() {\n\t\treturn fixture;\n\t}",
"protected Diary getFixture() {\n\t\treturn fixture;\n\t}",
"protected SokobanService getFixture() {\n\t\treturn fixture;\n\t}",
"protected Properties getFixture() {\r\n return delegate.fixture;\r\n }",
"protected Bone getFixture() {\r\n\t\treturn fixture;\r\n\t}",
"protected ObjectSlot getFixture() {\n\t\treturn fixture;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method is used for mutating a single individual with a given mutation rate. | public static Individual mutateIndividual(Problem problem, Individual iv, double mutationRate) {
Random r = new Random();
int muteDie = r.nextInt(100);
Individual mutatedIv = new Individual(problem);
mutationRate = mutationRate*100;
//if the mutation die is smaller than the mutation rate, apply mutation; otherwise leave as it is.
if(muteDie < mutationRate) {
int mutationIndex = r.nextInt(iv.getChromosome().size());
ArrayList<Base> mutatedChromosome = mutateGene(problem, iv.getChromosome(), mutationIndex);
mutatedIv.setChromosome(mutatedChromosome);
}
else {
mutatedIv = iv;
}
return mutatedIv;
} | [
"public void mutate(double mutationRate) {\n\t\t// chose a weight to mutate\n\t\tint MUTATED_WEIGHT = (int)(Math.random() * NUM_WEIGHTS);\n\t\tif (Math.random() < mutationRate) {\n\t\t\tif (MUTATED_WEIGHT == 1) { // picked weight is linesCleared\n\t\t\t\tthis.weights[MUTATED_WEIGHT] = (10)*Math.random(); \n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.weights[MUTATED_WEIGHT] = (-10)*Math.random();\n\t\t\t}\n\t\t}\n\t}",
"public void setMutationRate(double rate) { this.exec = this.exec.withProperty(\"svum.rate\", rate); }",
"@Override\n\tpublic void mutate() {\n\t\tthis.mutate.randomize(this.getGenes());\n\t}",
"public void setSmartMutationRate(double rate) { this.exec = this.exec.withProperty(\"sm.rate\", rate); }",
"public void setMutation(double newMutation) {\n\t\tthis.MUTATION_RATE = newMutation;\n\t}",
"public void mutate() {\n\t\t\tfor (int i = 0; i < genes.length; i++) {\n\t\t\t\tif (rand.nextDouble() < mutationChance)\n\t\t\t\t\tthis.genes[i] = rand.nextDouble();\n\t\t\t}\n\t\t}",
"public void mutate() {\n\t\tdouble mutateChance = myMutationRate * 100;\n\t\t\n\t\t// Add new Char at random location in current Gene String.\n\t\tint randomAdd = RAND.nextInt(100) + 1;\n\t\tif (randomAdd <= mutateChance) {\n\n\t\t\tint size = myGeneString.size();\n\t\t\tint randomSpot = RAND.nextInt(size + 1);\n\t\t\tint randomCharSelect = RAND.nextInt(GENE_POOL.size());\n\t\t\tmyGeneString.add(randomSpot, GENE_POOL.get(randomCharSelect));\n\t\t}\n\t\t\n\t\t// Randomly selects an index, and deletes char at index.\n\t\tint randomDel = RAND.nextInt(100) + 1;\n\t\tif (randomDel <= mutateChance && myGeneString.size() > 0) {\n\t\t\tint randomSelect = RAND.nextInt(myGeneString.size());\n\t\t\t\n\t\t\tmyGeneString.remove(randomSelect);\n\t\t}\n\t\t\n\t\t// Changes a random element to a new char.\n\t\tfor(int i = 0; i < myGeneString.size(); i++){\n\t\t\tint randomChange = RAND.nextInt(100) + 1;\n\t\t\tif (randomChange <= mutateChance && myGeneString.size() > 0) {\n\t\t\t\tint randomSelect = RAND.nextInt(myGeneString.size());\n\t\t\t\tint randomNewChar = RAND.nextInt(GENE_POOL.size());\n\n\t\t\t\tmyGeneString.set(randomSelect, GENE_POOL.get(randomNewChar));\n\t\t\t}\n\t\t}\n\t\tmyFitness = fitness();\n\t}",
"public Unit mutate(Unit u) {\r\n\r\n\t\tRandom rand = new Random();\r\n\t\tif (rand.nextInt(100) < unitMutationRate) {\r\n\t\t\tString genome = \"\";\r\n\t\t\tfor (int i = 0; i < genomeSize; i++) {\r\n\t\t\t\tgenome += rand.nextInt(100) < geneMutationRate ? alphabet.charAt(rand.nextInt(alphabet.length()))\r\n\t\t\t\t\t\t: u.getGenome().charAt(i);\r\n\t\t\t}\r\n\r\n\t\t\treturn new Unit(genome, calculateFitness(genome));\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\treturn u;\r\n\t}",
"private void mutationOneBit(Individual individual)\r\n\t{\r\n\t\tint point1,temp;\r\n\t\tint len=individual.getLength();\r\n\t\t\r\n\t\t//randomly select one points in the chromosome\r\n\t\tpoint1=RandomSingleton.getInstance().nextInt(len);\r\n\r\n\t\ttemp=1-Integer.parseInt((String)individual.getGene(point1)) ;\r\n\t\tindividual.setGene(point1,Integer.toString(temp));\r\n\t}",
"private void hyperMutation() {\n\t\t\n\t\tdouble tau = 3.476 * (population.length-1);\n\t\t// We leave the best individual intact, so we begin with 1\n\t\tfor (int index = 1; index < clonedPopulation.length; index++) {\n\t\t\tAntibody currentAntibody = clonedPopulation[index];\n\t\t\tint rank = clonedPopulationRanks[index]-1;\n\t\t\tint mutations = (int)(1+225*0.25* (1-Math.exp(-rank/tau))+0.5);\n\t\t\tcurrentAntibody.hyperMutate(mutations, rand);\n\t\t}\n\t\t\n\t}",
"private void mutationMultiBit(Individual individual)\r\n\t{\r\n\t\tint point1,point2,temp;\r\n\t\tint len=individual.getLength();\r\n\t\t\r\n\t\t//randomly select one points in the chromosome\r\n\t\tpoint1=RandomSingleton.getInstance().nextInt(len);\r\n\t\tdo \r\n\t\t{\r\n\t\t\tpoint2=RandomSingleton.getInstance().nextInt(len);\r\n\t\t}while (point1==point2);\r\n\t\t//point1 should be smaller than point2\r\n\t\tif(point1>point2)\r\n\t\t{\r\n\t\t\ttemp=point1;\r\n\t\t\tpoint1=point2;\r\n\t\t\tpoint2=temp;\r\n\t\t}\r\n\r\n\t\tfor (int i=point1;i<=point2;i++)\r\n\t\t{\r\n\t\t\ttemp=Integer.parseInt((String)individual.getGene(i));\r\n\t\t\ttemp=1-temp;\r\n\t\t\tindividual.setGene(i,Integer.toString(temp));\r\n\t\t}\r\n\t}",
"public void mutate(AbstractEAIndividual individual) {\n if (individual instanceof InterfaceGIIndividual) {\n int[] x = ((InterfaceGIIndividual)individual).getIGenotype();\n int[][] range = ((InterfaceGIIndividual)individual).getIntRange();\n int mutInd, mut;\n double mutate;\n for (int k = 0; k < this.m_NumberOfMutations; k++) {\n mutInd = RNG.randomInt(0, x.length-1);\n mutate = RNG.gaussianDouble(this.m_StepSize);\n mutate = mutate * (range[mutInd][1] - range[mutInd][1]);\n mut = (int)Math.round(mutate);\n if (mut == 0) {\n if (RNG.flipCoin(0.5)) mut = -1;\n else mut = 1;\n }\n x[mutInd] += mut;\n if (x[mutInd] < range[mutInd][0]) x[mutInd] = range[mutInd][0];\n if (x[mutInd] > range[mutInd][1]) x[mutInd] = range[mutInd][1];\n }\n ((InterfaceGIIndividual)individual).SetIGenotype(x);\n }\n }",
"T mutateValue(T valueToMutate, float mutationAmount, RandomSequence randomSequence);",
"public void mutate() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutate = rand.nextInt(4);\n\t\t\twhile (mutate == 0) {\n\t\t\t\tmutateHelper();\n\t\t\t\tmutate = rand.nextInt(4);\n\t\t\t}\n\t\t}\n\t}",
"private void mutate(Pair<Integer, Integer> shape){\n \r\n if(random.nextDouble() <= mutationRate){\r\n //mutate length by + or - 1\r\n shape.var1+= random.nextBoolean() ? 1 : -1;\r\n }\r\n \r\n if(random.nextDouble() <= mutationRate){\r\n //mutate position by + or - 1\r\n shape.var2+= random.nextBoolean() ? 1 : -1;\r\n }\r\n }",
"public void mutate(double rate, double severity) {\n\t\t// make a new random number generator\n\t\tRandom r = new Random();\n\n\t\t// make the percent point function that converts severity, this will map\n\t\t// anything given to the pdf of y/(E^y - 1))*E^(x*y), which is a proper\n\t\t// pdf from 0 to 1 with increasing probability in the 1 range with\n\t\t// increasing severity, and increasing probability in the 0 range with\n\t\t// decreasing severity\n\t\tFunction<Double, Double> ppf = d -> Math.log(1 - d + Math.exp(severity) * d) / severity;\n\n\t\t// check if severity is 0, in that case use the limit of the function as\n\t\t// it is discontinuous.\n\t\tif (severity == 0)\n\t\t\tppf = d -> d;\n\n\t\t// loop through each of the genes and determine if it should be mutated\n\t\tfor (G g : genes) {\n\n\t\t\t// determine if it is mutated\n\t\t\tif (r.nextDouble() < rate) {\n\t\t\t\t// if so mutate with a randomly generated mutation rate\n\t\t\t\tdouble m = r.nextDouble();\n\t\t\t\tdouble s = ppf.apply(m);\n\t\t\t\t\n\t\t\t\tg.mutate(s);\n\n\t\t\t}\n\n\t\t}\n\t}",
"private static void mutate (Trip trip) {\n // Loop through trip cities\n for(int tripPos1 = 0; tripPos1 < trip.tripSize(); tripPos1++){\n // Apply mutation rate\n if(Math.random() < mutationRate){\n // Get a second random position in the trip\n int tripPos2 = (int) (trip.tripSize() * Math.random());\n\n // Get the cities at target position in trip\n City city1 = trip.getCity(tripPos1);\n City city2 = trip.getCity(tripPos2);\n\n // Swap them around\n trip.setCity(tripPos2, city1);\n trip.setCity(tripPos1, city2);\n }\n }\n }",
"public double getMutationRate() {\n\t\treturn MUTATION_RATE;\n\t}",
"public void mutate(float p)\n {\n int regCount = this.registers.size();\n\n /**\n * Parameter mutation replace parameters by random terminals\n */\n for (int i = 0; i < registers.size(); i++)\n {\n LinearRegister reg = this.registers.get(i);\n \n if (1 - GPRunner.RANDOM.nextFloat() <= p)\n {\n if (reg.parameters.length == 0)\n {\n /**\n * Mutate whole register\n */\n this.registers.set(i, randomRegister());\n }\n else\n {\n int parameter = GPRunner.RANDOM\n .nextInt(reg.parameters.length + 1);\n \n if (parameter >= reg.parameters.length)\n {\n /**\n * Mutate whole register\n */\n this.registers.set(i, randomRegister());\n }\n else\n {\n /**\n * Mutate parameter\n */\n reg.parameters[parameter] = randomTerminal();\n }\n }\n }\n }\n\n /**\n * Mutate output register\n */\n\t\t// if(1 - Register.RANDOM.nextFloat() <= p)\n // {\n // this.outputRegister = Register.RANDOM.nextInt(registers.size());\n // }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
capture the output of a provided code into the file with provided artifact name. only one capture code will run at a time in multithreading environment | public void capture(String textFileNameWithoutExtension, ConsoleOutputGeneratingCode codeToProduceOutput) {
capture(textFileNameWithoutExtension, () -> {
codeToProduceOutput.runAndGenerate();
return null;
});
} | [
"public <R> R capture(String textFileNameWithoutExtension, ConsoleOutputGeneratingCodeWithReturn<R> codeToProduceOutput) {\n WebTauStep step = WebTauStep.createStep(\n tokenizedMessage().action(\"capturing\").classifier(\"console output\")\n .action(\"documentation artifact\").id(textFileNameWithoutExtension),\n (pathAndResult) -> tokenizedMessage().action(\"captured\").classifier(\"console output\")\n .action(\"documentation artifact\").id(textFileNameWithoutExtension).colon()\n .url(((PathAndStepResult<?>)pathAndResult).artifactPath.toAbsolutePath()),\n () -> captureStep(textFileNameWithoutExtension, codeToProduceOutput));\n\n PathAndStepResult<R> pathAndResult = step.execute(StepReportOptions.REPORT_ALL);\n return pathAndResult.result;\n }",
"void captureFrameToFile() {\n vuforia.getFrameOnce(\n Continuation.create(\n ThreadPool.getDefault(),\n new Consumer<Frame>() {\n\n @Override\n public void accept(Frame frame) {\n Bitmap bitmap = vuforia.convertFrameToBitmap(frame);\n if (bitmap != null) {\n File file = new File(\n captureDirectory,\n String.format(\n Locale.getDefault(),\n \"VuforiaFrame-%d.png\",\n captureCounter++\n )\n );\n try {\n FileOutputStream outputStream = new FileOutputStream(file);\n try {\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream);\n } finally {\n outputStream.close();\n telemetry.log().add(\"captured %s\", file.getName());\n }\n } catch (IOException e) {\n RobotLog.ee(TAG, e, \"exception in captureFrameToFile()\");\n }\n }\n }\n }\n )\n );\n }",
"public void run() {\n\t\t\n\t\ttry {\n\t\t\t// Open output file for writing\n\t\t\tFile outputFile = new File(Compiler.cmdLineArgValue(\"--dst-file-name\"));\n\t\t\tBufferedWriter output = new BufferedWriter(new FileWriter(outputFile));\n\n\t\t\t// Generate BOOTSTRAP code and write it to file\n\t\t\tfor (String instruction : generateBootstrapRoutine())\n\t\t\t\toutput.write(instruction + \"\\n\");\n\n\t\t\t// Generate STANDARD LIBRARY and write it to file\n\t\t\tfor (String instruction : generateStandardLibrary())\n\t\t\t\toutput.write(instruction + \"\\n\");\n\n\t\t\t// Generate PROLOGUE and EPILOGUE for each function and write it to\n\t\t\t// file\n\t\t\tfor (String instruction : generateCode())\n\t\t\t\toutput.write(instruction + \"\\n\");\n\n\t\t\toutput.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"private static void writeArtifact(String file_name) throws IOException {\n\n\t\tFile file = new File(file_name);\n\t\tif (!file.exists()) {\n\t\t\tFiles.copy(Paths.get(DOC_DUMMY_FILE), Paths.get(file_name));\n\t\t}\n\t}",
"public static String _fc_newstream(String _dir1,String _filename) throws Exception{\nanywheresoftware.b4a.keywords.Common.File.Copy(_dir1,_filename,_dir1,_filename+\".apk\");\n //BA.debugLineNum = 581;BA.debugLine=\"FileName=FileName&\\\".apk\\\"\";\n_filename = _filename+\".apk\";\n //BA.debugLineNum = 582;BA.debugLine=\"Log(FileName)\";\nanywheresoftware.b4a.keywords.Common.Log(_filename);\n //BA.debugLineNum = 583;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public void run() {\n\t\t\t\tif (!SettingsUtil.getShouldProcessHarsOnServer(getBaseContext())) {\n\t\t\t\t\tFile harFile = new File(SettingsUtil.getJobBasePath(getBaseContext()) + \"results.har\");\n\t\t\t\t\tWriteHarToFile(harFile);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Now that we have the JSON, we need to get the proper screenshots\n\t\t\t\tfor (Run run : currentJob.getResult().getRuns()) {\n\t\t\t\t\tsaveDocumentCompleteScreenshot(run);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Now create the avisynth files\n\t\t\t\tfor (Run run : currentJob.getResult().getRuns()) {\n\t\t\t\t\tLog.i(BZ_AGENT, \"Creating Avisynth file for run: \" + run.getIdentifier());\n\t\t\t\t\tAVSUtil.createAvisynthFile(run, run.getVideoFolder(), SettingsUtil.getFps(getBaseContext()));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tcompletePackageAndShip();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}",
"public void captureNoStep(String textFileNameWithoutExtension, ConsoleOutputGeneratingCode codeToProduceOutput) {\n captureStep(textFileNameWithoutExtension, () -> {\n codeToProduceOutput.runAndGenerate();\n return null;\n });\n }",
"private synchronized void recordImage()\n {\n String prefix = \"out_\";\n String outFilePath = outputFolder + \"\\\\\";\n outFilePath += prefix + \"R\" + regionCurrentVar + \"_\" + iteration + \".png\" ;\n\n if (Constants.DEBUG) {\n System.out.println(\"output: \" + outFilePath);\n }\n\n BufferedImage image = Main.getInstance().getCameraImagePanel().getImage();\n File outputFile = new File(outFilePath);\n String formatName = \"png\";\n\n\n if (image != null) {\n try {\n ImageIO.write(image, formatName, outputFile);\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"private static void record (final String outFileName, final String... command) throws IOException {\r\n\t\tstdout.printf (\"Recoding: %s\\t\", String.join (\" \", command));\r\n\t\tFile out = new File (DIR, outFileName);\r\n\t\ttry {\r\n\t\t\tnew ProcessBuilder(command)\r\n\t\t\t\t.directory (DIR)\r\n\t\t\t\t.redirectErrorStream (true)\r\n\t\t\t\t.redirectOutput (out)\r\n\t\t\t\t.start()\r\n\t\t\t\t.waitFor ();\r\n\t\t} catch (InterruptedException e) { /* ignore */ }\r\n\t\tstdout.println (\"(Done)\");\r\n\t}",
"public String downloadJobOutputFile(String filePath) throws Exception;",
"public void getScreenCapture(String name) {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tSimpleDateFormat formater = new SimpleDateFormat(\"dd_MM_yyyy_hh_mm_ss\");\n\n\t\ttry {\n\t\t\tFile srcFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n\n\t\t\tString reportDirectory = new File(System.getProperty(\"user.dir\")).getAbsolutePath()\n\t\t\t\t\t+ \"/src/main/java/com/pagefactory/framework/screenshot/\";\n\t\t\tFile destFile = new File(\n\t\t\t\t\t(String) reportDirectory + name + \"_\" + formater.format(calendar.getTime()) + \".png\");\n\t\t\tFileUtils.copyFile(srcFile, destFile);\n\t\t\tReporter.log(\"<a href='\" + destFile.getAbsolutePath() + \"'><img src='\" + destFile.getAbsolutePath()\n\t\t\t\t\t+ \"' height='100' width='100'/> </a\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"String getFileOutput();",
"private void \n doShowArchiveOutput\n (\n String aname\n )\n {\n GetArchivedOutputTask task = new GetArchivedOutputTask(aname);\n task.start();\n }",
"private void writeCode(String code) {\r\n try {\r\n asmFile.write(code);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.exit(1);\r\n }\r\n }",
"@Override\n\tpublic void processAndStore(ImageProcessingRecipe recipe,String outputFileName) {\n\t\tRenderedOp image = recipe.getRecipeAsJaiRenderedOp();\n\t\t\n\t\ttry {\n\t\t\tImageIO.write(image, \"tif\", new File(outputFileName));\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t\n\t\t/*\n\t\tParameterBlock pbS = new ParameterBlock();\n\t\tpbS.addSource(image);\n\t\tpbS.add(outputFileName);\n\t\tJAI.create(\"filestore\", outputFileName, image);\n\t\t*/\n\t\t\n\t}",
"public String getOutput(){\r\n // add assembly code to outputFile\r\n outputFile.append(assemblyCode.getOutputFile());\r\n \r\n // add a line spaces so the reader of the output file can determine\r\n // that a new assembly code sequence has started\r\n outputFile.append(System.lineSeparator());\r\n outputFile.append(\"************\");\r\n outputFile.append(System.lineSeparator());\r\n \r\n // return outputFile to a String\r\n return outputFile.toString();\r\n }",
"private void writeAnnotationFile() {\n \n if (!currentScenario.hasStepAnnotations()) {\n return;\n }\n currentScenario.setNameVideoFile(videoOutputFile.getName());\n\n try {\n currentScenario.setSha1ChecksumVideo(Helper.calcSha1Checksum(videoOutputFile));\n annotationExporter.write(currentScenario);\n } catch (Exception e) {\n throw new WebServiceException(\"Could not write Annotation-Outputfile: \"\n + e.getMessage());\n } finally {\n currentScenario = null;\n }\n\n\n }",
"public void testTailBuildOutput()\n throws InterruptedException\n {\n showProjectGroup( projectGroupName, projectGroupId, projectGroupDescription );\n clickAndWait( \"css=img[alt=\\\"Build Now\\\"]\" );\n\n // Wait on group page until updating icon (normally immediately after clicking build)\n waitForElementPresent( \"xpath=(//img[@alt='Updating'])[2]\" );\n clickAndWait( \"link=\" + projectName );\n clickAndWait( \"link=Builds\" );\n\n // Matches and clicks first result\n clickAndWait( \"css=img[alt=\\\"Building\\\"]\" );\n\n assertPage( \"Continuum - Build result\" );\n assertElementPresent( \"css=img[alt=\\\"Building\\\"]\" ); // confirm build is still in progress\n assertElementPresent( \"id=outputArea\" ); // confirm text area is in page\n assertText( \"id=outputArea\", \".*Sleeping[.][.][.].*\" ); // wait for conditions that should stream in\n assertText( \"id=outputArea\", \".*Woke Up[.].*\" );\n assertText( \"id=outputArea\", \".*BUILD SUCCESS.*\" );\n\n waitForElementPresent( \"css=img[alt=\\\"Success\\\"]\" ); // Verifies page is reloaded on completion\n assertElementPresent( \"link=Surefire Report\" ); // Check that the surefire link is present too\n }",
"private void outputProcessedCode() {\n\t\tif (isProcessed()) {\n\t\t\tgetLauncher().prettyprint();\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column pojo_type_json.type_desc | public String getTypeDesc() {
return typeDesc;
} | [
"public String getTypeDesc() {\r\n return typeDesc;\r\n }",
"public String getTypeJson() {\n return typeJson;\n }",
"public String getTypedesc() {\r\n\t\treturn typedesc;\r\n\t}",
"String getJsonType();",
"public String getData_type_desc() {\n return data_type_desc;\n }",
"String getTypeDescription();",
"public DescriptionType getDescriptionType();",
"public DescriptionType descriptionType() {\n return this.descriptionType;\n }",
"public String description() {\n return type.description();\n }",
"public DescriptionType getType() {\n return this.type;\n }",
"public String getCustTypeDesc() {\n return (String)getAttributeInternal(CUSTTYPEDESC);\n }",
"private static JType getType(JCodeModel jCodeModel, String type) {\r\n if (type.equals(\"short\")) {\r\n return jCodeModel.SHORT;\r\n } else if (type.equals(\"int\")) {\r\n return jCodeModel.INT;\r\n } else if (type.equals(\"long\")) {\r\n return jCodeModel.LONG;\r\n } else if (type.equals(\"char\")) {\r\n return jCodeModel.CHAR;\r\n } else if (type.equals(\"boolean\")) {\r\n return jCodeModel.BOOLEAN;\r\n } else if (type.equals(\"double\")) {\r\n return jCodeModel.DOUBLE;\r\n } else if (type.equals(\"float\")) {\r\n return jCodeModel.FLOAT;\r\n } else if (type.equals(\"String\")) {\r\n return jCodeModel.ref(String.class);\r\n } else if (type.equals(\"Short\")) {\r\n return jCodeModel.ref(Short.class);\r\n } else if (type.equals(\"Integer\")) {\r\n return jCodeModel.ref(Integer.class);\r\n } else if (type.equals(\"Long\")) {\r\n return jCodeModel.ref(Long.class);\r\n } else if (type.equals(\"Date\")) {\r\n return jCodeModel.ref(java.util.Date.class);\r\n } else if (type.equals(\"sqlDate\")) {\r\n return jCodeModel.ref(java.sql.Date.class);\r\n } else if (type.equals(\"Character\")) {\r\n return jCodeModel.ref(Character.class);\r\n } else if (type.equals(\"Boolean\")) {\r\n return jCodeModel.ref(Boolean.class);\r\n } else if (type.equals(\"Double\")) {\r\n return jCodeModel.ref(Double.class);\r\n } else if (type.equals(\"Float\")) {\r\n return jCodeModel.ref(Float.class);\r\n } else if (type.equals(\"Unsigned32\")) {\r\n return jCodeModel.LONG;\r\n } else if (type.equals(\"Unsigned64\")) {\r\n return jCodeModel.LONG;\r\n } else if (type.equals(\"Integer32\")) {\r\n return jCodeModel.INT;\r\n } else if (type.equals(\"Integer64\")) {\r\n return jCodeModel.LONG;\r\n } else if (type.equals(\"Enumerated\")) {\r\n return jCodeModel.INT;\r\n } else if (type.equals(\"Float32\")) {\r\n return jCodeModel.FLOAT;\r\n } else if (type.equals(\"Float64\")) {\r\n return jCodeModel.DOUBLE;\r\n } else {\r\n return null;\r\n }\r\n }",
"public void setTypeDesc(String typeDesc) {\r\n this.typeDesc = typeDesc;\r\n }",
"public String getJavaType() {\n return javaType;\n }",
"@Schema(description = \"The data type of the application property.\")\n public String getType() {\n return type;\n }",
"@Schema(description = \"Type of user attribute (\\\"string\\\", \\\"number\\\", \\\"datetime\\\", \\\"yesno\\\", \\\"zipcode\\\")\")\n public String getType() {\n return type;\n }",
"public java.lang.String getDescription() {\n return _typeKeyImplManager.getTypeKeyImpl().getDescription();\n }",
"public String get_out_type_desc()\n\t{\n\t\treturn out_type_desc;\n\t}",
"String getSchemaType();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write X series device EEPROM data Check D2xx Programmer's Guide Appendix A for details | public void writeEEPROM_X(EepromX eeprom) throws FTD2XXException {
String manufacturer = eeprom.getManufacturer();
Memory mManufacturer = new Memory(manufacturer.length() + 1);
mManufacturer.setString(0, manufacturer);
String manufacturerId = eeprom.getManufacturerId();
Memory mManufacturerId = new Memory(manufacturerId.length() + 1);
mManufacturerId.setString(0, manufacturerId);
String description = eeprom.getDescription();
Memory mDescription = new Memory(description.length() + 1);
mDescription.setString(0, description);
String serialNumber = eeprom.getSerialNumber();
Memory mSerialNumber = new Memory(serialNumber.length() + 1);
mSerialNumber.setString(0, serialNumber);
ensureFTStatus(ftd2xx
.FT_EEPROM_Program(ftHandle, eeprom.eeprom, eeprom.eeprom.size(), mManufacturer, mManufacturerId,
mDescription, mSerialNumber));
devSerialNumber = serialNumber;
devDescription = description;
} | [
"public void writeEEPROMUserArea(byte[] data) throws FTD2XXException {\n Memory source = new Memory(data.length);\n source.write(0, data, 0, data.length);\n ensureFTStatus(ftd2xx.FT_EE_UAWrite(ftHandle, source, data.length));\n }",
"void writeEeprom(ImuEepromWriter sensor, int scaleNo, short[] data);",
"public void writeEEPROM(EEPROMData programData) throws FTD2XXException {\n ensureFTStatus(ftd2xx.FT_EE_Program(ftHandle, programData.ft_program_data));\n }",
"public static void EEPROM_write(int bit)\n {\n\n\n if (serial_count >= SERIAL_BUFFER_LENGTH-1)\n {\n/*TODO*/// if (eepromlog!=null) fprintf(eepromlog,\"error: EEPROM serial buffer overflow\\n\");\n return;\n }\n\n serial_buffer[serial_count++] = (bit!=0 ? '1' : '0');\n serial_buffer[serial_count] ='\\0';\t/* nul terminate so we can treat it as a string */\n\n/*TODO*/// if (eepromlog!=null) fprintf(eepromlog,\"EEPROM write bit, buffer = \" + new String(serial_buffer)+\"\\n\");\n/*TODO*/// if (eepromlog!=null) fprintf(eepromlog,\"EEPROM write bit, serial_count = %d\\n\",serial_count);\n if ((intf.cmd_read!=null) \n && (serial_count == (strlen(intf.cmd_read) + intf.address_bits))\n && !strncmp(serial_buffer,intf.cmd_read,strlen(intf.cmd_read)))\n {\n int i,address;\n address = 0;\n for (i = 0;i < intf.address_bits;i++)\n {\n address <<= 1;\n if (serial_buffer[i + strlen(intf.cmd_read)] == '1') address |= 1;\n }\n if (intf.data_bits == 16)\n eeprom_data_bits = (((eeprom_data[2*address+0] << 8)&0xFF) + ((eeprom_data[2*address+1])&0xFF));\n else\n eeprom_data_bits = eeprom_data[address] &0xFF;\n sending = 1;\n serial_count = 0;\n/*TODO*/// if (eepromlog!=null) fprintf(eepromlog,\"EEPROM read %04x from address %02x\\n\",eeprom_data_bits,address);\n }\n else if (intf.cmd_erase!=null && serial_count == (strlen(intf.cmd_erase) + intf.address_bits) &&\n !strncmp(serial_buffer,intf.cmd_erase,strlen(intf.cmd_erase)))\n {\n int i,address;\n\n address = 0;\n for (i = 0;i < intf.address_bits;i++)\n {\n address <<= 1;\n if (serial_buffer[i + strlen(intf.cmd_erase)] == '1') address |= 1;\n }\n/*TODO*/// if (eepromlog!=null) fprintf(eepromlog,\"EEPROM erase address %02x\\n\",address);\n if (locked == 0)\n {\n if (intf.data_bits == 16)\n {\n eeprom_data[2*address+0] = 0x00;\n eeprom_data[2*address+1] = 0x00;\n }\n else\n eeprom_data[address] = 0x00;\n }\n else\n {\n/*TODO*/// if (eepromlog!=null) fprintf(eepromlog,\"Error: EEPROM is locked\\n\");\n serial_count = 0;\n }\n }\n else if (intf.cmd_write!=null && serial_count == (strlen(intf.cmd_write) + intf.address_bits + intf.data_bits) &&\n !strncmp(serial_buffer,intf.cmd_write,strlen(intf.cmd_write)))\n {\n int i,address,data;\n\n address = 0;\n for (i = 0;i < intf.address_bits;i++)\n {\n address <<= 1;\n if (serial_buffer[i + strlen(intf.cmd_write)] == '1') address |= 1;\n }\n data = 0;\n for (i = 0;i < intf.data_bits;i++)\n {\n data <<= 1;\n if (serial_buffer[i + strlen(intf.cmd_write) + intf.address_bits] == '1') data |= 1;\n }\n/*TODO*/// if (eepromlog!=null) fprintf(eepromlog,\"EEPROM write %04x to address %02x\\n\",data,address);\n if (locked == 0)\n {\n if (intf.data_bits == 16)\n {\n eeprom_data[2*address+0] = (char)((data >> 8)&0xff);\n eeprom_data[2*address+1] = (char)(data & 0xff);\n }\n else\n eeprom_data[address] = (char)(data&0xff);\n }\n else\n {\n/*TODO*/// if (eepromlog!=null) fprintf(eepromlog,\"Error: EEPROM is locked\\n\");\n serial_count = 0;\n }\n }\n else if (intf.cmd_lock!=null && serial_count == strlen(intf.cmd_lock) &&\n !strncmp(serial_buffer,intf.cmd_lock,strlen(intf.cmd_lock)))\n {\n/*TODO*/// if (eepromlog!=null) fprintf(eepromlog,\"EEPROM lock\\n\");\n locked = 1;\n serial_count = 0;\n }\n else if (intf.cmd_unlock!=null && serial_count == strlen(intf.cmd_unlock) &&\n !strncmp(serial_buffer,intf.cmd_unlock,strlen(intf.cmd_unlock)))\n {\n/*TODO*/// if (eepromlog!=null) fprintf(eepromlog,\"EEPROM unlock\\n\");\n locked = 0;\n serial_count = 0;\n }\n }",
"public void writeEEPROMUserArea(String data) throws FTD2XXException {\n Memory source = new Memory(data.length());\n source.setString(0, data);\n ensureFTStatus(ftd2xx.FT_EE_UAWrite(ftHandle, source, data.length()));\n }",
"public EepromX readEEPROM_X() throws FTD2XXException {\n EepromX eeprom = new EepromX();\n Memory manufacturer = new Memory(64);\n Memory manufacturerId = new Memory(64);\n Memory description = new Memory(64);\n Memory serialNumber = new Memory(64);\n\n Memory mem = new Memory(56);\n mem.setInt(0, 9);\n\n ensureFTStatus(ftd2xx\n .FT_EEPROM_Read(ftHandle, eeprom.eeprom, eeprom.eeprom.size(), manufacturer, manufacturerId, description,\n serialNumber));\n\n eeprom.setManufacturer(manufacturer.getString(0));\n eeprom.setManufacturerId(manufacturerId.getString(0));\n devDescription = description.getString(0);\n eeprom.setDescription(devDescription);\n devSerialNumber = serialNumber.getString(0);\n eeprom.setSerialNumber(devSerialNumber);\n\n return eeprom;\n }",
"int serial_write(urg_serial_t serial, String data, int size);",
"public int write(byte[] wbuf) throws SdkException {\n int ret =SdkNative.native_serial_write(mSerialHandle, wbuf, wbuf.length);\n if(ret<0){\n throw new SdkException(ret);\n }\n return ret;\n }",
"void writeToReservedAddress(DRAMAddress address, DRAMData data);",
"@Override\n public void writeToCharacteristic(byte[] dataBlock) {\n _btGattCharacteristic.setValue(dataBlock);\n _btGatt.writeCharacteristic(_btGattCharacteristic);\n // FOR DEBUGGING:\n System.out.println(\"Data written to characteristic:\");\n System.out.println(dataBlock[0] + \" \" + dataBlock[1]);\n }",
"void write (REGISTER register, byte[] data);",
"public void commitFirmware()\n {\n //There are apparently two ways to do this...\n //send(\"W20000840,00000006#W20000844,00000000#W20000848,00000001#W2000084C,00000001#\");\n //Lets stick with these magic numbers for today.\n send(\"#\\r\\nW400E0A04,5A00010B#\");\n }",
"public void write(byte[] command) {\n for (int i = 0; i < command.length; i++) {\r\n try {\r\n serial.write(command[i]);\r\n } catch (Exception e) {\r\n Logging.logError(e);\r\n }\r\n\r\n }\r\n }",
"public EEPROMData readEEPROM() throws FTD2XXException {\n FTD2XX.FT_PROGRAM_DATA.ByReference ftByReference = new FTD2XX.FT_PROGRAM_DATA.ByReference();\n ensureFTStatus(ftd2xx.FT_EE_Read(ftHandle, ftByReference));\n return new EEPROMData(ftByReference);\n }",
"void writeCalibrationData(byte[] data);",
"public void write ( byte[] byteArray, \n\t\t int start, int cnt ) throws DevIOException {\n int returnCode = _write( _fileDescrip, byteArray, start, cnt );\n\n if( returnCode != cnt ) {\n if (returnCode == -666) // EOM check\n\tthrow new DevIOException(\"EOM detected during write\", 666);\n else\n\tthrow new DevIOException(\"write failed\");\n // _e.get(\"20\" + Integer.toString(returnCode)),returnCode);\n } \n }",
"private synchronized void writeOperation() {\n if (dataIn[0] == CMD_EAU) {\n \t logP.fine(\"erase all unprotected\");\n \n eraseAllUnprotected();\n \n return;\n }\n \n //now let's check the WCC for bit 0\n if ((dataIn[1] & 0x01) != 0) {\n //Bit 7 is set to 1, reset all modified bits\n \t logP.fine(\"reset MDT\");\n \n resetMDT();\n lastWasCommand = true;\n }\n \n switch (dataIn[0]) {\n case CMD_EW:\n case CMD_EWA:\n \n //System.err.println(\"Erase Write...\");\n lastWasCommand = true;\n eraseWrite();\n \n break;\n \n case CMD_W:\n \n //System.err.println(\"Write...\");\n lastWasCommand = true;\n write();\n \n break;\n }\n \n //check the post-operation functions in the WCC\n if ((dataIn[1] & 0x04) != 0) {\n //Bit 5 is set to 1\n beep();\n }\n \n if ((dataIn[1] & 0x02) != 0) {\n //Bit 2 is set to 1\n rw.unlockKeyboard();\n client.status(RWTnAction.READY);\n }\n }",
"public boolean write(BluetoothGattCharacteristic characteristic, byte[] payload, boolean withEOD) {\n Log.v(TAG, String.format(\"write called: device=%s base64=%s value=%s length=%d characteristicUUID=%s\", getMACAddress(), Base64.encodeToString(payload, Base64.DEFAULT), BleDriver.bytesToHex(payload), payload.length, characteristic.getUuid()));\n\n if (!isClientConnected()) {\n Log.e(TAG, \"write error: device not connected\");\n return false;\n }\n\n int minOffset = 0;\n int maxOffset;\n\n // Send data to fit with MTU value\n while (minOffset != payload.length) {\n maxOffset = minOffset + getMtu() - GattServer.ATT_HEADER_SIZE > payload.length ? payload.length : minOffset + getMtu() - GattServer.ATT_HEADER_SIZE;\n final byte[] toWrite = Arrays.copyOfRange(payload, minOffset, maxOffset);\n minOffset = maxOffset;\n Log.v(TAG, String.format(\"write: data chunk: device=%s base64=%s value=%s length=%d characteristicUUID=%s\", getMACAddress(), Base64.encodeToString(toWrite, Base64.DEFAULT), BleDriver.bytesToHex(toWrite), toWrite.length, characteristic.getUuid()));\n if (!internalWrite(characteristic, toWrite)) {\n Log.e(TAG, String.format(\"write payload failed: device=%s\", getMACAddress()));\n return false;\n }\n }\n\n if (withEOD && !internalWrite(characteristic, EOD.getBytes())) {\n Log.e(TAG, String.format(\"write EOD failed: device=%s\", getMACAddress()));\n return false;\n }\n return true;\n }",
"private void organizeEEPROM() {\n\t \n \n\t //put red, green, blue, and activitity values into r, g, b, and a\n\t for(int i = 0; i < EEPROM.length; i += 8) {\n\t\t r[(i)/8] = 256*EEPROM[i] + EEPROM[i + 1];\n\t\t g[(i)/8] = 256*EEPROM[i + 2] + EEPROM[i + 3];\n\t\t b[(i)/8] = 256*EEPROM[i + 4] + EEPROM[i + 5];\n\t\t a[(i)/8] = 256*EEPROM[i + 6] + EEPROM[i + 7];\n \n\t\t //set resets to zero by default\n\t\t if((r[(i)/8] == 65278) && (b[(i)/8] == 65278) && (g[i/8] == 0)) {\n\t\t\t r[(i)/8] = 0;\n\t\t\t g[(i)/8] = 0;\n\t\t\t b[(i)/8] = 0;\n\t\t\t a[(i)/8] = 0;\n\t\t }\n\t }\n \n\t //get end of address\n\t for(int i = 0; i < EEPROM.length; i += 8) {\n\t\t if((EEPROM[i] == 255) && (EEPROM[i + 1] == 255)) {\n\t\t\t endaddress = i/8;\n\t\t\t break;\n\t\t }\n\t }\n\t if(isnew) {\n\t\t ID = Integer.parseInt(asciiheader[8]);\n\t\t mm = Integer.parseInt(asciiheader[7].substring(0, 2));\n\t\t dd = Integer.parseInt(asciiheader[7].substring(3, 5));\n\t\t yy = Integer.parseInt(asciiheader[7].substring(6, 8));\n\t\t HH = Integer.parseInt(asciiheader[7].substring(9, 11));\n\t\t MM = Integer.parseInt(asciiheader[7].substring(12, 14));\n\t\t period = Integer.parseInt(asciiheader[3]);\n\t\t\t\t \n\t\t if(isUTC) {\n\t\t\t offset = Calendar.get(Calendar.DST_OFFSET) / 3600000;\n\t\t\t //apply offset, but if offset rolls us into a new day, we need to account for that\n\t\t\t if (HH + offset > 23) {\n\t\t\t\t dd += 1;\n\t\t\t\t HH = (HH + offset) % 24;\n\t\t\t\t //if our new day rolls us into a new month, account for that\n\t\t\t\t //30 days have September, April, June, and November\n\t\t\t\t if(dd > 30 && (mm == 9 || mm == 4 || mm == 6 || mm == 11)) {\n\t\t\t\t\t dd = 1;\n\t\t\t\t\t mm += 1;\n\t\t\t\t }\n\t\t\t\t //All the rest have 31, except for February who is a fuckwad.\n\t\t\t\t else if (dd > 31 && !(mm == 9 || mm == 4 || mm == 6 || mm == 11 || mm == 2)) {\n\t\t\t\t\t dd = 1;\n\t\t\t\t\t mm += 1;\n\t\t\t\t }\n\t\t\t\t //If it is February and not a leap year\n\t\t\t\t else if (dd > 28 && (yy%4 != 0)) {\n\t\t\t\t\t dd = 1;\n\t\t\t\t\t mm += 1;\n\t\t\t\t }\n\t\t\t\t //If it is February and a leap year\n\t\t\t\t else if (dd > 29 && (yy%4 == 0)) {\n\t\t\t\t\t dd = 1;\n\t\t\t\t\t mm += 1;\n\t\t\t\t }\n\t\t\t\t //Did we rollover our year doing this?\n\t\t\t\t if (mm > 12) {\n\t\t\t\t\t mm = 1;\n\t\t\t\t\t yy += 1;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t }\n\t\t\t else {\n\t\t\t\t HH = HH + offset;\n\t\t\t }\n\t\t }\n\t }\n\t else {\n\t\t ID = (header[3] - 48)*1000 + (header[4] - 48)*100 + (header[5] - 48)*10 + (header[6] - 48);\n\t\t mm = (header[9] - 48)*10 + (header[10] - 48);\n\t\t dd = (header[12] - 48)*10 + (header[13] - 48);\n\t\t yy = (header[15] - 48)*10 + (header[16] - 48);\n\t\t HH = (header[18] - 48)*10 + (header[19] - 48);\n\t\t MM = (header[21] - 48)*10 + (header[22] - 48);\n\t\t period = (header[25] - 48)*100 + (header[26] - 48)*10 + (header[27] - 48);\n\t }\n \t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if(userPasses.containsKey(username) & userPasses.get(username).equals(password)) return true; | public static boolean checkUserPass(String username, String password){
getCurrentUsers();
if(userPasses.containsKey(username)){
System.out.println("bo");
if (userPasses.get(username).equals(password)){
return true;
}
}
System.out.println(username +"|"+password);
return false;
} | [
"private boolean passMatch (String user, String pass){\n String passFile = users.get(user);\n return passFile.equals(pass);\n }",
"Boolean isValidUserPassword(String username, String password);",
"boolean validateUserAndPassword(String username, String password);",
"private boolean verifyPassword( String username, String password ) {\n String encryptedPassword = encryptClearPassword(password);\n \n if(passwords.containsKey(username)) {\n // Valid username, now check if passwords match\n String actualPassword = passwords.get(username);\n \n return actualPassword.equals(encryptedPassword);\n }\n \n return false;\n }",
"private Boolean passwordsMatch(String password_a, String password_b) {\n \tif(password_a.equals(password_b)) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public Boolean checkPasswordMatch(){\n String pass1 = registerPasswordTextField.getText();//get the password in the first textfield\n String pass2 = retypePasswordTextField.getText();//get the retyped password in the second textfield\n \n if(pass1.equals(pass2)){//if the two entries are equal then return true\n return true;//return treu boolean value\n }else{\n return false;//return false boolean value\n }\n }",
"boolean hasPasswordRequired();",
"boolean isUser(final String username, final String password);",
"public boolean comparePassword(String password);",
"public abstract boolean checkCredentials (String username, String password);",
"boolean isPassword();",
"boolean isMatchPassword(Password toCheck) throws NoUserSelectedException;",
"@Override\r\n\tpublic boolean validatePassword(String hash)\r\n\t{\r\n\r\n\t\tif (hm.containsKey(hash))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Authentication OK.\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Authentication fail.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}",
"private boolean checkCredentials(String username, String password, Customer c) {\n return username.equals(c.getEmail()) && password.equals(c.getPassword());\n }",
"boolean hasPassWord();",
"public boolean comparePassword(String username, String password) {\n boolean matchedPass = false;\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS WHERE USERNAME=? AND PASSWORD=?\");\n ps.setString(1, username);\n ps.setString(2, password);\n\n ResultSet rs = ps.executeQuery();\n\n // rs.next() is not empty if both user and pass are in the same row\n matchedPass = rs.next();\n\n // close stuff\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return matchedPass;\n }",
"public boolean isPasswordValid(String username, String password) throws NoSuchAlgorithmException, SQLException{\n\t\tchar salt = username.charAt(0);\n\t\tString hashWord=encrypt(salt+password);\n\t\tStatement state=con.createStatement();\n\t\trs=state.executeQuery(\"SELECT * FROM users WHERE usernames =\\\"\"+username+\"\\\";\");\n\t\tif(rs.next()) {\n\t\t\tString actualHash = rs.getString(\"passwords\"); \n\t\t\tif (hashWord.equals(actualHash))return true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"boolean authenticatePassword(String username, String password){\n synchronized (salt) {\n return salt.authenticatePassword(username, password);\n }\n }",
"public boolean login(String username, String password) {\n\n if (userMap.containsKey(username)) {\n if (password.equals(userMap.get(username).getPassword())) {\n currentUser = userMap.get(username);\n return true;\n }\n }\n return false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the menu is showing GuiGameOver | boolean isGameOver() {
return getMenu() instanceof ch;
} | [
"boolean isMenuShowing() {\n return game.r != null;\n }",
"private void gameOver() {\r\n\t\t// Create game over dialog and set its position, then show it\r\n\t\tInGameDialog d = new InGameDialog(\"Game Over\", new Skin(\t\t\t\t\t\t\r\n\t\t\t\tGdx.files.internal(\"skins/menuSkin.json\"),\r\n\t\t\t\tnew TextureAtlas(Gdx.files.internal(\"skins/menuSkin.pack\"))), false);\r\n\t\td.pack();\r\n\t\td.setPosition(DropGame.WIDTH/2 - d.getWidth()/2, DropGame.HEIGHT/2 - d.getHeight()/2);\r\n\t\tstage.addActor(d);\r\n\r\n\t\tgameOver = true;\r\n\t\tcheckAchievements();\r\n\t}",
"public boolean isGameOver();",
"private void checkIfGameOver() {\n\t\tboolean gameWon = true, gameLost = true;\n\t\t// Check if any firetrucks are still alive\n\t\tfor (Firetruck firetruck : this.firetrucks) {\n\t\t\tif (firetruck.getHealthBar().getCurrentAmount() > 0) gameLost = false;\n\t\t}\n\t\t// Check if any fortresses are still alive\n\t\tfor (ETFortress ETFortress : this.ETFortresses) {\n\t\t\tif (ETFortress.getHealthBar().getCurrentAmount() > 0) gameWon = false;\n\t\t}\n\t\tif (gameWon || gameLost) {\n\t\t\tdispose();\n\t\t\tthis.game.setScreen(new MainMenuScreen(this.game));\n\t\t}\n\t}",
"protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }",
"public void checkGameOver()\n {\n // Get object reference to world\n SideScrollingWorld world = (SideScrollingWorld) getWorld(); \n\n // Vertical position where hero no longer visible\n int offScreenVerticalPosition = (world.getHeight() + this.getImage().getHeight() / 2);\n\n // Off bottom of screen?\n if (this.getY() > offScreenVerticalPosition)\n {\n // Remove the hero\n isGameOver = true;\n world.setGameOver();\n world.removeObject(this);\n\n // Tell the user game is over\n world.showText(\"GAME OVER\", world.getWidth() / 2, world.getHeight() / 2);\n }\n }",
"private boolean checkGameOver() {\n\t\tboolean singlePlayerWon = otherPlayer.getLife() == 0;\n\t\tboolean otherPlayerWon = singlePlayer.getLife() == 0;\n\n\t\tif (singlePlayerWon || otherPlayerWon) {\n\t\t\tthis.singlePlayer.createEndButton(singlePlayerWon);\n\t\t\tthis.singlePlayer.onGameOver();\n\t\t\tthis.otherPlayer.onGameOver();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }",
"public void checkState(){\n\t\tif (game.getState() == Game.GAMESET){\n \t\t\tdialog.setTitle(\"Player \" + game.switchPlayer() + \" Win\");\n\t\t\tdialog.setModal(true);\n\t\t\tdialog.setVisible(true);\n\t\t} else if (game.getState() == Game.BOARDFULL){\n \t\t\tdialog.setTitle(\"The Board is full\");\n\t\t\tdialog.setModal(true);\n\t\t\tdialog.setVisible(true);\n\t\t}\n\t}",
"private void gameOver() {\n winningHandView.setText(R.string.purse_empty_text);\n betOneButton.setEnabled(false);\n betMaxButton.setEnabled(false);\n dealButton.setEnabled(false);\n drawButton.setEnabled(false);\n }",
"public boolean doesGuiPauseGame()\n {\n return false;\n }",
"public void Menu(){\n\t\t\tfor(GOval p : checkrs){\n\t\t\t\tp.setVisible(false);\n\t\t\t}\n\t\t\tfor(JLabel k : kings){\n\t\t\t\tk.setVisible(false);\n\t\t\t}\n\t\t\tMenu.setVisible(false);\n\t\t\tquit.setVisible(false);\n\t\t\tplayAgain.setVisible(false);\n\t\t\tnGame.setVisible(true);\n\t\t\texit.setVisible(true);\n\t\t\trules.setVisible(true);\n\t\t\timage.setVisible(true);\n\t\t\tturn.setVisible(false);\n\t\t\tturno.setVisible(false);\n\t\t\tWinner.setVisible(false);\n\t\t\timageBack.setVisible(false);\n\t\t\tBoard.setVisible(false);\n\t\t}",
"public boolean doesGuiPauseGame()\r\n\t{\r\n\t\treturn false;\r\n\t}",
"private void checkGame() {\n if (game.checkWin()) {\n rollButton.setDisable(true);\n undoButton.setDisable(true);\n this.dialogFlag = true;\n if (game.isDraw()) {\n showDrawDialog();\n return;\n }\n if (game.getWinner().getName().equals(\"Computer\")) {\n showLoserDialog();\n return;\n }\n showWinnerDialog(player1);\n }\n }",
"private void checkEndGame() {\n\t\tAudioClip winClip = MediaTools.loadAudioClip(WIN_SOUND);\n\t\tdisableAllSouthButtons();\n\t\tif (Arrays.deepEquals(gameStatus, gameSolution)) {\n\t\t\tGImage splashScreenLost = new GImage(YOU_WON);\n\t\t\tGRect transparencyScreen = new GRect(getWidth(), getHeight());\n\t\t\ttransparencyScreen.setColor(TRANSLUCID_BEIGE);\n\t\t\ttransparencyScreen.setFilled(true);\n\t\t\tadd(transparencyScreen);\n\t\t\tsplashScreenLost.setSize(getWidth()*COUNTERTEXT_X, getHeight()*LOST_SCREEN_HEIGTHRESIZE);\n\t\t\tadd(splashScreenLost,(getWidth()- splashScreenLost.getWidth() - LOST_SCREEN_RIGHTMARGIN), (getHeight()- splashScreenLost.getHeight())*0.5 +LOST_SCREEN_LEFTMARGIN);\n\t\t\twinClip.play();\n\n\n\n\t\t} else {\n\t\t\tlostClip.play();\n\t\t\tGImage splashScreenLost = new GImage(\"YouLost.png\");\n\t\t\tGRect transparencyScreen = new GRect(getWidth(), getHeight());\n\t\t\ttransparencyScreen.setColor(TRANSLUCID_GOLD);\n\t\t\ttransparencyScreen.setFilled(true);\n\t\t\tadd(transparencyScreen);\n\t\t\tsplashScreenLost.setSize(getWidth()*LOST_SCREEN_WIDTHRESIZE, getHeight()*LOST_SCREEN_HEIGTHRESIZE);\n\t\t\tadd(splashScreenLost,(getWidth()- splashScreenLost.getWidth() - LOST_SCREEN_RIGHTMARGIN), (getHeight()- splashScreenLost.getHeight())*0.5 +LOST_SCREEN_LEFTMARGIN);\n\t\t\tlostClip.play();\n\n\n\t\t}\n\t}",
"public boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}",
"public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }",
"public boolean isGameOver()\n {\n if ( this.canMove(Direction.UP) || this.canMove(Direction.DOWN) ||\n this.canMove(Direction.LEFT) || this.canMove(Direction.RIGHT) ) { \n return false;\n }\n else {\n return true;\n } \n }",
"boolean gameOver(){\r\n return gameBoard.winningState(1) || gameBoard.winningState(2);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
AroundMethodAdvice for the APIs exposed from controller. Intercepts the request, gather requested time, requested uri, request type; also intercepts outgoing response gather information around the response status before releasing it to the consumer. | @SuppressWarnings("rawtypes")
@Around(CONTROLLER_BEAN_METHOD_POINTCUT)
public @ResponseBody Response aroundMethodInControllerClass(ProceedingJoinPoint joinPoint) throws Throwable {
LOGGER.debug("Got Request for controller");
Response jsonResponse = null;
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest();
// requested time
long requestTime = System.currentTimeMillis();
try {
jsonResponse = (Response) joinPoint.proceed();
} catch (ApplicationException apex) {
jsonResponse = globalExceptionHandler.processApplicationException(apex);
} catch (ExceptionContainer apex) {
jsonResponse = globalExceptionHandler.handleContainerException(apex);
} catch (IllegalArgumentException iaex) {
jsonResponse = globalExceptionHandler.processIllegalArgumentException(iaex);
} catch (Exception ex) {
jsonResponse = globalExceptionHandler.processException(ex, ProcessingStatusCode.INTERNAL_SERVER_ERROR);
}
if (jsonResponse == null) {
jsonResponse = new Response();
}
HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getResponse();
long responseTime = System.currentTimeMillis();
LOGGER.debug("Constructing Metadata");
MetaData data = constructMetadata(request, requestTime, response, responseTime);
jsonResponse.setMetaData(data);
LOGGER.debug("Returning response : {} ", jsonResponse);
return jsonResponse;
} | [
"@Around(\"restControllers()\")\n\tpublic Object measureMethodExecutionTime(ProceedingJoinPoint joinPoint) throws Throwable {\n\t\tlong start = System.nanoTime();\n\t\tObject returnValue = joinPoint.proceed();\n\t\tlong end = System.nanoTime();\n\t\tString methodName = joinPoint.getSignature().getName();\n\t\tlogger.info(\"Execution of {}.{} took {} ms\",joinPoint.getTarget().getClass().getSimpleName(), methodName, TimeUnit.NANOSECONDS.toMillis(end - start));\n\t\treturn returnValue;\n\t}",
"public interface MethodAdvice\n{\n /**\n * Allows the Aspect to advise the invocation. The Aspect is free to inspect and even replace parameters. Most\n * Aspects will then invoke {@link org.apache.tapestry5.ioc.Invocation#proceed()}. The Aspect may then inspect and\n * replace any checked thrown exceptions. Some Aspects (for example, caching) may selectively decide to bypass the\n * invocation entirely, and instead invoke some other method or otherwise set a return value or thrown exception.\n *\n * @param invocation to advise\n */\n void advise(Invocation invocation);\n}",
"@Around(\"@annotation( timedAnnotation ) \")\n public Object processSystemRequest(final ProceedingJoinPoint pjp, Timed timedAnnotation) throws Throwable {\n try {\n \tLog4JLogger log=new Log4JLogger(\"StatdPerformanceAspect.class\");\n long start = System.currentTimeMillis();\n Object retVal = pjp.proceed();\n long end = System.currentTimeMillis();\n long differenceMs = end - start;\n\n MethodSignature methodSignature = (MethodSignature) pjp.getSignature();\n Method targetMethod = methodSignature.getMethod();\n //get the value of timing notes as declared in the method annotation\n String timingNotes = timedAnnotation.timingNotes();\n //String requestInfo = param.getRequestInfo();\n statsdClient.increment(targetMethod.getDeclaringClass().getName() + \".\" + targetMethod.getName());\n statsdClient.timing(targetMethod.getDeclaringClass().getName() + \".\" + targetMethod.getName(),(int) differenceMs) ;\n log.debug(targetMethod.getDeclaringClass().getName() + \".\" + targetMethod.getName() + \" took \" + differenceMs + \" ms : timing notes: \" + timingNotes + \" request info : \");\n return retVal;\n } catch (Throwable t) {\n System.out.println(\"error occured\");\n throw t;\n }\n\n }",
"@AfterReturning(\"execution(* com.dav.mybatis.controller..*.*(..))\")\n public synchronized void logMethodAccessAfter(JoinPoint joinPoint) {\n log.info(\"***** Completed: \" + joinPoint.getSignature().getName() + \" *****\");\n }",
"@AroundInvoke\n public Object recordMethodDuration(InvocationContext invocationContext) throws Exception {\n TaskTimer timer = metricsService.timer(invocationContext.getMethod().getName());\n try {\n timer.start();\n return invocationContext.proceed();\n } finally {\n timer.stop();\n }\n }",
"private void dispatchMethod(Request request, Response response) throws Exception {\n HttpUtil.setConnectionHeader(request, response);\n PatternPathRouter.RoutableDestination<HttpResourceModel> destination =\n microservicesRegistry.\n getMetadata().\n getDestinationMethod(request.getUri(), request.getHttpMethod(), request.getContentType(),\n request.getAcceptTypes());\n HttpResourceModel resourceModel = destination.getDestination();\n response.setMediaType(getResponseType(request.getAcceptTypes(),\n resourceModel.getProducesMediaTypes()));\n InterceptorExecutor interceptorExecutor =\n new InterceptorExecutor(resourceModel, request, response, microservicesRegistry.getInterceptors());\n if (interceptorExecutor.execPreCalls()) { // preCalls can throw exceptions\n\n HttpMethodInfoBuilder httpMethodInfoBuilder =\n new HttpMethodInfoBuilder().\n httpResourceModel(resourceModel).\n httpRequest(request).\n httpResponder(response).\n requestInfo(destination.getGroupNameValues());\n\n HttpMethodInfo httpMethodInfo = httpMethodInfoBuilder.build();\n if (httpMethodInfo.isStreamingSupported()) {\n while (!(request.isEmpty() && request.isEomAdded())) {\n httpMethodInfo.chunk(request.getMessageBody());\n }\n httpMethodInfo.end();\n } else {\n httpMethodInfo.invoke();\n }\n interceptorExecutor.execPostCalls(response.getStatusCode()); // postCalls can throw exceptions\n }\n }",
"@Around(\"controllerMethodInvocation()\")\n public Object aroundController(ProceedingJoinPoint joinPoint) throws Throwable {\n MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();\n Annotation[][] annotations = methodSignature.getMethod().getParameterAnnotations();\n String[] paramNames = methodSignature.getParameterNames();\n Object[] args = joinPoint.getArgs();\n\n for (int i = 0; i < args.length; i++) {\n if (checkAnnotations(annotations[i])) {\n validateArg(args[i], paramNames[i]);\n }\n }\n return joinPoint.proceed(args);\n }",
"public interface AuthorizingMethodInterceptor extends HandlerInterceptor {\n}",
"@Override\n public boolean isAfterAdvice()\n {\n return false;\n }",
"private void processMethod(PClass pClass, ExecutableElement td) {\n\n log.fine(\" Looking at method \" + td.getSimpleName().toString());\n\n Path pathAnnotation = td.getAnnotation(Path.class);\n if (pathAnnotation == null) {\n return;\n }\n String path = pathAnnotation.value();\n path = cleanOutPath(path);\n\n PMethod pMethod = new PMethod();\n pClass.methods.add(pMethod);\n pMethod.path = path;\n\n Name elementName = td.getSimpleName();\n pMethod.name = elementName.toString();\n pMethod.method = getHttpMethod(td.getAnnotationMirrors());\n GZIP gzip = td.getAnnotation(GZIP.class);\n if (gzip != null) {\n pMethod.gzip = true;\n }\n ApiOperation apiOperation = td.getAnnotation(ApiOperation.class);\n String responseClass = null;\n if (apiOperation != null) {\n pMethod.description = apiOperation.value();\n if (!apiOperation.responseClass().equals(\"void\")) {\n responseClass = apiOperation.responseClass();\n if (apiOperation.multiValueResponse())\n responseClass = responseClass + \" (multi)\";\n }\n\n pMethod.notes = apiOperation.notes();\n\n }\n\n if (responseClass == null) {\n responseClass = td.getReturnType().toString();\n }\n\n // TODO can we somehow make the responseClass fully qualified, so that the link generation works?\n pMethod.returnType = constructTypeInfo(responseClass);\n\n // Loop over the parameters\n processParams(pMethod, td);\n processErrors(pMethod, td);\n\n processProduces(td, pMethod.produces);\n processConsumes(td, pMethod.consumes);\n }",
"@Override\n \t\tpublic void proceed() throws Exception {\n \t\t\tif (index == interceptors.size()) {\n \t\t\t\t\n \t\t\t\tObject controller = routeInstance.getController();\n \t\t\t\tMethod method = routeInstance.getMethod();\n \t\t\t\t\n \t\t\t\tmethod.invoke(controller, request, response);\n \t\t\t\t\n \t\t\t\treturn;\n \t\t\t}\n \t\t\t\n \t\t\t// retrieve the interceptor and increase the index \n \t\t\tInterceptor interceptor = interceptors.get(index);\n \t\t\tindex++;\n \t\t\t\n \t\t\t// execute the interceptor - notice that the interceptor will call this same method\n \t\t\tinterceptor.intercept(request, response, this);\n \t\t\t\n \t\t}",
"Advice getAdvice();",
"public interface MethodBeforeAdvice extends Advice {\n\n void before(Method method, Object[] args, Object target);\n}",
"@Pointcut(\"within(@org.springframework.web.bind.annotation.RestController *)\")\n public void controllerPointCut() {\n // Method is empty as this is just a Pointcut, the implementations are in the advices.\n }",
"void applyResponses(ReaderContext context, Operation operation, Method method);",
"void match(MockHttpServletRequest request, \n\t\t\t MockHttpServletResponse response, \n\t\t\t Object handler,\n\t\t\t HandlerInterceptor[] interceptors, \n\t\t\t ModelAndView mav, \n\t\t\t Exception resolvedException) throws Exception;",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"HandlerInterceptorAdapter : Spring MVC called postHandle() for\"\r\n + request.getRequestURI().toString()); \r\n\t}",
"public Object loggerAop(ProceedingJoinPoint joinPoint) throws Throwable {\n\t\t\n\t\t/*\n\t\t Join point: \"It is a candidate point in the Program Execution of the\n\t\t application where an aspect can be plugged in.\n\t\t such as method call, method returning normally, method throwing an exception, instantiating an object, referring an object, etc.\"\n\t\t more info at https://stackoverflow.com/questions/15447397/spring-aop-whats-the-difference-between-joinpoint-and-pointcut\n\t\t */\n\t\t\n\t\t\n\t\t//the method loggerAop is not directly involved in actual environments such as Student.java and Worker.java\n\t\t//let's output a method name\n\t\tString signatureStr = joinPoint.getSignature().toShortString();\t\t/* in common process */\n\t\tSystem.out.println();\n\t\tSystem.out.println(signatureStr + \" is started\");\n\t\tlong startTime = System.currentTimeMillis();\t//a start time\t/* still in common process */\n\t\t\n\t\ttry {\n\t\t\tObject obj = joinPoint.proceed();\t//proceed joinPoint; a target\t/* in core process */\n\t\t\treturn obj;\n\t\t\t\n\t\t} finally {\n\t\t\tlong endTime = System.currentTimeMillis();\t//an end time\t/* back in common process */\n\t\t\tSystem.out.println(signatureStr + \" is finished\");\n\t\t\tSystem.out.println(signatureStr + \" elapsed time: \" + (endTime - startTime));\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}",
"protected AdviceDec adviceDec() {\n return (AdviceDec) codeDec();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
All classes implementing this inteface will be capable of participate of the Groovy truth. | public interface Truth {
/**
* This method has to be implemented to know whether the
* object implementing this interface should be treated
* as a Boolean.TRUE value or Boolean.FALSE
*
* This interface has been created in order to
* make it easier to interact with Groovy collections
* and participate of the Groovy truth
*
* @return the boolean representation of the current type
*/
public Boolean asBoolean();
} | [
"boolean implementsOwnDependencyChecking();",
"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 abstract boolean esComestible();",
"public interface BooleanExpression_Aspect extends BooleanExpression, Expression_Aspect {\n}",
"boolean polymorphic();",
"public interface PlayDecision {\n}",
"interface CanFight {\n\tvoid fight();\n}",
"public void checkSemantics() {}",
"boolean isEvaluable();",
"abstract protected boolean acceptable(Class<?> oClass);",
"void doChecksV2() {\n\t\tHeavyAnimal hippo = new Hippo();\n\t\t\n\t\tboolean b1 = hippo instanceof Hippo; // true\n\t\tboolean b2 = hippo instanceof HeavyAnimal; // true\n\t\tboolean b3 = hippo instanceof Elephant; // false --> although the reference of type HeavyAnimal could be an Elephant, at runtime it isn't\n\t}",
"public boolean coversAll() {\n\t\treturn getSupportCount() == getLogicBase().getExamples().size();\n\t}",
"public abstract boolean interactionPossible(Robot robot);",
"public interface JavaEvaluator extends Evaluators {\n}",
"public boolean concernsObject() {\r\n\t\treturn true;\r\n\t}",
"public abstract boolean isInterface();",
"private CheckBoolean() {\n\t}",
"protected abstract boolean birthConditionsMet();",
"public boolean isSatisfiable(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value of the C6 column. | public void setC6(java.lang.Long c6)
{
this.c6 = c6;
} | [
"public void setCol6(String col6) {\r\n this.col6 = col6;\r\n }",
"public void setC6(Boolean c6) {\n\t\tthis.c6 = c6;\n\t}",
"public void setValue6(String value)\n {\n value6 = value;\n }",
"public void setCol6value(String col6value) {\n this.col6value = col6value == null ? null : col6value.trim();\n }",
"public String getCol6value() {\n return col6value;\n }",
"public void setNum6(int value) {\n this.num6 = value;\n }",
"public void setAttribute6(String value)\n {\n setAttributeInternal(ATTRIBUTE6, value);\n }",
"public void setAttribute6(String value) {\n setAttributeInternal(ATTRIBUTE6, value);\n }",
"public String getCol6() {\r\n return col6;\r\n }",
"public void setCellCap6(BigDecimal cellCap6) {\n this.cellCap6 = cellCap6;\n }",
"public void setField6(java.lang.CharSequence value) {\n this.field6 = value;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField6(java.lang.CharSequence value) {\n validate(fields()[6], value);\n this.field6 = value;\n fieldSetFlags()[6] = true;\n return this; \n }",
"public java.lang.Long getC6()\n {\n return this.c6;\n }",
"public void setCol6radio(String col6radio) {\n this.col6radio = col6radio == null ? null : col6radio.trim();\n }",
"public void setIntAttribute6(String value) {\n setAttributeInternal(INTATTRIBUTE6, value);\n }",
"public abstract void setCellValue(int cellValue, int row, int col);",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar6(java.lang.Integer value) {\n validate(fields()[7], value);\n this.var6 = value;\n fieldSetFlags()[7] = true;\n return this;\n }",
"public void setCellEvalu6(Integer cellEvalu6) {\n this.cellEvalu6 = cellEvalu6;\n }",
"public void setVar6(java.lang.Integer value) {\n this.var6 = value;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method updates the inventory by removing the vehicle. | public void updateInventory(String vin) {
dealership.getVehInv().deleteVehicle(vin);
} | [
"public void removeVehicle() {\n currentV = null;\n }",
"void removeFromInventory(Item item) {\n inventory.remove(item);\n }",
"public void unEquipArmor(){\n \tinventory.add(equippedArmor);\n \tequippedArmor = null;\n \tsetChanged();\n notifyObservers(inventory);\t\n }",
"public void removeVehicle() {\n\t\tmVehicles.removeFirst();\n\t}",
"public void remove(Vehicle vehicle) {\n\t\tvehicles.remove(vehicle);\n\n\t}",
"public void removeVehicle() { ... }",
"public void removeCar() {\n\n\t\tboolean alreadyParked = this.storage.getCarPosition().isPresent();\n\t\tif (alreadyParked && this.storage.getCarPosition().get().equals(this.storage.getUserPosition())) {\n\n\t\t\tthis.storage.setCarPosition(Optional.empty());\n\t\t\tenvInteraction.remove(this.storage.getUserPosition());\n\n\t\t\tif (this.isLocatingCar) {\n\t\t\t\t// turn off the search\n\t\t\t\tthis.locateCar();\n\t\t\t}\n\n\t\t}\n\n\t\tthis.ui.repaintMap();\n\n\t}",
"void removeFromInventory(IEquipableItem item);",
"void removeByKey(InventoryKey inventoryKey);",
"public void deleteInventory(Inventory inventory);",
"public void removeItemFromScene(){\n this.currentPlayer.getPlayerCurrentScene().getSceneInventory().removeItemFromInventory(this.currentItem);\n }",
"public void unEquipWeapon(){\n \tinventory.add(equippedWeapon);\n \tequippedWeapon = null;\n \tsetChanged();\n notifyObservers(inventory);\t\n }",
"public void remove(String item) {\n Inventory removeItem = em.find(Inventory.class, item);\n inventoryList.remove(removeItem);\n em.remove(removeItem);\n }",
"public void removeCarFromSlot()\n\t{\n\t\tthis.car = null;\n\t}",
"void unsetInventoryInd();",
"@SuppressWarnings(\"deprecation\")\r\n\tpublic void clearEquipment() {\r\n\t\tthis.player.getInventory().clear();\r\n\t\tthis.player.getInventory().setArmorContents(null);\r\n\t\tthis.player.updateInventory();\r\n\t}",
"private void delVehicle(Position position)\n\t{\n\t\tthis.getSquare(position).setVehicle(null);\n\t}",
"public void updateInventory();",
"public void removeAllItemsFromInventory()\n {\n this.items = new ArrayList<Item>();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to get the old FKCopy attribute for the ClassifyEvent | public long getOldFKCopy()
{
return getData("FKCopy").getPreviouslong();
} | [
"public long\tgetFKCopy() \r\n\t{\r\n\treturn getData(\"FKCopy\").getlong();\r\n\t}",
"public long\tgetOldPKClassifyEvent()\r\n{\r\n\treturn getData(\"PKClassifyEvent\").getPreviouslong();\r\n}",
"public\tCopyImpl\tgetOldCopy()\r\n{\r\n\tCopyImpl parent = null;\r\n\tSearchRequest searchReq = new SearchRequest();\r\n\tParameter param = null;\r\n\tparam = new Parameter();\r\n\tparam.objName = \"Copy\";\r\n\tparam.fieldName = \"PKCopy\";\r\n\tparam.value = getData(\"FKCopy\").getPreviousString();\r\n\tsearchReq.add(param);\r\n\tparent = (CopyImpl)(CopyBaseImpl.getObjectByKey(searchReq ,getSession()));\r\n\treturn parent;\r\n}",
"public Object getChangedAttribute()\r\n\t{\r\n\t\treturn changedAttribute;\r\n\t}",
"default IEmfAttribute<?, V> getOriginalAttribute() {\n\n\t\treturn this;\n\t}",
"@Override\n\tpublic String getChangeSetOld(){\n\t\treturn this.changeSetOld;\n\t}",
"public Integer getAttributechangeid() {\n return this.attributechangeid;\n }",
"public Integer getIdOriginal()\n {\n return this.idOriginal;\n }",
"public java.lang.String getRelatedIMEventOriginalID() {\n return relatedIMEventOriginalID;\n }",
"public java.lang.String getRelatedIMEventOriginalID() {\n return relatedIMEventOriginalID;\n }",
"public long\tgetPKClassifyEvent() \r\n{\r\n\treturn getData(\"PKClassifyEvent\").getlong();\r\n}",
"@Override\n\tpublic long getClassPK() {\n\t\treturn _changesetEntry.getClassPK();\n\t}",
"@Override\n public RelatedArtifactChangedColumn copy() {\n RelatedArtifactChangedColumn newXCol = new RelatedArtifactChangedColumn();\n super.copy(this, newXCol);\n return newXCol;\n }",
"public\tvoid\tsetCopy(CopyImpl parentObj)\r\n{\r\n\tthis.setFKCopy(parentObj.getPKCopy());\r\n}",
"public Set getOriginalAttributes() {\n\t\tSet out = new HashSet();\n\t\tfor (Iterator ci = getClasses().iterator(); ci.hasNext();) {\n\t\t\tSchemaClass cls = (SchemaClass) ci.next();\n\t\t\tfor (Iterator ai = cls.getAttributes().iterator(); ai.hasNext();) {\n\t\t\t\tSchemaAttribute att = (SchemaAttribute) ai.next();\n\t\t\t\tif (att.getOrigin() == cls) {\n\t\t\t\t\tout.add(att);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}",
"public Number getDssNotifIdFk() {\r\n return (Number) getAttributeInternal(DSSNOTIFIDFK);\r\n }",
"public abstract boolean keepOldAttributes();",
"public static Event getOriginalEvent(Event event) {\n while (event instanceof ForwardedEvent) {\n event = ((ForwardedEvent) event).getOriginalEvent();\n }\n\n return event;\n }",
"@Override\n\tpublic long getTypePK() {\n\t\treturn _dlSyncEvent.getTypePK();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates combat if space is a monster_encounter space | public void checkSpace() {
Space sp = map2.getSpaces().get(player1.getCoordX() + " " + player1.getCoordY());
if (sp.getSt() == SpaceType.MONSTER_ENCOUNTER) {
int randEn = RNG.generateInt(0, 10);
if (randEn == 10) {
move = false;
combatView(createMonster());
}
} else if (sp.getSt() == SpaceType.BOSS) {
Image bossImage = new Image("/images/enemy.png");
Boss boss = new Boss(0, 0, 0, 0, bossImage, 100, 100, 100, player1.getLevel(), "The Krebsinator!",
MonsterType.KREBS);
combatView(boss);
}
// Goes to next map if space is a door
else if (sp.getSt() == SpaceType.DOOR) {
player1.setMapLocation("/view/Map3.fxml");
doorButton.fire();
}
// Allows user to interact with the vendor
else if (sp.getSt() == SpaceType.VENDOR) {
// TODO implement Vendor view
}
} | [
"private void addAndCreateMonster() {\n int roll;\n Monster monster = new Monster();\n roll = rand.nextInt(100) + 1;\n monster.setType(roll);\n addMonster(monster);\n }",
"ArenaCreature createPlayerMageArenaCreature(Player player);",
"EnemyCharacter createEnemy();",
"Encounter createAdtEncounterFor(AdtAction action);",
"public Monster addNewMonster() {\n\t\t//every second frame a monster is created\n\t\tint spawnX = sample.MyController.getGridWidth()/2;\n\t\tint spawnY = sample.MyController.getGridHeight()/2;\n\t\tMonster addmonster = null;\n\t\t\tif ((frameId-1) % 6 == 0) {\n\t\t\t\taddmonster = new PenguinMonster(spawnX, spawnY, this); \n\t\t\t}\n\t\t\telse if ((frameId-1) % 4 == 0) {\n\t\t\t\taddmonster = new UnicornMonster(spawnX, spawnY, this); \n\t\t\t}\n\t\t\telse if ((frameId-1) % 2 == 0) {\n\t\t\t\taddmonster = new FoxMonster(spawnX, spawnY, this); \n\t\t\t}\n\t\t\n\t\treturn addmonster;\n\t}",
"private void createWarrior(String persoName, String persoImage, int persoLife, int attack) {\n\t\tpersoList.add(new Warrior(persoName, persoImage, persoLife, attack));\n\t}",
"public void combat()\n {\n numAttacks--;\n \n //Temp holding spots.\n Unit a = (attackerTurn) ? attacker : defender;\n Unit b = (attackerTurn) ? defender : attacker;\n \n //Perform the attack\n if(CombatMechanics.canAttack(a, a.getEquppedWeapon(), b))\n {\n attack(a,b);\n }\n \n //Set how long the animation is gonna last\n if(!graphics)\n animationLength = noGraphicFrames;\n else\n {\n if(attackerTurn)\n switch(attackResult)\n {\n case ATTACKMISS:\n animationLength = attackerMissFrames;\n damagePoint = attackerMissDamagePoint;\n break;\n case ATTACKHIT:\n animationLength = attackerHitFrames;\n damagePoint = attackerHitDamagePoint;\n break;\n case ATTACKCRIT:\n animationLength = attackerCritFrames;\n damagePoint = attackerCritDamagePoint;\n break;\n }\n else\n switch(attackResult)\n {\n case ATTACKMISS:\n animationLength = defenderMissFrames;\n damagePoint = defenderMissDamagePoint;\n break;\n case ATTACKHIT:\n animationLength = defenderHitFrames;\n damagePoint = defenderHitDamagePoint;\n break;\n case ATTACKCRIT:\n animationLength = defenderCritFrames;\n damagePoint = defenderCritDamagePoint;\n break;\n }\n \n }\n frameCount = 0;\n \n //and move on to the animation.\n controlState = 4;\n }",
"public void enterBattle(){\n generateMonster();\n System.out.println(\"You have encountered a \" + generateMonster() + \"!\");\n }",
"public NPC createNPC(CreatureType type, String name, Character character);",
"private void checkDespawn() {\n Player player = GameInstance.INSTANCE.getEntityManager().getOrCreatePlayer();\n\n if (this.distanceFrom(player) > 3000) {\n setDead(true);\n Gdx.app.debug(\"NPCEntity\", \"Too far from player, despawning!\");\n if(this instanceof NPCBoat) {\n NPCBoat npcBoat = (NPCBoat) this;\n if(npcBoat.isBoss() && npcBoat.getAllied().isPresent()) {\n //if boss is spawning, set spawned to false (so it will spawn again)\n College allied = npcBoat.getAllied().get();\n allied.setBossSpawned(false);\n }\n }\n }\n }",
"public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\t\tif (gameObj[5].size() == 0)\n\t\t{\n\t\t\tgameObj[5].add(new SpaceStation());\n\t\t\tSystem.out.println(\"SpaceStation added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A space station is already spawned\");\n\t\t}\n\t}",
"public Encounter(Player character, WeapForest weap, boolean boss)\n\t{\n\t\t//Random object to determine different random numbers\n\t\tthis.random = new Random(); \n\t\t\n\t\tthis.player = character;\n\t\t\n\t\tthis.weapons = weap;\n\t\t\n\t\t//Create Scanner object using the system input\n\t\tthis.scanner = new Scanner(System.in);\n\t\t\n\t\t//Create a locationID based on where the player is on the mapGrid\n\t\tthis.locationID = ((this.player.playerPosition.getLatitude() * 10) +\n\t\t\t\t\t this.player.playerPosition.getLongitude());\n\t\t\n\t\t//Start not completed\n\t\tthis.completed = false; \n\t\t\n\t\t//String object for battle result\n\t\tthis.battleResult = new String();\n\t\t\n\t\t//Determine if there is a monster\n\t\tint fightChance = random.nextInt(10);\n\t\t\n\t\t//If not the boss battle, then randomly generate a monster\n\t\tif(!boss)\n\t\t{\n\t\t\t//If within the bottom 60% then there is no monster\n\t\t\tif(fightChance < 6)\n\t\t\t{\n\t\t\t\tthis.monster = null;\n\t\t\t}\n\t\t\telse //If top 40% then there is a monster\n\t\t\t{\n\t\t\t\tthis.monster = randomMonster();\n\t\t\t}\n\t\t\n\t\t\t//If there is no monster, the use that battle result\n\t\t\tif(this.monster == null)\n\t\t\t{\n\t\t\t\tthis.battleResult = \"NO BATTLE\";\n\t\t\t\n\t\t\t\tcompleteEncounter(this.battleResult); //Complete the encounter with no monster\n\t\t\t}\n\t\t\telse \t//If there is no monster, then begin the battle\n\t\t\t{\n\t\t\t\tbattle(this.player, this.monster); //Battle between player and monster\n\t\t\t}\n\t\t}\n\t\telse //If it is the boss battle create a Boss class monster, and enter battle\n\t\t{\n\t\t\tthis.monster = new Boss();\n\t\t\t\n\t\t\tbattle(this.player, this.monster);\n\t\t}\n\t}",
"public Monster generateMonster(){\n\t\tRandom random = new Random();\n\n\t\tif(room.getLevel().getLevelNumber() == 5 && !this.equals(new GridLocation(null,6,4))){\t\n\t\t\treturn new Dragon(this,1500,200,0.15,1000);\t\t\t\n\t\t}\n\t\telse{\n\t\t\tdouble chanceMonster = random.nextDouble();\n\t\t\tif(chanceMonster < 0.10){ // 10% chance to generate a monster.\n\n\t\t\t\tint rand = random.nextInt(3) + 1; // 3 monsters to choose from.\n\n\t\t\t\tif(rand == 1){\n\t\t\t\t\tSpider spid = new Spider(this, 60*room.getLevel().getLevelNumber(),5 * room.getLevel().getLevelNumber(), 0.10, 30* room.getLevel().getLevelNumber());\n\t\t\t\t\treturn spid;\n\t\t\t\t}\n\t\t\t\telse if(rand == 2){\n\t\t\t\t\tBat bat = new Bat(this, 50*room.getLevel().getLevelNumber(), 10 * room.getLevel().getLevelNumber(), 0.10, 35* room.getLevel().getLevelNumber());\n\t\t\t\t\treturn bat;\n\t\t\t\t}\n\n\t\t\t\telse{\n\t\t\t\t\tAdder add = new Adder(this,70*room.getLevel().getLevelNumber(),5 * room.getLevel().getLevelNumber(), 0.20 ,40* room.getLevel().getLevelNumber());\n\t\t\t\t\treturn add;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\n\n\t}",
"Space create(Space space);",
"public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}",
"CharacterType createCharacterType(CharacterType t, long gameId);",
"public boolean hasMonster(){\n if(monsters.size() > 0){\n return true;\n }\n return false;\n }",
"public void addMonster(Monster monster){\n monsters.add(monster);\n }",
"private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public HeapNode(int key) Class' constructor Complexity O(1) | public HeapNode(int key) {
this.key = key;
this.rank = 0 ;
this.mark = 0 ;
this.originalNode = null;
} | [
"public HeapNode(int key, HeapNode originalNode) {\r\n \t this.key = key;\r\n \t this.rank = 0 ; \r\n \t this.mark = 0 ;\r\n \t this.originalNode = originalNode;\r\n \t}",
"public HeapNode(int aKey) {\r\n\t\t\tthis.mKey = aKey;\r\n\t\t\tthis.mMarked = false;\r\n\t\t\tthis.mRank = 0;\r\n\t\t\tthis.mChild = null;\r\n\t\t\tthis.mParent = null;\r\n\t\t\tthis.mNext = this;\r\n\t\t\tthis.mPrev = this;\r\n\t\t}",
"public BinomialHeap() {\n\n this.root = null;\n }",
"public BinomialHeap() {\n\t\thead = null; // make an empty root list\n\t}",
"public BinomialHeap() {\n this.head = null;\n }",
"public HeapNode insert(int key) {\r\n\t\t// Create an Heap and meld it with the current Heap\r\n\t\tFibonacciHeap lNewHeap = new FibonacciHeap();\r\n\t\tlNewHeap.mMin = new HeapNode(key);\r\n\t\tlNewHeap.mSize = 1;\r\n\t\tlNewHeap.mTreesCount = 1;\r\n\r\n\t\tthis.meld(lNewHeap);\r\n\r\n\t\t// return the Heap that was inserted\r\n\t\treturn lNewHeap.mMin;\r\n\r\n\t}",
"public HeapNode insert(int key)\r\n { \r\n \t return insertAllCases( key, null); \r\n\r\n }",
"public Heap() {\n\t\tthis.list = new ArrayList<Integer>();\n\t}",
"public Heap() {\r\n\t\tthis(DEFAULT_INITIAL_CAPACITY, null);\r\n\t}",
"public Heap() {\n\t\tthis(DEFAULT_INITIAL_CAPACITY, null);\n\t}",
"static Node newnode(int key)\n {\n\n Node node = new Node();\n node.key = key;\n node.left = node.right = null;\n return (node);\n }",
"public LeftistHeap() {\n root = null;\n }",
"public MinHeap()\n {\n contents = new ArrayList<>();\n contents.add( null );\n itemToIndex = new HashMap<>();\n }",
"public HeapSet () {\r\n\t\tsuper ();\r\n\t}",
"Node(int totalKeys) {\n\t\tt = totalKeys;\n\t\tkeys = new ArrayList<Integer>(t - 1);\n\t}",
"public MinHeap() {\n\tdata = new ArrayList<Integer>();\n\t}",
"public WBLeftistHeap(WBLeftistHeap<T> h) {\r\n\t\troot = copy(h.root);\r\n\t}",
"public BinaryHeap(BinaryHeap<E> heap) {\n this.currentSize = heap.currentSize;\n this.array = new ArrayList<E>(heap.array);\n }",
"public Node(int key, int level) {\n\t\tthis.key = key;\n\t\tthis.level = level;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the direction based on the two points from and to. The resulting direction will point from "from" to "to". Length is unchanged. | public void setDirection(final V2 from, final V2 to) {
final float l = this.length();
this.x = to.x - from.x;
this.y = to.y - from.y;
this.setLength(l);
} | [
"public void setDirection(Vector2 dir){\n this.direction = dir.cpy();\n }",
"public void setDirection( Vector3f direction );",
"public void setDirectionTo(Position ep, Position vp) throws InvalidPositionException;",
"private void initDirection(ROVector2f start, ROVector2f point) {\n if (start.equals(point)) {\n direction = new Vector2f(0, -1);\n } else {\n direction = new Vector2f(point);\n direction.sub(start);\n direction.normalise();\n }\n }",
"protected Direction makeDirection(KeyFrame start, KeyFrame end) {\n return new Direction(start.getPosition(), end.getPosition(),\n start.getWidth(), end.getWidth(),\n start.getHeight(), end.getHeight(),\n start.getColor(), end.getColor(),\n start.getTime(), end.getTime());\n }",
"public Direction(Vertex a, Vertex b) {\n this(b.getTranslated(a.getReverse()));\n }",
"public abstract void setDirection(int dir);",
"public void higher_to_lower_servo_degrees(Servo servo_motor, double from, double to) {\n double new_position = 0 ;\n for (double position = from; position >= to; position -= 1.0) {\n new_position = servo_motor_degrees_adapter(position);\n servo_motor.setPosition(new_position);\n\n\n }\n\n }",
"public void changeDirection();",
"public void lower_to_higher_servo_degrees(Servo servo_motor, double from, double to) {\n double new_position = 0 ;\n\n for (double position = from; position <= to; position += 1.0){\n new_position = servo_motor_degrees_adapter(position);\n servo_motor.setPosition(new_position);\n }\n\n }",
"public void setDirectionMove(double direction);",
"public void setDirection( Vector2f direction ) {\n\t\t// vector is not a direction if its zero vector\n\t\tif( direction.length() == 0 ) {\n\t\t\tthrow new IllegalArgumentException( \"Direction of speed is set \" +\n\t\t\t\t\t\t\t\t\t\t\t\t\"to zero vector\" );\n\t\t}\n\t\tthis.direction = direction.normalise();\n\t}",
"Direction(int xDel, int yDel) {\n this.xDel = xDel;\n this.yDel = yDel;\n }",
"@Override\n\tpublic void setDirectionToward(Point2D location) {\n\t\tPoint2D.Double unitVector = normalize(location, this.getCenter());\n\t\tthis.setDirection(unitVector);\n\t\t//this.setXDirection(target.getXCenter() - this.getXCenter());\n\t\t//this.setYDirection(target.getYCenter() + this.getYCenter());\n\t}",
"public abstract void getDirection(String origin, String destination);",
"public abstract Vector3 directionFrom(Point3 point);",
"public static Direction fromVector(double x, double y) {\n\t\treturn new Direction(x, y);\n\t}",
"public void changeDirectionBy(double delta)\n\t{\n\t\tsetDirection(direction+delta);\n\t}",
"public void updateDirection (int givenDirection)\n\t{\n\t\tdirection = givenDirection;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column fieldconfigschemeissuetype.FIELDCONFIGSCHEME | public void setFieldconfigscheme(Long fieldconfigscheme) {
this.fieldconfigscheme = fieldconfigscheme;
} | [
"public Fieldconfigschemeissuetype() {\n super();\n }",
"public void setCodingSchemeURI(java.lang.String codingSchemeURI) {\n this.codingSchemeURI = codingSchemeURI;\n }",
"public Long getFieldconfigscheme() {\n return fieldconfigscheme;\n }",
"public Fieldconfigschemeissuetype(Long id, String issuetype, Long fieldconfigscheme, Long fieldconfiguration) {\n this.id = id;\n this.issuetype = issuetype;\n this.fieldconfigscheme = fieldconfigscheme;\n this.fieldconfiguration = fieldconfiguration;\n }",
"public void setColourScheme(final java.lang.String colourScheme)\n {\n this._colourScheme = colourScheme;\n }",
"protected void setScheme(String scheme) {\n\t\tthis.scheme = scheme;\n\t}",
"public void setScheme(String scheme) {\n this.scheme = scheme;\n }",
"public void setScheme(String Scheme) {\n this.Scheme = Scheme;\n }",
"public Object assignFieldConfigurationSchemeToProject(FieldConfigurationSchemeProjectAssociation body) throws RestClientException {\n Object postBody = body;\n // verify the required parameter 'body' is set\n if (body == null) {\n throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, \"Missing the required parameter 'body' when calling assignFieldConfigurationSchemeToProject\");\n }\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfigurationscheme/project\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { \n \"application/json\"\n };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<Object> returnType = new ParameterizedTypeReference<Object>() {};\n return apiClient.invokeAPI(path, HttpMethod.PUT, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }",
"public void setScheme(final ExternalScheme scheme) {\n _scheme = scheme;\n }",
"@SuppressWarnings( \"unchecked\" )\n public void setScheme( Object scheme ) {\n if ( ! ( scheme instanceof List<?> ) ) {\n this.scheme = Arrays.asList( (String)scheme );\n } else {\n this.scheme = (List<String>)scheme;\n }\n\n checkSchemesAreValid();\n }",
"public void setDesignConceptColorScheme( VirageMediaBinServerSoap ws) throws RemoteException\r\n\t{\r\n\t\tif (createdDesignConceptGUID == null)\r\n\t\t{\r\n\t\t\treturn;\t\t// Part wasn't created so don't set a color scheme\r\n\t\t}\r\n\t\t// Get the color scheme value for this rendition\r\n\t\tMap<String,MBMetadataParameter> mdValues = new HashMap<String,MBMetadataParameter>();\r\n\t\tString colorSchemeGUID = colorSchemeIds.get(\"Black_1_None\");\r\n\t\tif (colorSchemeGUID != null)\r\n\t\t{\r\n\t\t\tMBMetadataParameter colorGuids = new MBMetadataParameter();\r\n\t\t\tcolorGuids.setIdentifier(MetadataGUIDS.ASSET_ID_COLOR_SCHEME);\r\n\t\t\tObject[] obs = {colorSchemeGUID};\r\n\t\t\tcolorGuids.setValues(obs);\r\n\t\t\tmdValues.put(MetadataGUIDS.ASSET_ID_COLOR_SCHEME,colorGuids);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tlog.warn(\"Could not find a Black color scheme for Design Concept asset\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tws.MBObject_ReviseMetadataValues(MBObjectType.Asset, createdDesignConceptGUID, mdValues.values().toArray(new MBMetadataParameter[0]), null);\r\n\t}",
"public void setColorScheme(int schemeNo){\n\t\tlocalColor = GCScheme.getColor(winApp, schemeNo);\n\t\tslider.localColor = GCScheme.getColor(winApp, schemeNo);\n\t\tArrayList<GOption> options = optGroup.getOptions();\n\t\tfor(int i = 0; i < options.size(); i++)\n\t\t\toptions.get(i).localColor = GCScheme.getColor(winApp, schemeNo);\n\t}",
"public void setUriScheme(java.lang.Short uriScheme) {\r\n this.uriScheme = uriScheme;\r\n }",
"void setCodeColumn(String codeColumn);",
"public void setCodingSchemeName(java.lang.String codingSchemeName) {\n this.codingSchemeName = codingSchemeName;\n }",
"public void setPDBCode (String pdb_id) ;",
"public java.lang.String getCodingSchemeURI() {\n return codingSchemeURI;\n }",
"public void setScheme(String p_scheme) throws MalformedURIException {\n if (p_scheme == null) {\n throw new MalformedURIException(\n \"Cannot set scheme from null string!\");\n }\n if (!isConformantSchemeName(p_scheme)) {\n throw new MalformedURIException(\"The scheme is not conformant.\");\n }\n \n m_scheme = p_scheme.toLowerCase();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setNeighbours to set the neighbours in all 6 directions of this Cell | protected void setNeighbours(Cell[] neighbours) throws IllegalArgumentEvent {
if(neighbours.length != 6){
throw new IllegalArgumentEvent("incorrect number of neighbours");
}
this.neighbours = neighbours;
} | [
"public void setNeighbours ()\n {\n neighbours = new ArrayList<Cell> ();\n\n if (x != 0)\n {\n addNeighbour (x-1, y);\n }\n\n if (y != 0)\n {\n addNeighbour (x, y-1);\n }\n\n if (x < maze.getColumns () - 1)\n {\n addNeighbour (x+1, y);\n }\n\n if (y < maze.getRows () - 1)\n {\n addNeighbour (x, y+1);\n }\n }",
"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 setNeighbours(List<NodeType> neighbours) {\n this.neighbours = neighbours;\n }",
"public void set_neighbors(Cell[] neighbors)\n\t{\n\t\tthis.neighbors = neighbors;\n\t}",
"public void setNeighbours(ArrayList<ThresholdDataPoint> neighbours, int connec) {\n\t\tif(connec == 8){\n\t\t\tthis.eightNeighbours = neighbours;\n\t\t} else if(connec == 4){\n\t\t\tthis.fourNeighbours = neighbours;\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"Invalid number of neighbours\");\n\t\t}\n\t}",
"public void setNeighbourhood(final List<Cell<V>> neighbourhood);",
"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 setNeighbourCellBodies(Set<Integer> neighbourCellBodies) {\n\t\tthis.neighbourCellBodies = neighbourCellBodies;\n\t}",
"public void neighboring() {\n\n for (int i = 0; i < this.cells.size(); i = i + 1) {\n\n Cell cell = this.cells.get(i);\n ArrayList<Integer> candidates = new ArrayList<Integer>(Arrays.asList((i - this.xgridNum - 1),\n (i - this.xgridNum), (i - this.xgridNum + 1), (i + 1), (i + this.xgridNum + 1),\n (i + this.xgridNum), (i + this.xgridNum - 1), (i - 1)));\n\n for (int candidate : candidates) {\n if (!(this.invalidNeighbor(i, candidate))) {\n Cell neighbor = this.cells.get(candidate);\n cell.addNeighbor(neighbor);\n }\n }\n this.cells.set(i, cell);\n }\n }",
"public void setNeighbors(ArrayList<Area> neighbors){\n this.neighbors = neighbors;\n }",
"public void setNeighbors(List<Vertex> neighbors) {\n myNeighbors = neighbors;\n }",
"public final void updateNeighbours() {\n BunkerElement[] neighbours = getNeighbours();\n for (BunkerElement element : neighbours) {\n if (element != null) {\n element.update();\n }\n }\n }",
"public void initializeNeighbors() {\n\t\tfor (int r = 0; r < getRows(); r++) {\n\t\t\tfor (int c = 0; c < getCols(); c++) {\n\t\t\t\tList<Cell> nbs = new ArrayList<>();\n\t\t\t\tinitializeNF(shapeType, r, c);\n\t\t\t\tmyNF.findNeighbors();\n\t\t\t\tfor (int[] arr : myNF.getNeighborLocations()){\n\t\t\t\t\tif (contains(arr[0], arr[1])){\n\t\t\t\t\t\tnbs.add(get(arr[0], arr[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tget(r, c).setNeighbors(nbs);\n\t\t\t}\n\t\t}\n\t}",
"public abstract void setupNeighbours(ElectionNode... neighbours);",
"public void updateAllNeighbors() {\n // resets all connections\n for (GamePiece g : nodes) {\n g.updateNeighbor(\"top\", null);\n g.updateNeighbor(\"right\", null);\n g.updateNeighbor(\"bottom\", null);\n g.updateNeighbor(\"left\", null);\n }\n for (int c = 0; c < this.width; c++) {\n // column value\n int left = c - 1;\n int right = c + 1;\n for (int r = 0; r < this.height; r++) {\n // row value\n int top = r - 1;\n int bottom = r + 1;\n if (top >= 0) {\n this.board.get(c).get(r).updateNeighbor(\"top\", this.board.get(c).get(top));\n }\n if (bottom < this.height) {\n this.board.get(c).get(r).updateNeighbor(\"bottom\", this.board.get(c).get(bottom));\n }\n if (left >= 0) {\n this.board.get(c).get(r).updateNeighbor(\"left\", this.board.get(left).get(r));\n }\n if (right < this.width) {\n this.board.get(c).get(r).updateNeighbor(\"right\", this.board.get(right).get(r));\n }\n }\n }\n }",
"public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}",
"public void updateNeighbours(){\n\t\tif(field.getRecentlyChangedNodeNetwork()){\n\t\t\tneighboursList = field.getNodesWithinRangeofNode(this);\n\t\t}\n\t}",
"protected void resetNeighbours() {\r\n resetClusters();\r\n for(Point p : points) {\r\n p.clearNeighbours();\r\n }\r\n }",
"public void fillNeighbours(ColoredCell cell) {\n List<String> keys = new ArrayList<>();\n keys.add(String.valueOf(cell.getX() - 1) + (cell.getY())); // up\n keys.add(String.valueOf(cell.getX() + 1) + (cell.getY())); // down\n keys.add(String.valueOf(cell.getX()) + (cell.getY() - 1)); // left\n keys.add(String.valueOf(cell.getX()) + (cell.getY() + 1)); // right\n keys.add(String.valueOf(cell.getX() - 1) + (cell.getY() - 1)); // top left\n keys.add(String.valueOf(cell.getX() - 1) + (cell.getY() + 1)); // top right\n keys.add(String.valueOf(cell.getX() + 1) + (cell.getY() - 1)); // bottom left\n keys.add(String.valueOf(cell.getX() + 1) + (cell.getY() + 1)); // bottom right\n\n keys.forEach(key -> {\n if (cellMap.containsKey(key)) {\n cell.addNeighbour(cellMap.get(key));\n }\n });\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set Function to f(x)=ax^2+bx+c | public Function(double a, double b, double c) {
//y = a*(x*x) + b*x + c;
co[0]= c;
co[1]= b;
co[2]= a;
degree[0] = 0;
degree[1] = 1;
degree[2] = 2;
cindex = 3;
} | [
"public Function(double b, double c) {\r\n\t //y = b*x + c;\r\n co[0]= c;\r\n co[1]= b;\r\n degree[0] = 0;\r\n degree[1] = 1;\r\n cindex = 2; \r\n\t}",
"public Function(double c) {\r\n co[0]= c;\r\n degree[0] = 0;\r\n cindex = 1; \r\n\t}",
"public static float fungsi(float x){\n float y;\r\n y = 2*(x * x * x) - 6*(x * x) + 16*x - 1;\r\n return y;\r\n }",
"public void setFunction(SoSensorCB f) {\n\t\t func = f; \n\t}",
"private double F(double x) {\n return 230 * Math.pow(x, 4) + 18 * Math.pow(x, 3) + 9 * Math.pow(x, 2) - 221 * x - 9;\n }",
"double calculateAxon(ActivationFunction activationFunction);",
"public void setValue(SlingFunction f) {\n source[0] = f;\n }",
"public Function(double coeff, String trigFunction, double p) {\r\n\t if(trigFunction.toLowerCase().equals(\"sin\")){\r\n //y = coeff * Math.sin(p*x);\r\n sinc[0] = coeff;\r\n sind[0] = p;\r\n sinindex = 1;\r\n }else if(trigFunction.toLowerCase().equals(\"cos\")){\r\n //y = coeff * Math.cos(p*x);\r\n if( p == 0){\r\n co[0]+= coeff;\r\n }else{\r\n cosc[0] = coeff;\r\n cosd[0] = p;\r\n cosindex = 1;\r\n } \r\n }else if(trigFunction.toLowerCase().equals(\"tan\")){\r\n //y = coeff * Math.tan(p*x);\r\n tanc[0] = coeff;\r\n tand[0] = p;\r\n tanindex = 1;\r\n }else{\r\n clear(); \r\n }\r\n\t}",
"protected final double fa(double x, double ac, double ae) {return ac*Math.pow(x, ae)/K;}",
"public void setF(){\n\t\tf=calculateF();\n\t}",
"public void setFunction(Function function)\n {\n this.function = function;\n }",
"public static double function(double x) {\n return (1.2 * pow(x,3)) + (6 * pow( x,2)) + (3.2 * x);\n }",
"public static String assignXY(String function, double x, double y) {\n try{\n String newf = \"\";\n for (int i = 0; i < function.length(); i++) {\n if (function.charAt(i) == 'X') {\n newf += x;\n } else if (function.charAt(i) == 'Y') {\n newf += y;\n } else newf += function.charAt(i);\n\n }\n return newf;\n }catch (Exception e){\n return \"ERROR:Illegal format XY\";\n }\n }",
"public void putFunction(String f, int argCount) throws MathLinkException;",
"public void setFunction(IActivationFunction function) {\n this.function = function;\n }",
"Function polynomial();",
"@Override\n\tpublic double f(double x) {\n\t\treturn Math.tanh(x);\n\t}",
"private void enFunction() {\r\n\r\n switch (this.functionCode) {\r\n\r\n case 0:\r\n enEightToOne();\r\n break;\r\n\r\n }\r\n }",
"public void setFunctionType(char fType){\r\n this.functionType = fType;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool delete_null = 1006; | boolean getDeleteNull(); | [
"boolean getForceDeleteNull();",
"public boolean getDeleteNull() {\n return deleteNull_;\n }",
"void deleteValue(boolean b);",
"public boolean getForceDeleteNull() {\n return forceDeleteNull_;\n }",
"boolean getDeleteCampaignNull();",
"boolean getDeleteTemplateNull();",
"public abstract boolean isNullRef();",
"boolean getDeleteCharacteristicNull();",
"@Test\n void deleteByPostNull(){\n boolean result = false;\n try {\n register.deleteAddress(null);\n result = true;\n }catch (NullPointerException ignore) {}\n assert(result == false);\n }",
"public boolean nullable_known() {return _nullable_known;}",
"boolean getUseLikeNull();",
"private boolean noNull(boolean aux) {\r\n\t\treturn aux;\r\n\t}",
"boolean notNull();",
"public native static boolean isNull(GameTask oper1);",
"boolean isNullOmittable();",
"NULL createNULL();",
"boolean getActiveNull();",
"io.dstore.values.BooleanValue getDelete();",
"public boolean getDeleteTemplateNull() {\n return deleteTemplateNull_;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes the MLE model using a percentile resolution hill climbing in the parameter space. | public static MLEPoint hillClimbSearch(MLEPoint point, MleLikelihoodCache mleCache, double[] T) {
// init the MLE points
MLEPoint temp = new MLEPoint(point.getPIuni(), point.getMu(), point.getSigma(), Double
.NEGATIVE_INFINITY);
boolean done = false;
while (!done) {
// Check each direction and move based on highest correlation
for (HillClimbDirection dir : HillClimbDirection.values()) {
// Skip NoMove direction
if (dir == HillClimbDirection.NoMove)
continue;
// get the new MLE Point given the 3D hill climb direction
int p = point.getPIuni() + dir.getPDir();
int m = point.getMu() + dir.getMDir();
int s = point.getSigma() + dir.getSDir();
// Check if this point is within the search bounds
if (p > 0 && p < 100 && m > 0 && m < 100 && s > 0 && s < 100) {
// check cache to see if this likelihood has previously been computed
double l = Double.NaN;
if (mleCache != null)
l = mleCache.getLikelihood(p, m, s);
// if this value has not been computed
if (Double.isNaN(l)) {
// compute the likelihood
l = computeMleLikelihood(T, p, m, s);
// add it to the shared cache
if (mleCache != null)
mleCache.setLikelihood(p, m, s, l);
}
// if the new likelihood is better than the best local one so far record it
if (l > temp.getLikelihood()) {
temp.setPIuni(p);
temp.setMu(m);
temp.setSigma(s);
temp.setLikelihood(l);
}
}
}
// if the best local neighborhood point is better that the current global best
if (Double.isNaN(point.getLikelihood()) || temp.getLikelihood() > point.getLikelihood()) {
// record current best
point.setPIuni(temp.getPIuni());
point.setMu(temp.getMu());
point.setSigma(temp.getSigma());
point.setLikelihood(temp.getLikelihood());
} else {
done = true;
}
}
return point;
} | [
"double getLbs();",
"private double getPowerFromModsTuningUS() {\r\n\r\n\t\tdouble fsr_freq = gloco.getChannelSpacing() / 1e9;\r\n\r\n\t\t// Mod for each each wavelength for each site +demod for the memory site\r\n\t\tdouble Mod_heater_power = gloco.getNumberOfWavelengths()\r\n\t\t\t\t* (gloco.getNumberOfCores() + 1)\r\n\t\t\t\t* gloco.getThermalPowerperFSR()\r\n\t\t\t\t* (0.5 * 10 * gloco.getDeltaT()\r\n\t\t\t\t\t\t/ (gloco.getNumberOfWavelengths() * fsr_freq) + 1.0 / gloco\r\n\t\t\t\t\t\t.getNumberOfWavelengths());\r\n\r\n\t\treturn Mod_heater_power;\r\n\t}",
"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 }",
"Double getLightningCoefficient();",
"private double getPowerFromModsTuningDS() {\r\n\r\n\t\tdouble fsr_freq = gloco.getChannelSpacing() / 1e9;\r\n\r\n\t\t// Mod for each each wavelength for each site +demod for the memory site\r\n\t\tdouble Mod_heater_power = gloco.getNumberOfWavelengths()\r\n\t\t\t\t* (gloco.getNumberOfCores() + 1)\r\n\t\t\t\t* gloco.getThermalPowerperFSR()\r\n\t\t\t\t* (0.5 * 10 * gloco.getDeltaT()\r\n\t\t\t\t\t\t/ (gloco.getNumberOfWavelengths() * fsr_freq) + 1.0 / gloco\r\n\t\t\t\t\t\t.getNumberOfWavelengths());\r\n\r\n\t\treturn Mod_heater_power;\r\n\t}",
"public void estimateParameter(){\r\n int endTime=o.length;\r\n int N=hmm.stateCount;\r\n double p[][][]=new double[endTime][N][N];\r\n for (int t=0;t<endTime;++t){\r\n double count=EPS;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]=fbManipulator.alpha[t][i]*hmm.a[i][j]*hmm.b[i][j][o[t]]*fbManipulator.beta[t+1][j];\r\n count +=p[t][j][j];\r\n }\r\n }\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]/=count;\r\n }\r\n }\r\n }\r\n double pSumThroughTime[][]=new double[N][N];\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]=EPS;\r\n }\r\n }\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n //rebuild gamma\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i) fbManipulator.gamma[t][i]=0;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n fbManipulator.gamma[t][i]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n double gammaCount=EPS;\r\n //maximum parameter\r\n for (int i=0;i<N;++i){\r\n gammaCount+=fbManipulator.gamma[0][i];\r\n hmm.pi[i]=fbManipulator.gamma[0][i];\r\n }\r\n for (int i=0;i<N;++i){\r\n hmm.pi[i]/=gammaCount;\r\n }\r\n\r\n for (int i=0;i<N;++i) {\r\n gammaCount = EPS;\r\n for (int t = 0; t < endTime; ++t) gammaCount += fbManipulator.gamma[t][i];\r\n for (int j = 0; j < N; ++j) {\r\n hmm.a[i][j] = pSumThroughTime[i][j] / gammaCount;\r\n }\r\n }\r\n for (int i=0;i<N;i++){\r\n for (int j=0;j<N;++j){\r\n double tmp[]=new double[hmm.observationCount];\r\n for (int t=0;t<endTime;++t){\r\n tmp[o[t]]+=p[t][i][j];\r\n }\r\n for (int k=0;k<hmm.observationCount;++k){\r\n hmm.b[i][j][k]=(tmp[k]+1e-8)/pSumThroughTime[i][j];\r\n }\r\n }\r\n }\r\n //rebuild fbManipulator\r\n fbManipulator=new HMMForwardBackwardManipulator(hmm,o);\r\n }",
"public double [] getMultipliers() throws Exception{\r\n\tif (!solved) solve();\r\n return lam;\r\n }",
"public static float pu2mw(float pwr) {return pwr*100F;}",
"public static float mw2pu(float mw) {return mw/100F;}",
"public RestrictedBoltzmannMachine(int[] inputData, double weightWide, double biasWide, double learningRate) {\n\t\t/*\n\t\t * inputData : {visibleUnitsNumber, hiddenunitsNumber}\n\t\t * \n\t\t * \n\t\t */\n\t\tthis.learningRate = learningRate;\n\t\tthis.weightWide = weightWide;\n\t\tthis.biasWide = biasWide;\n\t\tRandom rand = new Random();\n\t\tthis.layers = new Entity[2][];\n\t\tfor(int i = 0; i < 2; i++){\n\t\t\tthis.layers[i] = new Entity[inputData[i]];\n\t\t\tfor(int j = 0; j < inputData[i]; j++){\n\t\t\t\tthis.layers[i][j] = new Entity(j, (rand.nextDouble())*this.biasWide);\n\t\t\t}\n\t\t}\n\t\tthis.connections = new double[inputData[0]][inputData[1]];\n\t\tfor(int i = 0; i < this.connections.length; i++){\n\t\t\tfor(int j = 0; j < this.connections[0].length; j++){\n\t\t\t\tthis.connections[i][j] = (rand.nextDouble())*this.weightWide;\n\t\t\t}\n\t\t}\n\n\t\tthis.connectionsGradient = new double[this.connections.length][this.connections[0].length];\n\n\t\tthis.biasGradient = new double[2][];\n\t\tthis.biasGradient[0] = new double[this.layers[0].length];\n\t\tthis.biasGradient[1] = new double[this.layers[1].length];\n\t}",
"private double FLmi() {\n return Lx*Mi;\n }",
"public static Complex laguerre(Complex estx, Complex[] pcoeff, int m){\n double eps = 1e-7; // estimated fractional round-off error\n int mr = 8; // number of fractional values in Adam's method of breaking a limit cycle\n int mt = 1000; // number of steps in breaking a limit cycle\n int maxit = mr*mt; // maximum number of iterations allowed\n int niter = 0; // number of iterations taken\n\n // fractions used to break a limit cycle\n double frac[]={0.5, 0.25, 0.75, 0.13, 0.38, 0.62, 0.88, 1.0};\n\n Complex root = new Complex(); // root\n Complex b = new Complex();\n Complex d = new Complex();\n Complex f = new Complex();\n Complex g = new Complex();\n Complex g2 = new Complex();\n Complex h = new Complex();\n Complex sq = new Complex();\n Complex gp = new Complex();\n Complex gm = new Complex();\n Complex dx = new Complex();\n Complex x1 = new Complex();\n Complex temp1 = new Complex();\n Complex temp2 = new Complex();\n\n double abp = 0.0D, abm = 0.0D;\n double err = 0.0D, abx = 0.0D;\n\n for(int i=1; i<=maxit; i++){\n niter=i;\n b=Complex.copy(pcoeff[m]);\n err=Complex.abs(b);\n d=f=Complex.zero();\n abx=Complex.abs(estx);\n for(int j=m-1; j>=0;j--)\n {\n // Efficient computation of the polynomial and its first two derivatives\n f=Complex.plus(Complex.times(estx, f), d);\n d=Complex.plus(Complex.times(estx, d), b);\n b=Complex.plus(Complex.times(estx, b), pcoeff[j]);\n err=Complex.abs(b)+abx*err;\n }\n err*=eps;\n\n // Estimate of round-off error in evaluating polynomial\n if(Complex.abs(b)<=err)\n {\n root=Complex.copy(estx);\n niter=i;\n return root;\n }\n // Laguerre formula\n g=Complex.over(d, b);\n g2=Complex.square(g);\n h=Complex.minus(g2, Complex.times(2.0, Complex.over(f, b)));\n sq=Complex.sqrt(Complex.times((double)(m-1), Complex.minus(Complex.times((double)m, h), g2)));\n gp=Complex.plus(g, sq);\n gm=Complex.minus(g, sq);\n abp=Complex.abs(gp);\n abm=Complex.abs(gm);\n if( abp < abm ) gp = gm;\n temp1.setReal((double)m);\n temp2.setReal(Math.cos((double)i));\n temp2.setImag(Math.sin((double)i));\n dx=((Math.max(abp, abm) > 0.0 ? Complex.over(temp1, gp):Complex.times(Math.exp(1.0+abx),temp2)));\n x1=Complex.minus(estx, dx);\n if(Complex.isEqual(estx, x1))\n {\n root=Complex.copy(estx);\n niter=i;\n return root; // converged\n }\n if ((i % mt)!= 0){\n estx=Complex.copy(x1);\n }\n else{\n // Every so often we take a fractional step to break any limit cycle\n // (rare occurence)\n estx=Complex.minus(estx, Complex.times(frac[i/mt-1], dx));\n }\n niter=i;\n }\n // exceeded maximum allowed iterations\n root=Complex.copy(estx);\n System.out.println(\"Maximum number of iterations exceeded in laguerre\");\n System.out.println(\"root returned at this point\");\n return root;\n }",
"private void computePixelWeightingFactors_multiScale(int n_wide_full, int n_tall_full) {\n int n_elec = electrode_xy.length;\n\n //define the coarse grid data structures and pixel locations\n int decimation = 10;\n int n_wide_small = n_wide_full / decimation + 1;\n int n_tall_small = n_tall_full / decimation + 1;\n float weightFac[][][] = new float[n_elec][n_wide_small][n_tall_small];\n int pixelAddress[][][] = new int[n_wide_small][n_tall_small][2];\n for (int Ix=0; Ix<n_wide_small; Ix++) {\n for (int Iy=0; Iy<n_tall_small; Iy++) {\n pixelAddress[Ix][Iy][0] = Ix*decimation;\n pixelAddress[Ix][Iy][1] = Iy*decimation;\n };\n };\n\n //compute the weighting factors of the coarse grid\n computePixelWeightingFactors_trueAverage(pixelAddress, weightFac);\n\n //define the fine grid data structures\n electrode_color_weightFac = new float[n_elec][n_wide_full][n_tall_full];\n headVoltage = new float[n_wide_full][n_tall_full];\n\n //interpolate to get the fine grid from the coarse grid\n float dx_frac, dy_frac;\n for (int Ix=0; Ix<n_wide_full; Ix++) {\n int Ix_source = Ix/decimation;\n dx_frac = PApplet.parseFloat(Ix - Ix_source*decimation)/PApplet.parseFloat(decimation);\n for (int Iy=0; Iy < n_tall_full; Iy++) {\n int Iy_source = Iy/decimation;\n dy_frac = PApplet.parseFloat(Iy - Iy_source*decimation)/PApplet.parseFloat(decimation);\n\n for (int Ielec=0; Ielec<n_elec; Ielec++) {\n //println(\" : Ielec = \" + Ielec);\n if ((Ix_source < (n_wide_small-1)) && (Iy_source < (n_tall_small-1))) {\n //normal 2-D interpolation\n electrode_color_weightFac[Ielec][Ix][Iy] = interpolate2D(weightFac[Ielec], Ix_source, Iy_source, Ix_source+1, Iy_source+1, dx_frac, dy_frac);\n } else if (Ix_source < (n_wide_small-1)) {\n //1-D interpolation in X\n dy_frac = 0.0f;\n electrode_color_weightFac[Ielec][Ix][Iy] = interpolate2D(weightFac[Ielec], Ix_source, Iy_source, Ix_source+1, Iy_source, dx_frac, dy_frac);\n } else if (Iy_source < (n_tall_small-1)) {\n //1-D interpolation in Y\n dx_frac = 0.0f;\n electrode_color_weightFac[Ielec][Ix][Iy] = interpolate2D(weightFac[Ielec], Ix_source, Iy_source, Ix_source, Iy_source+1, dx_frac, dy_frac);\n } else {\n //no interpolation, just use the last value\n electrode_color_weightFac[Ielec][Ix][Iy] = weightFac[Ielec][Ix_source][Iy_source];\n } //close the if block selecting the interpolation configuration\n } //close Ielec loop\n } //close Iy loop\n } // close Ix loop\n\n //clean up the boundaries of our interpolated results to make the look nicer\n int pixelAddress_full[][][] = new int[n_wide_full][n_tall_full][2];\n for (int Ix=0; Ix<n_wide_full; Ix++) {\n for (int Iy=0; Iy<n_tall_full; Iy++) {\n pixelAddress_full[Ix][Iy][0] = Ix;\n pixelAddress_full[Ix][Iy][1] = Iy;\n };\n };\n cleanUpTheBoundaries(pixelAddress_full, electrode_color_weightFac);\n }",
"public void generateLinearGrowthModel(double m, double b) {\n\n for (int t = 0; t < 2192; t++) {\n listOfNumericalValues.add(m * t + b);\n }\n\n }",
"public static void estimate_parameters(){\n\t\tprojection_value = motif_length - motif_corruptions - 1;\n\t\t//bucket_threshold = 2 * background_sequences.size() * (background_seq_length - motif_length + 1) / (int)(Math.pow(4, projection_value));\n\t\t//if(bucket_threshold == 0)\n\t\t\tbucket_threshold = 200;\n\t\trp_loop = 2;\n\t}",
"private double pComputeMLE(int j, double[] data, double[] cResidual, double[] arCoef, double[] maCoef,\n\t\t\t\t\t\t\t double intercept, double sigma2, int param) {\n\n\t\tCSSGradientTarget cssProblem = new CSSGradientTarget();\n\t\tcssProblem.computeRSS(data, cResidual, 0, arCoef, maCoef, intercept, type, ifIntercept);\n\n\t\tdouble gradient = 0;\n\t\tif (param == 1) {\n\t\t\tdouble partialS = cssProblem.pComputeRSS(j, data, cssProblem.iterResidual, 0, arCoef, maCoef, intercept, 0,\n\t\t\t\t1);\n\t\t\tgradient = -partialS / (2.0 * sigma2);\n\t\t}\n\t\t//MA partial Inverse\n\t\tif (param == 2) {\n\t\t\tdouble partialS = cssProblem.pComputeRSS(j, data, cssProblem.iterResidual, 0, arCoef, maCoef, intercept, 0,\n\t\t\t\t2);\n\t\t\tgradient = -partialS / (2.0 * sigma2);\n\t\t}\n\t\t//intercept partial Inverse\n\t\tif (param == 3) {\n\t\t\tdouble partialS = cssProblem.pComputeRSS(j, data, cssProblem.iterResidual, 0, arCoef, maCoef, intercept, 0,\n\t\t\t\t3);\n\t\t\tgradient = -partialS / (2.0 * sigma2);\n\t\t}\n\t\tif (param == 4) {\n\t\t\tdouble s = cssProblem.computeRSS(data, cResidual, 0, arCoef, maCoef, intercept, 0, ifIntercept);\n\t\t\tgradient = -((double) data.length / (2.0 * sigma2)) + s / (2.0 * sigma2 * sigma2);\n\t\t}\n\t\treturn -gradient;\n\t}",
"public static double computeMleLikelihood(double[] T, double PIuni, double mu, double sigma) {\n\n double range = 100;\n double likelihood = Double.NEGATIVE_INFINITY;\n if (PIuni >= 0 && PIuni < 100) {\n PIuni = PIuni / 100;\n // loop over the elements the x array\n likelihood = 0; // init sum value\n for (int i = 0; i < T.length; i++) {\n double temp = (T[i] - mu) / sigma;\n temp = Math.exp(-0.5 * temp * temp);\n temp = temp / (SQRT2PI * sigma);\n temp = (PIuni / range) + (1 - PIuni) * temp;\n temp = Math.abs(temp);\n temp = Math.log(temp);\n likelihood = likelihood + temp;\n }\n }\n\n return likelihood;\n }",
"@Override\n\tpublic int optimize() throws Exception {\n\t\tlog.info(\"optimize\");\n\t\t\n\t\tLPOptimizationRequest lpRequest = getLPOptimizationRequest();\n\t\tif(log.isDebugEnabled() && lpRequest.isDumpProblem()){\n\t\t\tlog.debug(\"LP problem: \" + lpRequest.toString());\n\t\t}\n\t\t\n\t\t//standard form conversion\n\t\tLPStandardConverter lpConverter = new LPStandardConverter();//the slack variables will have default unboundedUBValue\n\t\t\n\t\tlpConverter.toStandardForm(getC(), getG(), getH(), getA(), getB(), getLb(), getUb());\n\t\tint nOfSlackVariables = lpConverter.getStandardS();\n\t\tlog.debug(\"nOfSlackVariables: \" + nOfSlackVariables);\n\t\tDoubleMatrix1D standardC = lpConverter.getStandardC();\n\t\tDoubleMatrix2D standardA = lpConverter.getStandardA();\n\t\tDoubleMatrix1D standardB = lpConverter.getStandardB();\n\t\tDoubleMatrix1D standardLb = lpConverter.getStandardLB();\n\t\tDoubleMatrix1D standardUb = lpConverter.getStandardUB();\n\t\t\n\t\t//solve the standard form problem\n\t\tLPOptimizationRequest standardLPRequest = lpRequest.cloneMe();\n\t\tstandardLPRequest.setC(standardC);\n\t\tstandardLPRequest.setA(standardA);\n\t\tstandardLPRequest.setB(standardB);\n\t\tstandardLPRequest.setLb(ColtUtils.replaceValues(standardLb, lpConverter.getUnboundedLBValue(), minLBValue));//substitute not-double numbers\n\t\tstandardLPRequest.setUb(ColtUtils.replaceValues(standardUb, lpConverter.getUnboundedUBValue(), maxUBValue));//substitute not-double numbers\n\t\tif(getInitialPoint()!=null){\n\t\t\tstandardLPRequest.setInitialPoint(lpConverter.getStandardComponents(getInitialPoint().toArray()));\n\t\t}\n\t\tif(getNotFeasibleInitialPoint()!=null){\n\t\t\tstandardLPRequest.setNotFeasibleInitialPoint(lpConverter.getStandardComponents(getNotFeasibleInitialPoint().toArray()));\n\t\t}\n\t\t\n\t\t//optimization\n\t\tLPPrimalDualMethod opt = new LPPrimalDualMethod(minLBValue, maxUBValue);\n\t\topt.setLPOptimizationRequest(standardLPRequest);\n\t\t//System.out.println(opt.optimizeStandardLP(nOfSlackVariables) );\n\t\t//System.out.println(OptimizationResponse.FAILED);\n\t\tif(opt.optimizeStandardLP(nOfSlackVariables) == OptimizationResponse.FAILED){\n\t\t\n\t\t\treturn OptimizationResponse.FAILED;\n\t\t}\n\t\t\n\t\t//back to original form\n\t\tLPOptimizationResponse lpResponse = opt.getLPOptimizationResponse();\n\t\tdouble[] standardSolution = lpResponse.getSolution();\n\t\tdouble[] originalSol = lpConverter.postConvert(standardSolution);\n\t\tlpResponse.setSolution(originalSol);\n\t\tsetLPOptimizationResponse(lpResponse);\n\t\treturn lpResponse.getReturnCode();\n\t}",
"public static Pair<DV, VarDouble> islrH(DM A, DV b, double p, double K, int iterMax, double tol) {\n\n if (A.colCount() < 5) {\n iterMax = 10;\n }\n if (A.colCount() < 4) {\n K = 1.5;\n }\n if (A.colCount() < 3) {\n p = 10;\n }\n\n\n // initial homotopy value\n double pk = 2;\n\n // initial L2 solution\n DV x = QRDecomposition.from(A).solve(b.asMatrix()).mapCol(0);\n\n VarDouble err = VarDouble.empty().name(\"errors\");\n\n for (int k = 0; k < iterMax; k++) {\n if (p >= 2) {\n pk = Math.min(p, K * p);\n } else {\n pk = Math.max(p, K * pk);\n }\n\n // error vector\n DV e = A.dot(x).sub(b);\n\n // error weights for IRLS\n double pkk = pk;\n DV w = DVDense.from(e.size(), pos -> pow(abs(e.get(pos)), (pkk - 2) / 2));\n\n // normalize weight matrix\n DM W = rapaio.math.linear.dense.DMStripe.empty(w.size(), w.size());\n double wsum = w.valueStream().sum();\n for (int i = 0; i < w.size(); i++) {\n W.set(i, i, w.get(i) / wsum);\n }\n\n // apply weights\n DM WA = W.dot(A);\n\n // weighted L2 solution\n\n DM A1 = WA.t().dot(WA);\n DV b1 = WA.t().dot(W).dot(b);\n\n DV x1 = QRDecomposition.from(A1).solve(b1.asMatrix()).mapCol(0);\n\n // Newton's parameter\n double q = 1.0 / (pk - 1);\n\n double nn;\n if (p > 2) {\n // partial update for p>2\n x = x1.mult(q).add(x.mult(1 - q));\n nn = p;\n } else {\n // no partial update for p<=2\n x = x1;\n nn = 2;\n }\n err.addDouble(e.norm(nn));\n\n // break if the improvement is then tolerance\n\n if (k > 0 && Math.abs(err.getDouble(err.rowCount() - 2) - err.getDouble(err.rowCount() - 1)) < tol) {\n break;\n }\n }\n return Pair.from(x, err);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ EntityManagerFactory emf = Persistence.createEntityManagerFactory("couponTestPU"); private EntityManager em; private EntityTransaction tx; private CouponDaoJpa cdj; | @Before
public void setUp() {
/* try {
new DatabaseCleaner(emf.createEntityManager()).clean();
} catch (SQLException ex) {
Logger.getLogger(CouponDaoJpaTest.class.getName()).log(Level.SEVERE, null, ex);
}
em = emf.createEntityManager();
tx = em.getTransaction();
cdj = new CouponDaoJpa();
cdj.setEm(em);*/
} | [
"private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }",
"EMInitializer() {\r\n try {\r\n emf = Persistence.createEntityManagerFactory(\"pl.polsl_MatchStatist\"\r\n + \"icsWeb_war_4.0-SNAPSHOTPU\");\r\n em = emf.createEntityManager();\r\n } catch (Exception e) {\r\n em = null;\r\n emf = null;\r\n }\r\n\r\n }",
"@BeforeClass\r\n public static void initTextFixture(){\r\n entityManagerFactory = Persistence.createEntityManagerFactory(\"itmd4515PU\");\r\n }",
"private PersistenceUtil()\r\n {\r\n factory = Persistence.createEntityManagerFactory(\r\n \"MusicAlbumsPU\");\r\n }",
"public static void main(String[] args) {\n\r\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"soft_uni\");\r\n EntityManager entityManager = factory.createEntityManager();\r\n Engine engine = new Engine(entityManager);\r\n\r\n engine.run();\r\n\r\n\r\n }",
"@Before\n\tpublic void setUp() throws Exception {\n\t\tydelseService.setEntityManager(entityManager);\n\t}",
"public EntityManager getEntityMan(){\r\n EntityManager em = factory.createEntityManager();\r\n return em;\r\n }",
"@Test\r\n public void testGetEntityManager() {\r\n /*System.out.println(\"getEntityManager\");\r\n UsuarioJpaController instance = null;\r\n EntityManager expResult = null;\r\n EntityManager result = instance.getEntityManager();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");*/\r\n }",
"public interface IEntityManagerFactory {\r\n\r\n\t/**\r\n\t * Called when entity manager factory will help to create DAO objects.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tEntityManager createEntityManager();\r\n}",
"EntityManagerContext(EntityManagerFactory factory) {\n this.factory = factory;\n }",
"PersistenceContext getPersistenceContext();",
"EntityManager createEntityManager(PersistenceContextType type);",
"@Test\n public void testGetEntityManager() {\n System.out.println(\"getEntityManager\");\n DaftarPengguna instance = new DaftarPengguna();\n EntityManager expResult = null;\n EntityManager result = instance.getEntityManager();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"protected CompanyJPA() {\n\t}",
"public EmployeeManagedBean() {\n this.sessionFactory = HibernateUtil.getSessionFactory(); \n }",
"@Override\n public EntityManager getEntityManager() {\n return entityManager;\n }",
"@Bean\n EntityManagerFactory entityManagerFactoryProvider() {\n \tEntityManagerFactory emf = Persistence.createEntityManagerFactory(DATA_SOURCE_NAME);\n return emf;\n }",
"private static void caso1() {\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"jpa-main\");\n loadData();\n EntityManager em = emf.createEntityManager();\n\n System.out.println(\"--- caso 1 ---\");\n\n //tx1\n System.out.println(\"tx1\");\n em.getTransaction().begin();\n\n Person person1 = em.find(Person.class, 1L);\n System.out.println(person1);\n\n em.remove(person1);//delete\n\n em.persist(new Person());//insert\n\n Person juana = em.find(Person.class, 2L);\n juana.setPadre(null);\n juana.setName(\"juana luisa\");//update\n\n em.getTransaction().commit();\n em.close();\n emf.close();\n }",
"public SettlementBean() {\r\n entitymanagerbean = new EntityManagerBean();\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return an intersection of two collections as a set. The original collections will not be modified. | public static <T> Set<T> intersection(Collection<T> a, Collection<T> b) {
return intersection(a, b, defaultSetFactory());
} | [
"public Set intersection(Set anotherSet);",
"Set<E> intersect(Set<E> other);",
"@Override\r\n public ImmutableSet<T> intersection(Set<T> other) {\r\n return intersect(asThis(other));\r\n }",
"public ZYSet<ElementType> intersection(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n if(otherSet.contains(e)){\n result.add(e);\n }\n }\n return result;\n }",
"public static <T> Set<T> intersection(Collection<T> a, Collection<T> b, Supplier<Set<T>> setFactory) {\n Set<T> result = createSet(a, setFactory);\n result.retainAll(b);\n return result;\n }",
"private Set<String> intersection(Set<String> s1, Set<String> s2) {\n Set<String> intersection = new HashSet<>(s1);\n intersection.retainAll(s2);\n return intersection;\n }",
"private static <T> Set<T> union(Collection<T> c1, Collection<T> c2) {\n return Stream.concat(c1.stream(), c2.stream()).collect(Collectors.toUnmodifiableSet());\n }",
"public BCollection intersection(Collection that);",
"void intersect(Multiset<E> other);",
"protected <Ty> HashSet<Ty> intersection(HashSet<Ty> setA, HashSet<Ty> setB) {\n HashSet<Ty> retSet = new HashSet<>();\n for (Ty t : setA) {\n if (setB.contains(t)) {\n retSet.add(t);\n }\n }\n return retSet;\n }",
"public <T> Set<T> intersect(Set<T> set1, Set<T> set2) {\n\t\tSet<T> intersection = new HashSet<T>(set1);\n\t\tintersection.retainAll(set2);\n\t\treturn intersection;\n\t}",
"public static <T> Set<T> union(Collection<T> a, Collection<T> b) {\n return union(a, b, defaultSetFactory());\n }",
"public static <T> Set<T> intersection(Set<T> setA, Set<T> setB) {\n Set<T> intersection = new HashSet<T>(setA);\n intersection.retainAll(setB);\n return intersection;\n }",
"public Set intersection(Set intersect){\n Set newSet = new Set();\n for(int element = 0; element < intersect.size(); element++){\n if(elementOf(intersect.getSet()[element]))\n newSet.add(intersect.getSet()[element]);\n }\n return newSet;\n }",
"public static <T> Set<T> complement(Collection<T> a, Collection<T> b) {\n return complement(a, b, defaultSetFactory());\n }",
"public static <T> Set<T> intersection(List<Set<T>> sets){\n\t\tSet<T> differenceSet = new HashSet<T>();\n\t\tif(sets.size() > 0){\n\t\t\tdifferenceSet = new HashSet<T>(sets.get(0));\n\t\t\tfor(int i = 1; i < sets.size(); i++){\n\t\t\t\tdifferenceSet.retainAll(new HashSet<T>(sets.get(i)));\n\t\t\t}\n\t\t}\n\t\treturn differenceSet;\n\t}",
"public final SetOf intersection (SetOf other)\n {\n if (indices == null)\n {\n\tcarrier.and(other.carrier);\n\treturn this;\n }\n\n if (!this.isSubsetOf(other))\n {\n\tcarrier.and(other.carrier);\n\tindices = null;\n }\n\n return this;\n }",
"public Set union(Set anotherSet);",
"public static List<Integer> intersection (List<Integer> a, List<Integer> b) {\n\t\tList<Integer> result = new ArrayList<Integer>();\n\t\tif (a == null || b == null) return result;\n\t\t\n\t\tSet<Integer> set = new HashSet<Integer>();\n\t\tfor (int v : a) {\n\t\t\tset.add(v);\n\t\t}\n\t\t\n\t\tfor (int v : b) {\n\t\t\tif (set.contains(v)) {\n\t\t\t\tset.remove(v);\n\t\t\t\tresult.add(v);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This method is used to print the output when an isomorphism is found. It formats and then returns the tuple array. | private static String printH(Tuple[] h){
String answer = "ISOMORPHISM:\t{";
for(int i = 0; i < h.length; i++){
answer = answer + h[i] + (i < h.length-1? ",": "");
}
answer = answer + "}";
return answer;
} | [
"public void printArray(){\n\n\t\tfor (int i=0;i<1;i++){\n\n\t\t\tfor (int j=0;j<population[i].getLength();j++){\n\n\t\t\t\tSystem.out.println(\"X\" + j + \": \" + population[i].getX(j) + \" \" + \"Y\"+ j + \": \" + population[i].getY(j));\n\t\t\t\tSystem.out.println();\n\n\t\t\t}//end j\n\n\t\t\tSystem.out.println(\"The duplicate count is: \" + population[i].duplicateCheck());\n\t\t\tSystem.out.println(\"The fitness is \" + population[i].computeFitness());\n\t\t\t//population[i].computeFitness();\n\n\t\t}//end i\n\n\t}",
"public void print() {\n if (this.tuples == null || this.tuples.isEmpty()) return; \n\n // Initialize number of attributes.\n int attributesNumber = attributes.size();\n\n // An array storing the max length of Strings per column.\n // The Strings per column are tuple Values and attributes.\n int[] maxColumnLengthOfStrings = new int[attributesNumber];\n\n // Loop all the attributes and fill the max length array\n for (int index = 0; index < attributesNumber; index++) {\n\n // Initialize the array with the attributes name length.\n maxColumnLengthOfStrings[index] = attributes.get(index).getName().length();\n\n // Loop the values and find the longest value toString().\n for (int rowIndex = 0; rowIndex < this.tuples.size(); rowIndex++) { // Loop the rows\n String value = this.tuples.get(rowIndex).getValues().get(index).toString();\n if (value.length() > maxColumnLengthOfStrings[index]){\n maxColumnLengthOfStrings[index] = value.length();\n }\n }\n }\n\n // A set of tables whose columns are in the attributes list.\n Set<SQLTable> tablesSet = new HashSet<>();\n // The list of attributes to String format.\n String attributesList = new String();\n // A line used to separate the attributes from the data.\n String separationLine = new String();\n // Create the separation line and the attributes line.\n for (int index = 0; index < attributesNumber; index++) {\n\n // The score column has a null table. Dont search it.\n if (!this.attributes.get(index).getName().equals(\"score\"))\n tablesSet.add((this.attributes.get(index).getTable()) );\n\n\n attributesList += \"|\" + PrintingUtils.addStringWithLeadingChars(maxColumnLengthOfStrings[index],\n this.attributes.get(index).getName(), \" \");\n separationLine += \"+\" + PrintingUtils.addStringWithLeadingChars(maxColumnLengthOfStrings[index], \"\", \"-\");\n }\n attributesList += \"|\"; // Add the last \"|\".\n separationLine += \"+\"; // Add the last \"+\".\n\n // Print the tables which contain this tuples (HACK WAY). \n String tablesInString = new String (\"Tables joined : \");\n for (SQLTable table: tablesSet) {\n tablesInString += table.toAbbreviation() + \" |><| \";\n }\n System.out.println(tablesInString.substring(0, tablesInString.length()-5));\n\n // Print the attributes between separation lines.\n System.out.println(separationLine);\n System.out.println(attributesList);\n System.out.println(separationLine);\n\n // Print all the rows of Tuple Values.\n for (OverloadedTuple tuple: this.tuples) {\n String rowOfValues = new String();\n for (int index = 0; index < attributesNumber; index++) {\n rowOfValues += \"|\" + PrintingUtils.addStringWithLeadingChars( maxColumnLengthOfStrings[index],\n tuple.getValues().get(index).toString(), \" \");\n }\n rowOfValues += \"|\";\n System.out.println(rowOfValues);\n }\n\n // Print a separation line.\n System.out.println(separationLine);\n }",
"@Override\n public String toString() {\n return tuple.toString();\n }",
"public abstract void printAnalysisResult();",
"public String toString(){\r\n String s = \"Pictures found in positions:\\n\";\r\n int size = (int)Math.sqrt(numPics*2);\r\n for (int i = 0; i < size; i++) {\r\n for (int j=0; j < size; j++)\r\n s += found[i][j]+\" \";\r\n s+=\"\\n\";\r\n }\r\n return s; \r\n \r\n }",
"@Override\r\n public String getPhotometricInterpretation() throws DIException {\n DValue dataElement = dicomDataSet.getValueByGroupElementString(\"0028,0004\");\r\n if (dataElement == null) {\r\n return null;\r\n }\r\n return getStringAnswer(dataElement); \t// {\"MONOCHROME1\",\"MONOCHROME2\",\"PALETTE COLOR\",\"RGB\",\"YBR_FULL\",\r\n // \"YBR_FULL_422\",\"YBR_PARTIAL_422\",\"YBR_PARTIAL_420\",\"YBR_ICT\",\"YBR_RCT\"}\r\n }",
"private void printTuple(final Tuple tuple) {\n\t\tSystem.out.println(tuple.getFormatedString());\n\t}",
"private String arrayToString() {\r\n\t\tString str = \"\";\r\n\t\tfor (String s : winningH) {\r\n\t\t\tstr = str + s + \"\\t\";\r\n\t\t}\r\n\t\treturn str;\r\n\t}",
"public void getGenotype() {\n System.out.println(\"Color Alleles: \" + colorAllele1 + \", \" + colorAllele2 + \" (Phenotype: \" + colorPhenotype + \")\");\n System.out.println(\"Tone Alleles: \" + toneAllele1 + \", \" + toneAllele2 + \" (Phenotype: \" + tonePhenotype + \")\");\n System.out.println(\"Shine Alleles: \" + shineAllele1 + \", \" + shineAllele2 + \" (Phenotype: \" + shinePhenotype + \")\");\n System.out.println(\"Jewel Alleles: \" + jewelAllele1 + \", \" + jewelAllele2 + \" (Phenotype: \" + jewelPhenotype + \")\\n\");\n }",
"public void printShapes() {\n System.out.println(\"PRINT THE SHAPES AS AN ARRAY OF SHAPE\");\r\n for ( int i = 0; i < shapes.length; i++ ) {\r\n System.out.println(shapes[i].getName() + \": \" +\r\n shapes[i].toString() + \", ID: \" +\r\n shapes[i].getIdNumber());\r\n System.out.println(\"Area = \" + shapes[i].area());\r\n System.out.println(\"Volume = \" + shapes[i].volume());\r\n System.out.println();\r\n }\r\n }",
"public String toString()\n {\n\n String elem;\n StringBuilder s = new StringBuilder();\n for(int i = 0 ; i < n ; i++)\n {\n elem = Integer.toString(array1[i]);\n s.append(elem);\n if(i < (n-1))\n s.append(',');\n }\n s.append('|');\n for(int i = 0 ; i < n ; i++)\n {\n elem = Integer.toString(array2[i]);\n s.append(elem);\n if(i < (n-1))\n s.append(',');\n }\n return s.toString();\n }",
"public String getOutputInfo (int i) {\n return null;\n }",
"public void printA(){\n\t\tfor(int i = 0; i < this.area.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tSystem.out.print(\" \");\n\t\t\tfor(int p = 0 ; p < this.area.length; p++){\n\n\t\t\t\tif(this.Ari[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" ? \");\n\t\t\t\t}\n\t\t\t\telse if(this.position[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" + \");\n\t\t\t\t}\n\t\t\t\telse if(this.Items[i][p] != null){\n\t\t\t\t\tSystem.out.print(\"<$>\");\n\t\t\t\t}\n\t\t\t\telse if(this.Door[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" D \");\n\t\t\t\t}\n\t\t\t\telse if(this.Stairs[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" S \");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.print(this.area[i][p]);\n\t\t\t\t}\n\t\t\t}//end of inner for print\n\t\t}//end of outter for print\n\t}",
"private void printPRep()\n {\n String info = \"\";\n if (pRep != null && pRep.length != 0)\n {\n for (int i = 0;i< 1;i++)\n {\n info += \"PARTICLE \"+i+'\\n';\n //info += \"Top: \"+pRep[i].boundingRectTop+'\\n';\n //info += \"Left: \"+pRep[i].boundingRectLeft+'\\n';\n //info += \"Width: \"+pRep[i].boundingRectWidth+'\\n';\n //info += \"Height: \"+pRep[i].boundingRectHeight+'\\n';\n info += \"Area: \"+pRep[i].particleArea+'\\n';\n info += \"Center: \"\n +pRep[i].center_mass_x_normalized\n +\", \"\n +pRep[i].center_mass_y_normalized+\"\\n\\n\"; \n }\n Log.defcon2(this, info);\n }\n }",
"@Override\n public String toString() {\n String output = \"\";\n\n for (int j = height - 1 ; j >= 0 ; j--) {\n for (int i = 0 ; i < width ; i++) {\n output += paper[i][j];\n }\n output += \"\\n\";\n }\n\n return output;\n }",
"private static void printResultPopulation(){\n System.out.println(\"Result Population:\");\n for(Chromosome chromosome:Config.population.getChromosomes()){\n System.out.println(chromosome.getBinaryCode().toString());\n }\n }",
"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 printIC(){\r\n\t\tIterator<Term> myiterator =annotDagBP.vertexSet().iterator();\r\n\t\twhile(myiterator.hasNext()){\r\n\t\t\tTerm thisterm = myiterator.next();\r\n\t\t\tLOGGER.info(\"IC of term \"+thisterm.getID()+\": \"+thisterm.getIC());\r\n\t\t}\r\n\t}",
"public String toString() {\r\n String output = icoList + \"\\n\";\r\n int index = 0;\r\n while (index < numberOfIcosahedrons) {\r\n output += \"\\n\" + icoObjs[index] + \"\\n\";\r\n index++;\r\n }\r\n return output;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a chain of interfaces to Fasten URIs. | public static List<FastenURI> toURIInterfaces(final List<ObjectType> types) {
final List<FastenURI> result = new ArrayList<>();
types.forEach(objectType -> result.add(OPALMethod.getTypeURI(objectType)));
return result;
} | [
"public static LinkedList<FastenURI> toURIClasses(final LinkedList<ObjectType> types) {\n final LinkedList<FastenURI> result = new LinkedList<>();\n types.forEach(objectType -> result.add(OPALMethod.getTypeURI(objectType)));\n return result;\n }",
"public URI toIRI(\n ){\n String xri = toXRI();\n StringBuilder iri = new StringBuilder(xri.length());\n int xRef = 0;\n for(\n int i = 0, limit = xri.length();\n i < limit;\n i++\n ){\n char c = xri.charAt(i);\n if(c == '%') {\n iri.append(\"%25\");\n } else if (c == '(') {\n xRef++;\n iri.append(c);\n } else if (c == ')') {\n xRef--;\n iri.append(c);\n } else if (xRef == 0) {\n iri.append(c);\n } else if (c == '#') {\n iri.append(\"%23\");\n } else if (c == '?') {\n iri.append(\"%3F\");\n } else if (c == '/') {\n iri.append(\"%2F\");\n } else {\n iri.append(c);\n }\n }\n return URI.create(iri.toString());\n }",
"public URI toAnyURI(\n ){\n return toIRI();\n }",
"public interface IBaseUris {\r\n /**\r\n * Base URI for the usage of 'rdf:about'\r\n */\r\n String BASE_URI = \"http://saschafeldmann.de/bachelor/ontology/\";\r\n /**\r\n * Base URI for the usage of 'rdf:ID'\r\n */\r\n String BASE_URI_ID = \"http://saschafeldmann.de/bachelor/ontology#\";\r\n \r\n String INDIVIDUAL_BASE_URI = BASE_URI + \"individuals/\";\r\n}",
"String asEndpointUri(String scheme, Map<String, String> properties, boolean encode) throws URISyntaxException;",
"@Override\n protected List<String> convertDoisToUrls(Collection<String> dois) {\n List<String> urls = new ArrayList<String>();\n for(String doi:dois) {\n // Encode the doi, then revert the FIRST %2F (slash) back to a \"/\":\n // 10.1023/A%3A1026541510549, not\n // 10.1023%2FA%3A1026541510549\n String url = String.format(\"%sarticle/%s\", baseUrl, encodeDoi(doi).replaceFirst(\"%2F\",\"/\"));\n urls.add(url);\n }\n return urls;\n }",
"static String uri(final String... paths) {\n StringBuilder sb = new StringBuilder();\n boolean firstPath = true;\n for (String s : paths) {\n if (s == null || s.isEmpty()) {\n continue;\n }\n if (!s.startsWith(\"/\") && !firstPath) {\n sb.append(\"/\");\n }\n sb.append(stripLeadingSlash(s));\n firstPath = false;\n }\n return sb.toString();\n }",
"String asEndpointUriXml(String scheme, Map<String, String> properties, boolean encode) throws URISyntaxException;",
"String createEndpointUri(String scheme, Map<String, String> options) throws URISyntaxException;",
"public interface IAppDownloadFileUriProvider {\n /* renamed from: a */\n Uri mo45383a(int i, String str, String str2);\n}",
"@Test\n\tpublic void testTurnUrlHelpersINtoUrls() {\n\t\tMap<String, String> params = new HashMap<String, String>();\n\t\tparams.put(\"parms1\", \"1\");\n\t\tparams.put(\"parms2\", \"2\");\n\t\tparams.put(\"parms3\", \"3\");\n\t\tString paramStringPart = \"parms3=3&parms1=1&parms2=2&\";\n\t\tUrlHelper hlpr1 = new UrlHelper(\"http://stackoverflow.com\", null, null);\n\t\tString expected1 = \"http://stackoverflow.com\";\n\t\tUrlHelper hlpr2 = new UrlHelper(\"http://stackoverflow.com\", \"/users\", null);\n\t\tString expected2 = \"http://stackoverflow.com/users\";\n\t\tUrlHelper hlpr3 = new UrlHelper(\"http://stackoverflow.com\", null, params);\n\t\tString expected3 = \"http://stackoverflow.com?\" + paramStringPart;\n\t\tUrlHelper hlpr4 = new UrlHelper(\"http://stackoverflow.com\", \"/users\", params);\n\t\tString expected4 = \"http://stackoverflow.com/users?\" + paramStringPart;\n\t\tassertEquals(expected1, hlpr1.toUrl());\n\t\tassertEquals(expected2, hlpr2.toUrl());\n\t\tassertEquals(expected3, hlpr3.toUrl());\n\t\tassertEquals(expected4, hlpr4.toUrl());\n\t}",
"List<URI> getURIs();",
"private static String getMirrorPathOfOntologyIRI(IRI iri) {\n String iriString = iri.toString();\n iriString = iriString.replaceFirst(\"http://\", \"\").replaceFirst(\"https://\", \"\");\n iriString = iriString.replace(':', '_');\n iriString = iriString.replace('\\\\', '_');\n return iriString;\n }",
"private void encodeSequentialNetworkLink(String linkbase, int prevStart,\n int maxFeatures, String id, String readableName) {\n String link = linkbase + \"?startindex=\" + prevStart\n + \"&maxfeatures=\" + maxFeatures;\n start(\"NetworkLink\", KMLUtils.attributes(new String[] {\"id\", id}));\n element(\"linkName\",readableName);\n start(\"Link\");\n element(\"href\",link);\n end(\"Link\");\n end(\"NetworkLink\");\n }",
"public abstract String unrewrite(String absoluteIRI);",
"private URI listUri() throws URISyntaxException {\n return new URI(composeUri(\"bot\", null, null, null)\n + composeParams(null));\n }",
"public interface LinkExtractor extends Iterator {\n /**\n * Setup the LinkExtractor to operate on the given stream and charset,\n * considering the given contextURI as the initial 'base' URI for\n * resolving relative URIs.\n *\n * May be called to 'reset' a LinkExtractor to start with new input.\n *\n * @param source source URI \n * @param base base URI (usually the source URI) for URI derelativizing\n * @param content input stream of content to scan for links\n * @param charset Charset to consult to decode stream to characters\n * @param listener ExtractErrorListener to notify, rather than raising\n * exception through extraction loop\n */\n public void setup(UURI source, UURI base, InputStream content,\n Charset charset, ExtractErrorListener listener);\n \n /**\n * Convenience version of above for common case where source and base are \n * same. \n * \n * @param sourceandbase URI to use as source and base for derelativizing\n * @param content input stream of content to scan for links\n * @param charset Charset to consult to decode stream to characters\n * @param listener ExtractErrorListener to notify, rather than raising\n * exception through extraction loop\n */\n public void setup(UURI sourceandbase, InputStream content,\n Charset charset, ExtractErrorListener listener);\n \n /**\n * Alternative to Iterator.next() which returns type Link.\n * @return a discovered Link\n */\n public Link nextLink();\n\n /**\n * Discard all state and release any used resources.\n */\n public void reset();\n}",
"public String genLink (String request, Array filters){\n \n }",
"private boolean transformICLibs() {\t\t\n\t\t\n\t\tEList<InterfaceClassLibType> icls = aml.getInterfaceClassLib();\t\t\n\t\t\n\t\tfor (InterfaceClassLibType icl : icls) {\n\t\t\t// note the icl has only the top-level classes as direct ICs\n\t\t\tfor(InterfaceFamilyType ift : icl.getInterfaceClass()) {\n//\t\t\t\tif_handler.add2Owl(ift, this.factory.getOWLThing(), output_ont);\n\t\t\t\t//System.out.println(ift.getName());\n\t\t\t\ttransformIF(ift, icl);\n\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\treturn true;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notifies profiler that named event had stopped | public void stop(String event) {
Long start = started.get(event);
if (start != null && start != NOT_STARTED) {
profile.add(event, System.currentTimeMillis() - start);
started.put(event, NOT_STARTED);
}
} | [
"public void unregisterProfileNameEvents()\n {\n profileNameListener_ = null;\n }",
"@Override\n\tpublic void stopped() {\n\t\t\n\t}",
"protected void on_stop()\n {\n }",
"private void notifyPlayerEventStopped() {\n if (logger.isActivated()) {\n logger.info(\"Player is stopped\");\n }\n Iterator<IAudioEventListener> ite = listeners.iterator();\n while (ite.hasNext()) {\n try {\n ((IAudioEventListener)ite.next()).audioStopped();\n } catch (RemoteException e) {\n if (logger.isActivated()) {\n logger.error(\"Can't notify listener\", e);\n }\n }\n }\n }",
"@EventName(\"targetCrashed\")\n EventListener onTargetCrashed(EventHandler<TargetCrashed> eventListener);",
"private void handleTerminateEvent(DebugEvent event) {\n Object source = event.getSource();\n if (thread.getDebugTarget() == source) {\n DebugPlugin.getDefault().removeDebugEventListener(this);\n }\n }",
"public void stop() {\n synchronized (eventQueue) {\n isAlive = false;\n }\n }",
"@EventName(\"targetDestroyed\")\n EventListener onTargetDestroyed(EventHandler<TargetDestroyed> eventListener);",
"public synchronized void stop() {\n isStopped = true;\n generators.forEach(EventGenerator::stop);\n EventSimulatorDataHolder.getSimulatorMap().remove(uuid);\n if (log.isDebugEnabled()) {\n log.debug(\"Stop event simulation for uuid : \" + uuid);\n }\n }",
"void stop( String profileId );",
"public void setEventName(String name);",
"void stopPumpingEvents();",
"public void stop() {\r\n if (Status.STARTED.equals(this.status)) {\r\n this.to = TimeUtils.current();\r\n\r\n listener.onStop(this);\r\n\r\n PerformanceTiming timing = CONVERTER.createEndTiming(this);\r\n measurementHub.submit(timing);\r\n }\r\n this.status = Status.STOPPED;\r\n }",
"void unregisterEventFinishedListener(EventModel event, EventListenerModel eventListener);",
"public void onServoStopped(String name);",
"public abstract void onUserStopped(int userId);",
"public interface StopListener {\n /** Called when the given {@code process} stops. */\n void stopped(VmProcess process);\n }",
"public void willStopMonitoring( Correlator<?,RecordType,?> sender );",
"public long[] stop() throws PapiException {\n // logUsage(\"stop\");\n long[] results = new long[this.eventsNr];\n int rc = Wrapper.eventSetStop(eventSetId, results);\n if (rc == Constants.PAPI_OK) {\n return results;\n }\n if (rc != Constants.PAPI_ENOTRUN) {\n PapiException.throwOnError(rc, \"stopping\");\n }\n return null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add additional type query parameter | public <TValue> ByProjectKeyByResourceTypeGet addType(final TValue type) {
return copy().addQueryParam("type", type);
} | [
"public void setQueryType(String queryType);",
"public void addParam(String type) {\n String[] origParams = getParamNames();\n String[] params = new String[origParams.length + 1];\n for (int i = 0; i < origParams.length; i++)\n params[i] = origParams[i];\n params[origParams.length] = type;\n setParams(params);\n }",
"Builder addAdditionalType(String value);",
"public void setQueryType(QueryType type);",
"public <TValue> ByProjectKeyByResourceTypeGet addType(final Collection<TValue> type) {\n return copy().addQueryParams(\n type.stream().map(s -> new ParamEntry<>(\"type\", s.toString())).collect(Collectors.toList()));\n }",
"Builder addAdditionalType(URL value);",
"public void\naddParamType( Type pParamType );",
"public void addParam(int pos, Class type) {\n addParam(pos, type.getName());\n }",
"public QueryParameter(Object value, int type) {\n this(value, type, false, false);\n }",
"public ByProjectKeyByResourceTypeGet addType(final Supplier<String> supplier) {\n return copy().addQueryParam(\"type\", supplier.get());\n }",
"QueryType createQueryType();",
"public String getQueryType();",
"public abstract void setQueryParam(Query query, String parameterName, NumberType value);",
"public static String updateQueryParamLine(final String name, final String type) {\n return \"this.updateQueryParam(\\\"\" + camelToUnderscore(name) + \"\\\", \" + type + \");\\n\";\n }",
"private VLcParamTracker addParam(String param, String type) {\n VLcParamTracker item = new VLcParamTracker(null, getVnmrIF(), param);\n item.setAttribute(VARIABLE, param);\n item.setAttribute(SUBTYPE, type);\n add(item);\n return item;\n }",
"public void addDatatype(int type){\n\n\t\t// Convert to JWalk type map\n\t\tswitch(type){\n\t\t\tcase Token.STRING:\n\t\t\t\ttype = TYPE_STRING;\n\t\t\t\tbreak;\n\t\t\tcase Token.NUMBER:\n\t\t\t\ttype = TYPE_NUMBER;\n\t\t\t\tbreak;\n\t\t\tcase Token.TRUE:\n\t\t\tcase Token.FALSE:\n\t\t\t\ttype = TYPE_BOOLEAN;\n\t\t\t\tbreak;\n\t\t\tcase Token.NULL:\n\t\t\t\ttype = TYPE_NULL;\n\t\t\t\tbreak;\n\t\t\tcase Token.THIS:\n\t\t\t\ttype = TYPE_THIS;\n\t\t\t\tbreak;\n\t\t\tcase Token.REGEXP:\n\t\t\t\ttype = TYPE_REGEXP;\n\t\t\t\tbreak;\n\t\t\t/*case Token.OBJECTLIT:\n\t\t\t\ttype = TYPE_OBJLIT;\n\t\t\t\tbreak;*/\n\t\t\tdefault:\n\t\t\t\ttype = TYPE_UNKNOWN;\n\t\t}\n\n\t\taddDatatype(new Integer(type));\n\t}",
"public void addType(int type){\t\n\t\tbufferType.add(type);\n\t}",
"public void addTypeStatement(Resource subj, URI obj) {\n\t}",
"void addTypedParameter(Parameter typedParameter);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a list of harvested DDOWiki item links into full URLs. For example, /page/Item:Duality,_the_Moral_Compass would become | static Set<String> convertWikiItemLinksToFullURL(Set<String> links) {
Set<String> items = shortenWikiItemLinks(links);
Set<String> ret = new HashSet<>();
for(String item : items) {
ret.add(WIKI_BASE_URL + item);
}
return ret;
} | [
"private static String makeLinkListString(String[] items) {\n\t\tString linkListString = \"\";\n\t\tfor (int i = 0; i < items.length; i++)\n\t\t\tlinkListString += items[i] + ((i < items.length - 1) ? LINK_LIST_SEPARATOR : \"\");\n\t\treturn linkListString;\n\t}",
"@Override\n protected List<String> convertDoisToUrls(Collection<String> dois) {\n List<String> urls = new ArrayList<String>();\n for(String doi:dois) {\n // Encode the doi, then revert the FIRST %2F (slash) back to a \"/\":\n // 10.1023/A%3A1026541510549, not\n // 10.1023%2FA%3A1026541510549\n String url = String.format(\"%sarticle/%s\", baseUrl, encodeDoi(doi).replaceFirst(\"%2F\",\"/\"));\n urls.add(url);\n }\n return urls;\n }",
"public SafeHtml linkify() {\n final String part = \"(?:\" +\n \"[a-zA-Z0-9$_+!*'%;:@=?#/~-]\" +\n \"|&(?!lt;|gt;)\" +\n \"|[.,](?!(?:\\\\s|$))\" +\n \")\";\n return replaceAll(\n \"(https?://\" +\n part + \"{2,}\" +\n \"(?:[(]\" + part + \"*\" + \"[)])*\" +\n part + \"*\" +\n \")\",\n \"<a href=\\\"$1\\\" target=\\\"_blank\\\">$1</a>\");\n }",
"protected String createUrlEntries(Map model)\r\n {\r\n StringBuilder urlEntries = new StringBuilder();\r\n List<SitemapEntry> sitemapEntries = (List<SitemapEntry>) model.get(SITEMAP_ENTRIES);\r\n for (SitemapEntry sitemapEntry : sitemapEntries)\r\n {\r\n urlEntries.append(createUrlEntry(sitemapEntry));\r\n }\r\n\r\n return urlEntries.toString();\r\n }",
"private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }",
"protected String convertLink(String doc) {\n String newStr = doc.replaceAll(\"(http(s?)://[^ ]+)\", \"url\");\n newStr = newStr.replaceAll(\"(www.[^ ]+)\", \"url\");\n return newStr;\n }",
"private static URL buildURL(List<String> args) throws MalformedURLException {\n\n\t\tfinal String IDList = args.stream().map(id -> id.toString() + \",\").reduce(\"\", String::concat);\n\n\t\treturn new URL(String.format(BASE_URL, IDList));\n\t}",
"private String buildLinksURL() {\n\n StringBuilder sb = new StringBuilder(CHAIN_LINKS_URL);\n\n try {\n\n String email = mChain.getmMemberID();\n sb.append(\"member=\");\n sb.append(URLEncoder.encode(email, \"UTF-8\"));\n\n\n String chainTitle = mChain.getmChainTitle();\n sb.append(\"&chainTitle=\");\n sb.append(URLEncoder.encode(chainTitle, \"UTF-8\"));\n\n Log.i(TAG, sb.toString());\n\n }\n catch(Exception e) {\n Toast.makeText(this, \"Something wrong with the url\" + e.getMessage(), Toast.LENGTH_LONG)\n .show();\n }\n return sb.toString();\n }",
"public List<Deals> reformatImageURLs (List<Deals> dealsList) {\n int i = 0;\n for (Deals deals : dealsList) {\n //Replace URL retrieved from target API with new one and add different number to address\n //This ensures each image loaded is different, circumventing caching by Glide service\n deals.setImage(NEW_IMAGE_URL + String.valueOf(i));\n i++;\n }\n\n return dealsList;\n }",
"public String saveLinks(){\n String linksData = new String();\n Iterator it = links.iterator();\n while(it.hasNext()){\n singleLink link = (singleLink) it.next();\n linksData = linksData + link.saveLink() + \" ENDZZZ1\";\n }\n return linksData;\n }",
"URL format(ShortLink shortLink);",
"public final static ArrayList<URL> parseUrls(String body) {\n if (body.isEmpty()) {\n return new ArrayList<URL>(0);\n }\n else {\n ArrayList<URL> urls = new ArrayList<URL>();\n for(String urlAsString : body.split(\",\")) {\n try {\n urls.add(new URL(urlAsString));\n }\n catch(MalformedURLException e) {\n e.printStackTrace();\n }\n }\n return urls;\n }\n }",
"private String fixOutboundLinks(String src) {\n\t\t\n\t\tsrc = src.replace(\"[[\", \"[[#\");\t// identify the links we need to process\n\t\ttry {\n\t\t\twhile (src.contains(\"[[#\") && src.contains(\"]]\")) {\n\t\t\t\tint a = src.indexOf(\"[[#\")+3; // identify the left bound + # character\n\t\t\t\tint b = src.indexOf(\"]]\", a); // and right bound\n\t\t\t\tString link = src.substring(a, b);\t\n\t\t\t\t// wp links may contain an alt text separated from the linked page title by a '|' char\n\t\t\t\t// if so, we only want the title\n\t\t\t\tint c = link.indexOf(\"|\");\t// this will be -1 if there's no alt text\n\t\t\t\tString linkTitle = (c == -1) ? link : src.substring(a, a+c);\n\t\t\t\tif (!target.exists(linkTitle)[0]) {\n\t\t\t\t\tsrc = src.substring(0, a-1)+\t\t\t// omits the # marker \n\t\t\t\t\t\t\t\"wikipedia:\"+\t\t\t\t\t// adds the prefix to point us back to wikipedia (i.e. not an internal link)\n\t\t\t\t\t\t\tsrc.substring(a);\t// and add the rest of the text back in\n\t\t\t\t} else {\n\t\t\t\t\tsrc = src.substring(0, a-1) + src.substring(a);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn src;\n\t}",
"@Test\n\tpublic void testTurnUrlHelpersINtoUrls() {\n\t\tMap<String, String> params = new HashMap<String, String>();\n\t\tparams.put(\"parms1\", \"1\");\n\t\tparams.put(\"parms2\", \"2\");\n\t\tparams.put(\"parms3\", \"3\");\n\t\tString paramStringPart = \"parms3=3&parms1=1&parms2=2&\";\n\t\tUrlHelper hlpr1 = new UrlHelper(\"http://stackoverflow.com\", null, null);\n\t\tString expected1 = \"http://stackoverflow.com\";\n\t\tUrlHelper hlpr2 = new UrlHelper(\"http://stackoverflow.com\", \"/users\", null);\n\t\tString expected2 = \"http://stackoverflow.com/users\";\n\t\tUrlHelper hlpr3 = new UrlHelper(\"http://stackoverflow.com\", null, params);\n\t\tString expected3 = \"http://stackoverflow.com?\" + paramStringPart;\n\t\tUrlHelper hlpr4 = new UrlHelper(\"http://stackoverflow.com\", \"/users\", params);\n\t\tString expected4 = \"http://stackoverflow.com/users?\" + paramStringPart;\n\t\tassertEquals(expected1, hlpr1.toUrl());\n\t\tassertEquals(expected2, hlpr2.toUrl());\n\t\tassertEquals(expected3, hlpr3.toUrl());\n\t\tassertEquals(expected4, hlpr4.toUrl());\n\t}",
"String fullUrl(RequestCycle requestCycle) throws LinkInvalidTargetRuntimeException, LinkParameterInjectionRuntimeException, LinkParameterValidationRuntimeException;",
"public static String quoteStringsAndJoin(List<String> items){\n return String.format(\"\\\"%s\\\"\", Joiner.on(\"\\\" \\\"\").join(items));\n }",
"public List<String> getAllLinks();",
"public void setLinkItem(String string) {\r\n this.linkItem = string;\r\n }",
"public List<String> getObjects(List<String> fullURIs) {\n List<String> abbreviatedURI = new ArrayList<>();\n StmtIterator si = model.listStatements();\n Statement s;\n while (si.hasNext()) {\n s = si.nextStatement();\n fullURIs.add(s.getObject().toString());\n abbreviatedURI.add(FileManager.getSimpleFilename(s.getObject().toString()));\n }\n return abbreviatedURI;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize NodeBar Connections in Model | public void initialize() {
for (String barname : barmap.keySet()){
Bar bar = barmap.get(barname);
bar.initialize_model_connections();
}
for (String nodename : nodemap.keySet()){
Node node = nodemap.get(nodename);
node.initialize_model_connections();
}
} | [
"@Override\n protected void setUpConnections() {\n drawer.setDrawerObservable(model);\n drawer.notifyOfChanges();\n model.addDrawerObserver(drawer);\n }",
"private void initBars()\n\t{\n\t\tfor (int i = 0; i < Constants.MAX_VALUE; i++)\n\t\t{\n\t\t\trows[i] = new Bar();\n\t\t\tcolumns[i] = new Bar();\n\t\t\tgrids[i] = new Bar();\n\t\t}\n\n\t\tfor (int rowIndex = 0; rowIndex < this.nodes.length; rowIndex++)\n\t\t{\n\t\t\tNode[] row = this.nodes[rowIndex];\n\t\t\tfor (int colIndex = 0; colIndex < row.length; colIndex++)\n\t\t\t{\n\t\t\t\tNode node = row[colIndex];\n\n\t\t\t\t// Make Rows\n\t\t\t\tthis.rows[rowIndex].nodes[colIndex] = node;\n\t\t\t\tnode.setRow(this.rows[rowIndex]);\n\n\t\t\t\t// Make Columns\n\t\t\t\tthis.columns[colIndex].nodes[rowIndex] = node;\n\t\t\t\tnode.setColumn(this.columns[colIndex]);\n\n\t\t\t\t// Make Grid\n\t\t\t\t// the index of Grid Array\n\t\t\t\tint gridIndex = colIndex / 3 + (rowIndex / 3) * 3;\n\n\t\t\t\t// the index of nodes array of one grid object\n\t\t\t\tint gridNodeIndex = colIndex % 3 + (rowIndex % 3) * 3;\n\t\t\t\tthis.grids[gridIndex].nodes[gridNodeIndex] = node;\n\t\t\t\tnode.setGrid(this.grids[gridIndex]);\n\t\t\t}\n\t\t}\n\t}",
"public LinkNodesUI() {\n initComponents();\n }",
"protected ListNodesNodeModel() {\r\n this(0, 1);\r\n }",
"private void initHubTab() {\n\n /** Create the Hiub to manage the master model \"modelHub\"\n */\n this.hub = new BoundedRangeModelHub( this.modelHub );\n\n /** Define the range values of our master model\n */\n this.modelHub.setMinimum(0);\n this.modelHub.setMaximum(5000);\n\n /** Create 3 sub models initially with an arbitrary weight of 10\n * Theses weights are editable by the user\n */\n this.modelHub1 = this.hub.createFragment( 10 );\n this.modelHub2 = this.hub.createFragment( 10 );\n this.modelHub3 = this.hub.createFragment( 10 );\n\n /** Each SubModel's range values are independant and take it directly from theses slider.\n * All models (even the master) are independant and can have theses owns range values\n */\n this.modelHub1.setMinimum( this.jSliderModel1.getMinimum() );\n this.modelHub1.setMaximum( this.jSliderModel1.getMaximum() );\n this.modelHub2.setMinimum( this.jSliderModel2.getMinimum() );\n this.modelHub2.setMaximum( this.jSliderModel2.getMaximum() );\n this.modelHub3.setMinimum( this.jSliderModel3.getMinimum() );\n this.modelHub3.setMaximum( this.jSliderModel3.getMaximum() );\n\n /** Fix some default weight for sub models\n * At this stage of initialisation, listeners are effective on spinners.\n * Theses changes will change sub model weight\n */\n this.jSpinnerModel1.setValue(40);\n this.jSpinnerModel2.setValue(60);\n this.jSpinnerModel3.setValue(20);\n\n /** Set the BusyIcon to the label\n */\n this.jLabelHub.setIcon( iconHub );\n }",
"private static void initialize() {\r\n mapperNodesCreator = new MapperNodesCreator();\r\n numOfNodes = 0;\r\n }",
"private void setNodes() {\n this.getChildren().addAll(viewLibrary, menu);\n menu.setOnAction(e -> window.setScene(new Scene((\n new MainMenuSceneBox(window,library,username)),WIDTH,HEIGHT)));\n }",
"private void initializeConnections() {\n connectionsCB.getItems().clear();\n connectionsCB.valueProperty().addListener(this);\n ConnectionsWrapper connection = (ConnectionsWrapper) XMLFileManager.loadXML(\"connections.xml\", ConnectionsWrapper.class);\n if (connection != null && connection.getConnectionList() != null) {\n fillConnectionItem(connection.getConnectionList());\n }\n }",
"private void init() {\n myNodeDetails = new NodeDetails();\n try {\n //port will store value of port used for connection\n //eg: port = 5554*2 = 11108\n String port = String.valueOf(Integer.parseInt(getMyNodeId()) * 2);\n //nodeIdHash will store hash of nodeId =>\n // eg: nodeIdHash = hashgen(5554)\n String nodeIdHash = genHash(getMyNodeId());\n myNodeDetails.setPort(port);\n myNodeDetails.setNodeIdHash(nodeIdHash);\n myNodeDetails.setPredecessorPort(port);\n myNodeDetails.setSuccessorPort(port);\n myNodeDetails.setSuccessorNodeIdHash(nodeIdHash);\n myNodeDetails.setPredecessorNodeIdHash(nodeIdHash);\n myNodeDetails.setFirstNode(true);\n\n if (getMyNodeId().equalsIgnoreCase(masterPort)) {\n chordNodeList = new ArrayList<NodeDetails>();\n chordNodeList.add(myNodeDetails);\n }\n\n } catch (Exception e) {\n Log.e(TAG,\"**************************Exception in init()**********************\");\n e.printStackTrace();\n }\n }",
"@Override\n public void initialize() {\n \tcontroller=new TrendsRuntimeController(this);\n \tJComponent trendsComponent=controller.getTrendsComponent();\n \tcomponent=trendsComponent;\n }",
"protected void initialize() {\n\n\t\tDataTable table_nodes = new DataTable(Cytoscape.getNodeAttributes(),\n\t\t\t\tDataTable.NODES);\n\t\tDataTable table_edges = new DataTable(Cytoscape.getEdgeAttributes(),\n\t\t\t\tDataTable.EDGES);\n\t\tDataTable table_network = new DataTable(Cytoscape\n\t\t\t\t.getNetworkAttributes(), DataTable.NETWORK);\n\t}",
"@Override\n protected void initBar() {\n\n }",
"public void initialize() {\n\t\tfGraph.initialize();\n\t}",
"private void initializeNodes() {\n for (NasmInst inst : nasm.listeInst) {\n Node newNode = graph.newNode();\n inst2Node.put(inst, newNode);\n node2Inst.put(newNode, inst);\n if (inst.label != null) {\n NasmLabel label = (NasmLabel) inst.label;\n label2Inst.put(label.toString(), inst);\n }\n }\n }",
"public GraphingData() {\n\t\tinitComponents();\n\t}",
"protected XTandemReaderNodeModel() {\r\n super(0, 3);\r\n }",
"private void registerNeurons(){\n\t\tneurons.add(new ObstaclesDetectionNeuron(this));\n\t\tneurons.add(new AreaLimitDetectionNeuron(this));\n\t\tneurons.add(new ButtonHandlerNeuron(this));\n\t\tneurons.add(new BeeperNeuron(this));\n\t}",
"private void initModel() {\t\n \t\t// build default tree structure\n \t\tif(treeMode == MODE_DEPENDENCY) {\n \t\t\t// don't re-init anything\n \t\t\tif(rootDependency == null) {\n \t\t\t\trootDependency = new DefaultMutableTreeNode();\n \t\t\t\tdepNode = new DefaultMutableTreeNode(); // dependent objects\n \t\t\t\tindNode = new DefaultMutableTreeNode();\n \t\t\t\tauxiliaryNode = new DefaultMutableTreeNode();\n \t\t\t\t\n \t\t\t\t// independent objects \n \t\t\t\trootDependency.add(indNode);\n \t\t\t\trootDependency.add(depNode);\n \t\t\t}\n \t\t\t\n \t\t\t// set the root\n \t\t\tmodel.setRoot(rootDependency);\n \n \t\t\t// add auxiliary node if neccessary\n \t\t\tif(showAuxiliaryObjects) {\n \t\t\t\tif(!auxiliaryNode.isNodeChild(rootDependency)) {\n \t\t\t\t\tmodel.insertNodeInto(auxiliaryNode, rootDependency, rootDependency.getChildCount());\n \t\t\t\t}\n \t\t\t}\n \t\t} else {\n \t\t\t// don't re-init anything\n \t\t\tif(rootType == null) {\n \t\t\t\trootType = new DefaultMutableTreeNode();\n \t\t\t\ttypeNodesMap = new HashMap<String, DefaultMutableTreeNode>(5);\n \t\t\t}\n \t\t\t\n \t\t\t// always try to remove the auxiliary node\n \t\t\tif(showAuxiliaryObjects && auxiliaryNode != null) {\n \t\t\t\tmodel.removeNodeFromParent(auxiliaryNode);\n \t\t\t}\n \n \t\t\t// set the root\n \t\t\tmodel.setRoot(rootType);\n \t\t}\n \t}",
"public void initiliazeNetoworkConnections() {\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check if two trips have the same return date | public boolean sameReturningDate(Trip otherTrip)
{
return this._returningDate.equals(otherTrip._returningDate);
} | [
"protected boolean hasSameDates(final Available other) {\n\t\treturn (_tDateStart.equals(other._tDateStart) &&\n\t\t _tDateStamp.equals(other._tDateStamp) &&\n\t\t _tDateEnd.equals(other._tDateEnd) &&\n\t\t _tDateCreated.equals(other._tDateCreated) &&\n\t\t _tLastModified.equals(other._tLastModified)) ;\n\t}",
"private boolean checkIfSameDate(Task t) {\n if (t instanceof TimedTask) {\n TimedTask tt = (TimedTask) t;\n return tt.getDate().isEqual(date);\n }\n return false;\n }",
"private static void assertPassingsAreOnSameDay(List<LocalDateTime> passings) {\n\t\tLocalDateTime firstPassing = passings.get(0);\n\t\tLocalDateTime lastPassing = passings.get(passings.size() - 1);\n\t\tif (!firstPassing.toLocalDate().isEqual(lastPassing.toLocalDate())) {\n\t\t\tthrow new IllegalArgumentException(\"All passings must be on the same day, arguments spanned from \" + firstPassing + \" to \" + lastPassing);\n\t\t}\n\t}",
"public boolean sameDepartureDate(Trip otherTrip)\r\n {\r\n return this._departureDate.equals(otherTrip._departureDate);\r\n }",
"if (payDateTime == adhocTicket.getPaidDateTime()) {\n System.out.println(\"Paid Date Time is passed\");\n }",
"public boolean overlap(Trip otherTrip)\r\n {\r\n \tif (!this._departureDate.after(otherTrip._returningDate) && // the current trip departure date is between\r\n \t\t\t!this._departureDate.before(otherTrip._departureDate)) // the other trip departure and returning dates\r\n \t\treturn true;\r\n \t\r\n \telse if (!this._returningDate.before(otherTrip._departureDate) && // the current trip returning date is between\r\n \t\t\t!this._returningDate.after(otherTrip._returningDate)) // the other trip departure and returning dates\r\n \t\treturn true;\r\n \t\r\n \telse if (!otherTrip._departureDate.after(this._departureDate) && // the other trip departure date is between \r\n \t\t\t!otherTrip._departureDate.before(this._returningDate)) // the current trip departure and returning dates\r\n \t\treturn true;\r\n \t\r\n \telse if (!otherTrip._returningDate.before(this._departureDate) && // the other trip returning date is between\r\n \t\t\t!otherTrip._returningDate.after(this._returningDate)) // the current trip departure and returning dates\r\n \t\treturn true;\r\n \telse\r\n \t\treturn false;\r\n }",
"private boolean sameDay(Date other) {\n\t\treturn other.day == day && other.month == month;\n\t}",
"public boolean testFindFlights() {\n\n\t\tfor (int i = 0; i < flightsToTest.size(); i++) {\n\t\t\tFlightKey key = flightsToTest.get(i);\n\t\t\tArrayList<FlightNode> results = list.findFlights(key,\n\t\t\t\t\ttimeDifference[i]);\n\t\t\tFlightNode[] expectedResult = expectedResults.get(i);\n\t\t\tif (expectedResult.length != results.size()) {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"In testFindFlights: the number of flights returned for \"\n\t\t\t\t\t\t\t\t+ key + \" is not what was expected\");\n\t\t\t\tSystem.out.println(\"Expected size versus actual size: \"\n\t\t\t\t\t\t+ expectedResult.length + \" vs \" + results.size());\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"The expected output of findFlights method on this flight with \"\n\t\t\t\t\t\t\t\t+ \" time difference of \"\n\t\t\t\t\t\t\t\t+ timeDifference[i]\n\t\t\t\t\t\t\t\t+ \" hours is: \");\n\t\t\t\tfor (int l = 0; l < expectedResult.length; l++)\n\t\t\t\t\tSystem.out.println(expectedResult[l].getKey() + \" \");\n\t\t\t\treturn false; // failed the test\n\t\t\t}\n\t\t\tfor (int k = 0; k < expectedResult.length; k++) {\n\t\t\t\tFlightNode node1 = expectedResult[k];\n\t\t\t\tFlightNode node2 = results.get(k);\n\t\t\t\tFlightKey ndkey1 = node1.getKey();\n\t\t\t\tFlightKey ndkey2 = node2.getKey();\n\t\t\t\tboolean bol = (((ndkey1.getOrigin()).equals(ndkey2.getOrigin()))\n\t\t\t\t\t\t&& ((ndkey1.getDest()).equals(ndkey2.getDest()))\n\t\t\t\t\t\t&& ((ndkey1.getDate()).equals(ndkey2.getDate())) && ((ndkey1\n\t\t\t\t\t\t.getTime()).equals(ndkey2.getTime())));\n\t\t\t\t{\n\t\t\t\t\tif (!bol) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"At least one of the flights returned by findFlights is incorrect: \"\n\t\t\t\t\t\t\t\t\t\t+ ndkey1);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"testFindFlights = success.\");\n\t\treturn true;\n\t}",
"if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }",
"public boolean checkforDuplicates(Tour tocheck) {\r\n\t\t boolean duplicate=false;\r\n\t\tfor(int t=0; t<tours.length-1;t++) {\r\n\t\t\tif(tocheck.checkforOrderDiffrence(tours[t])==false) {\r\n\t\t\t\tduplicate=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn duplicate;\r\n\t}",
"private Boolean compareDay(DateSerial cachedDate){\n\t\tCalendar cal1 = Calendar.getInstance();\n\t\tCalendar cal2 = Calendar.getInstance();\n\t\tDate currentDate = new Date();\n\t\tcal1.setTime(cachedDate.getSaveDate());\n\t\tcal2.setTime(currentDate);\n\t\tboolean sameDay = cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) &&\n\t\t cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR);\n\t\treturn !sameDay;\n\t}",
"protected boolean isOverdue() {\n\t\t// this might be backwards, go back and check later\n\t\t/*int i = todaysDate.compareTo(returnDate);// returns 0, a positive num, or a negative num\n\t\tif (i == 0) { return false;}\t\t// the dates are equal, not overdue\n\t\telse if (i > 0) { return true; }\t// positive value if the invoking object is later than date\n\t\telse { return false; } */\t\t\t// negative value if the invoking object is earlier than date\n\t\t\n\t\t// can also do\n\t\tif (todaysDate.getTime() > returnDate.getTime() ) { return true; }\n\t\telse { return false; }\t// if the difference in time is less than or equal\n\t}",
"boolean hasJudgement_passing_date();",
"protected boolean isValidReturnDate(final Map<String, Map<String, TransportOfferingModel>> transportOfferings)\n\t{\n\t\tif (transportOfferings.size() < NdcservicesConstants.RETURN_FLIGHT_LEG_NUMBER)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tZonedDateTime arrivalUtcTime = TravelDateUtils.getUtcZonedDateTime(getTimeService().getCurrentTime(),\n\t\t\t\tZoneId.systemDefault());\n\n\t\tfor (final Map.Entry<String, TransportOfferingModel> transportOffering : transportOfferings\n\t\t\t\t.get(String.valueOf(NdcservicesConstants.OUTBOUND_FLIGHT_REF_NUMBER)).entrySet())\n\t\t{\n\t\t\tfinal ZonedDateTime offeringDepartureUtc = getNdcTransportOfferingService()\n\t\t\t\t\t.getArrivalZonedDateTimeFromTransportOffering(transportOffering.getValue());\n\t\t\tif (arrivalUtcTime.isBefore(offeringDepartureUtc))\n\t\t\t{\n\t\t\t\tarrivalUtcTime = offeringDepartureUtc;\n\t\t\t}\n\t\t}\n\n\t\tarrivalUtcTime = arrivalUtcTime.plus(TravelfacadesConstants.MIN_BOOKING_ADVANCE_TIME, ChronoUnit.HOURS);\n\n\t\tfor (final Map.Entry<String, TransportOfferingModel> transportOffering : transportOfferings\n\t\t\t\t.get(String.valueOf(NdcservicesConstants.INBOUND_FLIGHT_REF_NUMBER)).entrySet())\n\t\t{\n\t\t\tfinal ZonedDateTime offeringDepartureUtc = getNdcTransportOfferingService()\n\t\t\t\t\t.getDepartureZonedDateTimeFromTransportOffering(transportOffering.getValue());\n\t\t\tif (arrivalUtcTime.isAfter(offeringDepartureUtc))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"private boolean verifyTransientDate(TransientTask task) {\n for (int i = 0; i < transientTasks.size(); i++) {\r\n TransientTask currentTask = transientTasks.get(i);\r\n if (currentTask.getDate() == task.getDate()) {\r\n float currentTaskStartTime = currentTask.getStartTime();\r\n float currentTaskEndTime = currentTask.getEndTime();\r\n\r\n //This disqualifies same start time, and the task to be added is in the duration of another task\r\n if (task.getStartTime() >= currentTaskStartTime && task.getStartTime() < currentTaskEndTime) {\r\n System.out.println(\"conflict with: \"+ currentTask.getName());\r\n return false;\r\n }\r\n\r\n //is the task has a duration that bleeds onto another task\r\n if (task.getEndTime() > currentTaskStartTime && task.getEndTime() <= currentTaskEndTime) {\r\n System.out.println(\"conflict with: \"+ currentTask.getName());\r\n return false;\r\n }\r\n\r\n // Case where task to be added starts before current task and ends after current task\r\n if (task.getStartTime() <= currentTaskStartTime && task.getEndTime() >= currentTaskEndTime) {\r\n System.out.println(\"conflict with: \"+ currentTask.getName());\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n // Check if task to be added clashes with any recurring tasks\r\n for (RecurringTask recTask : recurringTasks) {\r\n //if the task is weekly\r\n if(recTask.getFrequency()==7){\r\n\r\n // Check if this recurring task occurs on the same day as task to be added\r\n if (getDayOfWeek(recTask.getStartDate()) == getDayOfWeek(task.getDate())) {\r\n\r\n // Check if this recurring task overlaps with the task to be added\r\n if ((task.getStartTime() >= recTask.getStartTime() && task.getStartTime() < recTask.getEndTime())\r\n || (task.getEndTime() > recTask.getStartTime() && task.getEndTime() <= recTask.getEndTime())\r\n || (task.getStartTime() <= recTask.getStartTime() && task.getEndTime() >= recTask.getEndTime())) {\r\n\r\n // Check if there is an anti-task that cancels out this overlapping recurring task\r\n for (AntiTask antiTask : antiTasks) {\r\n // First check if anti-task date matches the task to be added\r\n if (antiTask.getDate() == task.getDate()) {\r\n // Check if this anti-task matches the recurring task. If it matches, this recurring task shouldn't block the task we are trying to add.\r\n if (antiTask.getStartTime() == recTask.getStartTime()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n // No anti-task found to cancel this blocking recurring task\r\n return false;\r\n }\r\n }\r\n }\r\n //if the task is daily\r\n else{\r\n //checking if it falls in the range of the recurring task INCLUDING SAME DAY (\"<= or >=\")\r\n if(task.getDate() <= recTask.getEndDate() && task.getDate() >= recTask.getStartDate()){\r\n //check if they have any overlapping times\r\n float currentTaskStartTime = recTask.getStartTime();\r\n float currentTaskEndTime = recTask.getEndTime();\r\n\r\n //This disqualifies same start time, and the task to be added is in the duration of another task\r\n if ((task.getStartTime() >= recTask.getStartTime() && task.getStartTime() < recTask.getEndTime())\r\n || (task.getEndTime() > recTask.getStartTime() && task.getEndTime() <= recTask.getEndTime())\r\n || (task.getStartTime() <= recTask.getStartTime() && task.getEndTime() >= recTask.getEndTime())) {\r\n for (AntiTask antiTask : antiTasks) {\r\n // First check if anti-task date matches the task to be added\r\n if (antiTask.getDate() == task.getDate()) {\r\n // Check if this anti-task matches the recurring task. If it matches, this recurring task shouldn't block the task we are trying to add.\r\n if (antiTask.getStartTime() == recTask.getStartTime()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n // No blocking overlapping transient or recurring tasks\r\n return true;\r\n }",
"private static Boolean endsSameDay(Date start, Date end){\n Logger.info(\"CalendarController.endsSameDay() has worked\");\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd\");\n return dateFormat.format(start).equals(dateFormat.format(end));\n }",
"private void method_check_validations()\n {\n Calendar cal = Calendar.getInstance();\n Date latest_datetime = cal.getTime();\n Date date_latest = null;\n //Added\n Date testlatest = null;\n //For departure time validation when current and departure dates are same\n String latest_dateStr = sdf.format(latest_datetime);\n try\n {\n date_latest = sdf.parse(latest_dateStr);\n //Added\n String str = dateFormat1.format(latest_datetime);\n testlatest = dateFormat1.parse(str);\n }\n catch (ParseException e)\n {\n Log.e(\"Exception e\", \"@@@@@@@@@@@\" + e.toString());\n }\n// Log.e(\"checking\", \"\" + (date_depart.equals(date_latest) && !test.after(testlatest)));\n// Log.e(\"time_depart\", \"\" + time_depart);\n // Log.e(\"latest_datetime\", \"\" + latest_datetime);\n // Log.e(\"Log check\", \"\" + (test.after(testlatest)));\n // Log.e(\"Log check\", \"\" + (!test.after(testlatest)));\n // Log.e(\"Log check\", \"\" + ( date_depart.equals(date_latest) && !test.after(testlatest)));\n\n //For Single Trip\n if (static_string != \"round\")\n {\n if (autocompleteFrom.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter Leaving From\");\n }\n else if (strng_lat_from.equals(\"0.0\") || strng_lat_from.equals(\"0\") || strng_lat_from.equals(\"\"))\n {\n snackbar_method(\"Select Leaving From point from dropdown only\");\n }\n else if (autocompleteTo.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter Leaving To\");\n }\n\n else if (strng_lat_to.equals(\"0.0\") || strng_lat_to.equals(\"0\") || strng_lat_to.equals(\"\"))\n {\n snackbar_method(\"Select Leaving To point from dropdown only\");\n\n }\n else if (txt_departure_date.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter Departure Date\");\n }\n else if (txt_departure_time.getText().toString().length() <= 0)\n {\n\n snackbar_method(\"Enter Departure Time\");\n }\n else if (date_depart.equals(date_latest) && !test.after(testlatest))\n {\n Log.e(\"LOGGGG \", \"after\" + time_depart.after(latest_datetime));\n snackbar_method(\"Please update your departure time.\");\n txt_departure_time.setText(\"\");\n\n }\n //else if (depart_date.equals(date_latest) && !time_depart.after(latest_datetime)) {\n else if (date_depart.equals(date_latest) && !time_depart.after(latest_datetime))//Wed Feb 17 18:29:00 GMT+05:30 2016\n {\n Log.e(\"Log\", \"EQUA\" + !(time_difference(3, latest_datetime) >= 5));\n\n Log.e(\"LOGGGG \", \"after\" + time_depart.after(latest_datetime));\n snackbar_method(\"Please update your departure time.\");\n txt_departure_time.setText(\"\");\n\n }\n // else if (depart_date.equals(date_latest) && !(time_difference(3, latest_datetime) >= 5)) {\n else if (date_depart.equals(date_latest) && !(time_difference(3, latest_datetime) >= 5))\n {\n snackbar_method(\"Please update your departure time.\");\n txt_departure_time.setText(\"\");\n }\n // else if (depart_date.before(date_latest)) {\n else if (date_depart.before(date_latest))\n {\n snackbar_method(\"Please update your departure date and time.\");\n txt_departure_date.setText(\"\");\n txt_departure_time.setText(\"\");\n }\n else if (txt_number_Seats.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter seat available\");\n }\n else if (txt_number_Seats.getText().toString().equals(\"0\"))\n {\n snackbar_method(\"Seat available cannot be 0\");\n }\n /*else if (txt_rate_per_seat.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter seat cost\");\n }*/\n /* else if (!seat_RateValidation(txt_rate_per_seat.getText().toString().trim()))\n {\n snackbar_method(\"Please enter appropriate seat rate.\");\n }*/\n else if ((edt_car_name.getText().toString().trim()).length() <= 0)\n {\n snackbar_method(\"Enter vehicle name\");\n }\n else if ((edt_car_number.getText().toString().trim()).length() <= 0)\n {\n snackbar_method(\"Enter vehicle number\");\n }\n else if (txt_number_Seats.getText().toString().equals(\"0\"))\n {\n snackbar_method(\"Seat available cannot be 0\");\n }\n else if (autocomplete_new_entry_midpnt.getText().toString().length() > 0)\n {\n snackbar_method(\"Commit your mid point first\");\n }\n else if (txt_car_top.getText().toString().equals(\"Bike Information\"))\n {\n\n if (txt_number_Seats.getText().toString().equals(\"1\"))\n {\n HitService();\n }\n else\n {\n snackbar_method(\"Seat available for bike has to be 1\");\n }\n }\n else\n {\n HitService();\n }\n\n //For Round Trip\n\n }\n else if (static_string == \"round\")\n {\n if (autocompleteFrom.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter Leaving From\");\n }\n else if (strng_lat_from.equals(\"0.0\") || strng_lat_from.equals(\"0\") || strng_lat_from.equals(\"\"))\n {\n snackbar_method(\"Select Leaving From point from dropdown only\");\n }\n else if (autocompleteTo.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter Leaving To\");\n }\n\n else if (strng_lat_to.equals(\"0.0\") || strng_lat_to.equals(\"0\") || strng_lat_to.equals(\"\"))\n {\n snackbar_method(\"Select Leaving To point from dropdown only\");\n\n }\n else if (txt_departure_date.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter departure date\");\n }\n else if (txt_departure_time.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter departure time\");\n }\n else if (txt_return_date.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter return date\");\n }\n else if (txt_return_time.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter return time\");\n }\n else if (date_depart.equals(date_latest) && !test.after(testlatest))\n {\n Log.e(\"LOGGGG \", \"after\" + time_depart.after(latest_datetime));\n snackbar_method(\"Please update your departure and return time.\");\n txt_departure_time.setText(\"\");\n txt_return_time.setText(\"\");\n\n }\n // else if (depart_date.equals(date_latest) && !time_depart.after(latest_datetime)) {\n else if (date_depart.equals(date_latest) && !time_depart.after(latest_datetime))\n {\n Log.e(\"LOGGGG \", \"after\" + time_depart.after(latest_datetime));\n snackbar_method(\"Please update your departure and return time.\");\n txt_departure_time.setText(\"\");\n txt_return_time.setText(\"\");\n\n }\n // else if (depart_date.equals(date_latest) && !(time_difference(3, latest_datetime) >= 5)) {\n else if (date_depart.equals(date_latest) && !(time_difference(3, latest_datetime) >= 5))\n {\n Log.e(\"LOGGGG \", \"(((((((((((\" + (time_difference(3, latest_datetime) >= 5));\n snackbar_method(\"Please update your departure and return time.\");\n txt_departure_time.setText(\"\");\n txt_return_time.setText(\"\");\n }\n // else if (depart_date.before(date_latest)) {\n else if (date_depart.before(date_latest))\n {\n snackbar_method(\"Please update your date and time.\");\n txt_departure_date.setText(\"\");\n txt_departure_time.setText(\"\");\n txt_return_date.setText(\"\");\n txt_return_time.setText(\"\");\n }\n else if (!(date_depart.equals(date_return)) && !(date_depart.before(date_return)))\n {\n snackbar_method(\"Please update your date and time.\");\n txt_departure_date.setText(\"\");\n txt_departure_time.setText(\"\");\n txt_return_date.setText(\"\");\n txt_return_time.setText(\"\");\n }\n else if (txt_number_Seats.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter seat available\");\n }\n else if (txt_number_Seats.getText().toString().equals(\"0\"))\n {\n snackbar_method(\"Seat available cannot be 0\");\n }\n /* else if (txt_rate_per_seat.getText().toString().length() <= 0)\n {\n snackbar_method(\"Enter seat cost\");\n }\n else if (!seat_RateValidation(txt_rate_per_seat.getText().toString().trim()))\n {\n snackbar_method(\"Please enter appropriate seat rate.\");\n }*/\n else if ((edt_car_name.getText().toString().trim()).length() <= 0)\n {\n snackbar_method(\"Enter vehicle name\");\n }\n else if ((edt_car_number.getText().toString().trim()).length() <= 0)\n {\n snackbar_method(\"Enter vehicle number\");\n }\n else if (txt_number_Seats.getText().toString().equals(\"0\"))\n {\n snackbar_method(\"Seat available cannot be 0\");\n }\n else if (autocomplete_new_entry_midpnt.getText().toString().length() > 0)\n {\n snackbar_method(\"Commit your mid point first\");\n }\n else if (txt_car_top.getText().toString().equals(\"Car Information\"))\n {\n HitService();\n }\n else if (txt_car_top.getText().toString().equals(\"Bike Information\"))\n {\n if (!txt_number_Seats.getText().toString().equals(\"1\"))\n {\n snackbar_method(\"Seat available for bike has to be 1\");\n }\n else\n {\n HitService();\n }\n }\n else\n {\n HitService();\n }\n\n }\n }",
"private boolean isSame(Calendar first, Calendar second)\n {\n return (first.get(Calendar.DAY_OF_MONTH) == second.get(Calendar.DAY_OF_MONTH))\n && (first.get(Calendar.MONTH) == second.get(Calendar.MONTH))\n && (first.get(Calendar.YEAR) == second.get(Calendar.YEAR));\n }",
"int existsSame(String startDate1,String endDate1,String startDate2,String endDate2) throws SQLException, ParseException {\n Connection con = db.connection();\n PreparedStatement stmt = con.prepareStatement(\"select id from rateplan where rp1startdate = ? and rp1enddate = ? and rp2startdate = ? and rp2enddate = ?\");\n stmt.setDate(1,getDate(startDate1));\n stmt.setDate(2,getDate(endDate1));\n stmt.setDate(3,getDate(startDate2));\n stmt.setDate(4,getDate(endDate2));\n\n ResultSet rs = stmt.executeQuery();\n if (rs.next())\n return rs.getInt(1);\n return -1;\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new page in PDF document. | public void createNewPage(); | [
"public void create() {\n PDDocument document = new PDDocument();\n PDPage page = new PDPage();\n document.addPage(page);\n\n // Create a new font object selecting one of the PDF base fonts\n PDFont font = PDType1Font.HELVETICA_BOLD;\n try (document) {\n // Start a new content stream which will \"hold\" the to be created content\n writeDataToDocument(document, page, font);\n // Save the results and ensure that the document is properly closed:\n document.save(\"Hello World.pdf\");\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n }",
"PdfPage makePage(PdfDocument pdfDocument,\n Object pdfPageObject)\n throws PdfException;",
"public static void startNewPage( Document document )\n {\n document.newPage();\n }",
"public void createPage() {\n AddPageCommand c = new AddPageCommand(this);\n PagePane p = new PagePane();\n PageModel m = (PageModel) p.getModel();\n String pageKey = EnumFactory.getInstance().createKey(EnumFactory.PAGE);\n m.setKey(pageKey);\n m.setEnum(EnumFactory.getInstance().createEnum(EnumFactory.PAGE));\n c.add(p);\n execute(c);\n }",
"protected void createPDF() {\n PdfCreator pdfCreator = new PdfCreator(MainActivity.this);\n pdfCreator.createPdf();\n }",
"Page createPage();",
"public void createPdf() {\n\t\tDocument document = new Document();\n\t\ttry {\n\t\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\tFont header = new Font(Font.FontFamily.HELVETICA, 15, Font.BOLD);\n\t\t\tdocument.open();\n\t\t\t// set the title on the page as \"My Albums\"\n\t\t\tif (state.equals(\"a\")) {\n\t\t\t\tParagraph aHead = new Paragraph();\n\t\t\t\taHead.setFont(header);\n\t\t\t\taHead.add(\"My Albums\\n\\n\");\n\t\t\t\tdocument.add(aHead);\n\t\t\t}\n\t\t\t// or set the title on the page as \"My Publications\"\n\t\t\telse if (state.equals(\"p\")) {\n\t\t\t\tParagraph pHead = new Paragraph();\n\t\t\t\tpHead.setFont(header);\n\t\t\t\tpHead.add(\"My Publications\\n\\n\");\n\t\t\t\tdocument.add(pHead);\n\t\t\t}\n\t\t\t// create the table of albums/publications\n\t\t\tdocument.add(createTable());\n\t\t\tdocument.close();\n\t\t\tFile f = new File(fileName);\n\t\t\ttry {\n\t\t\t\tDesktop.getDesktop().browse(f.toURI());\n\t\t\t}\n\t\t\tcatch(IOException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (DocumentException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void CreatePdfDocument() \n\t{\n\t\t//初始化相关配置\n\t\tGlobalConf gc = new GlobalConf();\n\n\t\t//数据初始化\n\t\tDataInit();\n\n\t\t//设置页面大小\n\t\tRectangle pagesize = new Rectangle(GlobalConf.pageWidth, GlobalConf.pageHeight);\n\t\tDocument docm = new Document(pagesize,(float)GlobalConf.pageWidth*0.05f,(float)GlobalConf.pageWidth*0.05f,\n\t\t\t\t(float)GlobalConf.pageHeight*0.05f,(float) GlobalConf.pageHeight*0.1f);\n\t\tPdfWriter pwriter = null;\n\n\n\t\ttry {\n\n\t\t\ttry {\n\t\t\t\t//初始化pdf读写对象\n\t\t\t\tpwriter = PdfWriter.getInstance(docm, new FileOutputStream(GlobalConf.pdfFileName));\n\t\t\t} catch (FileNotFoundException fnfe) {\n\t\t\t\tSystem.err.println(fnfe.getMessage());\n\t\t\t}\n\n\t\t\t//设置页眉页脚\n\t\t\tHeader header = new Header();\n\t\t\tpwriter.setPageEvent(header);\n\n\t\t\tpwriter.setViewerPreferences(pwriter.PageModeUseOutlines);\n\t\t\t//pwriter.setViewerPreferences(PdfWriter.PageModeFullScreen);\n\t\t\t//pwriter.setPageEvent(new TransitionDuration());\n\n\t\t\tdocm.addAuthor(\"Liang Yang\");\n\t\t\tdocm.addSubject(\"PDF File AutoYielded by Software\");\n\n\t\t\tdocm.open();\n\n\t\t\t//制作封面\n\t\t\tMakePDFCover(docm);\n\n\t\t\t//制作目录\n\t\t\tMakePDFIndex(docm);\n\t\t\t//docm.newPage();\n\n\t\t\t//写后续9页内容\n\t\t\tfor (int i = 1; i <= 8; i++) {\n\n\t\t\t\tParagraph cTitle = new Paragraph(listStr[i-1], YH_NORMAL);\n\t\t\t\tcTitle.setSpacingBefore(10);\n\t\t\t\tChapter chap = new Chapter(cTitle, i);\n\n\t\t\t\t//Paragraph subTitle = new Paragraph(\"Section \" + i, YH_NORMAL);\n\t\t\t\t//Section sect = chap.addSection(subTitle, 1);\n\t\t\t\t//sect.setBookmarkOpen(false);\n\n\t\t\t\tString str = BuildFirstDesc(i-1);\n\t\t\t\tSystem.out.println(\"Page\" + i + \" : \" + str);\n\n\t\t\t\tif (i == 1) {\n\t\t\t\t//第一页,totalValue判断,内容较多\n\t\t\t\t\tAddFirstDescription(chap, str);\n\t\t\t\t} else {\n\t\t\t\t\tAddDescription(chap, str);\n\t\t\t\t}\n\n\t\t\t\t//添加1.2表格\n\t\t\t\tAddHistTable(chap, i-1);\n\n\t\t\t\t//添加1.3走势说明\n\t\t\t\tAddTendDesc(chap);\n\n\t\t\t\t//添加章节\n\t\t\t\tdocm.add(chap);\n\n\t\t\t\t//绘制每页中图像, 包括温度计和走势图\n\t\t\t\tMakePageImage(pwriter, (float)(listVal[i-1]), i-1);\n\n\t\t\t}\n\n\t\t\n\t\t} catch (DocumentException de) {\n\t\t\tSystem.err.println(de.getMessage());\n\t\t}\n\n\t\tdocm.close();\n\t}",
"public abstract void createPages();",
"@Override\n public void createPdfDocument(String dirName, String pdfName) throws IOException {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n File Root = Environment.getExternalStorageDirectory();\n File Dir = new File(Root.getAbsolutePath() + dirName);\n if (!Dir.exists()) {\n boolean created = Dir.mkdir();\n if (!created) {\n Toast.makeText(context, \"Dir cannot be created.\", Toast.LENGTH_SHORT).show();\n }\n }\n //Creating pdf file in the external storage.\n pdfFile = new File(Dir, pdfName);\n } else {\n Toast.makeText(context, \"SD card not found.\", Toast.LENGTH_SHORT).show();\n }\n //Creating pdf document.\n pdDocument = new PDDocument();\n\n try {\n //Adding first page to the pdf document.\n addNewPage();\n } catch (IOException e) {\n throw new IOException(\"Pdf document cannot be added to pdf. Pdf export failed.\");\n }\n\n currPageWidth = page.getMediaBox().getWidth();\n pageMargin = 0;\n xPageStart = pageMargin;\n yPageStart = page.getMediaBox().getHeight() - pageMargin;\n xCursor = xPageStart;\n yCursor = yPageStart;\n }",
"public void writeToPDF() {\n\n PDDocument document = new PDDocument();\n\n for(int pageNo = 0; pageNo < NUMBER_OF_PAGES; pageNo++) {\n PDPage page = new PDPage();\n document.addPage(page);\n }\n\n PDPage currentPage = document.getPage(0);\n PDRectangle pageBox = currentPage.getMediaBox();\n String title = \"Group Chat Analysis\";\n\n try {\n\n writePageOne(document);\n writePageTwo(document);\n writePageThree(document);\n writePageFour(document);\n writePageFive(document);\n writePageSix(document);\n writePageSeven(document);\n\n document.save(\"C:\\\\chart.pdf\");\n document.close();\n\n } catch (Exception e) {\n e.getStackTrace();\n }\n }",
"void createPage0() {\n\n\t}",
"public void addPage() {\n Context context = App.getContext();\n //get index for new current page\n int index = 0;\n if (currentPage != null) {\n index = currentPage.getIndex() + 1;\n }\n if(currentPage == null || !currentPage.isPageEmpty()){\n //add page to template\n currentPage = new TemplatePage(index);\n currentTemplate.addPage(currentPage);\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n View newView = inflater.inflate(R.layout.new_page, null);\n //Add page to the list so we keep track of the pages for printing\n pageViews.add(newView.findViewById(R.id.linearLayoutBody));\n //Add new page under last\n linearLayoutPdf.addView(newView, linearLayoutPdf.getChildCount());\n //focus on new page\n linearLayoutBody = newView.findViewById(R.id.linearLayoutBody);\n //Number the page\n linearLayoutBody.setTag(currentPage);\n TextView footer = linearLayoutBody.findViewById(R.id.footer);\n footer.setText(\"Page \" + (index + 1));\n //log\n LogManager.reportStatus(context, \"INSPECTOR\", \"onAddPage\");\n //add slots\n if(!isLoading){\n isLoading = true;\n int slot = 16;\n while (slot > 0){\n addSpacer(0);\n slot = slot - 1;\n }\n isLoading = false;\n }\n } else{\n //do nothing, current page is empty\n LogManager.reportStatus(context, \"INSPECTOR\", \"pageNotAdded:PageEmpty\");\n }\n }",
"PdfPage getPage();",
"public PDFPages(PDFDocument document) {\n setObjectNumber(document);\n }",
"public PDFPage makePage(final PDFResources resources, final int pageIndex,\n final Rectangle2D mediaBox, final Rectangle2D cropBox,\n final Rectangle2D bleedBox, final Rectangle2D trimBox) {\n /*\n * create a PDFPage with the next object number, the given resources,\n * contents and dimensions\n */\n final PDFPage page = new PDFPage(resources, pageIndex, mediaBox,\n cropBox, bleedBox, trimBox);\n\n getDocument().assignObjectNumber(page);\n getDocument().getPages().addPage(page);\n return page;\n }",
"public PDFPages makePages() {\n final PDFPages pdfPages = new PDFPages(++this.document.objectcount);\n pdfPages.setDocument(getDocument());\n getDocument().addTrailerObject(pdfPages);\n return pdfPages;\n }",
"public void createPdf(String fileName)\n {\n try {\n PdfWriter.getInstance(document, new FileOutputStream(fileName));\n document.open();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\t}",
"public static void splitAndCreatePdf(final String inputFile, final String outputFile, final Integer[] pages) {\n\n\t\tDocument document = new Document();\n\t\tPdfWriter writer = null;\n\t\ttry {\n\t\t\tPdfReader inputPDF = new PdfReader(inputFile);\n\n\t\t\t// Create a writer for the output stream\n\t\t\twriter = PdfWriter.getInstance(document, new FileOutputStream(outputFile));\n\n\t\t\tdocument.open();\n\t\t\tPdfContentByte pcb = writer.getDirectContent(); // Holds the PDF data\n\t\t\tPdfImportedPage page;\n\n\t\t\tfor (int i = 0; i < pages.length; i++) {\n\t\t\t\tdocument.newPage();\n\t\t\t\tpage = writer.getImportedPage(inputPDF, pages[i]);\n\t\t\t\tpcb.addTemplate(page, 0, 0);\n\t\t\t}\n\t\t\tdocument.close();\n\t\t\twriter.close();\n\t\t} catch (IOException | DocumentException e) {\n\t\t\tthrow new ApplicationException(1001, \"Unable to split pdf\", e);\n\t\t}\n\n\t\tfinally {\n\t\t\tif (document.isOpen()) {\n\t\t\t\tdocument.close();\n\t\t\t}\n\t\t\tif (writer != null) {\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
based on file contents see what the newline type is | private static String newlineFromFile(String fileContents) {
String newline = "\n";
if (fileContents.contains("\\r\\n")) {
newline = "\\r\\n";
}
if (fileContents.contains("\\n\\r")) {
newline = "\\n\\r";
}
if (fileContents.contains("\\r")) {
newline = "\\r";
}
return newline;
} | [
"@Test\n public void test_parsenewlines_crlf() {\n NewlineParser nlp = new NewlineParser();\n Diagnostics<Diagnosis> diagnostics = new Diagnostics<Diagnosis>();\n byte[] bytes;\n int expectedNewlines;\n boolean expectedMissingCr;\n boolean expectedMissingLf;\n boolean expectedMisplacedCr;\n boolean expectedMisplacedLf;\n String expectedRemaining;\n ByteArrayInputStream in;\n ByteCountingPushBackInputStream pbin;\n int newlines;\n byte[] remainingBytes = new byte[16];\n int remaining;\n String remainingStr;\n\n Object[][] cases = {\n {\"\".getBytes(), 0, false, false, false, false, \"\"},\n {\"a\".getBytes(), 0, false, false, false, false, \"a\"},\n {\"a\\r\".getBytes(), 0, false, false, false, false, \"a\\r\"},\n {\"a\\n\".getBytes(), 0, false, false, false, false, \"a\\n\"},\n {\"a\\r\\n\".getBytes(), 0, false, false, false, false, \"a\\r\\n\"},\n {\"a\\n\\r\".getBytes(), 0, false, false, false, false, \"a\\n\\r\"},\n {\"\\n\".getBytes(), 1, true, false, false, false, \"\"},\n {\"\\r\".getBytes(), 1, false, true, false, false, \"\"},\n {\"\\r\\n\".getBytes(), 1, false, false, false, false, \"\"},\n {\"\\ra\".getBytes(), 1, false, true, false, false, \"a\"},\n {\"\\r\\n\\n\".getBytes(), 2, true, false, false, false, \"\"},\n {\"\\n\\r\\n\".getBytes(), 2, true, false, true, true, \"\"},\n {\"\\r\\n\\r\\n\".getBytes(), 2, false, false, false, false, \"\"},\n {\"\\r\\n\\na\".getBytes(), 2, true, false, false, false, \"a\"},\n {\"\\n\\r\\na\".getBytes(), 2, true, false, true, true, \"a\"},\n {\"\\r\\n\\r\\na\".getBytes(), 2, false, false, false, false, \"a\"},\n {\"\\n\\r\\n\\ra\".getBytes(), 2, false, false, true, true, \"a\"}\n };\n\n try {\n for (int i=0; i<cases.length; ++i) {\n bytes = (byte[])cases[i][0];\n expectedNewlines = (Integer)cases[i][1];\n expectedMissingCr = (Boolean)cases[i][2];\n expectedMissingLf = (Boolean)cases[i][3];\n expectedMisplacedCr = (Boolean)cases[i][4];\n expectedMisplacedLf = (Boolean)cases[i][5];\n expectedRemaining = (String)cases[i][6];\n // debug\n //System.out.println(Base16.encodeArray(bytes));\n in = new ByteArrayInputStream(bytes);\n pbin = new ByteCountingPushBackInputStream(in, 16);\n newlines = nlp.parseCRLFs(pbin, diagnostics);\n Assert.assertEquals(expectedNewlines, newlines);\n Assert.assertEquals(expectedMissingCr, nlp.bMissingCr);\n Assert.assertEquals(expectedMissingLf, nlp.bMissingLf);\n Assert.assertEquals(expectedMisplacedCr, nlp.bMisplacedCr);\n Assert.assertEquals(expectedMisplacedLf, nlp.bMisplacedLf);\n remaining = pbin.read(remainingBytes);\n if (remaining == -1) {\n remaining = 0;\n }\n remainingStr = new String(remainingBytes, 0, remaining);\n Assert.assertEquals(expectedRemaining, remainingStr);\n }\n } catch (IOException e) {\n e.printStackTrace();\n Assert.fail(\"Unexepected exception!\");\n }\n }",
"private static int isNewLine(final byte[] data, final int index) {\n if (index + 1 < data.length\n && ((data[index] == '\\n' && data[index + 1] == '\\r') || data[index] == '\\r'\n && data[index + 1] == '\\n')) {\n // found 2 byte new line\n return 2;\n } else if (index < data.length && data[index] == '\\n') {\n // line\n return 1;\n } else {\n return 0;\n }\n\n }",
"private boolean containsNewline(final byte[] buffer) {\n for (int pos = 0; pos < buffer.length; pos++) {\n if (buffer[pos] == '\\r' || buffer[pos] == '\\n') {\n return true;\n }\n }\n return false;\n }",
"private void readFileContent() throws IOException {\n\t\tString strLine = null;\n\t\t\n\t\tfor ( strLine = _reader.readLine(); strLine != null; strLine = _reader.readLine() ) {\n\t\t\tif ( \n\t\t\t\t\tstrLine.trim().length() != 0\t\t\t\t\t \t// line is not empty\n\t\t\t\t && strLine.charAt(INT_POS_COMMENTS - 1) != '*' ) {\t\t// line is not commented\n\t\t\t\t\n\t\t\t\t//System.out.println( \"Raw line '\" + strLine + \"'\" );\n\t\t\t\t\n\t\t\t\t// remove the first 8 characters\n\t\t\t\ttry {\n\t\t\t\t\tstrLine = strLine.substring(INT_POS_COMMENTS);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e) {\n\t\t\t\t\t// do nothing\n\t\t\t\t}\n\n\t\t\t\t// remove the characters behind position 80 if present\n\t\t\t\ttry {\n\t\t\t\t\tstrLine = strLine.substring(0, INT_POS_EOL - INT_POS_COMMENTS);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e) {\n\t\t\t\t\t// do nothing\n\t\t\t\t}\n\n\t\t\t\t// remove potential useless spaces\n\t\t\t\tstrLine.trim();\n\n\t\t\t\t//_mapLines.put( _reader.getLineNumber(), strLine ); \n\t\t\t\tstream.append( \"#\" );\t\t\t\t\t\t// add line number between #\n\t\t\t\tstream.append( _reader.getLineNumber() );\t// add line number between #\n\t\t\t\tstream.append( \"# \" );\t\t\t\t\t\t// add line number between #\n\t\t\t\tstream.append( strLine );\t\t\t\t\t// add trimed line to stream\n\t\t\t\tstream.append( \" \" );\t\t\t\t\t\t// add single space character to ensure two words are 'glued' to each other\n\t\t\t}\n\t\t}\n\t}",
"private boolean readLines(final File file) throws IOException {\n\t\t_lastCommentStart = -1;\n\t\t_lastCommentEnd = -1;\n\t\t_lastCommentLine = -1;\n\t\t_firstCommentStart = -1;\n\t\t_firstCommentEnd = -1;\n\t\t_linePos = -1;\n\t\tBufferedReader in = _charset == null\n\t\t\t? new BufferedReader(new InputStreamReader(\n\t\t\t\tnew FileInputStream(file)))\n\t\t\t: new BufferedReader(new InputStreamReader(\n\t\t\t\tnew FileInputStream(file), _charset));\n\t\tString line;\n\t\tboolean modified = false;\n\t\twhile ((line = in.readLine()) != null) {\n\t\t\t_lines++;\n\t\t\t//cut final white spaces\n\t\t\tint len = line.length();\n\t\t\tint i = len;\n\t\t\tint k;\n\t\t\twhile((len > 0)\n\t\t\t\t&& line.charAt(len - 1) <= ' ') {\n\t\t\t\tlen--;\n\t\t\t}\n\t\t\t_linePos = _sb.length();\n\t\t\tif (len == 0) {\n\t\t\t\tif (_linePos == 0) { //ignore leading empty lines\n\t\t\t\t\tmodified = true;\n\t\t\t\t} else {\n\t\t\t\t\tmodified |= i != len;\n\t\t\t\t\tif (_genCR) {\n\t\t\t\t\t\t_sb.append('\\r'); //add CR\n\t\t\t\t\t}\n\t\t\t\t\t_sb.append('\\n'); //add LF\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (_spacesToTab) { //makeTabsFromSpaces\n\t\t\t\t//replace leading spaces by tabs\n\t\t\t\tfor (i = 0, k = 0; i < len; i++ ) {\n\t\t\t\t\tchar ch = line.charAt(i);\n\t\t\t\t\tif (ch == '\\t') {\n\t\t\t\t\t\tk = (((k + _indentSize - 1)/_indentSize) + 1)\n\t\t\t\t\t\t\t*_indentSize;\n\t\t\t\t\t} else if (ch == ' ') {\n\t\t\t\t\t\tk++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (i < len) { //not empty line\n\t\t\t\t\tfor (int j = 0; j < (k / _indentSize); j++) {\n\t\t\t\t\t\t_sb.append('\\t');\n\t\t\t\t\t}\n\t\t\t\t\tif ((k = k % _indentSize) > 0) {\n\t\t\t\t\t\t_sb.append(_indentSpaces.substring(0, k));\n\t\t\t\t\t}\n\t\t\t\t\t_sb.append(line.substring(i,len));\n\t\t\t\t}\n\t\t\t} else { //makeSpacesFromTabs\n\t\t\t\t//replace leading tabs by spaces\n\t\t\t\tfor (i = 0, k = 0; i < len; i++ ) {\n\t\t\t\t\tchar ch = line.charAt(i);\n\t\t\t\t\tif (ch == '\\t') {\n\t\t\t\t\t\tk = (((k+_oldIndent-1)/_oldIndent)+1)*_oldIndent;\n\t\t\t\t\t } else if (ch == ' ') {\n\t\t\t\t\t\tk++;\n\t\t\t\t\t } else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tif (i < len) { //not empty line\n\t\t\t\t\tfor (int j = 0; j < (k / _oldIndent); j++) {\n\t\t\t\t\t\t_sb.append(_indentSpaces);\n\t\t\t\t\t}\n\t\t\t\t\tif ((k = k % _oldIndent) > 0) {\n\t\t\t\t\t\t_sb.append(_indentSpaces.substring(0, k));\n\t\t\t\t\t}\n\t\t\t\t\t_sb.append(line.substring(i,len));\n\t\t\t\t}\n\t\t\t}\n\t\t\tmodified |= !line.equals(_sb.substring(_linePos));\n\t\t\tif (_lastCommentStart >= 0) {\n\t\t\t\tif (line.indexOf(\"*/\") >= 0) {\n\t\t\t\t\tif (line.endsWith(\"*/\")) { //only comment lines blocks\n\t\t\t\t\t\t_lastCommentLine = _linePos;\n\t\t\t\t\t\t_lastCommentEnd = _sb.length();\n\t\t\t\t\t\tif (_firstCommentEnd == -1) {\n\t\t\t\t\t\t\t_firstCommentEnd = _lastCommentEnd;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (_firstCommentStart == _lastCommentStart) {\n\t\t\t\t\t\t\t_firstCommentStart = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_lastCommentStart = -1;\n\t\t\t\t\t\t_lastCommentEnd = -1;\n\t\t\t\t\t\t_lastCommentLine = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (line.trim().startsWith(\"/*\")) {\n\t\t\t\tif (line.indexOf(\"*/\") < 0) { //only more lines blocks\n\t\t\t\t\t_lastCommentStart = _linePos;\n\t\t\t\t\t_lastCommentLine = -1;\n\t\t\t\t\t_lastCommentEnd = -1;\n\t\t\t\t\tif (_firstCommentStart == -1) {\n\t\t\t\t\t\t_firstCommentStart = _linePos;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_genCR) {\n\t\t\t\t_sb.append('\\r'); //add CR\n\t\t\t}\n\t\t\t_sb.append('\\n'); //add LF\n\t\t}\n\t\tin.close();\n\t\treturn modified;\n\t}",
"@Test\n public void testNextLineText() {\n System.out.println(\"nextLineText\");\n System.out.println(\"nextLineText@no line terminators in the file.\");\n for(TypeOfStream stype: TypeOfStream.values()) {\n InputStream stream = getInputStream(stype, TypeOfContent.BYTE_10, cs_UTF_8);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs_UTF_8.newDecoder(), 10);\n assertEquals(0, instance.position());\n String expResult = TypeOfContent.BYTE_10.getContent();\n String result = instance.nextLineText();\n assertEquals(expResult, result);\n assertEquals(11, instance.position());\n }\n }",
"@DISPID(1610940416) //= 0x60050000. The runtime will prefer the VTID if present\n @VTID(22)\n boolean atEndOfLine();",
"private static String readLineOrLines(Environment env) {\n\t\tString line = env.readLine();\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\twhile(isMultiline(line, env.getMorelinesSymbol())) {\n\t\t\tString actualLine = line.substring(0, \n\t\t\t\t\tline.lastIndexOf(env.getMorelinesSymbol()));\n\t\t\tsb.append(actualLine);\n\t\t\tenv.write(env.getMultilineSymbol() + \" \");\n\t\t\tline = env.readLine();\n\t\t}\n\t\tsb.append(line);\n\t\t\n\t\treturn sb.toString();\n\t}",
"private boolean endline() {\r\n return (CHAR('\\r') || true) && CHAR('\\n');\r\n }",
"boolean handleByte(byte b) {\n switch (state) {\n case SKIP:\n break;\n // after a CR character at the end of a header line, expecting an LF\n case HEADER_CR:\n state = ParserState.HEADER_LINESTART;\n if (b == '\\n') {\n addHeaderByte(b);\n lastEnding = LineEnding.CRLF;\n break;\n }\n // \\r without \\n -- treat this as the first character of the next line\n lastEnding = LineEnding.CR;\n addHeaderByte((byte) '\\n');\n //$FALL-THROUGH$\n\n // at the beginning of a header line, after a CR/LF/CRLF\n case HEADER_LINESTART:\n if (processBoundary()) {\n // found a part boundary, which may transition us to body parsing\n return handleByte(b);\n } else if (misencodedCRLF()) {\n // broken MUA sent the CRLF as \"=0D\\n\" -- treat as header/body separator\n clearHeader();\n state = ParserState.BODY_LINESTART;\n return handleByte(b);\n }\n newline();\n if (b == ' ' || b == '\\t') {\n // folded line; header value continues\n addHeaderByte(b);\n state = ParserState.HEADER;\n break;\n }\n // not a folded header line, so record the header and continue\n saveHeader();\n // check for a blank line, which terminates the header\n if (b == '\\n') {\n lastEnding = LineEnding.LF;\n state = ParserState.BODY_LINESTART;\n break;\n } else if (b == '\\r') {\n state = ParserState.BODY_CR;\n break;\n }\n state = ParserState.HEADER;\n //$FALL-THROUGH$\n\n // in a header line, after reading at least one byte\n case HEADER:\n addHeaderByte(b);\n if (b == '\\n') {\n lastEnding = LineEnding.LF;\n if (!header.endsWith((byte) '\\r')) {\n header.pop().append('\\r').append('\\n');\n }\n state = ParserState.HEADER_LINESTART;\n } else if (b == '\\r') {\n state = ParserState.HEADER_CR;\n }\n break;\n\n // after a CR character at the end of a body line, expecting an LF\n case BODY_CR:\n if (b == '\\n') {\n lastEnding = LineEnding.CRLF;\n state = ParserState.BODY_LINESTART;\n break;\n }\n // \\r without \\n -- treat this as the first character of the next line\n lastEnding = LineEnding.CR;\n //$FALL-THROUGH$\n\n // at the beginning of a body line, after a CR/LF/CRLF\n case BODY_LINESTART:\n if (processBoundary()) {\n // found a part boundary, which may transition us to header parsing\n return handleByte(b);\n }\n newline();\n state = ParserState.BODY;\n if (currentPart().bodyStart < 0) {\n // first line of the body part; we're now far enough along that we can create and store the MimePart\n if (bodyStart(position)) {\n // in one case (message/rfc822 attachments), starting the \"body\" transitions us back to header parsing...\n return handleByte(b);\n }\n }\n //$FALL-THROUGH$\n\n // somewhere within a body line\n case BODY:\n if (b == '\\n') {\n lastEnding = LineEnding.LF;\n state = ParserState.BODY_LINESTART;\n } else if (b == '\\r') {\n state = ParserState.BODY_CR;\n }\n // XXX: could decode the cte and figure out unencoded part lengths...\n break;\n\n case TERMINATED:\n throw new IllegalStateException(\"parsing has already been terminated\");\n }\n\n // if there are active MIME boundaries, check whether this line could match one of them\n if (boundaries != null) {\n checkBoundary(b);\n }\n\n position++;\n\n return true;\n }",
"@Test\n void getEndingLineTest() {\n assertThat(source.getEndingLine()).isEqualTo(ENDINGLINE);\n }",
"private static String readLine(InputStream is) throws IOException {\n StringBuilder builder = new StringBuilder();\n while (true) {\n int ch = is.read();\n if (ch == '\\r') {\n ch = is.read();\n if (ch == '\\n') {\n break;\n } else {\n throw new IOException(\"unexpected char after \\\\r: \" + ch);\n }\n } else if (ch == -1) {\n if (builder.length() > 0) {\n throw new IOException(\"unexpected end of stream\");\n }\n break;\n }\n builder.append((char) ch);\n }\n return builder.toString();\n }",
"private void read() throws FileNotFoundException\n {\n System.out.print(\"Enter the file you would like to read:\\n>\");\n Scanner input = new Scanner(new File(console.nextLine()));\n while(input.hasNext()){\n String inputLine = input.nextLine();\n String splitline[] = inputLine.split(\" \", 2);\n if(isInt(splitline[0])) {\n Line lineObj = new Line(Integer.parseInt(splitline[0]), splitline[1]);\n theText.insertInOrder(lineObj);\n }\n else\n {\n fatal(\"could not parse file\");\n\n }\n }\n\n }",
"protected boolean ignoreLinesStartWith(char a) {\r\n if (!this.hasNextToken()) return false;\r\n boolean b = false;\r\n while (true) {\r\n char c = this.stream.peek();\r\n if (c==a) {\r\n this.getUntilMeetChar('\\n');\r\n b = true;\r\n continue;\r\n }\r\n return b;\r\n }\r\n }",
"private static boolean isNewline(char next_char) {\n\t\treturn next_char == '\\n' || next_char == '\\r';\n\t}",
"private String nextLine() throws IOException {\n\t\t\tString line = new String(\"\");\n\t\t\tboolean first = true;\n\n\t\t\twhile (true) {\n\t\t\t\tswitch (tok.nextToken()) {\n\n\t\t\t\tcase StreamTokenizer.TT_EOL:\n\t\t\t\t\tif (DEBUG)\n\t\t\t\t\t\tSystem.err.println(\"nextLine returning \" + line);\n\t\t\t\t\treturn line;\n\n\t\t\t\tcase StreamTokenizer.TT_EOF:\n\t\t\t\t\tthrow new EOFException(\"EOF in config file\");\n\n\t\t\t\tcase StreamTokenizer.TT_WORD:\n\t\t\t\t\tif (first) {\n\t\t\t\t\t\tline = tok.sval;\n\t\t\t\t\t\tfirst = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tline += \" \" + tok.sval;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase StreamTokenizer.TT_NUMBER:\n\t\t\t\t\tif (first) {\n\t\t\t\t\t\tline = Double.toString(tok.nval);\n\t\t\t\t\t\tfirst = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tline += \" \" + Double.toString(tok.nval);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\n public String readLine() throws IOException {\n\n String line = null;\n\n while (true) {\n\n line = super.readLine();\n\n if (line == null) {\n\n return null;\n }\n\n // Get rid of comments\n\n // VT: FIXME: not handling the escaped comments\n\n int hash = line.indexOf(\"#\");\n\n if (hash != -1) {\n\n // Check if the '#' is escaped\n\n if (hash > 0 && line.indexOf(\"\\\\#\") == hash - 1) {\n\n // Yes, it is\n\n // System.err.println( \"Raw: '\"+line+\"'\" );\n line = line.substring(0, hash - 1) + line.substring(hash, line.length());\n // System.err.println( \"Unescaped: '\"+line+\"'\" );\n\n } else {\n\n line = line.substring(0, hash);\n }\n }\n\n // Trim it\n\n line = line.trim();\n\n if (line.length() != 0) {\n\n return line;\n }\n }\n }",
"protected boolean tryCrlf() {\n boolean found = false;\n while (tryConsume(\"\\r\\n\")) {\n found = true;\n }\n return found;\n }",
"private String getTextLineFromStream( InputStream is ) throws IOException {\n StringBuffer buffer = new StringBuffer();\n int b;\n\n \twhile( (b = is.read()) != -1 && b != (int) '\\n' ) {\n \t\tbuffer.append( (char) b );\n \t}\n \treturn buffer.toString().trim();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method, that gets specific table information from a given period | public List<Table> getTables(char table, DatePeriod period) throws OnlineResourcesAccessException, JsonParserException {
// http://api.nbp.pl/api/exchangerates/tables/{table}/{startDate}/{endDate}/
String url = "http://api.nbp.pl/api/exchangerates/tables/%c/%s/%s/"; // table, startDate, endDate
List<Table> result = new LinkedList<>();
List<DatePeriod> periods = period.split(93);
try {
for (DatePeriod per : periods) {
OnlineResourceFetcher fetcher = new OnlineResourceFetcher(String.format(url, table, per.getStartDate(), per.getEndDate()));
if (fetcher.fetchResource()) {
result.addAll(Arrays.asList(Table.deserializeMany(fetcher.getContent())));
} else {
throw new OnlineResourcesAccessException(fetcher.getResponseCode(), fetcher.getResponseMessage(), fetcher.getUrl());
}
}
} catch (IOException e) {
throw new JsonParserException();
}
return result;
} | [
"java.lang.String getTable();",
"String getTable(String tableName);",
"Object getTables();",
"public void findPayPeriod()\r\n {\r\n BatSQL bSQL = new BatSQL();\r\n \r\n String q = \"SELECT * FROM PAYPERIOD\"; \r\n ResultSet rs = bSQL.query(q);\r\n try\r\n {\r\n rs.next();\r\n ppstart = rs.getString(1);\r\n ppstop = rs.getString(2);\r\n }\r\n catch (SQLException ex)\r\n {\r\n System.out.println(\"!*******SQLException caught*******!\");\r\n System.out.println(\"findPayPeriod\");\r\n while (ex != null)\r\n {\r\n System.out.println (\"SQLState: \" + ex.getSQLState ());\r\n System.out.println (\"Message: \" + ex.getMessage ());\r\n System.out.println (\"Vendor: \" + ex.getErrorCode ());\r\n ex = ex.getNextException ();\r\n System.out.println (\"\");\r\n }\r\n System.exit(0);\r\n } //end catching SQLExceptions\r\n catch (java.lang.Exception ex)\r\n {\r\n System.out.println(\"!*******Exception caught*******!\");\r\n System.exit(0);\r\n } //end catching other Exceptions\r\n bSQL.disconnect();\r\n }",
"public TapTable findOneTable(String tableName);",
"TableInfoTable getTableInfoTable();",
"public List<FloorsheetLive> loadLiveTradingData() throws Exception {\n\t\tDatabaseMetaData metaData = dataSource.getConnection().getMetaData();\n\t\tResultSet tables = metaData.getTables(\"livetrading\", null, null, new String[] { \"TABLE\" });\n\t\t\n\t\tFloorsheetLive floorsheet = new FloorsheetLive();\n\t\tList<FloorsheetLive> floorsheetList = new ArrayList<FloorsheetLive>();\n\t\t\n\t\tString DB_URL = \"jdbc:mysql://localhost:3306/livetrading\";\n\t\tString USER = \"root\";\n\t\tString PASS = \"@1uis9818A\";\n\n\t\tint count = 0;\n\t\tint totalRecords = 0;\n\t\t\n\t\tConnection conn = DriverManager.getConnection(DB_URL, USER, PASS);\n\t\tStatement stmt = conn.createStatement();\n\n\t\twhile (tables.next()) {\n\t\t\tString tableName = tables.getString(\"TABLE_NAME\");\n\t\t\tResultSet columns = metaData.getColumns(\"livetrading\", null, tableName, \"%\");\n\t\t\tMap<String, String> rowMap = new HashMap<String, String>();\n\n\t\t\tList<String> columnsName = new ArrayList<String>();\n\n\t\t\tString QUERY = \"select * from \" + tableName + \" order by timestamp asc\";\n\n\t\t\twhile (columns.next()) {\n\t\t\t\tString column = columns.getString(\"COLUMN_NAME\");\n\t\t\t\tcolumnsName.add(column);\n\t\t\t}\n\t\t\t\n\t\t\tif(tableName.equals(\"floorsheet_live\")) {\n\t\t\t\tfloorsheet.setTablename(tableName);\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"...................................\"+tableName + \".................................\");\n\t\t\t\t\tResultSet rs = stmt.executeQuery(QUERY);\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tfloorsheet = new FloorsheetLive();\n\t\t\t\t\t\trowMap = new LinkedHashMap<String, String>();\n\t\t\t\t\t\tfloorsheet.setTablename(tableName);\n\t\t\t\t\t\tfor(String c : columnsName) {\n\t\t\t\t\t\t\tif(c.equals(\"stockSymbol\")) {\n\t\t\t\t\t\t\t\tfloorsheet.setStockSymbol(rs.getString(\"stockSymbol\"));\n\t\t\t\t\t\t\t}else if(c.equals(\"rate\")) {\n\t\t\t\t\t\t\t\tfloorsheet.setRate(rs.getInt(\"rate\"));\n\t\t\t\t\t\t\t}else if(c.equals(\"timestamp\")) {\n\t\t\t\t\t\t\t\tfloorsheet.setTimestamp(rs.getDate(\"timestamp\"));\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\trowMap.put(c, rs.getString(c));\n\t\t\t\t\t\t\t\tfloorsheet.setRows(rowMap);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\tallFloorsheetData.add(floorsheet);\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total Records: \" + totalRecords);\n\t\t\n\t\treturn allFloorsheetData;\n\t}",
"String getTableName();",
"public Table getTable(String tableName) {\r\n Table table = null;\r\n for(Table x : db) {\r\n if(x.tableName.equals(tableName)) {\r\n table = x;\r\n break;\r\n }\r\n }\r\n return table;\r\n }",
"public void getAvailableTables() {\n int size = tables.size(); //used for looping\n System.out.println(\"The following \" + npStart + \" tables are available in the pet-friendly section:\"); //output pet section header\n for( int i = 0; i < npStart; i++) //loop over pet section\n {\n if(tables.get(i).peekParty() == null) //check for availability\n {\n System.out.println(\"Table \"+tables.get(i).getName()+\" with \"+tables.get(i).getSeatCount()+\" seats\"); //output if available\n }\n }\n\n //AS ABOVE BUT FOR NON PET FRIENDLY SECTION, JUST DIFFERENT INDEXES\n System.out.println(\"The following \" + (tables.size() - npStart) + \" tables are available in the non-pet-friendly section:\");\n for (int i = npStart; i < size; i++)\n {\n if(tables.get(i).peekParty() == null)\n {\n System.out.println(\"Table \"+ tables.get(i).getName()+\" with \"+tables.get(i).getSeatCount()+\" seats\");\n }\n }\n }",
"public PdfPTable getTable(DatabaseConnection connection, Date day)\n throws SQLException, DocumentException, IOException {\n PdfPTable table = new PdfPTable(new float[] { 2, 1, 2, 5, 1 });\n table.setWidthPercentage(100f);\n table.getDefaultCell().setUseAscender(true);\n table.getDefaultCell().setUseDescender(true);\n table.getDefaultCell().setBackgroundColor(BaseColor.LIGHT_GRAY);\n for (int i = 0; i < 2; i++) {\n table.addCell(\"Location\");\n table.addCell(\"Time\");\n table.addCell(\"Run Length\");\n table.addCell(\"Title\");\n table.addCell(\"Year\");\n }\n table.getDefaultCell().setBackgroundColor(null);\n table.setHeaderRows(2);\n table.setFooterRows(1);\n List<Screening> screenings = PojoFactory.getScreenings(connection, day);\n Movie movie;\n for (Screening screening : screenings) {\n movie = screening.getMovie();\n table.addCell(screening.getLocation());\n table.addCell(String.format(\"%1$tH:%1$tM\", screening.getTime()));\n table.addCell(String.format(\"%d '\", movie.getDuration()));\n table.addCell(movie.getMovieTitle());\n table.addCell(String.valueOf(movie.getYear()));\n }\n return table;\n }",
"EventTable getEventTable();",
"String getBaseTable();",
"private void treatGetTable(HashMap<String, String> map) throws SQLException {\r\n String table = map.get(\"table\");\r\n String result = \"\";\r\n if(table.toLowerCase().equals(\"artists\")) {\r\n result = SQL.getArtistsTable();\r\n }\r\n else if(table.toLowerCase().equals(\"musics\")) {\r\n result = SQL.getMusicsTable();\r\n }\r\n else if(table.toLowerCase().equals(\"albums\")) {\r\n result = SQL.getAlbumsTable();\r\n }\r\n else if(table.toLowerCase().equals(\"cloudmusics\")) {\r\n result = SQL.getMusicsCloudTable(map.get(\"username\"));\r\n }\r\n else if(table.toLowerCase().equals(\"users\")) {\r\n result = SQL.getUsersTable();\r\n }\r\n HashMap<String, String> hmap = new HashMap<>();\r\n hmap.put(\"type\", \"getTablesResponse\");\r\n hmap.put(\"table\", table);\r\n hmap.put(\"result\", result);\r\n ConnectionFunctions.sendUdpPacket(hmap);\r\n }",
"public ArrayList<Table> getTable(String status)\n {\n ArrayList<Table> tables = new ArrayList();\n \n \n // First open a database connnection\n DatabaseConnection connection = new DatabaseConnection();\n if(connection.openConnection())\n {\n // If a connection was successfully setup, execute the SELECT statement.\n ResultSet resultset = connection.executeSQLSelectStatement(\n \"SELECT * FROM `tafel` WHERE tafelStatus = '\"+status+\"';\");\n\n if(resultset != null)\n {\n try\n {\n while(resultset.next())\n {\n Table newTable = new Table(\n \n resultset.getInt(\"tafelNummer\"),\n resultset.getString(\"tafelStatus\"),\n resultset.getInt(\"aantalpersonen\"));\n\n tables.add(newTable);\n }\n \n }\n catch(SQLException e)\n {\n System.out.println(e);\n tables = null;\n }\n }\n\n connection.closeConnection();\n }\n \n return tables;\n }",
"private String getTableName(final String param_class_Name) {// This method\n\t\t// is used to\n\t\t// know the\n\t\t// table name\n\t\t// that is\n\t\t// mapped with the class name\n\t\tString table_Name = null;\n\t\tSolutionsAdapter sAdapter = saReader.getSA();\n\t\tDataObjectType dataObject = sAdapter.getDataObject();\n\t\tList listGroup = dataObject.getGroup();\n\t\tgroup_Loop: for (Iterator groupIter = listGroup.iterator(); groupIter\n\t\t\t\t.hasNext();) {\n\t\t\tGroupList groupList = (GroupList) groupIter.next();\n\t\t\tList classList = groupList.getClasses();\n\t\t\tclass_Loop: for (int j = 0; j < classList.size(); j++) {\n\t\t\t\tClassList classesList = (ClassList) classList.get(j);\n\t\t\t\tfinal String className = classesList.getClassName();// Provides\n\t\t\t\t// the class\n\t\t\t\t// name\n\t\t\t\tif (className.equals(param_class_Name)) {\n\t\t\t\t\tList fieldList = classesList.getFields();// Provides the\n\t\t\t\t\t// list of\n\t\t\t\t\t// fields\n\t\t\t\t\t// present in a\n\t\t\t\t\t// class\n\t\t\t\t\tfield_Loop: for (int k = 0; k < fieldList.size(); k++) {\n\t\t\t\t\t\tFieldNameList listField = (FieldNameList) fieldList\n\t\t\t\t\t\t\t\t.get(k);\n\t\t\t\t\t\tList dodsMapList = listField.getDODSMap();\n\t\t\t\t\t\tdoDsMap_Loop: for (int l = 0; l < dodsMapList.size(); l++) {\n\t\t\t\t\t\t\tDSMapList dsType = (DSMapList) dodsMapList.get(l);\n\t\t\t\t\t\t\ttable_Name = dsType.getTableName();\n\t\t\t\t\t\t\tbreak group_Loop;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn table_Name;\n\t}",
"protected TableModel getCronusTables1() {\r\n String sqlString = \"SELECT name AS Tabellnamn FROM sys.tables\";\r\n ResultSet rs = this.excecuteQuery(sqlString);\r\n TableModel tm = this.getResultSetAsDefaultTableModel(rs);\r\n return tm;\r\n\r\n }",
"public List<Timetable> getAllTimetable() throws Exception;",
"private synchronized String readTable(String tableName) {\n String tableStr;\n try {\n Result<Record> result;\n if (tableName.equals(ResourceFlowUnit.RCA_TABLE_NAME)) {\n result = create.select()\n .from(tableName)\n .orderBy(ResourceFlowUnitFieldValue.RCA_NAME_FILELD.getField())\n .fetch();\n }\n else {\n result = create.select().from(tableName).fetch();\n }\n tableStr = result.formatJSON(new JSONFormat().header(false));\n } catch (DataAccessException e) {\n LOG.error(\"Fail to read table {}\", tableName);\n tableStr = \"[]\";\n }\n return tableStr;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves collection of active Product's by ReportingClass'es | private Map getReportingClassToActiveProductCollection()
{
if(reportingClassToActiveProduct == null)
{
reportingClassToActiveProduct = new HashMap(DEFAULT_SIZE);
}
return reportingClassToActiveProduct;
} | [
"public synchronized Product[] getProductsForReportingClass(ReportingClass reportingClass, boolean activeOnly)\n {\n Product[] products = productPrototype;\n\n if(activeOnly)\n {\n if(getReportingClassToActiveProductCollection().containsKey(reportingClass))\n {\n ArrayList list = (ArrayList)getReportingClassToActiveProductCollection().get(reportingClass);\n products = (Product[])list.toArray(productPrototype);\n }\n }\n else\n {\n ArrayList union = new ArrayList(200);\n ArrayList list;\n\n if(getReportingClassToActiveProductCollection().containsKey(reportingClass))\n {\n list = (ArrayList)getReportingClassToActiveProductCollection().get(reportingClass);\n union.addAll(list);\n }\n if(getReportingClassToInactiveProductCollection().containsKey(reportingClass))\n {\n list = (ArrayList)getReportingClassToInactiveProductCollection().get(reportingClass);\n union.addAll(list);\n }\n products = (Product[])union.toArray(productPrototype);\n }\n return products;\n }",
"private Map getReportingClassToInactiveProductCollection()\n {\n if(reportingClassToInactiveProduct == null)\n {\n reportingClassToInactiveProduct = new HashMap(101);\n }\n\n return reportingClassToInactiveProduct;\n }",
"private Map getActiveProductTypeToClassCollection()\n {\n if(productTypeToClassActive == null)\n {\n productTypeToClassActive = new HashMap(101);\n }\n\n return productTypeToClassActive;\n }",
"private Map getActiveClassKeyToProductCollection()\n {\n if(classKeyToProductActive == null)\n {\n classKeyToProductActive = new HashMap(DEFAULT_SIZE);\n }\n\n return classKeyToProductActive;\n }",
"List<EcsSupplierCategory> selectAll();",
"public List<Product> listAllAvailableProducts();",
"public List<ApartmentClass> getApClasses();",
"List<EcsSupplierCatRecommend> selectAll();",
"public synchronized ProductClass[] getProductClasses(short productType, boolean activeOnly)\n {\n Short productTypeObject = new Short(productType);\n\n //only want active\n if(activeOnly)\n {\n //do we have active classes for this product type\n if(!getActiveProductTypeToClassCollection().containsKey(productTypeObject))\n {\n //no\n return classPrototype;\n }\n else\n {\n //then just return them from cache\n HashMap activeClassesMap = (HashMap)(getActiveProductTypeToClassCollection().get(productTypeObject));\n Collection values = activeClassesMap.values();\n return (ProductClass[])values.toArray(classPrototype);\n }\n }\n else\n {\n //want active & inactive\n //do we have active or inactive classes for this product type\n if(!getActiveProductTypeToClassCollection().containsKey(productTypeObject) &&\n !getInactiveProductTypeToClassCollection().containsKey(productTypeObject))\n {\n //no\n return classPrototype;\n }\n else\n {\n //then just return all of them from the caches.\n //must build an ArrayList as a union combining other two Map's,\n //then perform a toArray on new combined ArrayList.\n ArrayList union = new ArrayList();\n\n HashMap activeClassesMap;\n HashMap inActiveClassesMap;\n\n if(getActiveProductTypeToClassCollection().containsKey(productTypeObject))\n {\n activeClassesMap = (HashMap)getActiveProductTypeToClassCollection().get(productTypeObject);\n Collection values = activeClassesMap.values();\n union.addAll(values);\n }\n\n if(getInactiveProductTypeToClassCollection().containsKey(productTypeObject))\n {\n inActiveClassesMap = (HashMap)getInactiveProductTypeToClassCollection().get(productTypeObject);\n Collection values = inActiveClassesMap.values();\n union.addAll(values);\n }\n\n return (ProductClass[])union.toArray(classPrototype);\n }\n }\n }",
"private void addReportingClassToProductMapping(Product product)\n {\n if(product != null &&\n (product.getListingState() == ListingStates.ACTIVE ||\n product.getListingState() == ListingStates.INACTIVE))\n {\n ReportingClass reportingClass = getReportingClassByKey(product.getProductKeysStruct().reportingClass);\n\n if(reportingClass != null)\n {\n ArrayList productsList;\n if(product.getListingState() == ListingStates.ACTIVE)\n {\n productsList = (ArrayList)getReportingClassToActiveProductCollection().get(reportingClass);\n }\n else\n {\n productsList = (ArrayList)getReportingClassToInactiveProductCollection().get(reportingClass);\n }\n\n if(productsList == null)\n {\n productsList = new ArrayList(20);\n }\n\n if(!productsList.contains(product))\n {\n productsList.add(product);\n if(product.getListingState() == ListingStates.ACTIVE)\n {\n getReportingClassToActiveProductCollection().put(reportingClass, productsList);\n }\n else\n {\n getReportingClassToInactiveProductCollection().put(reportingClass, productsList);\n }\n }\n }\n }\n }",
"public List<Product> getProCategory(int catid);",
"@Override\r\n\tpublic List<Product> listActiveProducts() {\r\n\t\tString selectActiveProduct = \"from Product where active=:active\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(selectActiveProduct);\r\n\t\tquery.setParameter(\"active\", true);\r\n\t\treturn query.getResultList();\r\n\t}",
"private Map getInactiveClassKeyToProductCollection()\n {\n if(classKeyToProductInactive == null)\n {\n classKeyToProductInactive = new HashMap(101);\n }\n\n return classKeyToProductInactive;\n }",
"List<PointsMallProducts> selectAll();",
"private Map getInactiveProductTypeToClassCollection()\n {\n if(productTypeToClassInactive == null)\n {\n productTypeToClassInactive = new HashMap(101);\n }\n\n return productTypeToClassInactive;\n }",
"public List<Product> listOfAllProducts();",
"public List<Product> getProducts();",
"List<Product> getAllProducts();",
"private Map getFullReportingClassCollection()\n {\n if(reportingClassMap == null)\n {\n reportingClassMap = new HashMap(101);\n }\n\n return reportingClassMap;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return true if variant has any prediction with a SO term (or its children) with this label | public boolean hasSequenceOntologyLabel(final VariantContext ctx,final String lbl)
{
if(lbl==null) return false;
final Term t= this.getSequenceOntologyTree().getTermByLabel(lbl);
if(t==null) LOG.warning("don't know SO.label "+lbl);
return hasSequenceOntologyTerm(ctx,t);
} | [
"public boolean getPredSentencePolarity() {\n Iterator<Integer> childrenIter = childIndListSets.get(0).iterator();\n int nonRootHeadInd = childrenIter.next();\n childrenIter = childIndListSets.get(nonRootHeadInd).iterator(); // Get all children of nonRootHead\n\n int posCount = 0;\n int negCount = 0;\n while (childrenIter.hasNext()) {\n int childInd = childrenIter.next();\n if (predictLabelSeq[childInd] == 1) {\n posCount++;\n } else if (predictLabelSeq[childInd] == 2) {\n negCount++;\n }\n }\n\n System.out.println(\"\\n ***NonRoot Head Ind= \" + nonRootHeadInd + \" posCount= \" + posCount\n + \" negCount= \" + negCount);\n if (posCount > negCount) {\n return true;\n } else if (negCount > posCount) {\n return false;\n } else { // direct children posCount and negCount equal, then count all tokens\n posCount = 0;\n negCount = 0;\n for (int i = 1; i < absoluteLength(); i++) {\n if (predictLabelSeq[i] == 1) {\n posCount++;\n } else if (predictLabelSeq[i] == 2) {\n negCount++;\n }\n }\n System.out.println(\"\\n ***Direct children equal, total posCount= \" + posCount\n + \" negCount= \" + negCount);\n return (posCount >= negCount);\n\n }\n }",
"public boolean hasSequenceOntologyTerm(final VariantContext ctx,final Term t)\n\t\t\t{\n\t\t\tif(t==null) return false;\n\t\t\tfinal Set<Term> children=t.getAllDescendants();\n\t\t\tfor(AnnPredictionParser.AnnPrediction a: getAnnPredictions(ctx)) {\n\t\t\t\tif(!Collections.disjoint(a.getSOTerms(),children)) return true;\n\t\t\t\t}\n\t\t\tfor(VepPredictionParser.VepPrediction a: getVepPredictions(ctx)) {\n\t\t\t\tif(!Collections.disjoint(a.getSOTerms(),children)) return true;\n\t\t\t\t}\n\t\t\treturn false;\n\t\t\t}",
"private static boolean hasNoun(Tree root) {\n return root.getLeaves().stream().anyMatch(l -> l.parent(root).value().equals(\"NN\"));\n }",
"boolean hasLabel();",
"public boolean isAncestorOf(SeqFeatureI sf);",
"boolean hasVariationType();",
"private boolean contains(DynamicState dyn)\n\t{\t\t\n\t\tfor (DynamicState s : m_children)\n\t\t{\n\t\t\tif(s.equals(dyn))\n\t\t\t\treturn true; \n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public static boolean isProcessed(Sentence sentence) {\n\tif (sentence.getTree() == null || sentence.getDependencyList().size() == 0)\n\t return false;\n\tfor (SynDependency d : sentence.getDependencyList()) {\n\t if (d.getType().equals(\"dep\") == false)\n\t\treturn true;\n\t}\n\treturn false;\n }",
"public abstract boolean hasVarAndCstSons();",
"public boolean isParentSetName(String varsetname) {\r\n\t\t\t// remove undesired characters\r\n\t\t\tvarsetname = varsetname.replaceAll(\"\\\\s\",\"\");\r\n\t\t\t// make sure ',' can also be used as separators\r\n\t\t\tvarsetname = varsetname.replace(',', this.currentSSBNNode.getStrongOVSeparator().charAt(0));\r\n\t\t\t\r\n\t\t\tCollection<SSBNNode> parentSet = null;\r\n\t\t\tif (isExactMatchStrongOV()) {\r\n\t\t\t\tparentSet = this.currentSSBNNode.getParentSetByStrongOVWithWeakOVCheck(varsetname.split(\"\\\\\" + this.currentSSBNNode.getStrongOVSeparator()));\r\n\t\t\t} else {\r\n\t\t\t\t// we just need to find at least one parent matching this ov\r\n\t\t\t\tparentSet = new ArrayList<SSBNNode>();\r\n\t\t\t\tfor (String ovName : varsetname.split(\"\\\\\" + this.currentSSBNNode.getStrongOVSeparator())) {\r\n\t\t\t\t\tparentSet = this.currentSSBNNode.getParentSetByStrongOV(false, ovName);\r\n\t\t\t\t\tif (!parentSet.isEmpty()) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn parentSet.size() > 0;\r\n\t\t}",
"public boolean contains(Shape shape)\n {\n // checks if the child is in the children list\n return children.contains(shape);\n }",
"public boolean hasSubTaxa() {\n\t\treturn !children.isEmpty();\n\t}",
"public boolean is(String... sentence) {\n if (sentence.length != children.size()) {\n return false;\n }\n for (int i = 0; i < sentence.length; i++) {\n // No match.\n if (!sentence[i].equals(children.get(i).getId())) {\n return false;\n }\n }\n return true;\n }",
"boolean hasVariant();",
"public boolean containsTerm(Term target) {\n if (equals(target)) {\n return true;\n }\n for (Iterator iter = getSubExprs().iterator(); iter.hasNext();) {\n if (((Term) iter.next()).containsTerm(target)) {\n return true;\n }\n }\n return false;\n }",
"public boolean hasPredFor(String name) {\n boolean re = false;\n if (name != null && getPredictions() != null) {\n Prediction tmp = null;\n for (int i=0; i<getPredictions().size(); i++) {\n tmp = getPredictions().get(i);\n if (tmp.stop.equals(name)) {\n re = true;\n break;\n }\n }\n }\n return re;\n }",
"public boolean isLabelSet();",
"private void testContains(Node s, Node p, Node o) {\n List<Triple> expectedTriples = LibTestRDFS.findInGraph(getReferenceGraph(), s, p, o);\n if ( removeVocabFromReferenceResults() )\n expectedTriples = LibTestRDFS.removeRDFS(expectedTriples);\n boolean expected = ! expectedTriples.isEmpty();\n\n // Do test graph \"contains\" by contains.\n boolean actual = LibTestRDFS.containsInGraph(getTestGraph(), s, p, o);\n\n Assert.assertEquals(getTestLabel(), expected, actual);\n }",
"public boolean isMaybeSingleObjectLabel() {\n checkNotPolymorphicOrUnknown();\n return object_labels != null && object_labels.size() == 1;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs a GET request on the categoryRules endpoint. This test uses a valid session ID and tests whether the output is formatted according to the specification. This test also adds rules first, making sure the correct rules are returned. | @Test
public void validSessionWithDataCategoryRulesGetTest() {
categoryRulePostTest();
given()
.header("X-session-ID", sessionId)
.get("api/v1/categoryRules")
.then()
.assertThat()
.body(matchesJsonSchema(CATEGORYRULE_LIST_SCHEMA_PATH.toAbsolutePath().toUri()))
.statusCode(200);
} | [
"@Test\n public void validSessionCategoryRulesGetTest() {\n given()\n .header(\"X-session-ID\", sessionId)\n .get(\"api/v1/categoryRules\")\n .then()\n .assertThat()\n .body(matchesJsonSchema(CATEGORYRULE_LIST_SCHEMA_PATH.toAbsolutePath().toUri()))\n .statusCode(200);\n }",
"@Test\n public void invalidSessionCategoryRulesGetTest() {\n given()\n .get(\"api/v1/categoryRules\")\n .then()\n .assertThat()\n .statusCode(401);\n }",
"@Test\n public void invalidSessionWithDataCategoryRulesGetTest() {\n categoryRulePostTest();\n\n given()\n .get(\"api/v1/categoryRules\")\n .then()\n .assertThat()\n .statusCode(401);\n }",
"@Test\n public void applyCategoryRuleTest() {\n // Create a new category rule\n testCategoryRuleId = given()\n .header(\"X-session-ID\", sessionId)\n .body(String.format(TEST_CATEGORYRULE_FORMAT, testCategoryId, false))\n .post(\"api/v1/categoryRules\")\n .then()\n .assertThat()\n .body(matchesJsonSchema(CATEGORYRULE_SCHEMA_PATH.toAbsolutePath().toUri()))\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n\n // Create a new transaction matching the category rule created earlier\n testTransactionId = given()\n .header(\"X-session-ID\", sessionId)\n .body(TEST_TRANSACTION)\n .post(\"api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n\n // Assure the transaction category was set according to the new rule\n int categoryId = given()\n .header(\"X-session-ID\", sessionId)\n .get(String.format(\"api/v1/transactions/%d\", testTransactionId))\n .then()\n .assertThat()\n .statusCode(200)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"category.id\");\n\n assertEquals(testCategoryId.intValue(), categoryId);\n }",
"@Test\n public void categoryRulePostTest() {\n testCategoryRuleId = given()\n .header(\"X-session-ID\", sessionId)\n .body(String.format(TEST_CATEGORYRULE_FORMAT, testCategoryId, false))\n .post(\"api/v1/categoryRules\")\n .then()\n .assertThat()\n .body(matchesJsonSchema(CATEGORYRULE_SCHEMA_PATH.toAbsolutePath().toUri()))\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n }",
"@Test\n public void validSessionTransactionsGetCategoryTest() {\n // Insert two different transactions with two different categories into the API.\n validSessionTransactionsGetOffsetTest();\n\n Object[] categories = given()\n .header(\"X-session-ID\", sessionId)\n .queryParam(\"category\", \"work\")\n .get(\"/api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(200)\n .body(matchesJsonSchema(TRANSACTION_LIST_SCHEMA_PATH))\n .contentType(ContentType.JSON)\n .extract()\n .jsonPath()\n .getList(\"$.category.name\")\n .toArray();\n\n for (Object category : categories) {\n assertThat(category, equalTo(\"work\"));\n }\n }",
"@Test\n public void applyCategoryRuleBlankTest() {\n // Create a new category rule with all fields left blank, causing all transactions to match it.\n testCategoryRuleId = given()\n .header(\"X-session-ID\", sessionId)\n .body(String.format(TEST_CATEGORYRULE_BLANK_FORMAT, testCategoryId))\n .post(\"api/v1/categoryRules\")\n .then()\n .assertThat()\n .body(matchesJsonSchema(CATEGORYRULE_SCHEMA_PATH.toAbsolutePath().toUri()))\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n\n // Create a new transaction matching the category rule created earlier\n testTransactionId = given()\n .header(\"X-session-ID\", sessionId)\n .body(TEST_TRANSACTION)\n .post(\"api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n\n // Assure the transaction category was set according to the new rule\n int categoryId = given()\n .header(\"X-session-ID\", sessionId)\n .get(String.format(\"api/v1/transactions/%d\", testTransactionId))\n .then()\n .assertThat()\n .statusCode(200)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"category.id\");\n\n assertEquals(testCategoryId.intValue(), categoryId);\n }",
"@Test\n public void invalidSessionCategoryRulePostTest() {\n given()\n .body(String.format(TEST_CATEGORYRULE_FORMAT, testCategoryId, false))\n .post(\"api/v1/categoryRules\")\n .then()\n .assertThat()\n .statusCode(401);\n }",
"@Test\n public void applyCategoryRuleWrongTest() {\n // Create a new category rule\n testCategoryRuleId = given()\n .header(\"X-session-ID\", sessionId)\n .body(String.format(TEST_CATEGORYRULE_FORMAT, testCategoryId, false))\n .post(\"api/v1/categoryRules\")\n .then()\n .assertThat()\n .body(matchesJsonSchema(CATEGORYRULE_SCHEMA_PATH.toAbsolutePath().toUri()))\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n\n // Create a new transaction which does not match the category rule created earlier\n // Note: The description is different (NOT University of Twente).\n testTransactionId = given()\n .header(\"X-session-ID\", sessionId)\n .body(TEST_TRANSACTION_DIFFERENT)\n .post(\"api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n\n // Assure the transaction category was not set according to the new rule\n String categoryId = given()\n .header(\"X-session-ID\", sessionId)\n .get(String.format(\"api/v1/transactions/%d\", testTransactionId))\n .then()\n .assertThat()\n .statusCode(200)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getJsonObject(\"category_id\");\n\n assertNull(categoryId);\n }",
"@Test\n public void applyOnHistoryCategoryRuleTest() {\n // Create a new transaction\n testTransactionId = given()\n .header(\"X-session-ID\", sessionId)\n .body(TEST_TRANSACTION)\n .post(\"api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n\n // Create a new category rule with applyOnHistory set to true, matching the transaction created earlier\n testCategoryRuleId = given()\n .header(\"X-session-ID\", sessionId)\n .body(String.format(TEST_CATEGORYRULE_FORMAT, testCategoryId, true))\n .post(\"api/v1/categoryRules\")\n .then()\n .assertThat()\n .body(matchesJsonSchema(CATEGORYRULE_SCHEMA_PATH.toAbsolutePath().toUri()))\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n\n // Assure the transaction category was set according to the new rule\n int categoryId = given()\n .header(\"X-session-ID\", sessionId)\n .get(String.format(\"api/v1/transactions/%d\", testTransactionId))\n .then()\n .assertThat()\n .statusCode(200)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"category.id\");\n\n assertEquals(testCategoryId.intValue(), categoryId);\n }",
"@GetMapping(\"/content-rules/{id}\")\n @Timed\n public ResponseEntity<ContentRules> getContentRules(@PathVariable Long id) {\n log.debug(\"REST request to get ContentRules : {}\", id);\n ContentRules contentRules = contentRulesRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(contentRules));\n }",
"@Test\n public void testGetCategoriesIdAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getCategoriesIdAction(\"{id}\");\n List<Integer> expectedResults = Arrays.asList(200, 400, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/Category\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }",
"@Test\n public void testGetCategoriesAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getCategoriesAction(\"{sort}\", -1, -1, \"{type}\", -1);\n List<Integer> expectedResults = Arrays.asList(200);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseCategory\", response.getContent());\n }\n \n }",
"private void hitGetCategoryListApi() {\n ApiInterface apiInterface = RestApi.createServiceAccessToken(this, ApiInterface.class);//empty field is for the access token\n final HashMap<String, String> params = new HashMap<>();\n Call<ResponseBody> call = apiInterface.hitGetPreferredCategoryListApi(AppUtils.getInstance().encryptData(params));\n ApiCall.getInstance().hitService(this, call, this, Constants.NetworkConstant.REQUEST_CATEGORIES);\n }",
"public HttpResponse getGovernanceRules() throws Throwable {\n QueryInfo qInfo = getQueryInfo(\"/v1/rules\");\n\n //prepare and invoke the API call request to fetch the response\n final HttpRequest _request = getClientInstance().get(qInfo._queryUrl, qInfo._headers, null);\n\n //invoke the callback before request if its not null\n if (getHttpCallBack() != null)\n {\n getHttpCallBack().OnBeforeRequest(_request);\n }\n \n // make the API call\n HttpResponse _response = getClientInstance().executeAsString(_request);\n \n // Wrap the request and the response in an HttpContext object\n HttpContext _context = new HttpContext(_request, _response);\n \n //invoke the callback after response if its not null\n if (getHttpCallBack() != null)\n {\n getHttpCallBack().OnAfterResponse(_context);\n }\n\n //handle errors defined at the API level\n validateResponse(_response, _context);\n \n // Return headers to the client\n return _response;\n }",
"RulesClient getRules();",
"@Override\n public ResponseEntity<Rule> getRule(Integer id) {\n String apiKeyId = (String) servletRequest.getAttribute(\"Application\");\n\n RuleEntity existingRuleEntity =\n ruleRepository.findByApiKeyEntityValue_AndId(apiKeyId, Long.valueOf(id))\n .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND));\n\n return ResponseEntity.ok(toRule(existingRuleEntity));\n }",
"Category getCategory(String categoryId) throws Exception;",
"private void requestForSubCategoriesWS(String categoryId, final RecyclerView mRecyclerView, final TextView txtContent,\n final TextView mTxtCategory) {\n showLoadingDialog(\"Loading...\", false);\n HashMap<String, String> params = new HashMap<>();\n params.put(\"Token\", UserDetails.getInstance(mContext).getUserToken());\n\n JSONObject mJsonObject = new JSONObject();\n try {\n mJsonObject.put(\"action\", \"categorys\");\n mJsonObject.put(\"cid\", categoryId);\n ServerResponse serverResponse = new ServerResponse();\n serverResponse.serviceRequestJSonObject(mContext, \"POST\", WebServices.BASE_URL, mJsonObject, params,\n new IParseListener() {\n @Override\n public void ErrorResponse(String response, int requestCode) {\n hideLoadingDialog(mContext);\n PopUtils.alertDialog(mContext, \"\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n }\n });\n }\n\n @Override\n public void SuccessResponse(String response, int requestCode) {\n hideLoadingDialog(mContext);\n switch (requestCode) {\n case WsUtils.WS_CODE_CATEGORIES:\n responseForSubCategories(response, mRecyclerView, txtContent);\n break;\n default:\n break;\n }\n }\n }, WsUtils.WS_CODE_CATEGORIES);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the YANG module name of the JSON subtree that the builder is currently building. This function may be called when the builder finishes building a data node. | void popModuleName(); | [
"public com.autodesk.ws.avro.Call.Builder clearModule() {\n module = null;\n fieldSetFlags()[2] = false;\n return this;\n }",
"void unsetBuildingName();",
"public void removeModuleFromTree(DefaultMutableTreeNode newNode) {\r\n treeModel.removeNodeFromParent(newNode) ;\r\n treeModel.reload();\r\n }",
"public void removeModuleFromTree(DefaultMutableTreeNode newNode) {\n\t\ttreeModel.removeNodeFromParent(newNode) ;\n\t\ttreeModel.reload();\n\t}",
"public void unsetProjectName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(PROJECTNAME$22);\n }\n }",
"public void unsetFromName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FROMNAME$14, 0);\n }\n }",
"public void remName(){\n rem(MetaDMSAG.__name);\n }",
"public void unsetParentName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PARENTNAME$40, 0);\n }\n }",
"public void setRemoveModule(boolean b){\n\t\tremovemodule = true;\n\t}",
"public void removeProcessName()\r\n {\r\n getSemanticObject().removeProperty(rep_processName);\r\n }",
"public void unsetFromName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FROMNAME$4, 0);\n }\n }",
"public void unsetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NAME$0, 0);\n }\n }",
"public void unsetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NAME$4, 0);\n }\n }",
"public void unsetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NAME$8, 0);\n }\n }",
"public void deleteModule(int moduleAutoID);",
"public void unsetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NAME$10, 0);\n }\n }",
"void deleteModule(Module module);",
"void unsetRootTypeQname();",
"private void removeModule(String code){\n\t\t\n\t\ttt.removeModuleFromRoom(code);\n\t\ttt.removeModuleFromTimeSlot(code);\n\t\tfillTable();\n\t\tdisplayCourses();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reverse complement a byte array of bases (that is, chars casted to bytes, not base indices in byte form) | static public byte[] simpleReverseComplement(byte[] bases) {
byte[] rcbases = new byte[bases.length];
for (int i = 0; i < bases.length; i++) {
rcbases[i] = simpleComplement(bases[bases.length - 1 - i]);
}
return rcbases;
} | [
"@Deprecated\n static public char[] simpleReverseComplement(char[] bases) {\n char[] rcbases = new char[bases.length];\n\n for (int i = 0; i < bases.length; i++) {\n rcbases[i] = simpleComplement(bases[bases.length - 1 - i]);\n }\n\n return rcbases;\n }",
"@Deprecated\n static public String simpleReverseComplement(String bases) {\n return new String(simpleReverseComplement(bases.getBytes()));\n }",
"public static byte[] reverseBytes(byte[] data) {\r\n byte[] out = new byte[data.length];\r\n\r\n for (int i = 0; i < out.length; i++) {\r\n out[i] = data[data.length - 1 - i];\r\n }\r\n\r\n return out;\r\n }",
"static public byte simpleComplement(byte base) {\n switch (base) {\n case 'A':\n case 'a':\n return 'T';\n case 'C':\n case 'c':\n return 'G';\n case 'G':\n case 'g':\n return 'C';\n case 'T':\n case 't':\n return 'A';\n default:\n return base;\n }\n }",
"public void revComp() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (int i = 0; i < seq.size(); i++) {\n char c = seq.get(seq.size() - 1 - i);\n newSeq.add(complement(c));\n }\n seq = newSeq;\n }",
"private static void invertBuffer(char[] buffer,\n int start,\n int length) {\n\n for(int i = start, j = start + length - 1; i < j; i++, --j) {\n char temp = buffer[i];\n buffer[i] = buffer[j];\n buffer[j] = temp;\n }\n }",
"private static double[] bitReverse(double[] array)\n\t{\n\t\tdouble[] reversed = new double[array.length];\n\t\tfor (int k = 0; k < array.length; k++)\n\t\t{\n\t\t\t// calculate position of k in new array\n\t\t\tint kNew = k;\n\t\t\tint r = 0;\n\t\t\tfor (int j = 1; j < array.length; j *= 2)\n\t\t\t{\n\t\t\t\tint b = kNew & 1;\n\t\t\t\tr = (r << 1) + b;\n\t\t\t\tkNew = (kNew >>> 1);\n\t\t\t}\n\t\t\treversed[r] = array[k];\n\t\t}\n\t\treturn reversed;\n\t}",
"public static byte[] reverse(byte[] data) {\n if (data == null)\n return null;\n byte[] buff = new byte[data.length];\n for (int i = 0; i < buff.length; i++)\n buff[i] = data[i];\n int n = buff.length - 1;\n byte temp;\n for (int j = (n - 1) >> 1; j >= 0; --j) {\n temp = buff[j];\n buff[j] = buff[n - j];\n buff[n - j] = temp;\n }\n return buff;\n\n }",
"public static void revert(byte[] data) {\r\n\t\tint len = data.length;\r\n\t\tint begin = 0;\r\n\t\tint end = len - 1;\r\n\t\tbyte temp;\r\n\t\tint mid = len >> 1; // mid = len /2\r\n\t\twhile (begin < mid) {\r\n\t\t\ttemp = data[begin];\r\n\t\t\tdata[begin] = data[end];\r\n\t\t\tdata[end] = temp;\r\n\t\t\tbegin++;\r\n\t\t\tend--;\r\n\t\t}\r\n\t}",
"private void reverseBits() {\r\n \t\t\r\n \t\tfor(int i = 0; i < 6; i++) \r\n \t\t\tmacArrayRev[i] = (byte) (Integer.reverse((int) macArray[i]) >>> 24);\r\n \t}",
"private void reverseBytes(long startAbsPos) {\n assert absPos > startAbsPos;\n long endAbsPos = absPos - 1;\n\n /*\n * If reversing happens in current byte array.\n */\n byte temp;\n int startRelPos = (int) (startAbsPos & (chunkSize - 1));\n int endRelPos = (int) (absPos & (chunkSize - 1));\n if ((endAbsPos >> exponentBits) == (startAbsPos >> exponentBits)) {\n for (int idx = (endRelPos - 1); idx >= startRelPos; idx--) {\n temp = currentBytes[idx];\n currentBytes[idx] = currentBytes[startRelPos];\n currentBytes[startRelPos++] = temp;\n }\n } // else the range of bytes to be reversed involves two byte arrays.\n else {\n byte[] startChunk = byteChunks.get(byteChunks.size() - 2);\n byte[] endChunk = currentBytes;\n for (int idx = (endRelPos - 1); idx >= startRelPos; idx--) {\n if (idx == -1) {\n idx = chunkSize - 1;\n endChunk = startChunk;\n }\n temp = endChunk[idx];\n endChunk[idx] = startChunk[startRelPos];\n startChunk[startRelPos++] = temp;\n }\n\n }\n\n }",
"public void complement()\n {\n\t// creates string variable to hold new data\n String newDataStr = \"\";\n for (int i = 0; i < dataStr.length(); i++)\n {\n // Helper method returns character that is complement of the character.\n newDataStr += complement(dataStr.charAt(i)); \n }\n dataStr = newDataStr;\n }",
"public void getReverseA(byte[] is, int offset, int length) {\n\t\tfor (int i = offset + length - 1; i >= offset; i--) {\n\t\t\tis[i] = getByteA();\n\t\t}\n\t}",
"public static char[] degenerateToBases(final char base) {\n\tswitch(base) {\n\t case 'A':\n\t case 'C':\n\t case 'G':\n\t case 'T':\n\t case 'U': return new char[]{base};\n\t case 'R': return new char[]{'A','G'}; \n\t case 'Y': return new char[]{'C','T'}; \n\t case 'S': return new char[]{'G','C'};\n\t case 'W': return new char[]{'A','T'};\n\t case 'K': return new char[]{'G','T'};\n\t case 'M' :return new char[]{'A','C'};\n\t case 'B': return new char[]{'C','G','T'};\n\t case 'D': return new char[]{'A','G','T'};\n\t case 'H': return new char[]{'A','C','T'};\n\t case 'V': return new char[]{'A','C','G'};\n\t case 'N': return new char[]{'A','C','G','T'};\n\t //\n\t case 'a':\n\t case 'c':\n\t case 'g':\n\t case 't':\n\t case 'u': return new char[]{base};\n\t case 'r': return new char[]{'a','g'}; \n\t case 'y': return new char[]{'c','t'}; \n\t case 's': return new char[]{'g','c'};\n\t case 'w': return new char[]{'a','t'};\n\t case 'k': return new char[]{'g','t'};\n\t case 'm' :return new char[]{'a','c'};\n\t case 'b': return new char[]{'c','g','t'};\n\t case 'd': return new char[]{'a','g','t'};\n\t case 'h': return new char[]{'a','c','t'};\n\t case 'v': return new char[]{'a','c','g'};\n\t case 'n': return new char[]{'a','c','g','t'};\n\t default: throw new IllegalArgumentException(\"bad DNA base:\"+base);\n\t\t}\n\t}",
"public static String reverseComplement(final CharSequence seq)\n\t{\n\tfinal StringBuilder b=new StringBuilder(seq.length());\n\tfor(int i=0;i< seq.length();++i)\n\t\t{\n\t\tb.append(complement(seq.charAt((seq.length()-1)-i)));\n\t\t}\n\treturn b.toString();\n\t}",
"public static byte[] reverse(byte[] source) {\n\t\tint len = source.length;\n\t\tbyte[] destination = new byte[len];\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tdestination[len - i - 1] = source[i];\n\t\t}\n\t\treturn destination;\n\t}",
"static public void convertToUpperCase(final byte[] bases) {\n StringUtil.toUpperCase(bases);\n }",
"public void complement() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (char c : seq) {\n newSeq.add(complement(c));\n }\n seq = newSeq;\n }",
"public String toReverseComplement(){\r\n\t\tString str = this.sequence;\r\n\t\tint length = str.length();\r\n\t\t\r\n\t\tchar[] reverse = new char[length];\r\n\t\t\r\n\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\t\r\n\t\t\tswitch(str.charAt(i)) {\r\n\t\t\tcase 'A': \r\n\t\t\t\treverse[length - i - 1] = 'T';\r\n\t\t\t\tbreak;\r\n\t\t case 'T': \r\n\t\t \treverse[length - i - 1] = 'A';\r\n\t\t \tbreak;\r\n\t\t case 'C': \r\n\t\t \treverse[length - i - 1] = 'G';\r\n\t\t \tbreak;\r\n\t\t case 'G': \r\n\t\t \treverse[length - i - 1] = 'C';\r\n\t\t \tbreak;\r\n\t\t default: \r\n\t\t \treverse[length - i - 1] = 'N';\r\n\t\t \tbreak;\r\n\t\t }\r\n\t\t}\r\n\t\treturn new String(reverse);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Hyperbolic sin. Hyperbolic sine: (e^xe^x)/2 | public static final float sinh(float x) {
return (MoreMath.pow(MoreMath.E, x) - MoreMath.pow(MoreMath.E, -x)) / 2.0f;
} | [
"public static final double sinh(double x) {\n return (Math.pow(Math.E, x) - Math.pow(Math.E, -x)) / 2.0d;\n }",
"public double calculateHyperbolicSine(double angle);",
"E sin(final E n);",
"public double sine()\n {\n return Math.sin( result );\n }",
"public static double sin(double x) // Using a Chebyshev-Pade approximation\n {\n int n=(int)(x/PI2)+1; // reduce to the 4th and 1st quadrants\n if(n<1)n=n-1;\n if ((n&2)==0) x=x-(n&0xFFFFFFFE)*PI2; // if it from the 2nd or the 3rd quadrants\n else x=-(x-(n&0xFFFFFFFE)*PI2);\n\n double x2=x*x;\n return (0.9238318854f-0.9595498071e-1f*x2)*x/(0.9238400690f+(0.5797298195e-1f+0.2031791179e-2f*x2)*x2);\n }",
"public static double mySin(double x) {\n int n = 0;\n int N = 20;\n double y = 0;\n for (; n <= N; n++) {\n double p1 = 1;\n for (int i = 1; i <= n; i++) {\n p1 *= (-1);\n }\n double p2 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p2*=i;\n }\n double p3 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p3*=x;\n }\n y = y + (p1/p2)*p3;\n }\n return y;\n }",
"@Override\n\tpublic double f(double x) {\n\t\treturn Math.sin(x);\n\t}",
"public static double haversin(double x) {\n return sq(Math.sin(x / 2));\n }",
"public static final float asinh(float x) {\n //\t\tlogger.info(\"enter asinh \" + x);\n \t\treturn MoreMath.log(x + ((float) Math.sqrt(x * x + 1)));\n \t}",
"private Double sin() {\n this.engineer.sin(this.firstArg);\n return this.engineer.getResult();\n }",
"@Test\r\n void test_Sinh()\r\n {\r\n double res;\r\n SinhLogic logic = new SinhLogic();\r\n res = logic.calculate_Sinh(1);\r\n \r\n assertEquals(1.1752011936438016,res,0);\r\n }",
"@Override\n public double f( double x ) {\n return Math.sin(x * (Math.PI / 180));\n }",
"public static final float sin(float angle) {\r\n if (angle < 0f) {\r\n return -sine[(int) -(angle * 10f)];\r\n }\r\n\r\n return sine[(int) (angle * 10f)];\r\n }",
"protected byte sineWave(double t, double constant) {\n\t\tdouble period = (double) this.sampleRate / this.freq;\n\t double angle = constant * Math.PI * (t / period);\n\t return (byte) (Math.sin(angle) * amplitude); \n\t}",
"private double sigmoid(double x) {\n\t\treturn 1./(1 + Math.exp(-x));\n\t\t//return Math.tanh(x);\n\t}",
"private double phi(double x) {\r\n return Math.exp(-x*x / 2) / Math.sqrt(2 * Math.PI);\r\n }",
"public static int sin(int num){\n return (int)Math.sin(num);\n }",
"public static double sigmoid(double x)\n {\n \treturn tanh(x);\n }",
"private static void sinPressed(String input) {\n\n Double tempValue = valueOf (input);\n System.out.println (tempValue);\n convertDecimalToString (Math.sin (tempValue));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
BA.debugLineNum = 299;BA.debugLine="Sub Activity_KeyPress(KeyCode As Int)As Boolean"; BA.debugLineNum = 300;BA.debugLine="If KeyCode = KeyCodes.KEYCODE_BACK Then"; | public static boolean _activity_keypress(int _keycode) throws Exception{
if (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_BACK) {
//BA.debugLineNum = 301;BA.debugLine="close_click";
_close_click();
};
//BA.debugLineNum = 304;BA.debugLine="Return True";
if (true) return anywheresoftware.b4a.keywords.Common.True;
//BA.debugLineNum = 305;BA.debugLine="End Sub";
return false;
} | [
"public static boolean _activity_keypress(int _keycode) throws Exception{\nif (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_BACK) { \n //BA.debugLineNum = 298;BA.debugLine=\"Activity.Finish\";\nmostCurrent._activity.Finish();\n };\n //BA.debugLineNum = 300;BA.debugLine=\"End Sub\";\nreturn false;\n}",
"public static boolean _activity_keypress(int _keycode) throws Exception{\nif (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_BACK) { \n //BA.debugLineNum = 290;BA.debugLine=\"Activity.Finish\";\nmostCurrent._activity.Finish();\n };\n //BA.debugLineNum = 292;BA.debugLine=\"End Sub\";\nreturn false;\n}",
"public static boolean _activity_keypress(int _keycode) throws Exception{\nif ((_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_BACK)) { \r\n //BA.debugLineNum = 35;BA.debugLine=\"Activity.Finish\";\r\nmostCurrent._activity.Finish();\r\n //BA.debugLineNum = 36;BA.debugLine=\"Return False\";\r\nif (true) return anywheresoftware.b4a.keywords.Common.False;\r\n };\r\n //BA.debugLineNum = 38;BA.debugLine=\"End Sub\";\r\nreturn false;\r\n}",
"public static boolean _activity_keypress(int _keycode) throws Exception{\nif (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_BACK) { \r\n //BA.debugLineNum = 76;BA.debugLine=\"Activity.finish\";\r\nmostCurrent._activity.Finish();\r\n //BA.debugLineNum = 77;BA.debugLine=\"Activity.RemoveAllViews\";\r\nmostCurrent._activity.RemoveAllViews();\r\n };\r\n //BA.debugLineNum = 79;BA.debugLine=\"End Sub\";\r\nreturn false;\r\n}",
"public static boolean _activity_keypress(int _keycode) throws Exception{\nif (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_BACK) { \n //BA.debugLineNum = 75;BA.debugLine=\"If Msgbox2(\\\"آيا مايل به خروج هستيد؟\\\",\\\"خروج\\\",\\\"آري\\\",\\\"خير\\\",\\\"\\\",Null) = DialogResponse.POSITIVE Then\";\nif (anywheresoftware.b4a.keywords.Common.Msgbox2(\"آيا مايل به خروج هستيد؟\",\"خروج\",\"آري\",\"خير\",\"\",(android.graphics.Bitmap)(anywheresoftware.b4a.keywords.Common.Null),mostCurrent.activityBA)==anywheresoftware.b4a.keywords.Common.DialogResponse.POSITIVE) { \n //BA.debugLineNum = 76;BA.debugLine=\"Activity.Finish\";\nmostCurrent._activity.Finish();\n };\n //BA.debugLineNum = 78;BA.debugLine=\"Return True\";\nif (true) return anywheresoftware.b4a.keywords.Common.True;\n }else if(_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_HOME) { \n //BA.debugLineNum = 80;BA.debugLine=\"Return True\";\nif (true) return anywheresoftware.b4a.keywords.Common.True;\n };\n //BA.debugLineNum = 83;BA.debugLine=\"End Sub\";\nreturn false;\n}",
"public static String _btn_back_click() throws Exception{\nmostCurrent._activity.Finish();\n //BA.debugLineNum = 249;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"@Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_BACK) {\n report(true);\n return true;\n } else\n return super.onKeyDown(keyCode, event);\n }",
"public void keyBackIsPressed(){}",
"public static String _butt_click() throws Exception{\n_ab1_click();\n //BA.debugLineNum = 1548;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public static String _katigor_click() throws Exception{\nanywheresoftware.b4a.keywords.Common.StartActivity(processBA,(Object)(\"katigoriess\"));\n //BA.debugLineNum = 260;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public static String _katigor_click() throws Exception{\nanywheresoftware.b4a.keywords.Common.StartActivity(processBA,(Object)(\"katigoriess\"));\n //BA.debugLineNum = 269;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public static String _btnbar_click() throws Exception{\nmostCurrent._sm.ShowMenu();\n //BA.debugLineNum = 123;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public static String _activity_pause(boolean _userclosed) throws Exception{\nif (_userclosed==anywheresoftware.b4a.keywords.Common.False) { \n //BA.debugLineNum = 49;BA.debugLine=\"Activity.Finish\";\nmostCurrent._activity.Finish();\n };\n //BA.debugLineNum = 51;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public static boolean _showmenu3() throws Exception{\nif (true) return anywheresoftware.b4a.keywords.Common.True;\n //BA.debugLineNum = 154;BA.debugLine=\"End Sub\";\nreturn false;\n}",
"public static String _activity_pause(boolean _userclosed) throws Exception{\nmostCurrent._activity.Finish();\n //BA.debugLineNum = 243;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public static String _btnbooked_click() throws Exception{\nanywheresoftware.b4a.keywords.Common.StartActivity(processBA,(Object)(mostCurrent._booking.getObject()));\n //BA.debugLineNum = 128;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public static String _activity_pause(boolean _userclosed) throws Exception{\nmostCurrent._activity.Finish();\n //BA.debugLineNum = 252;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public static String _activity_pause(boolean _userclosed) throws Exception{\n_exa.setEnabled(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 296;BA.debugLine=\"ex.Enabled=False\";\n_ex.setEnabled(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 298;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"@Override\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event)\n\t\t{\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK)\n\t\t\t{\n\t\t\t//preventing default implementation previous to android.os.Build.VERSION_CODES.ECLAIR\n\t\t\treturn true;\n\t\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
use the pageid as the xpath | private void showPathList(WebContext ctx, String xpath, PageId pageId) {
showPathList(ctx, pageId.name(), null, false);
} | [
"private void navigateToPage(String page) throws MalformedURLException, XPathExpressionException {\n switchPage(page);\n\n }",
"void setXPath(String xpath);",
"java.lang.String getPageId();",
"void setXpath(java.lang.String xpath);",
"String getPageID();",
"Integer getPageId();",
"void visit(XPathLocationPath locationPath);",
"String getXPath();",
"java.lang.String getRefPageId();",
"public HtmlPage clickContentPath();",
"private String getValueFromXPath(HtmlPage appPage, String xPath) throws Exception {\n\t\treturn ((HtmlElement) appPage.getByXPath(xPath).get(0)).asText();\n\t}",
"public void scroll_The_Page(String xpath) {\r\n WebElement Element = driver.findElement(By.xpath(xpath));\r\n\r\n JavascriptExecutor js = (JavascriptExecutor) driver;\r\n js.executeScript(\"arguments[0].scrollIntoView();\", Element);\r\n// System.out.println(loc);\r\n// Point loc = driver.findElement(By.xpath(xpath)).getLocation();\r\n// JavascriptExecutor js = (JavascriptExecutor) driver;\r\n// js.executeScript(\"javascript:window.scrollBy(0,\" + loc.y + \")\");\r\n }",
"@Test\n public void relTags(){\n driver.get(\"https://automationbookstore.dev/\");\n WebElement pid5=driver.findElement(RelativeLocator.withTagName(\"li\").toLeftOf(By.id(\"pid6\")).below(By.id(\"pid1\")));\n String id=pid5.getAttribute(\"id\");\n System.out.println(id);\n }",
"static WebElementSelector selectByXPath(String xpath)\n {\n return selectBy(String.format(\"{%s}\", xpath), By.xpath(xpath));\n }",
"private HtmlPage getNextReviewPage(HtmlPage reviewsPage, String xPath) throws Exception {\n\t\t// Get the last link that matches the xPath. That's probably the next page link.\n\t\tList<Object> links = reviewsPage.getByXPath(xPath);\n\t\tHtmlElement nextPageLink = (HtmlElement) links.get(links.size() - 1);\n\n\t\t// if the found link does not read: \"Next Page\", it is probably the last page.\n\t\tif (nextPageLink.asText().toLowerCase().trim().compareTo(\"next page\") != 0) {\n\t\t\tthrow new Exception();\n\t\t}\n\t\tHtmlPage newPage = nextPageLink.click();\n\t\tThread.sleep(10000);\n\t\t// for (HtmlAnchor a : newPage.getAnchors()) {\n\t\t// System.out.print(a.asText() + \" - \");\n\t\t// }\n\t\treturn newPage;\n\t}",
"public void Scroll_The_Page(String xpath)\n\t{\n\t\tPoint loc = driver.findElement(By.xpath(xpath)).getLocation();\n\t\t//\t\tSystem.out.println(loc);\n\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\tjs.executeScript(\"javascript:window.scrollBy(0,\"+loc.y+\")\");\t\n\t}",
"public void setPageNumber(String id, int pageNumber)\n { \n IDNode node=(IDNode)idReferences.get(id); \n node.setPageNumber(pageNumber); \n }",
"public void findByXpath(String btnXpath){\n\t\t try{\n\t\t\t uniqId=wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(btnXpath)));\n\t\t//\t reportEvent.Status(e1.getClassName().toString().replace(\"com.uhg.vbr.panels.\",\"\")+\"page\",\"Button with Xpath\"+btnXpath+\"is found\",\"pass\");\n\t\t }catch(Exception e){\n\t\t//\t reportEvent.Status(e1.getClassName().toString().replace(\"com.uhg.vbr.panels.\",\"\")+\"page\",\"Button with Xpath\"+btnXpath+\"is Not found\",\"Fail\");\n\t\t\t return;\n\t\t\t \n\t\t }\n\t }",
"public String customerqueryXpath(String fileld) throws Exception\r\n\t {\r\n\t\t String QueryXpath=\"\";\r\n\t\t try{\r\n\t\t\t \r\n\t\t\t QueryXpath=\"//*[contains(text(),'\"+fileld+\"')]//following::div[1]/input\";\r\n\t\t }\r\n\t\t \r\n\t\t catch(Exception e)\r\n\t\t {\r\n\t\t\t e.printStackTrace(); \r\n\t\t }\r\n\t\t return QueryXpath;\r\n\t }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor creates a new DefaultCmdLineHandler as its delegate | public LoggerCmdLineHandler ( OutputStream stream,
String cmdName,
String cmdDesc,
Parameter[] options,
Parameter[] args,
CmdLineParser parser) {
this(stream, new DefaultCmdLineHandler(
cmdName, cmdDesc, options, args, parser));
} | [
"public LoggerCmdLineHandler ( OutputStream stream,\n String cmdName, \n String cmdDesc, \n Parameter[] options,\n Parameter[] args) {\n this(stream, \n new DefaultCmdLineHandler(cmdName, cmdDesc, options, args));\n }",
"public static void initDefaultOptions()\r\n\t{\n\r\n\t\taddOption(HELP, true, \"show Arguments\");\r\n\t}",
"public CommandLineParser() {\n this.options = new Options();\n }",
"public ArgumentsParser() {\n this(new String[0]);\n }",
"void defaults(final WriteableCommandLine commandLine);",
"@Override\n protected void initDefaultCommand() {}",
"private static void initCmdLineOptions() {\n options.addOption(\n OptionBuilder\n .isRequired(false)\n .withDescription(\"Prints this message\")\n .create(\"help\")\n );\n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"ID of the network to run the algorithm on.\\n\"\n + \"Default value: \" + NETWORK_ID_DEFAULT\n )\n .create(\"networkId\")\n );\n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"Method ID transformer for P2P Prebonder.\\n\"\n + \"Default value: \" + P2PPrebonderStandardTransformer.class.getCanonicalName()\n )\n .create(\"methodIdTransformer\")\n );\n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"Discovery TX power\\n\"\n + \"Allowed range of vales: [\"\n + AutoNetworkAlgorithmImpl.DISCOVERY_TX_POWER_MIN\n + \"..\"\n + AutoNetworkAlgorithmImpl.DISCOVERY_TX_POWER_MAX\n + \"]\\n\"\n + \"Default value: \" + AutoNetworkAlgorithmImpl.DISCOVERY_TX_POWER_DEFAULT\n )\n .create(\"discoveryTxPower\")\n );\n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"Prebonding interval [in seconds]\\n\"\n + \"Allowed range of vales: [\"\n + AutoNetworkAlgorithmImpl.PREBONDING_INTERVAL_MIN\n + \"..\"\n + AutoNetworkAlgorithmImpl.PREBONDING_INTERVAL_MAX\n + \"]\\n\"\n + \"Default value: \" + AutoNetworkAlgorithmImpl.PREBONDING_INTERVAL_DEFAULT\n )\n .create(\"prebondingInterval\")\n );\n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"Authorize retries\\n\"\n + \"Default value: \" + AutoNetworkAlgorithmImpl.AUTHORIZE_RETRIES_DEFAULT\n )\n .create(\"authorizeRetries\")\n );\n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"Discovery retries\\n\"\n + \"Default value: \" + AutoNetworkAlgorithmImpl.DISCOVERY_RETRIES_DEFAULT\n )\n .create(\"discoveryRetries\")\n );\n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"Temporary address timeout [in tens of seconds]\\n\"\n + \"Allowed range of vales: [\"\n + AutoNetworkAlgorithmImpl.TEMPORARY_ADDRESS_TIMEOUT_MIN\n + \"..\"\n + AutoNetworkAlgorithmImpl.TEMPORARY_ADDRESS_TIMEOUT_MAX\n + \"]\\n\"\n + \"Default value: \" + AutoNetworkAlgorithmImpl.TEMPORARY_ADDRESS_TIMEOUT_DEFAULT\n )\n .create(\"temporaryAddressTimeout\")\n );\n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"Use FRC automatically in checking the accessibility of newly bonded nodes\\n\"\n + \"Default value: \" + AutoNetworkAlgorithmImpl.AUTOUSE_FRC_DEFAULT\n )\n .create(\"autoUseFrc\")\n );\n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"Number of nodes to bond\\n\"\n + \"Set the \" + AutoNetworkAlgorithmImpl.NODES_NUMBER_TO_BOND_MAX + \" value \"\n + \" for maximal number of nodes to bond according to \"\n + \" the IQRF DPA networks limitations.\\n\"\n + \"Default value: \" + AutoNetworkAlgorithmImpl.NODES_NUMBER_TO_BOND_MAX\n )\n .create(\"nodesNumberToBond\")\n );\n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"Maximal running time of the algorithm [in seconds].\"\n + \"Set the \" + MAX_RUNNING_TIME_UNLIMITED + \" value \"\n + \"for not to limit the maximal running time.\\n\"\n + \"Default value: \" + MAX_RUNNING_TIME_UNLIMITED \n )\n .create(\"maxRunningTime\")\n ); \n \n options.addOption(\n OptionBuilder\n .isRequired(false)\n .hasArg()\n .withDescription(\n \"Remove bonds from all nodes to enable another test.\\n\"\n + \"Default value: \" + removeBondsAtEnd\n )\n .create(\"removeBondsAtEnd\")\n ); \n }",
"public abstract ArgumentParser makeParser();",
"public CommandLineBuilder()\n {\n m_commandLine = new String[0];\n }",
"public FileHandler(String defaultFileName) {\n\t\tsuper();\n\t\tconfig(defaultFileName);\n\t}",
"public ArgumentParser()\n {\n argumentList = new ArrayList<CommandLineArgument>();\n requiredOptionals = new ArrayList<CommandLineArgument>();\n unmatched =\"\";\n incorrectType= \"\";\n\t\taddOptionalArgument(\"help\", CommandLineArgument.DataType.Boolean);\n\t\tsetShortOption(\"help\", \"h\");\n\t}",
"public ConfigParserHandler() {\n\t}",
"public void defaults( final WriteableCommandLine commandLine )\n {\n commandLine.setDefaultSwitch( this, m_defaultSwitch );\n }",
"CmdLineOption(String flag) {\n super();\n this.flag = flag;\n }",
"public SimpleModeCmdLineParser(String defaultUsage, String ... modes){\r\n this.usage = defaultUsage;\r\n this.holder = new HashMap<>();\r\n for(String s : modes){\r\n this.holder.put(s, new ModeParser());\r\n }\r\n }",
"private static Constructor<? extends OptionHandler> getConstructor(Class<? extends OptionHandler> handlerClass) {\n try {\n return handlerClass.getConstructor(CmdLineParser.class, OptionDef.class, Setter.class);\n } catch (NoSuchMethodException e) {\n throw new IllegalArgumentException(Messages.NO_CONSTRUCTOR_ON_HANDLER.format(handlerClass));\n }\n }",
"public CommandParser() {\r\n\t\tinitialiseDictionaries();\r\n\t}",
"private static CommandLine handleCLIArguments(String[] args) {\n Options options = new Options();\n\n // optional argument port\n options.addOption(null,\"port\", true, String.format(\"Port to listen to. Default: %s.\", DEFAULT_PORT));\n\n // mandatory argument keystore\n options.addRequiredOption(\"k\",\"keystore\", true, \"Keystore containing key material for the SSL socket to use.\");\n\n // mandatory argument password\n options.addRequiredOption(\"p\", \"password\", true, \"The password to opten the keystore.\");\n\n // optional argument truststore\n options.addOption(null,\"truststore\", true, \"Truststore containing trust material for the SSL socket to base trust decisions on.\");\n\n // optional argument truststore-password\n options.addOption(null,\"truststore-password\", true, \"The password to open the truststore.\");\n\n CommandLineParser parser = new DefaultParser();\n HelpFormatter formatter = new HelpFormatter();\n CommandLine cmd = null;\n try {\n cmd = parser.parse(options, args);\n } catch(ParseException e) {\n LOGGER.error(e.getMessage());\n formatter.printHelp(\"utility-name\", options);\n System.exit(1);\n }\n\n return cmd;\n }",
"public NormalCommandLine createNormalCommandLine() {\n\t\tCollection<String> files = new ArrayList<String>();\n\n\t\tNormalCommandLine line = new NormalCommandLine();\n\t\tif (currConfig != null) {\n\t\t\tif (!currConfig.getSelectedFiles().isEmpty()) {\n\t\t\t\tfiles.add(currConfig.getSelectedFiles().get(0).getPath());\n\t\t\t\tline.setFiles(files);\n\t\t\t}\n\n\t\t\tGMCSection cmdSection = currConfig.getGmcConfig()\n\t\t\t\t\t.getAnonymousSection();\n\n\t\t\tline.setGMCConfig(currConfig.getGmcConfig());\n\t\t\tline.setGMCSection(cmdSection);\n\t\t\tline.complete();\n\t\t}\n\n\t\tline.setCommand(comNameToComKind(currCommand));\n\t\tthis.commandLine = line;\n\t\treturn line;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests whether a single servlet is correctly merged into a descriptor that already contains the definition of an other servlet. | public void testMergeOneServletIntoDocumentWithAnotherServlet() throws Exception
{
String srcXml = "<web-app>"
+ " <servlet>"
+ " <servlet-name>s1</servlet-name>"
+ " <servlet-class>sclass1</servlet-class>"
+ " </servlet>"
+ "</web-app>";
WebXml srcWebXml = WebXmlIo.parseWebXml(
new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);
String mergeXml = "<web-app>"
+ " <servlet>"
+ " <servlet-name>s2</servlet-name>"
+ " <servlet-class>sclass2</servlet-class>"
+ " </servlet>"
+ "</web-app>";
WebXml mergeWebXml = WebXmlIo.parseWebXml(
new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);
WebXmlMerger merger = new WebXmlMerger(srcWebXml);
merger.merge(mergeWebXml);
assertTrue(WebXmlUtils.hasServlet(srcWebXml, "s1"));
assertTrue(WebXmlUtils.hasServlet(srcWebXml, "s2"));
} | [
"public void testMergeOneServletIntoDocumentWithSameServlet() throws Exception\n {\n String srcXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \"</web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n assertTrue(WebXmlUtils.hasServlet(srcWebXml, \"s1\"));\n }",
"public void testMergeOneServletIntoEmptyDocument() throws Exception\n {\n String srcXml = \"<web-app></web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n assertTrue(WebXmlUtils.hasServlet(srcWebXml, \"s1\"));\n }",
"public void testMergeOneServletWithOneMappingIntoEmptyDocument() throws Exception\n {\n String srcXml = \"<web-app></web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \" <servlet-mapping>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <url-pattern>/s1mapping1</url-pattern>\"\n + \" </servlet-mapping>\"\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n assertTrue(WebXmlUtils.hasServlet(srcWebXml, \"s1\"));\n List<String> servletMappings = WebXmlUtils.getServletMappings(srcWebXml, \"s1\");\n assertEquals(1, servletMappings.size());\n assertEquals(\"/s1mapping1\", servletMappings.get(0));\n }",
"public void testMergeOneServletWithMultipleMappingsIntoEmptyDocument() throws Exception\n {\n String srcXml = \"<web-app></web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \" <servlet-mapping>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <url-pattern>/s1mapping1</url-pattern>\"\n + \" </servlet-mapping>\"\n + \" <servlet-mapping>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <url-pattern>/s1mapping2</url-pattern>\"\n + \" </servlet-mapping>\"\n + \" <servlet-mapping>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <url-pattern>/s1mapping3</url-pattern>\"\n + \" </servlet-mapping>\"\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n assertTrue(WebXmlUtils.hasServlet(srcWebXml, \"s1\"));\n List<String> servletMappings = WebXmlUtils.getServletMappings(srcWebXml, \"s1\");\n assertEquals(3, servletMappings.size());\n assertEquals(\"/s1mapping1\", servletMappings.get(0));\n assertEquals(\"/s1mapping2\", servletMappings.get(1));\n assertEquals(\"/s1mapping3\", servletMappings.get(2));\n }",
"public void testMergeMultipleServletMappings() throws Exception\n {\n String srcXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \" <servlet-mapping>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <url-pattern>/u1</url-pattern>\"\n + \" <url-pattern>/u2</url-pattern>\"\n + \" </servlet-mapping>\"\n + \"</web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \" <servlet-mapping>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <url-pattern>/u2</url-pattern>\"\n + \" <url-pattern>/u3</url-pattern>\"\n + \" </servlet-mapping>\"\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n assertTrue(WebXmlUtils.hasServlet(srcWebXml, \"s1\"));\n List<String> servletMappings = WebXmlUtils.getServletMappings(srcWebXml, \"s1\");\n assertEquals(3, servletMappings.size());\n assertEquals(\"/u1\", servletMappings.get(0));\n assertEquals(\"/u2\", servletMappings.get(1));\n assertEquals(\"/u3\", servletMappings.get(2));\n }",
"public void testMergingServletWithInitParamsThatIsAlreadyDefined() throws Exception\n {\n String srcXml = \"<web-app>\".trim()\n + \" <servlet>\".trim()\n + \" <servlet-name>s1</servlet-name>\".trim()\n + \" <servlet-class>sclass1</servlet-class>\".trim()\n + \" <load-on-startup>1</load-on-startup>\".trim()\n + \" </servlet>\".trim()\n + \"</web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\".trim()\n + \" <servlet-name>s1</servlet-name>\".trim()\n + \" <servlet-class>sclass1</servlet-class>\".trim()\n + \" <init-param>\".trim()\n + \" <param-name>s1param1</param-name>\".trim()\n + \" <param-value>s1param1value</param-value>\".trim()\n + \" </init-param>\".trim()\n + \" </servlet>\".trim()\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n Element servletElement = WebXmlUtils.getServlet(srcWebXml, \"s1\");\n assertEquals(\"load-on-startup\",\n ((Element) servletElement.getChildren().get(servletElement.getChildren().size() - 1))\n .getName());\n }",
"public void testMergeOneServletIntoDocumentWithMultipleServlets() throws Exception\n {\n String srcXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \" <servlet>\"\n + \" <servlet-name>s2</servlet-name>\"\n + \" <servlet-class>sclass2</servlet-class>\"\n + \" </servlet>\"\n + \" <servlet>\"\n + \" <servlet-name>s3</servlet-name>\"\n + \" <servlet-class>sclass3</servlet-class>\"\n + \" </servlet>\"\n + \"</web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s4</servlet-name>\"\n + \" <servlet-class>sclass4</servlet-class>\"\n + \" </servlet>\"\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n List<String> servletNames = WebXmlUtils.getServletNames(srcWebXml);\n assertEquals(4, servletNames.size());\n assertEquals(\"s1\", servletNames.get(0));\n assertEquals(\"s2\", servletNames.get(1));\n assertEquals(\"s3\", servletNames.get(2));\n assertEquals(\"s4\", servletNames.get(3));\n }",
"private boolean isServletType (Class c)\n { \n boolean isServlet = false;\n if (javax.servlet.Servlet.class.isAssignableFrom(c) ||\n javax.servlet.Filter.class.isAssignableFrom(c) || \n javax.servlet.ServletContextListener.class.isAssignableFrom(c) ||\n javax.servlet.ServletContextAttributeListener.class.isAssignableFrom(c) ||\n javax.servlet.ServletRequestListener.class.isAssignableFrom(c) ||\n javax.servlet.ServletRequestAttributeListener.class.isAssignableFrom(c) ||\n javax.servlet.http.HttpSessionListener.class.isAssignableFrom(c) ||\n javax.servlet.http.HttpSessionAttributeListener.class.isAssignableFrom(c) || \n (_pojoInstances.get(c) != null))\n \n isServlet=true;\n \n return isServlet; \n }",
"boolean isSetServletClass();",
"public void testMergeMultipleServletsIntoEmptyDocument() throws Exception\n {\n String srcXml = \"<web-app></web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \" <servlet>\"\n + \" <servlet-name>s2</servlet-name>\"\n + \" <servlet-class>sclass2</servlet-class>\"\n + \" </servlet>\"\n + \" <servlet>\"\n + \" <servlet-name>s3</servlet-name>\"\n + \" <servlet-class>sclass3</servlet-class>\"\n + \" </servlet>\"\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n List<String> servletNames = WebXmlUtils.getServletNames(srcWebXml);\n assertEquals(3, servletNames.size());\n assertEquals(\"s1\", servletNames.get(0));\n assertEquals(\"s2\", servletNames.get(1));\n assertEquals(\"s3\", servletNames.get(2));\n }",
"public void visitServletMapping(WebAppContext context, Descriptor descriptor, XmlParser.Node node)\n {\n\n String servlet_name = node.getString(\"servlet-name\", false, true);\n switch (context.getMetaData().getOrigin(servlet_name+\".servlet.mappings\"))\n {\n case NotSet:\n {\n //no servlet mappings\n context.getMetaData().setOrigin(servlet_name+\".servlet.mappings\", descriptor);\n addServletMapping(servlet_name, node, context, descriptor); \n break;\n }\n case WebDefaults:\n case WebXml:\n case WebOverride:\n {\n //previously set by a web xml descriptor, if we're parsing another web xml descriptor allow override\n //otherwise just ignore it as web.xml takes precedence (pg 8-81 5.g.vi)\n if (!(descriptor instanceof FragmentDescriptor))\n {\n addServletMapping(servlet_name, node, context, descriptor);\n }\n break;\n }\n case WebFragment:\n {\n //mappings previously set by another web-fragment, so merge in this web-fragment's mappings\n addServletMapping(servlet_name, node, context, descriptor);\n break;\n }\n default:\n LOG.warn(new Throwable()); // TODO throw ISE?\n }\n }",
"@Test\n\tpublic void testRegisterServletToWarContext() throws Exception {\n\t\tfinal AtomicReference<HttpContext> httpContext1 = new AtomicReference<>();\n\t\tfinal AtomicReference<HttpContext> httpContext2 = new AtomicReference<>();\n\t\tfinal CountDownLatch latch1 = new CountDownLatch(1);\n\t\tfinal CountDownLatch latch2 = new CountDownLatch(1);\n\n\t\tcontext.registerService(WebApplicationEventListener.class, webEvent -> {\n\t\t\tif (webEvent.getType() == WebApplicationEvent.State.DEPLOYED) {\n\t\t\t\tif (webEvent.getContext() != null) {\n\t\t\t\t\thttpContext1.set(webEvent.getContext());\n\t\t\t\t\tlatch1.countDown();\n\t\t\t\t}\n\t\t\t}\n\t\t}, null);\n\n\t\tLOG.debug(\"installing war-simple war\");\n\n\t\tBundle simpleWar = configureAndWaitForDeploymentUnlessInstalled(\"war-simple\", () -> {\n\t\t\tinstallAndStartWebBundle(\"war-simple\", \"/war-simple\");\n\t\t});\n\n\t\tassertTrue(latch1.await(5, TimeUnit.SECONDS));\n\n\t\tLOG.debug(\"context registered, calling web request ...\");\n\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'Hello, World, from JSP'\",\n\t\t\t\t\t\tresp -> resp.contains(\"Hello, World, from JSP\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/war-simple\");\n\n\t\tfinal HttpService httpService = getHttpService(simpleWar.getBundleContext());\n\n\t\tLOG.debug(\"... adding additional content to war\");\n\n\t\tcontext.registerService(WebElementEventListener.class, webEvent -> {\n\t\t\tif (webEvent.getType() == WebElementEvent.State.DEPLOYED) {\n\t\t\t\tif (webEvent.getData() instanceof ServletEventData) {\n\t\t\t\t\tif (\"/test2\".equals(((ServletEventData) webEvent.getData()).getAlias())) {\n\t\t\t\t\t\thttpContext2.set(webEvent.getData().getHttpContext());\n\t\t\t\t\t\tlatch2.countDown();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, null);\n\n\t\tTestServlet servlet2 = new TestServlet();\n\t\thttpService.registerServlet(\"/test2\", servlet2, null, httpContext1.get());\n\n\t\t// register resources to different context\n\t\t// \"/\" will be changed to \"\" anyway\n\t\t// these resources will be loaded from original bundle that \"created\" this http context\n\n\t\t// here we're using \"default\" httpContext for \"war-simple\" bundle, so the default implementation is\n\t\t// org.ops4j.pax.web.service.spi.context.DefaultHttpContext and getResource() will use\n\t\t// org.osgi.framework.Bundle.getResource() (classloader access method)\n\t\thttpService.registerResources(\"/r1\", \"/static\", null);\n\t\thttpService.registerResources(\"/r2\", \"static\", null);\n\t\thttpService.registerResources(\"/r3\", \"/\", null);\n\t\thttpService.registerResources(\"/r4\", \"\", null);\n\n\t\t// here we're using the context taken the WAB and all its web elements, so the default implementation is\n\t\t// org.ops4j.pax.web.service.spi.context.WebContainerContextWrapper wrapping an instance of\n\t\t// org.ops4j.pax.web.extender.war.internal.WebApplicationHelper and getResource() will use\n\t\t// org.osgi.framework.Bundle.findEntries() (non-classloader access method)\n\t\thttpService.registerResources(\"/r1\", \"/static\", httpContext1.get());\n\t\thttpService.registerResources(\"/r2\", \"static\", httpContext1.get());\n\t\thttpService.registerResources(\"/r3\", \"/\", httpContext1.get());\n\t\thttpService.registerResources(\"/r4\", \"\", httpContext1.get());\n\t\t// case when \"resource name\" == \"context\"\n\t\thttpService.registerResources(\"/war-simple\", \"/static\", httpContext1.get());\n\n\t\t// can't replace WAR's \"default\" resource servlet:\n\t\t// org.osgi.service.http.NamespaceException: \\\n\t\t// ServletModel{id=ServletModel-40,name='default',alias='/',urlPatterns=[/],contexts=[{HS,OCM-23,default,/war-simple}]} \\\n\t\t// can't be registered. \\\n\t\t// ServletContextModel{id=ServletContextModel-22,contextPath='/war-simple'} already contains servlet named default: \\\n\t\t// ServletModel{id=ServletModel-24,name='default',urlPatterns=[/],contexts=[{HS,OCM-23,default,/war-simple}]}\n//\t\thttpService.registerResources(\"/\", \"/static\", httpContext1.get());\n\n\t\tassertTrue(latch2.await(5, TimeUnit.SECONDS));\n\n\t\tassertSame(httpContext1.get(), httpContext2.get());\n\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'Hello, World, from JSP'\",\n\t\t\t\t\t\tresp -> resp.contains(\"Hello, World, from JSP\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/war-simple\");\n\n\t\t// Jetty has condition: \"if (_servlet == null && (_initOnStartup || isInstance()))\", so dynamically\n\t\t// added servlet with the instance set is immediately initialized\n//\t\tassertFalse(\"Servlet.init(ServletConfig) was called\", servlet2.isInitCalled());\n\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'TEST OK'\",\n\t\t\t\t\t\tresp -> resp.contains(\"TEST OK\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/war-simple/test2\");\n\n\t\tassertTrue(\"Servlet.init(ServletConfig) was not called\", servlet2.isInitCalled());\n\n\t\t// resources\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (static)'\",\n\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (static) - entry\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/war-simple/r1/readme.txt\");\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (static)'\",\n\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (static) - entry\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/war-simple/r2/readme.txt\");\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (ROOT)'\",\n\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (ROOT) - entry\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/war-simple/r3/readme.txt\");\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (ROOT)'\",\n\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (ROOT) - entry\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/war-simple/r4/readme.txt\");\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (static)'\",\n\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (static) - entry\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/war-simple/war-simple/readme.txt\");\n\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (static)'\",\n\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (static) - classpath\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/r1/readme.txt\");\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (static)'\",\n\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (static) - classpath\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/r2/readme.txt\");\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (ROOT)'\",\n\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (ROOT) - classpath\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/r3/readme.txt\");\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (ROOT)'\",\n\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (ROOT) - classpath\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/r4/readme.txt\");\n\t\t// this is interesting - because /war-simple is both a context path and resource prefix in ROOT context,\n\t\t// the longest context path prefix takes precedence\n\t\tHttpTestClientFactory.createDefaultTestClient()\n\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (static)'\",\n\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (ROOT) - entry\"))\n\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/war-simple/readme.txt\");\n\t\t// This is where I explicitly fail to comply to \"140.2 The Servlet Context\" of the whiteboard specification.\n\t\t// This chapter mentions two ServletContextHelpers with two paths:\n\t\t// - osgi.http.whiteboard.context.path = /foo\n\t\t// - osgi.http.whiteboard.context.path = /foo/bar\n\t\t// and a request URI http://localhost/foo/bar/someServlet is said to be resolved in this order:\n\t\t// 1. /foo/bar context looking for a pattern to match /someServlet\n\t\t// 2. /foo context looking for a pattern to match /bar/someServlet\n\t\t// However this is not correct resolution in chapter \"12.1 Use of URL Paths\" of Servlet API 4:\n\t\t// Upon receipt of a client request, the Web container determines the Web application\n\t\t// to which to forward it. The Web application selected must have the longest context\n\t\t// path that matches the start of the request URL. The matched part of the URL is the\n\t\t// context path when mapping to servlets.\n//\t\tHttpTestClientFactory.createDefaultTestClient()\n//\t\t\t\t.withResponseAssertion(\"Response must contain 'registerResources test (static)'\",\n//\t\t\t\t\t\tresp -> resp.contains(\"registerResources test (static) - classpath\"))\n//\t\t\t\t.doGETandExecuteTest(\"http://127.0.0.1:8181/war-simple/readme2.txt\");\n\t}",
"@Test\n public void testOrgApacheSlingJcrWebdavImplServletsSimpleWebDavServletProperties() {\n // TODO: test OrgApacheSlingJcrWebdavImplServletsSimpleWebDavServletProperties\n }",
"com.sun.java.xml.ns.j2Ee.ServletNameType addNewServletName();",
"default boolean isServerReqRespValidForBlob(final HttpServletRequest req,\n final HttpServletResponse resp,\n @Nullable final Throwable servletException) {\n return true;\n }",
"protected boolean allowAddition(RemoteFileDesc other) {\n if (!initDone) {\n synchronized (matcher) {\n matcher.setIgnoreCase(true);\n matcher.setIgnoreWhitespace(true);\n matcher.setCompareBackwards(true);\n }\n initDone = true;\n }\n\n // before doing expensive stuff, see if connection is even possible...\n if (other.getQuality() < 1) // I only want 2,3,4 star guys....\n return false;\n\n // get other info...\n final URN otherUrn = other.getSHA1Urn();\n final String otherName = other.getFileName();\n final long otherLength = other.getSize();\n\n synchronized (this) {\n long ourLength = getContentLength();\n\n if (ourLength != -1 && ourLength != otherLength)\n return false;\n\n if (otherUrn != null && getSha1Urn() != null)\n return otherUrn.equals(getSha1Urn());\n\n // compare to previously cached rfds\n for (RemoteFileDesc rfd : cachedRFDs) {\n final String thisName = rfd.getFileName();\n final long thisLength = rfd.getSize();\n\n // if they are similarly named and same length\n // do length check first, much less expensive.....\n if (otherLength == thisLength)\n if (namesClose(otherName, thisName))\n return true;\n }\n\n\n String resumeFileName = getResumeFileName();\n if (resumeFileName != null) {\n return namesClose(otherName, resumeFileName);\n }\n }\n return false;\n }",
"public boolean multiDeployment() {\n return this == application || this == global;\n }",
"private ServletPathMatchesData setupServletChains() {\n //create the default servlet\n ServletHandler defaultServlet = null;\n final ManagedServlets servlets = deployment.getServlets();\n final ManagedFilters filters = deployment.getFilters();\n\n final Map<String, ServletHandler> extensionServlets = new HashMap<>();\n final Map<String, ServletHandler> pathServlets = new HashMap<>();\n\n final Set<String> pathMatches = new HashSet<>();\n final Set<String> extensionMatches = new HashSet<>();\n\n DeploymentInfo deploymentInfo = deployment.getDeploymentInfo();\n\n //loop through all filter mappings, and add them to the set of known paths\n for (FilterMappingInfo mapping : deploymentInfo.getFilterMappings()) {\n if (mapping.getMappingType() == FilterMappingInfo.MappingType.URL) {\n String path = mapping.getMapping();\n if (path.equals(\"*\")) {\n //UNDERTOW-95, support this non-standard filter mapping\n path = \"/*\";\n }\n if (!path.startsWith(\"*.\")) {\n pathMatches.add(path);\n } else {\n extensionMatches.add(path.substring(2));\n }\n }\n }\n\n //now loop through all servlets.\n for (Map.Entry<String, ServletHandler> entry : servlets.getServletHandlers().entrySet()) {\n final ServletHandler handler = entry.getValue();\n //add the servlet to the approprite path maps\n for (String path : handler.getManagedServlet().getServletInfo().getMappings()) {\n if (path.equals(\"/\")) {\n //the default servlet\n pathMatches.add(\"/*\");\n if (defaultServlet != null) {\n throw UndertowServletMessages.MESSAGES.twoServletsWithSameMapping(path);\n }\n defaultServlet = handler;\n } else if (!path.startsWith(\"*.\")) {\n //either an exact or a /* based path match\n if (path.isEmpty()) {\n path = \"/\";\n }\n pathMatches.add(path);\n if (pathServlets.containsKey(path)) {\n throw UndertowServletMessages.MESSAGES.twoServletsWithSameMapping(path);\n }\n pathServlets.put(path, handler);\n } else {\n //an extension match based servlet\n String ext = path.substring(2);\n extensionMatches.add(ext);\n if(extensionServlets.containsKey(ext)) {\n throw UndertowServletMessages.MESSAGES.twoServletsWithSameMapping(path);\n }\n extensionServlets.put(ext, handler);\n }\n }\n }\n ServletHandler managedDefaultServlet = servlets.getServletHandler(DEFAULT_SERVLET_NAME);\n if(managedDefaultServlet == null) {\n //we always create a default servlet, even if it is not going to have any path mappings registered\n managedDefaultServlet = servlets.addServlet(new ServletInfo(DEFAULT_SERVLET_NAME, DefaultServlet.class));\n }\n\n if (defaultServlet == null) {\n //no explicit default servlet was specified, so we register our mapping\n pathMatches.add(\"/*\");\n defaultServlet = managedDefaultServlet;\n }\n\n final ServletPathMatchesData.Builder builder = ServletPathMatchesData.builder();\n\n //we now loop over every path in the application, and build up the patches based on this path\n //these paths contain both /* and exact matches.\n for (final String path : pathMatches) {\n //resolve the target servlet, will return null if this is the default servlet\n MatchData targetServletMatch = resolveServletForPath(path, pathServlets, extensionServlets, defaultServlet);\n\n final Map<DispatcherType, List<ManagedFilter>> noExtension = new EnumMap<>(DispatcherType.class);\n final Map<String, Map<DispatcherType, List<ManagedFilter>>> extension = new HashMap<>();\n //initalize the extension map. This contains all the filers in the noExtension map, plus\n //any filters that match the extension key\n for (String ext : extensionMatches) {\n extension.put(ext, new EnumMap<DispatcherType, List<ManagedFilter>>(DispatcherType.class));\n }\n\n //loop over all the filters, and add them to the appropriate map in the correct order\n for (final FilterMappingInfo filterMapping : deploymentInfo.getFilterMappings()) {\n ManagedFilter filter = filters.getManagedFilter(filterMapping.getFilterName());\n if (filterMapping.getMappingType() == FilterMappingInfo.MappingType.SERVLET) {\n if (targetServletMatch.handler != null) {\n if (filterMapping.getMapping().equals(targetServletMatch.handler.getManagedServlet().getServletInfo().getName()) || filterMapping.getMapping().equals(\"*\")) {\n addToListMap(noExtension, filterMapping.getDispatcher(), filter);\n }\n }\n for (Map.Entry<String, Map<DispatcherType, List<ManagedFilter>>> entry : extension.entrySet()) {\n ServletHandler pathServlet = targetServletMatch.handler;\n boolean defaultServletMatch = targetServletMatch.defaultServlet;\n if (defaultServletMatch && extensionServlets.containsKey(entry.getKey())) {\n pathServlet = extensionServlets.get(entry.getKey());\n }\n\n if (filterMapping.getMapping().equals(pathServlet.getManagedServlet().getServletInfo().getName()) || filterMapping.getMapping().equals(\"*\")) {\n addToListMap(extension.get(entry.getKey()), filterMapping.getDispatcher(), filter);\n }\n }\n } else {\n if (filterMapping.getMapping().isEmpty() || !filterMapping.getMapping().startsWith(\"*.\")) {\n if (isFilterApplicable(path, filterMapping.getMapping())) {\n addToListMap(noExtension, filterMapping.getDispatcher(), filter);\n for (Map<DispatcherType, List<ManagedFilter>> l : extension.values()) {\n addToListMap(l, filterMapping.getDispatcher(), filter);\n }\n }\n } else {\n addToListMap(extension.get(filterMapping.getMapping().substring(2)), filterMapping.getDispatcher(), filter);\n }\n }\n }\n //resolve any matches and add them to the builder\n if (path.endsWith(\"/*\")) {\n String prefix = path.substring(0, path.length() - 2);\n //add the default non-extension match\n builder.addPrefixMatch(prefix, createHandler(deploymentInfo, targetServletMatch.handler, noExtension, targetServletMatch.matchedPath, targetServletMatch.defaultServlet, targetServletMatch.mappingMatch, targetServletMatch.userPath), targetServletMatch.defaultServlet || targetServletMatch.handler.getManagedServlet().getServletInfo().isRequireWelcomeFileMapping());\n\n //build up the chain for each non-extension match\n for (Map.Entry<String, Map<DispatcherType, List<ManagedFilter>>> entry : extension.entrySet()) {\n ServletHandler pathServlet = targetServletMatch.handler;\n String pathMatch = targetServletMatch.matchedPath;\n\n boolean defaultServletMatch = targetServletMatch.defaultServlet;\n if (defaultServletMatch && extensionServlets.containsKey(entry.getKey())) {\n defaultServletMatch = false;\n pathServlet = extensionServlets.get(entry.getKey());\n }\n HttpHandler handler = pathServlet;\n if (!entry.getValue().isEmpty()) {\n handler = new FilterHandler(entry.getValue(), deploymentInfo.isAllowNonStandardWrappers(), handler);\n }\n builder.addExtensionMatch(prefix, entry.getKey(), servletChain(handler, pathServlet.getManagedServlet(), entry.getValue(), pathMatch, deploymentInfo, defaultServletMatch, defaultServletMatch ? MappingMatch.DEFAULT : MappingMatch.EXTENSION, defaultServletMatch ? \"/\" : \"*.\" + entry.getKey()));\n }\n } else if (path.isEmpty()) {\n //the context root match\n builder.addExactMatch(\"/\", createHandler(deploymentInfo, targetServletMatch.handler, noExtension, targetServletMatch.matchedPath, targetServletMatch.defaultServlet, targetServletMatch.mappingMatch, targetServletMatch.userPath));\n } else {\n //we need to check for an extension match, so paths like /exact.txt will have the correct filter applied\n int lastSegmentIndex = path.lastIndexOf('/');\n String lastSegment;\n if(lastSegmentIndex > 0) {\n lastSegment = path.substring(lastSegmentIndex);\n } else {\n lastSegment = path;\n }\n if (lastSegment.contains(\".\")) {\n String ext = lastSegment.substring(lastSegment.lastIndexOf('.') + 1);\n if (extension.containsKey(ext)) {\n Map<DispatcherType, List<ManagedFilter>> extMap = extension.get(ext);\n builder.addExactMatch(path, createHandler(deploymentInfo, targetServletMatch.handler, extMap, targetServletMatch.matchedPath, targetServletMatch.defaultServlet, targetServletMatch.mappingMatch, targetServletMatch.userPath));\n } else {\n builder.addExactMatch(path, createHandler(deploymentInfo, targetServletMatch.handler, noExtension, targetServletMatch.matchedPath, targetServletMatch.defaultServlet, targetServletMatch.mappingMatch, targetServletMatch.userPath));\n }\n } else {\n builder.addExactMatch(path, createHandler(deploymentInfo, targetServletMatch.handler, noExtension, targetServletMatch.matchedPath, targetServletMatch.defaultServlet, targetServletMatch.mappingMatch, targetServletMatch.userPath));\n }\n\n }\n }\n\n //now setup name based mappings\n //these are used for name based dispatch\n for (Map.Entry<String, ServletHandler> entry : servlets.getServletHandlers().entrySet()) {\n final Map<DispatcherType, List<ManagedFilter>> filtersByDispatcher = new EnumMap<>(DispatcherType.class);\n for (final FilterMappingInfo filterMapping : deploymentInfo.getFilterMappings()) {\n ManagedFilter filter = filters.getManagedFilter(filterMapping.getFilterName());\n if (filterMapping.getMappingType() == FilterMappingInfo.MappingType.SERVLET) {\n if (filterMapping.getMapping().equals(entry.getKey())) {\n addToListMap(filtersByDispatcher, filterMapping.getDispatcher(), filter);\n }\n }\n }\n if (filtersByDispatcher.isEmpty()) {\n builder.addNameMatch(entry.getKey(), servletChain(entry.getValue(), entry.getValue().getManagedServlet(), filtersByDispatcher, null, deploymentInfo, false, MappingMatch.EXACT, \"\"));\n } else {\n builder.addNameMatch(entry.getKey(), servletChain(new FilterHandler(filtersByDispatcher, deploymentInfo.isAllowNonStandardWrappers(), entry.getValue()), entry.getValue().getManagedServlet(), filtersByDispatcher, null, deploymentInfo, false, MappingMatch.EXACT, \"\"));\n }\n }\n\n return builder.build();\n }",
"public static boolean isWebInfExist() {\n\t\t\treturn isWebinfExist;\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the TerritoryCodes field. The rating territory codes. | @gw.internal.gosu.parser.ExtendedProperty
public entity.TerritoryCode[] getTerritoryCodes() {
return (entity.TerritoryCode[])__getInternalInterface().getFieldValue(TERRITORYCODES_PROP.get());
} | [
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.TerritoryCode[] getTerritoryCodes() {\n return (entity.TerritoryCode[])__getInternalInterface().getFieldValue(TERRITORYCODES_PROP.get());\n }",
"public void setTerritoryCodes(entity.TerritoryCode[] value) {\n __getInternalInterface().setFieldValue(TERRITORYCODES_PROP.get(), value);\n }",
"public void setTerritoryCodes(entity.TerritoryCode[] value) {\n __getInternalInterface().setFieldValue(TERRITORYCODES_PROP.get(), value);\n }",
"public String getTerritory() {\n return territory;\n }",
"public Territories getTerritory() {\r\n\t\treturn territory;\r\n\t}",
"@Override\n\tpublic Territory getTerritory() {\n\t\treturn territory;\n\t}",
"@Override\r\n\tpublic String getIndustryCodes() {\r\n\t\treturn (String)map.get(INDUSTRY_CODES);\r\n\t}",
"public java.lang.Object getTerritoryID() {\n return territoryID;\n }",
"public java.lang.String getTerritorialityCode() {\n return territorialityCode;\n }",
"Code[] getCodes();",
"java.lang.String getRegionCode();",
"public java.lang.String getTerritoryItemType() {\n return territoryItemType;\n }",
"public void addToTerritoryCodes(entity.TerritoryCode element) {\n __getInternalInterface().addArrayElement(TERRITORYCODES_PROP.get(), element);\n }",
"public void addToTerritoryCodes(entity.TerritoryCode element) {\n __getInternalInterface().addArrayElement(TERRITORYCODES_PROP.get(), element);\n }",
"public String getIndustryCodes() {\n return industryCodes;\n }",
"public List<Territory> getTerritories()\n {\n return territories;\n }",
"public String getRegionCode() {\n return (String)getAttributeInternal(REGIONCODE);\n }",
"public Integer getRegionCode(){\n int res = authorityID[2]<<8 | authorityID[3];\n return res;\n }",
"public void updateTerritoryCodes() {\n ((com.guidewire.pc.domain.policy.period.PolicyLocationPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pc.domain.policy.period.PolicyLocationPublicMethods\")).updateTerritoryCodes();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test that you cannot create a shape with the same name as another shape in the animation. | @Test(expected = IllegalArgumentException.class)
public void testNoShapeWithSameName() {
model1.addShape(Rectangle.createRectangle("R", new Point.Double(500, 200),
new Color(0, 0, 0), 0, 10, 10, 10));
model1.addShape(Oval.createOval("R", new Point.Double(500, 200),
new Color(0, 0, 0), 0, 10, 10, 10));
} | [
"@Test(expected = IllegalArgumentException.class)\n public void testAddSameShapeTwice() {\n testAnimation.addShape(c, 1, 100);\n testAnimation.addShape(c, 50, 70);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testNoShapeWithSameNameCaseInsensitive() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addShape(Oval.createOval(\"r\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testCantMoveSameShapeInOverlappingTime() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(new MoveAction(\"R\", 0, 100, new Point.Double(500, 200),\n new Point.Double(10, 10)));\n model1.addAction(new MoveAction(\"R\", 50, 150,\n new Point.Double(500, 200), new Point.Double(10, 10)));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void addexceptionShapesAndAnimations() {\n // shape does not exist\n this.builder.addRectangle(\"R\", 2, 7, 10, 30, Color.RED,\n 1, 100);\n this.builder.addOval(\"R\", 2, 7, 34, 34, Color.GREEN,\n 76, 77);\n this.builder.addOval(\"L\", 2, 7, 34, 34, Color.GREEN,\n 76, 31);\n this.builder.addColorChange(\"O\", Color.GREEN, Color.BLUE, 7, 20);\n this.builder.addColorChange(\"R\", Color.GREEN, Color.RED, 14, 20);\n this.builder.addMove(\"O\", 5, 5, 12, 12, 4, 15);\n builder.build();\n }",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeDisappearsBeforeAppearing() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 0, 50, 100));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testErrorShapeDoesntExist() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(ScaleOvalAction.createScaleOvalAction(\"O\", 0, 100,\n 100, 100, 1, 1));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullName() {\n model1.addShape(Oval.createOval(null, new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testAddMoveEventWithoutAddShape() {\n move1 = new MoveShape(r, 200.0, 200.0, 300.0, 300.0);\n testAnimation.addEvent(r, move1, 10, 50);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeAppearsBefore0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), -1, 100, 50, 100));\n }",
"@Test(dependsOnGroups = {\"ShapeNGTest.emptyCrsCache\"})\n public void testGenerateShapefileInvalidShape() throws IOException {\n final Map<String, String> shapes = new HashMap<>();\n shapes.put(POLY_ID, Shape.generateShape(POLY_ID, POLYGON, POLY_COORDS));\n shapes.put(BOX_ID, Shape.generateShape(BOX_ID, POLYGON, BOX_COORDS));\n\n try ( MockedConstruction<FeatureJSON> mockFeatureJson = Mockito.mockConstruction(FeatureJSON.class,\n (mock, context) -> {\n // throw exception on first call, then call real method on all other calls\n when(mock.streamFeatureCollection(any())).thenThrow(IOException.class).thenCallRealMethod();\n })) {\n\n final File f = File.createTempFile(\"tmp\", SHP_EXT);\n Shape.generateShapefile(\"dummy\", POLYGON,\n shapes, Collections.emptyMap(), f,\n Shape.SpatialReference.WGS84);\n\n DataStore store = null;\n try {\n store = getShapefileStore(f);\n // check that only one expected feature was generated\n final SimpleFeatureCollection features\n = store.getFeatureSource(store.getTypeNames()[0]).getFeatures();\n assertEquals(features.size(), 1);\n\n // check that only one expected feature was generated\n try ( SimpleFeatureIterator it = features.features()) {\n final String featureName = (String) it.next().getAttribute(NAME);\n assertTrue(featureName.equals(POLY_ID)\n || featureName.equals(BOX_ID));\n }\n } finally {\n if (store != null) {\n store.dispose();\n }\n }\n\n // check that the class attempted to get features from both shapes\n verify(mockFeatureJson.constructed().get(0), times(2)).streamFeatureCollection(any());\n }\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullLocation() {\n model1.addShape(Oval.createOval(\"C\", null,\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }",
"@Test(dependsOnGroups = {\"ShapeNGTest.emptyCrsCache\"})\n public void testGenerateKmlInvalidShape() throws IOException {\n final Map<String, String> shapes = new HashMap<>();\n shapes.put(POINT_ID, Shape.generateShape(POINT_ID, POINT, POINT_COORDS));\n shapes.put(LINE_ID, Shape.generateShape(LINE_ID, LINE, LINE_COORDS));\n\n try ( MockedConstruction<FeatureJSON> mockFeatureJson = Mockito.mockConstruction(FeatureJSON.class,\n (mock, context) -> {\n // throw exception on first call, then call real method on all other calls\n when(mock.streamFeatureCollection(any())).thenThrow(IOException.class).thenCallRealMethod();\n })) {\n\n final String kml = Shape.generateKml(\"dummy\", shapes, Collections.emptyMap());\n\n /* One shape will error and be ignored, one shape will pass and be\n output. Assert by checking that a placemark for point OR line is\n present, but not both. */\n final String pointPlacemark = KML_PLACEMARK + POINT_ID;\n final String linePlacemark = KML_PLACEMARK + LINE_ID;\n assertTrue(kml.contains(pointPlacemark) || kml.contains(linePlacemark));\n assertFalse(kml.contains(pointPlacemark) && kml.contains(linePlacemark));\n\n // check that the class attempted to get features from both shapes\n verify(mockFeatureJson.constructed().get(0), times(2))\n .streamFeatureCollection(any());\n }\n }",
"@Test\n public void testShapesButNoMotions() throws IOException {\n AnimationModel am = new SimpleAnimationModel();\n StringBuilder sb = new StringBuilder();\n am.addShape(\"Reccy\", ShapeType.RECTANGLE);\n am.startAnimation();\n IAnimationView av = new SVGAnimationView(am, 2, sb);\n av.render();\n assertEquals(\"<svg viewBox = \\\"0 0 0 0\\\" version=\\\"1.1\\\" \"\n + \"xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"\n + \"\\n\"\n + \"</svg>\", sb.toString());\n }",
"@Test\n public void testDifferentChangeTypeOverlap() {\n testAnimation.addShape(c, 1, 100);\n move1 = new MoveShape(c, 500.0, 100.0, 300.0, 300.0);\n size1 = new ScaleShape(c, 120.0, 60.0, 85.0, 10.67);\n colorChange1 = new ChangeColor(c,\n 0, 0, 1,\n 0, 1, 0);\n testAnimation.addEvent(c, move1, 20, 45);\n testAnimation.addEvent(c, size1, 28, 88);\n testAnimation.addEvent(c, colorChange1, 36, 95);\n assertEquals(\"Shapes:\\n\"\n + \"Name: C\\n\"\n + \"Type: ellipse\\n\"\n + \"Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0,0,1)\\n\"\n + \"Appears at t=1\\n\"\n + \"Disappears at t=100\\n\"\n + \"\\n\"\n + \"C moves from (500.0,100.0) to (300.0,300.0) from time t=20 to t=45\\n\"\n + \"C changes height from 60.0 to 10.67 and changes width from 120.0 to 85.0\"\n + \" from time t=28 to t=88\\nC changes color from (0,0,1) to (0,1,0) from \" +\n \"time t=36 \"\n + \"to t=95\\n\",\n testAnimation.toString());\n }",
"@Test(expected = IllegalArgumentException.class)\n public void createOvalNegX() {\n Shapes oval3 = new Oval(\"oval 3\", 15, 20,\n p2, Color.DARK_GRAY, -10.0, 10.0);\n }",
"void removeShape(String name);",
"@Test(dependsOnGroups = {\"ShapeNGTest.emptyCrsCache\"},\n expectedExceptions = {IllegalArgumentException.class},\n expectedExceptionsMessageRegExp = \".*MULTI_POINT, is not currently supported.\")\n public void testGenerateShapeNotSupported() throws IOException {\n Shape.generateShape(\n \"dummy\",\n MULTI_POINT,\n Arrays.asList(new Tuple<>(POINT_LAT, POINT_LON)));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testNoScaleRectangleOnOval() {\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"C\", 0,\n 100, 100, 100, 1, 1));\n textView1.animate(model1, 1, out);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullColor() {\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n null, 6, 100, 60.0, 30.0));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
1) Provided with the details of a transaction we need to be able to add the transaction to a bank account. | public void processTransaction(Transaction transaction) throws BankProcessingException {
Account account = map.get(transaction.getAssociatedAccount());
if (account != null) {
synchronized (account) {
try {
account.addTransaction(transaction);
} catch (NotEnoughFundsException exception) {
throw new BankProcessingException(exception.getMessage());
}
}
} else {
throw new BankProcessingException("Account doesn't exist!");
}
} | [
"public void addTransaction(Transaction tx) {\n // IMPLEMENT THIS\n }",
"protected abstract Transaction createAndAdd();",
"public void addTransaction(TransactionId tid, Permissions pms){\n\tif(tid != null){\n\t Transaction tas = new Transaction(tid, pms);\n\t this.traid.add(tas);\n\t} else{\n\t Debug.log(\"!!!warning: a 'null' transation ID is going to get a page. Adding refused.\"); \n\t}\n }",
"void addBankAccountDetails(BankAccountDTO bankAccountDTO,String name)throws EOTException;",
"public String addTransaction(Transaction transaction) {\r\n\t\tBook book = new Book();\r\n\t\tbook.setBookName(transaction.getBookName());\r\n\t\tbook.setAuthorName(transaction.getAuthorName());\r\n\t\tbook.setEdition(transaction.getEdition());\r\n\t\tbook = libraryDao.searchBook(book);\r\n\t\tMember member = new Member();\r\n\t\tmember.setMemberName(transaction.getMemberName());\r\n\t\tmember.setPhoneNumber(transaction.getPhoneNumber());\r\n\t\tmember = libraryDao.searchMember(member);\r\n\t\tif (member == null) {\r\n\t\t\treturn \"Member not Present\";\r\n\t\t} else {\r\n\t\t\tInteger present = libraryDao.searchTransaction(\r\n\t\t\t\t\tmember.getMemberID(), book.getBookID());\r\n\t\t\tif (transaction.getState().equalsIgnoreCase(\"Issue\")) {\r\n\r\n\t\t\t\tif (present == null) {\r\n\t\t\t\t\tbook.setCopies(book.getCopies() - 1);\r\n\t\t\t\t\tlibraryDao.updateBookCopies(book);\r\n\t\t\t\t\tlibraryDao.addTransaction(book, member, transaction);\r\n\t\t\t\t\treturn \"Issued book successfully\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn \"Book is already issued\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (transaction.getState().equalsIgnoreCase(\"Return\")) {\r\n\t\t\t\tif (present != null) {\r\n\t\t\t\t\tbook.setCopies(book.getCopies() + 1);\r\n\t\t\t\t\tlibraryDao.updateBookCopies(book);\r\n\t\t\t\t\tlibraryDao.deleteTransaction(book, member);\r\n\t\t\t\t\treturn \"Returned book successfully\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn \"Book is not issued\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public void createTransaction(Transaction trans);",
"protected final Transaction addTransaction(Transaction trans) {\n\t\treturn addTransactionTo(getAccount(), trans);\n\t}",
"public TransactionRecord addTransaction(Transaction transaction) \n throws IOException;",
"void addConfirmedTransaction(int transId, String userId);",
"@Test(groups = \"Transactions Tests\", description = \"Create new transaction\")\n\tpublic void createNewTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"300\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.typeTransactionNote(\"Extra income from this month\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"Sub-account created successfully and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"'Double Entry' account also have the transaction and the value is correct\");\n\n\t}",
"public int customerTransaction(int accountId, double balance) throws BusinessException;",
"Optional<Transaction> createTransaction(@NotNull Long accountID, double amount);",
"int transaction(String from, String payee, String first_name, String last_name,\n float value, String trans_pwd, String memo){\n int err = transPwdChecker(from, trans_pwd);\n if (err == 0) {\n err = payeeChecker(payee, first_name, last_name);\n if (err == 0) {\n err = amountChecker(from, value);\n if (err == 0) {\n err = executeTransaction(from, payee, value);\n if (err == 0) {\n err = transactionDetailGenerator(from, payee, first_name, last_name, value, memo);\n if (err == 0){\n try {\n PreparedStatement find_nin = connection.prepareStatement(\n \"select id from linkedaccounts where account = ?;\");\n find_nin.setString(1, from);\n ResultSet ret = find_nin.executeQuery();\n if (ret.next()) {\n String nin = ret.getString(1);\n PreparedStatement self_transfer = connection.prepareStatement(\n \"select account from linkedaccounts where id = ?;\");\n self_transfer.setString(1, nin);\n ResultSet ret2 = self_transfer.executeQuery();\n ArrayList<String> arr = new ArrayList<>();\n while (ret2.next()){\n arr.add(ret2.getString(1));\n }\n if (!arr.contains(payee)){\n PreparedStatement find_email = connection.prepareStatement(\n \"select email from mobilereg where id = ?;\");\n find_email.setString(1, nin);\n ResultSet ret1 = find_email.executeQuery();\n if (ret1.next()) {\n String email = ret1.getString(1);\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n out.write(myIO.toBytes(email, 50));\n out.write(1);\n out.write(myIO.toBytes(payee, 8));\n out.write(myIO.toBytes(first_name, 10));\n out.write(myIO.toBytes(last_name, 10));\n if (modifyPayees(out.toByteArray()) == 1) {\n System.out.println(\"Post transaction Payee addition successful\");\n }\n\n }\n\n }\n }\n } catch (SQLException | IOException e) {\n e.printStackTrace();\n }\n\n }\n }\n }\n }\n }\n return err;\n }",
"public void transfer(int tranfer_AccNumber,int source_accNumber, int pin, double trans_amount) \n\t{\n\t\t\n\t\tdouble trans_balance=0;\n\t\t//getting the source balance\n\t\tdouble source_balance=getBalance(source_accNumber, pin);\n\t\t//minimum 500 balance in source account\n\t\tif (source_balance>500)\n\t\t{\n\t\t\tsource_balance = source_balance - trans_amount;\n\t\t\ttry {\n\t\t\t\t//get balance of transfer account\n\t\t\t\tst=con.createStatement();\n\t\t\t\trs=st.executeQuery(\"select balance,name from sbi where accnumber=\"+tranfer_AccNumber);\n\t\t\t\twhile (rs.next())\n\t\t\t\t{\n\t\t\t\t\ttrans_balance=rs.getInt(\"balance\");\n\t\t\t\t}\n\t\t\t\ttrans_balance+=trans_amount;\n\t\t\t\tcon.setAutoCommit(false);\n\t\t\t\tString name=getName(tranfer_AccNumber);\n\t\t\t\t//update source account in sbi table\n\t\t\t\tString query1=\"update sbi set balance=\"+source_balance+\" where accnumber=\"+source_accNumber;\n\t\t\t\t//inserting record in transactionlog table\n\t\t\t\tString queryLog=\"insert into transactionlog values(\"+source_accNumber+\",\"+tranfer_AccNumber+\",'\"+name+\n\t\t\t\t\t\t\"',\"+trans_amount+\",'debited','\"+new Date()+\"','transaction')\";\n\t\t\t\t//update transfer account in sbi table \t\n\t\t\t\tString query2=\"update sbi set balance=\"+trans_balance+\" where accnumber=\"+tranfer_AccNumber;\n\t\t\t\t//inserting record in transactionlog table\n\t\t\t\tString queryLog2=\"insert into transactionlog values(\"+source_accNumber+\",\"+tranfer_AccNumber+\",'\"+name+\n\t\t\t\t\t\t\"',\"+trans_amount+\",'credited','\"+new Date()+\"','transction')\";\n\t\t\t\tst.addBatch(query1);\n\t\t\t\tst.addBatch(queryLog);\n\t\t\t\tst.addBatch(query2);\n\t\t\t\tst.addBatch(queryLog2);\n\t\t\t\tst.executeBatch();\n\t\t\t\tcon.commit();\n\t\t\t\tSystem.out.println(\"*********************************************************************************\");\n\t\t\t\tSystem.out.println(\"money tranfered successfully...\");\n\t\t\t\tSystem.out.println(\"current balance :\"+checkBalance(source_accNumber,pin));\n\t\t\t\tSystem.out.println(\"*********************************************************************************\");\n\t\t\t}\n\t\t catch (SQLException e) \n\t\t\t{\n\t\t\t e.printStackTrace();\n\t\t\t try {\n\t\t\t\t\tcon.rollback();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"*********************************************************************************\");\n\t\t\t\tSystem.err.println(\"transation failed...\");\n\t\t\t\tSystem.out.println(\"current balance :\"+checkBalance(source_accNumber,pin));\n\t\t\t\tSystem.out.println(\"*********************************************************************************\");\n\t\t\t \n\t\t}\n\t}\n\telse\n\t\tSystem.err.println(\"Transtion failed : your account have low balance\"+source_balance);\n}",
"void insert(AccountTransfer accountTransfer);",
"@Test\n public void CompoundTransaction_AddTransactionTest()\n {\n ct = new CompoundTransaction(\"compound\");\n\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n ct.addTransaction(new Transaction(\"atomic1\", acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),10));\n\n ct.addTransaction(new Transaction(\"atomic2\",acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),40));\n\n Assert.assertEquals(2, ct.getTransaction_list().size());\n }",
"@Test\n public void testUserAccountTransactionOperations() {\n LocalDate time = LocalDate.now();\n UserAccount account = new UserAccount(\"TEST_USERID\", \"TEST_NAME\", encryptPassword(\"TEST_PASSWORD\"), time,\n \"TEST_NATIONALITY\", \"TEST_ADDRESS\", BigDecimal.valueOf(999.99), BigDecimal.valueOf(15999.99));\n // Test case for checking whether the allTransactions() returns empty array for a totally new user account.\n assertEquals(0, account.allTransactions().length);\n // Test case for adding one existed transaction.\n Transaction transaction = new Transaction(\"TEST_STATUS\", \"TEST_USERID\", time.atStartOfDay(),\n \"TEST_TRANSACTION_ID\", \"TEST_TRANSACTION_DESC\", BigDecimal.valueOf(699.99), \"TEST_MERCHANT\",\n DataWranglerInterface.PaymentMethods.CASH_OUT, \"TEST_LOCATION\");\n account.addTransaction(transaction);\n assertEquals(1, account.allTransactions().length);\n assertEquals(transaction, account.allTransactions()[0]);\n // Test case for removing transaction from an invalid id.\n assertFalse(account.removeTransaction(\"INVALID_TRANSACTION\"));\n assertEquals(1, account.allTransactions().length);\n // Test case for removing transaction from a valid id.\n assertTrue(account.removeTransaction(\"TEST_TRANSACTION_ID\"));\n assertEquals(0, account.allTransactions().length);\n // Test case for adding multiple transactions.\n account.addTransaction(transaction);\n account.addTransaction(new Transaction(\"NEW_STATUS\", account.getUserID(), time.atStartOfDay(),\n \"NEW_TRANSACTION_ID\", \"NEW_DESC\", BigDecimal.valueOf(99.99), \"TEST_MERCHANT\",\n DataWranglerInterface.PaymentMethods.TRANSFER, \"NEW_LOCATION\"));\n assertEquals(2, account.allTransactions().length);\n assertEquals(\"NEW_STATUS\", account.allTransactions()[1].getTransactionStatus());\n // Test case for removing a transaction from a valid id.\n Transaction addedTransaction = account.allTransactions()[1];\n assertTrue(account.removeTransaction(addedTransaction.getTransactionID()));\n assertEquals(1, account.allTransactions().length);\n // Test case for removing a transaction from a new created invalid transaction object.\n Transaction invalidTransaction = new Transaction(\"INVALID\", \"INVALID\", time.atTime(1, 1), \"INVALID\", \"INVALID\",\n BigDecimal.ZERO, \"INVALID\", DataWranglerInterface.PaymentMethods.DEBIT, \"INVALID\");\n assertFalse(account.removeTransaction(invalidTransaction));\n assertEquals(1, account.allTransactions().length);\n // Test case for searching a valid transaction id.\n assertEquals(transaction, account.getSearchedTransaction(\"TEST_TRANSACTION_ID\"));\n // Test case for removing a transaction from a existed valid transaction object.\n assertTrue(account.removeTransaction(transaction));\n assertEquals(0, account.allTransactions().length);\n // Test case for searching an already removed transaction from its id.\n assertNull(account.getSearchedTransaction(\"TEST_TRANSACTION_ID\"));\n }",
"au.gov.asic.types.fss.TransactionsType addNewPaid();",
"public Transaction createTransaction(Credentials user, TransactionType tt) throws RelationException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ELong__Group__1" $ANTLR start "rule__ELong__Group__1__Impl" ../org.xtext.catalogo.ui/srcgen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1748:1: rule__ELong__Group__1__Impl : ( RULE_INT ) ; | public final void rule__ELong__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1752:1: ( ( RULE_INT ) )
// ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1753:1: ( RULE_INT )
{
// ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1753:1: ( RULE_INT )
// ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1754:1: RULE_INT
{
before(grammarAccess.getELongAccess().getINTTerminalRuleCall_1());
match(input,RULE_INT,FollowSets000.FOLLOW_RULE_INT_in_rule__ELong__Group__1__Impl3436);
after(grammarAccess.getELongAccess().getINTTerminalRuleCall_1());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__ELong__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1741:1: ( rule__ELong__Group__1__Impl )\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1742:2: rule__ELong__Group__1__Impl\n {\n pushFollow(FollowSets000.FOLLOW_rule__ELong__Group__1__Impl_in_rule__ELong__Group__13409);\n rule__ELong__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ELong__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1710:1: ( rule__ELong__Group__0__Impl rule__ELong__Group__1 )\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1711:2: rule__ELong__Group__0__Impl rule__ELong__Group__1\n {\n pushFollow(FollowSets000.FOLLOW_rule__ELong__Group__0__Impl_in_rule__ELong__Group__03344);\n rule__ELong__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__ELong__Group__1_in_rule__ELong__Group__03347);\n rule__ELong__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleELong() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:185:2: ( ( ( rule__ELong__Group__0 ) ) )\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:186:1: ( ( rule__ELong__Group__0 ) )\n {\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:186:1: ( ( rule__ELong__Group__0 ) )\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:187:1: ( rule__ELong__Group__0 )\n {\n before(grammarAccess.getELongAccess().getGroup()); \n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:188:1: ( rule__ELong__Group__0 )\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:188:2: rule__ELong__Group__0\n {\n pushFollow(FollowSets000.FOLLOW_rule__ELong__Group__0_in_ruleELong334);\n rule__ELong__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getELongAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__End__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10576:1: ( rule__End__Group__1__Impl rule__End__Group__2 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10577:2: rule__End__Group__1__Impl rule__End__Group__2\r\n {\r\n pushFollow(FOLLOW_rule__End__Group__1__Impl_in_rule__End__Group__121872);\r\n rule__End__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__End__Group__2_in_rule__End__Group__121875);\r\n rule__End__Group__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:6703:1: ( rule__EInt__Group__1__Impl )\n // InternalComponentDefinition.g:6704:2: rule__EInt__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInt__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Rule__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAst.g:2580:1: ( rule__Rule__Group__1__Impl )\n // InternalAst.g:2581:2: rule__Rule__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Rule__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EOperations__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:15063:1: ( rule__EOperations__Group__1__Impl )\n // InternalAADMParser.g:15064:2: rule__EOperations__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EOperations__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ELong__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1722:1: ( ( ( '-' )? ) )\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1723:1: ( ( '-' )? )\n {\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1723:1: ( ( '-' )? )\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1724:1: ( '-' )?\n {\n before(grammarAccess.getELongAccess().getHyphenMinusKeyword_0()); \n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1725:1: ( '-' )?\n int alt11=2;\n int LA11_0 = input.LA(1);\n\n if ( (LA11_0==27) ) {\n alt11=1;\n }\n switch (alt11) {\n case 1 :\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1726:2: '-'\n {\n match(input,27,FollowSets000.FOLLOW_27_in_rule__ELong__Group__0__Impl3376); \n\n }\n break;\n\n }\n\n after(grammarAccess.getELongAccess().getHyphenMinusKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:14130:1: ( rule__EInt__Group__1__Impl )\n // InternalMyDsl.g:14131:2: rule__EInt__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInt__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Exprs__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:2100:1: ( rule__Exprs__Group__1__Impl )\n // InternalWhdsl.g:2101:2: rule__Exprs__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Exprs__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Definition__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:702:1: ( rule__Definition__Group_1__1__Impl )\n // InternalWh.g:703:2: rule__Definition__Group_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Definition__Group_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__LExpr__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:2208:1: ( rule__LExpr__Group__1__Impl )\n // InternalWhdsl.g:2209:2: rule__LExpr__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__LExpr__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Language__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1401:1: ( rule__Language__Group__1__Impl rule__Language__Group__2 )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1402:2: rule__Language__Group__1__Impl rule__Language__Group__2\n {\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__1__Impl_in_rule__Language__Group__12729);\n rule__Language__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__2_in_rule__Language__Group__12732);\n rule__Language__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDomain.g:2245:1: ( rule__EInt__Group__1__Impl )\n // InternalDomain.g:2246:2: rule__EInt__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInt__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:4354:1: ( rule__EInt__Group__1__Impl )\n // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:4355:2: rule__EInt__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__EInt__Group__1__Impl_in_rule__EInt__Group__18683);\n rule__EInt__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XRelationalExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6120:1: ( rule__XRelationalExpression__Group__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6121:2: rule__XRelationalExpression__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__XRelationalExpression__Group__1__Impl_in_rule__XRelationalExpression__Group__112821);\n rule__XRelationalExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Hello__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3370:1: ( rule__Hello__Group__2__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3371:2: rule__Hello__Group__2__Impl\n {\n pushFollow(FOLLOW_rule__Hello__Group__2__Impl_in_rule__Hello__Group__27321);\n rule__Hello__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTaskDefinition.g:1992:1: ( rule__EInt__Group__1__Impl )\n // InternalTaskDefinition.g:1993:2: rule__EInt__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInt__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Exprs__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:2154:1: ( rule__Exprs__Group_1__1__Impl )\n // InternalWhdsl.g:2155:2: rule__Exprs__Group_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Exprs__Group_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the priority for this type key | public int getPriority() {
return _typeKeyImplManager.getTypeKeyImpl().getPriority();
} | [
"public int getPriorityType() {\n return getPT();\n }",
"com.google.protobuf.Int32Value getPriority();",
"public byte getPriority()\n\t{\n\t\treturn priority;\n\t}",
"String getSpecifiedPriority();",
"public int getPriorityNumber();",
"@DISPID(1610874911) //= 0x6004001f. The runtime will prefer the VTID if present\r\n @VTID(61)\r\n int getPriority();",
"public T getPriority() {\n return priority;\n }",
"public int getPriority();",
"com.google.protobuf.Int32ValueOrBuilder getPriorityOrBuilder();",
"public double getPriority() {\n return priority;\n }",
"public Integer getPriority() {\n return _record\n .getIntField(LockInfoAttribute.PRIORITY.name(), LockConstants.DEFAULT_PRIORITY_INT);\n }",
"public static int getPriority(String key) {\n return priorityMap.get(key);\n }",
"public String getPriority()\n\t{\n\t\treturn plevel;\n\t}",
"@java.lang.Override\n public com.google.cloud.recommender.v1.Recommendation.Priority getPriority() {\n com.google.cloud.recommender.v1.Recommendation.Priority result =\n com.google.cloud.recommender.v1.Recommendation.Priority.forNumber(priority_);\n return result == null\n ? com.google.cloud.recommender.v1.Recommendation.Priority.UNRECOGNIZED\n : result;\n }",
"public int priority() {\n\t\treturn 1;\n\t}",
"@java.lang.Override\n public com.google.cloud.recommender.v1.Recommendation.Priority getPriority() {\n com.google.cloud.recommender.v1.Recommendation.Priority result =\n com.google.cloud.recommender.v1.Recommendation.Priority.forNumber(priority_);\n return result == null\n ? com.google.cloud.recommender.v1.Recommendation.Priority.UNRECOGNIZED\n : result;\n }",
"public String getPriority() {\n\t\treturn ticketPriority;\n\t}",
"public java.lang.String getPriorityNumber() {\r\n return priorityNumber;\r\n }",
"public EventPriority getPriority() {\n return EventPriority.getEnum(mStorage.eventLatency.getValue());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An immutable clientside representation of ScriptPackage. | public interface ScriptPackage {
/**
* Gets the id property: Fully qualified resource Id for the resource.
*
* @return the id value.
*/
String id();
/**
* Gets the name property: The name of the resource.
*
* @return the name value.
*/
String name();
/**
* Gets the type property: The type of the resource.
*
* @return the type value.
*/
String type();
/**
* Gets the description property: User friendly description of the package.
*
* @return the description value.
*/
String description();
/**
* Gets the version property: Module version.
*
* @return the version value.
*/
String version();
/**
* Gets the company property: Company that created and supports the package.
*
* @return the company value.
*/
String company();
/**
* Gets the uri property: Link to support by the package vendor.
*
* @return the uri value.
*/
String uri();
/**
* Gets the inner com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner object.
*
* @return the inner object.
*/
ScriptPackageInner innerModel();
} | [
"public JavaPackage asJavaPackage() {\r\n\t\tJavaPackage outPckg = null;\r\n\t\tString pckgStr = this.asString();\r\n\t\tif (!Strings.isNullOrEmpty(pckgStr)) {\r\n\t\t\toutPckg = new JavaPackage(pckgStr);\r\n\t\t}\r\n\t\treturn outPckg;\r\n\t}",
"public List getPackageList()\n {\n return Collections.unmodifiableList(_objPackage);\n }",
"public DsByteString getPackage() {\n return m_strPackage;\n }",
"public String getPackage() {\n return this._package;\n }",
"public CopyOnWriteList<PackageItem> getPackageItems() {\n return packageItems;\n }",
"public Package getPackage();",
"com.google.protobuf.ByteString getScript();",
"protected abstract String getJavaPackage();",
"Package createPackage();",
"ICpPack getPack();",
"ScriptPackageInner innerModel();",
"public PackageStatement getPackageStatement() {\n return pkg;\n }",
"public String getPackageId()\n {\n return packageId;\n }",
"public String getScriptAsString() {\n return this.script;\n }",
"public PackageSection createPackage() {\n PackageSection ps = newPackageSection();\n this.packages.add( ps );\n return ps;\n }",
"String getPackage();",
"public java.util.List<java.lang.String> getPackage$() {\n return package$;\n }",
"public String getFullPackage()\r\n {\r\n return fullPackage;\r\n }",
"DataPackage createDataPackage();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The LispList interface allows both ConsCells, which have data members, and NilAtoms, to be treated as lists, the latter as the empty list. In Common Lisp, NIL is both an atom and a list, so it essentially has multiple inheritance, which is just the appropriate use for an interface In scheme it is an error to call CAR or CDR on '(), but in CL, both calls return NIL. | interface LispList extends Iterable<LispObject>, LispObject {
LispList listOfValues(Environment env) ;
LispObject evalSequence(Environment env) ;
public LispList cdrList() ;
LispObject[] toArray();
int length() ;
} | [
"static List createEmptyList() {\n return new LinkedList<>();\n }",
"public interface ImList<E> {\n /**\n * @return a list with e as its first element, \n * followed by this list as its remaining elements.\n */\n public ImList<E> cons(E e);\n \n /**\n * @return the first element of this list. \n * Requires this list to be nonempty.\n */\n public E first();\n \n /**\n * @return the rest of this list after removing the first element. \n * Requires this list to be nonempty.\n */\n public ImList<E> rest();\n \n /**\n * @return \n */\n public boolean isEmpty();\n }",
"EmptyList createEmptyList();",
"NonEmptyList createNonEmptyList();",
"public static List<String> createEmptyList() {\n\t\treturn new LinkedList<String>();\n\t}",
"public SLList() {\n\t\tsentinel = new Node(null, null);\n\t\tsize = 0;\n\t}",
"public CellList() {\n head = null;\n size = 0;\n }",
"EmptyList() {\r\n // an empty constructor\r\n }",
"public MyList()\n\t{\n\t\tlist = new Object[0];\n\t}",
"public Sequence list() {\r\n\tif (list == null) {\r\n\t\tlist = new Track(\"list\");\r\n\t\tlist.add(new Symbol('[')); // push this, as a fence\r\n\t\t\r\n\t\tAlternation a = new Alternation();\r\n\t\ta.add(listContents());\r\n\t\ta.add(new Empty().setAssembler(\r\n\t\t\tnew ListAssembler()));\r\n\r\n\t\tlist.add(a);\r\n\t\tlist.add(new Symbol(']').discard());\r\n\t}\r\n\treturn list;\r\n}",
"private LISTconsImpl() {\n\t\tsuper(NullFlavorImpl.NI);\n\t}",
"@NonNull\n @SafeVarargs\n static <V> ConsList<V> list(@NonNull V... elements) {\n ConsList<V> cons = nil();\n for (int i = elements.length - 1; i >= 0; i--) {\n cons = new ConsListImpl<>(elements[i], cons);\n }\n return cons;\n }",
"protected TupleList nonEmptyList(Evaluator evaluator, TupleList list,\n ResolvedFunCall call) {\n if (list.isEmpty()) {\n return list;\n }\n\n TupleList result = TupleCollections.createList(list.getArity(),\n (list.size() + 2) >> 1);\n\n // Get all of the Measures\n final Query query = evaluator.getQuery();\n\n final String measureSetKey = \"MEASURE_SET-\" + ctag;\n Set<Member> measureSet = Util.cast((Set) query.getEvalCache(measureSetKey));\n // If not in query cache, then create and place into cache.\n // This information is used for each iteration so it makes\n // sense to create and cache it.\n if (measureSet == null) {\n measureSet = new HashSet<Member>();\n Set<Member> queryMeasureSet = query.getMeasuresMembers();\n MeasureVisitor visitor = new MeasureVisitor(measureSet, call);\n for (Member m : queryMeasureSet) {\n if (m.isCalculated()) {\n Exp exp = m.getExpression();\n exp.accept(visitor);\n } else {\n measureSet.add(m);\n }\n }\n\n Formula[] formula = query.getFormulas();\n if (formula != null) {\n for (Formula f : formula) {\n f.accept(visitor);\n }\n }\n\n query.putEvalCache(measureSetKey, measureSet);\n }\n\n final String allMemberListKey = \"ALL_MEMBER_LIST-\" + ctag;\n List<Member> allMemberList = Util.cast((List) query\n .getEvalCache(allMemberListKey));\n\n final String nonAllMembersKey = \"NON_ALL_MEMBERS-\" + ctag;\n Member[][] nonAllMembers = (Member[][]) query.getEvalCache(nonAllMembersKey);\n if (nonAllMembers == null) {\n //\n // Get all of the All Members and those Hierarchies that\n // do not have All Members.\n //\n Member[] evalMembers = evaluator.getMembers().clone();\n\n List<Member> listMembers = list.get(0);\n\n // Remove listMembers from evalMembers and independentSlicerMembers\n for (Member lm : listMembers) {\n Hierarchy h = lm.getHierarchy();\n for (int i = 0; i < evalMembers.length; i++) {\n Member em = evalMembers[i];\n if ((em != null) && h.equals(em.getHierarchy())) {\n evalMembers[i] = null;\n }\n }\n }\n\n List<Member> slicerMembers = null;\n if (evaluator instanceof RolapEvaluator) {\n RolapEvaluator rev = (RolapEvaluator) evaluator;\n slicerMembers = rev.getSlicerMembers();\n }\n // Iterate the list of slicer members, grouping them by hierarchy\n Map<Hierarchy, Set<Member>> mapOfSlicerMembers = new HashMap<Hierarchy, Set<Member>>();\n if (slicerMembers != null) {\n for (Member slicerMember : slicerMembers) {\n Hierarchy hierarchy = slicerMember.getHierarchy();\n if (!mapOfSlicerMembers.containsKey(hierarchy)) {\n mapOfSlicerMembers.put(hierarchy, new HashSet<Member>());\n }\n mapOfSlicerMembers.get(hierarchy).add(slicerMember);\n }\n }\n\n // Now we have the non-List-Members, but some of them may not be\n // All Members (default Member need not be the All Member) and\n // for some Hierarchies there may not be an All Member.\n // So we create an array of Objects some elements of which are\n // All Members and others elements will be an array of all top-level\n // Members when there is not an All Member.\n SchemaReader schemaReader = evaluator.getSchemaReader();\n allMemberList = new ArrayList<Member>();\n List<Member[]> nonAllMemberList = new ArrayList<Member[]>();\n\n Member em;\n boolean isSlicerMember;\n for (Member evalMember : evalMembers) {\n em = evalMember;\n\n isSlicerMember = slicerMembers != null && slicerMembers.contains(em);\n\n if (em == null) {\n // Above we might have removed some by setting them\n // to null. These are the CrossJoin axes.\n continue;\n }\n if (em.isMeasure()) {\n continue;\n }\n\n //\n // The unconstrained members need to be replaced by the \"All\"\n // member based on its usage and property. This is currently\n // also the behavior of native cross join evaluation. See\n // SqlConstraintUtils.addContextConstraint()\n //\n // on slicer? | calculated? | replace with All?\n // -----------------------------------------------\n // Y | Y | Y always\n // Y | N | N\n // N | Y | N\n // N | N | Y if not \"All\"\n // -----------------------------------------------\n //\n if ((isSlicerMember && !em.isCalculated())\n || (!isSlicerMember && em.isCalculated())) {\n // If the slicer contains multiple members from this one's\n // hierarchy, add them to nonAllMemberList\n if (isSlicerMember) {\n Set<Member> hierarchySlicerMembers = mapOfSlicerMembers.get(em\n .getHierarchy());\n if (hierarchySlicerMembers.size() > 1) {\n nonAllMemberList.add(hierarchySlicerMembers\n .toArray(new Member[hierarchySlicerMembers.size()]));\n }\n }\n continue;\n }\n\n // If the member is not the All member;\n // or if it is a slicer member,\n // replace with the \"all\" member.\n if (isSlicerMember || !em.isAll()) {\n Hierarchy h = em.getHierarchy();\n final List<Member> rootMemberList = schemaReader\n .getHierarchyRootMembers(h);\n if (h.hasAll()) {\n // The Hierarchy has an All member\n boolean found = false;\n for (Member m : rootMemberList) {\n if (m.isAll()) {\n allMemberList.add(m);\n found = true;\n break;\n }\n }\n if (!found) {\n System.out.println(\"CrossJoinFunDef.nonEmptyListNEW: ERROR\");\n }\n } else {\n // The Hierarchy does NOT have an All member\n Member[] rootMembers = rootMemberList.toArray(new Member[rootMemberList\n .size()]);\n nonAllMemberList.add(rootMembers);\n }\n }\n }\n nonAllMembers = nonAllMemberList\n .toArray(new Member[nonAllMemberList.size()][]);\n\n query.putEvalCache(allMemberListKey, allMemberList);\n query.putEvalCache(nonAllMembersKey, nonAllMembers);\n }\n\n //\n // Determine if there is any data.\n //\n // Put all of the All Members into Evaluator\n final int savepoint = evaluator.savepoint();\n evaluator.setContext(allMemberList);\n\n // Iterate over elements of the input list. If for any combination of\n // Measure and non-All Members evaluation is non-null, then\n // add it to the result List.\n final TupleCursor cursor = list.tupleCursor();\n while (cursor.forward()) {\n cursor.setContext(evaluator);\n if (checkData(nonAllMembers, nonAllMembers.length - 1, measureSet, evaluator)) {\n result.addCurrent(cursor);\n }\n }\n\n evaluator.restore(savepoint);\n return result;\n }",
"public T caseNonEmptyList(NonEmptyList object)\n {\n return null;\n }",
"public T caseOsListLiteral(OsListLiteral object) {\n return null;\n }",
"public static <T> List<T> getOrEmptyList(List<T> list) {\n return list == null ? Collections.emptyList() : list;\n }",
"public final EObject ruleListTypeCS() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_0=null;\r\n Token otherlv_1=null;\r\n Token otherlv_3=null;\r\n EObject lv_type_2_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:3108:28: ( (otherlv_0= 'List' otherlv_1= '(' ( (lv_type_2_0= ruleTypeExpCS ) ) otherlv_3= ')' ) )\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:3109:1: (otherlv_0= 'List' otherlv_1= '(' ( (lv_type_2_0= ruleTypeExpCS ) ) otherlv_3= ')' )\r\n {\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:3109:1: (otherlv_0= 'List' otherlv_1= '(' ( (lv_type_2_0= ruleTypeExpCS ) ) otherlv_3= ')' )\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:3109:3: otherlv_0= 'List' otherlv_1= '(' ( (lv_type_2_0= ruleTypeExpCS ) ) otherlv_3= ')'\r\n {\r\n otherlv_0=(Token)match(input,64,FollowSets000.FOLLOW_64_in_ruleListTypeCS6850); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_0, grammarAccess.getListTypeCSAccess().getListKeyword_0());\r\n \r\n }\r\n otherlv_1=(Token)match(input,55,FollowSets000.FOLLOW_55_in_ruleListTypeCS6862); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getListTypeCSAccess().getLeftParenthesisKeyword_1());\r\n \r\n }\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:3117:1: ( (lv_type_2_0= ruleTypeExpCS ) )\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:3118:1: (lv_type_2_0= ruleTypeExpCS )\r\n {\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:3118:1: (lv_type_2_0= ruleTypeExpCS )\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:3119:3: lv_type_2_0= ruleTypeExpCS\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getListTypeCSAccess().getTypeTypeExpCSParserRuleCall_2_0()); \r\n \t \r\n }\r\n pushFollow(FollowSets000.FOLLOW_ruleTypeExpCS_in_ruleListTypeCS6883);\r\n lv_type_2_0=ruleTypeExpCS();\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.getListTypeCSRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"type\",\r\n \t\tlv_type_2_0, \r\n \t\t\"TypeExpCS\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n otherlv_3=(Token)match(input,56,FollowSets000.FOLLOW_56_in_ruleListTypeCS6895); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_3, grammarAccess.getListTypeCSAccess().getRightParenthesisKeyword_3());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"public Term listFunctor() throws SourceCodeException\n {\n // Get the interned names of the nil and cons functors.\n int nilId = interner.internFunctorName(\"nil\", 0);\n int consId = interner.internFunctorName(\"cons\", 2);\n\n // A list always starts with a '['.\n Token leftDelim = consumeToken(LSQPAREN);\n\n // Check if the list contains any arguments and parse them if so.\n Term[] args = null;\n\n Token nextToken = tokenSource.peek();\n\n switch (nextToken.kind)\n {\n case LPAREN:\n case LSQPAREN:\n case INTEGER_LITERAL:\n case FLOATING_POINT_LITERAL:\n case STRING_LITERAL:\n case VAR:\n case FUNCTOR:\n case ATOM:\n args = arglist();\n break;\n\n default:\n }\n\n // Work out what the terminal element in the list is. It will be 'nil' unless an explicit cons '|' has\n // been used to specify a different terminal element. In the case where cons is used explciitly, the\n // list prior to the cons must not be empty.\n Term accumulator;\n\n if (tokenSource.peek().kind == CONS)\n {\n if (args == null)\n {\n throw new SourceCodeException(\"Was expecting one of \" + BEGIN_TERM_TOKENS + \" but got \" +\n tokenImage[nextToken.kind] + \".\", null, null, null,\n new SourceCodePositionImpl(nextToken.beginLine, nextToken.beginColumn, nextToken.endLine,\n nextToken.endColumn));\n }\n\n consumeToken(CONS);\n\n accumulator = term();\n }\n else\n {\n accumulator = new Nil(nilId, null);\n }\n\n // A list is always terminated with a ']'.\n Token rightDelim = consumeToken(RSQPAREN);\n\n // Walk down all of the lists arguments joining them together with cons/2 functors.\n if (args != null) // 'args' will contain one or more elements if not null.\n {\n for (int i = args.length - 1; i >= 0; i--)\n {\n Term previousAccumulator = accumulator;\n\n //accumulator = new Functor(consId.ordinal(), new Term[] { args[i], previousAccumulator });\n accumulator = new Cons(consId, new Term[] { args[i], previousAccumulator });\n }\n }\n\n // Set the position that the list was parsed from, as being the region between the '[' and ']' brackets.\n SourceCodePosition position =\n new SourceCodePositionImpl(leftDelim.beginLine, leftDelim.beginColumn, rightDelim.endLine,\n rightDelim.endColumn);\n accumulator.setSourceCodePosition(position);\n\n // The cast must succeed because arglist must return at least one argument, therefore the cons generating\n // loop must have been run at least once. If arglist is not called at all because an empty list was\n // encountered, then the accumulator will contain the 'nil' constant which is a functor of arity zero.\n return (Functor) accumulator;\n }",
"public T caseList(List object)\n {\n return null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The async counterpart of GreetingService. | public interface GreetingServiceAsync
{
void addUserFormData(UserFormData data, AsyncCallback<String> callback);
void getUserFormData(Integer startIndex, Integer length, AsyncCallback<UserFormData[]> callback);
void getUserFormDataCount( AsyncCallback<Integer> callback);
} | [
"public interface GreetingServiceAsync {\n\tvoid getAllChannels(AsyncCallback<ArrayList<String>> callback);\n\tvoid getChatLogDataFromSearchCriteria(String startDate, String endDate, String channel, String searchText, AsyncCallback<ArrayList<ChatLog>> callback);\n\tvoid getDaysAndCountForChannel(String channel, AsyncCallback<LinkedHashMap<String, String>> callback);\n\tvoid getChatLogsForChannelAndDate(String channel, String date, AsyncCallback<ArrayList<ChatLog>> callback);\n}",
"public interface GreetingServiceAsync {\n void checkc(String s1,String s2, AsyncCallback<String> callback)\n throws IllegalArgumentException;\n void checkf(String s1,String s2, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n void reg(Reg k, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n void freg(Reg m, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n void feed(String f, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n void land(nuti n,String f_id, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n void det(fdet f,String fad, AsyncCallback<fdet> callback)\n\t throws IllegalArgumentException;\n void book(String f_id,String c_id,String username, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n void fevnt(sevent l, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n void evnt(String s, AsyncCallback<eve> callback)\n\t throws IllegalArgumentException;\n void allfar(String l, AsyncCallback<farmerslist> callback)\n\t throws IllegalArgumentException;\n void fid(String s1,String s2, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n void cid(String s1,String s2, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n void allcon(String f_id, AsyncCallback<consumerslist> callback)\n\t throws IllegalArgumentException;\n void condet(Cdet c,String c_id, AsyncCallback<Cdet> callback)\n\t throws IllegalArgumentException;\n void cost(String f_id, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n void amount(String f_id,String c_id,String a, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n}",
"public interface GreetingServiceAsync {\r\n\r\n\tvoid getGiantBomb(String juego, AsyncCallback<GiantBombSearch> callback);\r\n\r\n\tvoid getSteamID(AsyncCallback<SteamID> callback);\r\n\r\n\tvoid getSteamPrice(Integer id, AsyncCallback<Double> callback);\r\n\t\r\n\tvoid getYoutubeSearch(String juego, AsyncCallback<YoutubeSearch> callback);\r\n\r\n\tvoid getGiantBombGame(Integer idGB, AsyncCallback<GiantBombGame> asyncCallback);\r\n}",
"public interface GreetingServiceAsync {\r\n\tvoid greetServer(String username, String password, AsyncCallback<String> callback)\r\n\t\t\tthrows IllegalArgumentException;\r\n\r\n\tvoid getUserSessionInfo(AsyncCallback<UserSessionInfo> asyncCallback);\r\n\r\n\t\r\n}",
"@GET\n @Produces(MediaType.TEXT_PLAIN)\n @Path(\"{name}\")\n public CompletionStage<String> greeting(@PathParam(\"name\") String name) {\n\n // When complete, return the content to the client\n CompletableFuture<String> future = new CompletableFuture<>();\n\n long start = System.nanoTime();\n\n // Asynchronous greeting\n\n LOGGER.info(\"##### Entering vertx.setTimer...\");\n\n // Delay reply by 1000ms\n vertx.setTimer(1000, l -> {\n\n // Compute elapsed time in milliseconds\n long duration = MILLISECONDS.convert(System.nanoTime() - start, NANOSECONDS);\n\n // Format message\n String message = String.format(\"Hello %s! (%d ms)%n\", name, duration);\n\n // Complete\n LOGGER.info(\">>>>> message = {}\", message);\n future.complete(message);\n });\n\n LOGGER.info(\"##### Left vertx.setTimer.\");\n\n return future;\n }",
"public interface Gwt1ServiceAsync {\n void greetServer(String input, AsyncCallback<String> callback)\n throws IllegalArgumentException;\n}",
"public String getGreeting() {\n return greetingService.sayGreeting();\n }",
"private Response doIt() {\n\t\treturn Response.created(info.getAbsolutePath()).entity(\"async\").build();\r\n\t}",
"public interface MessageServiceAsync {\n void sendMessage(String input, AsyncCallback<String> callback);\n}",
"public interface ManagerServiceAsync {\n\n\tvoid timeToNextPlay(AsyncCallback<Long> callback) throws WWWordzException;\n\n\tvoid register(String nick, String password, AsyncCallback<Long> callback) throws WWWordzException;\n\n\tvoid getPuzzle(AsyncCallback<Puzzle> callback) throws WWWordzException;\n\n\tvoid setPoints(String nick, int points, AsyncCallback<Void> callback) throws WWWordzException;\n\n\tvoid getRanking(AsyncCallback<List<Rank>> callback) throws WWWordzException;\n}",
"public interface IRentalServiceAsync\n{\n\tvoid createRentalCar(String model, AsyncCallback<Void> callback) throws IllegalArgumentException;\n\tvoid rent(int car, String renter, AsyncCallback<Void> callback) throws IllegalArgumentException;\n\tvoid returnRental(int car, AsyncCallback<Void> callback) throws IllegalArgumentException;\n\tvoid getCars(AsyncCallback<String[]> callback) throws IllegalArgumentException;\n}",
"public void await() {\n }",
"public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Returns the list of all webhooks in the specified agent.\n * </pre>\n */\n default void listWebhooks(\n com.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3beta1.ListWebhooksResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListWebhooksMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves the specified webhook.\n * </pre>\n */\n default void getWebhook(\n com.google.cloud.dialogflow.cx.v3beta1.GetWebhookRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3beta1.Webhook>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetWebhookMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a webhook in the specified agent.\n * </pre>\n */\n default void createWebhook(\n com.google.cloud.dialogflow.cx.v3beta1.CreateWebhookRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3beta1.Webhook>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateWebhookMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates the specified webhook.\n * </pre>\n */\n default void updateWebhook(\n com.google.cloud.dialogflow.cx.v3beta1.UpdateWebhookRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3beta1.Webhook>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateWebhookMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes the specified webhook.\n * </pre>\n */\n default void deleteWebhook(\n com.google.cloud.dialogflow.cx.v3beta1.DeleteWebhookRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteWebhookMethod(), responseObserver);\n }\n }",
"public GreetingService() {\n\n }",
"public interface BankOfficeGWTServiceAsync {\n\tpublic void findById(Integer id, AsyncCallback<BankOfficeDTO> callback);\n\tpublic void saveOrUpdate(BankOfficeDTO entity, AsyncCallback<Integer> callback);\n\tpublic void getMyOffice(AsyncCallback<BankOfficeDTO> callback);\n\tpublic void findByExternalId(Long midasId, AsyncCallback<BankOfficeDTO> callback);\n\tpublic void findAll(AsyncCallback<ArrayList<BankOfficeDTO>> callback);\n\tpublic void findAllShort(AsyncCallback<ArrayList<ListBoxDTO>> asyncCallback);\n}",
"public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Lists the versions of a service.\n * </pre>\n */\n default void listVersions(\n com.google.appengine.v1.ListVersionsRequest request,\n io.grpc.stub.StreamObserver<com.google.appengine.v1.ListVersionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListVersionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets the specified Version resource.\n * By default, only a `BASIC_VIEW` will be returned.\n * Specify the `FULL_VIEW` parameter to get the full resource.\n * </pre>\n */\n default void getVersion(\n com.google.appengine.v1.GetVersionRequest request,\n io.grpc.stub.StreamObserver<com.google.appengine.v1.Version> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetVersionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deploys code and resource files to a new version.\n * </pre>\n */\n default void createVersion(\n com.google.appengine.v1.CreateVersionRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateVersionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates the specified Version resource.\n * You can specify the following fields depending on the App Engine\n * environment and type of scaling that the version resource uses:\n * **Standard environment**\n * * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)\n * *automatic scaling* in the standard environment:\n * * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n * * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n * * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n * * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n * * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n * * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)\n * *basic scaling* or *manual scaling* in the standard environment:\n * * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)\n * * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)\n * **Flexible environment**\n * * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)\n * *automatic scaling* in the flexible environment:\n * * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n * * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n * * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n * * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)\n * *manual scaling* in the flexible environment:\n * * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)\n * </pre>\n */\n default void updateVersion(\n com.google.appengine.v1.UpdateVersionRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateVersionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes an existing Version resource.\n * </pre>\n */\n default void deleteVersion(\n com.google.appengine.v1.DeleteVersionRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteVersionMethod(), responseObserver);\n }\n }",
"public interface PgStudioServiceAsync {\n\n\tvoid getConnectionInfoMessage(String connectionToken, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n\t\n\tvoid getList(String connectionToken, DATABASE_OBJECT_TYPE type, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n\n\tvoid getList(String connectionToken, int schema, ITEM_TYPE type, AsyncCallback<String> callback)\n \t\tthrows IllegalArgumentException;\n\n\tvoid getRangeDiffFunctionList(String connectionToken, String schema, String subType, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getTriggerFunctionList(String connectionToken, int schema, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid getItemObjectList(String connectionToken, int item, ITEM_TYPE type, ITEM_OBJECT_TYPE object, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getItemMetaData(String connectionToken, int item, ITEM_TYPE type, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getItemData(String connectionToken, int item, ITEM_TYPE type, int count, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getQueryMetaData(String connectionToken, String query, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid executeQuery(String connectionToken, String query, String queryType, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid dropItem(String connectionToken, int item, ITEM_TYPE type, boolean cascade, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid analyze(String connectionToken, int item, ITEM_TYPE type, boolean vacuum, boolean vacuumFull, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid renameItem(String connectionToken, int item, ITEM_TYPE type, String newName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid truncate(String connectionToken, int item, ITEM_TYPE type, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createIndex(String connectionToken, int item, String indexName, INDEX_TYPE indexType, boolean isUnique, boolean isConcurrently, ArrayList<String> columnList, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid dropItemObject(String connectionToken, int item, ITEM_TYPE type, String objectName, ITEM_OBJECT_TYPE objType, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid renameItemObject(String connectionToken, int item, ITEM_TYPE type, String objectName, ITEM_OBJECT_TYPE objType, String newObjectName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid renameSchema(String connectionToken, String oldSchema, String schema, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid dropSchema(String connectionToken, String schemaName, boolean cascade, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createSchema(String connectionToken, String schemaName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getExplainResult(String connectionToken, String query, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createView(String connectionToken, String schema, String viewName, String definition, String comment, boolean isMaterialized, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createColumn(String connectionToken, int item, String columnName, String datatype, String comment, boolean not_null, String defaultval, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createTable(String connectionToken, int schema, String tableName, boolean unlogged, boolean temporary, String fill, ArrayList<String> col_list, HashMap<Integer,String> commentLog, ArrayList<String> col_index, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createUniqueConstraint(String connectionToken, int item, String constraintName, boolean isPrimaryKey, ArrayList<String> columnList, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createCheckConstraint(String connectionToken, int item, String constraintName, String definition, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createForeignKeyConstraint(String connectionToken, int item, String constraintName, ArrayList<String> columnList, String referenceTable, ArrayList<String> referenceList, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\t\t\n\tvoid createSequence(String connectionToken, int schema, String sequenceName, boolean temporary, int increment, int minValue, int maxValue, int start, int cache, boolean cycle, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createFunction(String connectionToken, int schema, String functionName, String returns, String language, ArrayList<String> paramList, String definition, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createType(String connectionToken, String schema, String typeName, TYPE_FORM form, String baseType, String definition, ArrayList<String> attributeList, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createForeignTable(String connectionToken, String schema, String tableName, String server, ArrayList<String> columns, HashMap<Integer, String> comments, ArrayList<String> options, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid refreshMaterializedView(String connectionToken, String schema, String viewName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createRule(String connectionToken, int item, ITEM_TYPE type, String ruleName, String event, String ruleType, String definition, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createTrigger(String connectionToken, int item, ITEM_TYPE type, String triggerName, String event, String triggerType, String forEach, String function, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid revoke(String connectionToken, int item, ITEM_TYPE type, String privilege, String grantee, boolean cascade, AsyncCallback<String> callback) \n\t\t\t\t\tthrows IllegalArgumentException;\n\t\t\t\n\tvoid grant(String connectionToken, int item, ITEM_TYPE type, ArrayList<String> privileges, String grantee, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid doLogout(String connectionToken, String source, AsyncCallback<Void> asyncCallback) throws IllegalArgumentException;\n\n\tvoid invalidateSession(AsyncCallback<Void> callback);\n\n}",
"@Override\n public void sendGreeting() {\n lock.lock();\n try {\n output.writeByte(1);\n output.writeUTF(this.username);\n } catch (IOException e) {\n throw new StreamException(\"ERROR: Sending greeting to server\");\n }\n lock.unlock();\n Platform.runLater(() -> controller.changeLabel(\"Sent greeting to server\"));\n }",
"com.pl.demo.grpc.Hello.GreetingResponse getGreetings(int index);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define a transect that is 60 degrees long and extends along a meridian that passes through vertex 1 exactly. This means that the first half of the transect is in the middle of triangles, the center point exactly hits a vertex, and the last half of the transect resides on (or very close to) an edge of a triangle. The triangles that contain vertex1 are a bit different in that vertex1 is only contained by 5 triangles, not the usual 6. transect has a kink in it at vertex1 | @Test
public void testTransect() throws GeoTessException {
double dist = Math.toRadians(60);
double azimuth = Math.toRadians(10);
double[] vertex1 = posLinear.getModel().getGrid().getVertex(1);
//System.out.println(GeoTessUtils.getLatLonString(vertex1)); System.out.println();
double[] start = GeoTessUtils.move(vertex1, dist / 2., Math.PI + azimuth);
double[] end = GeoTessUtils.move(vertex1, dist / 2., azimuth);
// build the transect data structures and populate the point positions.
int npoints = 51;
GreatCircle gc = new GreatCircle(start, end);
ArrayList<double[]> points = gc.getPoints(npoints, false);
points.set(npoints / 2, vertex1);
double[] distance = new double[npoints];
double[] valuesLinear = new double[npoints];
double[] valuesNN = new double[npoints];
for (int i = 0; i < npoints; ++i) {
distance[i] = GeoTessUtils.angleDegrees(vertex1, points.get(i));
if (i < npoints / 2) {
distance[i] *= -1.;
}
valuesLinear[i] = 1. / posLinear.set(4, points.get(i), 1e4).getValue(0);
}
int nloops = 1; // 100000;
posNN.set(4, points.get(0), 1e4);
long timer = System.currentTimeMillis();
for (int n = 0; n < nloops; ++n) {
for (int i = 0; i < npoints; ++i) {
valuesNN[i] = 1. / posNN.set(4, points.get(i), 1e4).getValue(0);
}
}
timer = System.currentTimeMillis() - timer;
//System.out.println("cpuTime = "+timer);
// for (int i=0; i<npoints; ++i) System.out.printf("%12.6f %12.6f %12.6f%n",
// //GeoTessUtils.getLatLonString(points.get(i)),
// distance[i], valuesLinear[i], valuesNN[i]);
//
// for (int i=0; i<npoints; ++i) System.out.printf("%1.6f, ", distance[i]);
// System.out.println();
// for (int i=0; i<npoints; ++i) System.out.printf("%1.6f, ", valuesLinear[i]);
// System.out.println();
// for (int i=0; i<npoints; ++i) System.out.printf("%1.6f, ", valuesNN[i]);
// System.out.println();
double[] expDistance = new double[]{-30.000000, -28.800000,
-27.600000, -26.400000, -25.200000, -24.000000, -22.800000,
-21.600000, -20.400000, -19.200000, -18.000000, -16.800000,
-15.600000, -14.400000, -13.200000, -12.000000, -10.800000,
-9.600000, -8.400000, -7.200000, -6.000000, -4.800000,
-3.600000, -2.400000, -1.200000, 0.000001, 1.200000, 2.400000,
3.600000, 4.800000, 6.000000, 7.200000, 8.400000, 9.600000,
10.800000, 12.000000, 13.200000, 14.400000, 15.600000,
16.800000, 18.000000, 19.200000, 20.400000, 21.600000,
22.800000, 24.000000, 25.200000, 26.400000, 27.600000,
28.800000, 30.000000};
double[] expLinear = new double[]{8.040000, 8.040000, 8.040000,
8.040000, 8.040000, 8.040000, 8.040000, 8.040000, 8.040000,
8.040000, 8.040000, 8.040000, 8.040000, 8.040000, 8.040000,
8.040000, 8.040000, 8.054137, 8.071930, 8.089795, 8.107838,
8.126071, 8.144387, 8.162803, 8.181334, 8.200000, 8.168896,
8.138100, 8.107579, 8.077304, 8.047246, 8.018002, 8.002167,
8.002729, 8.005888, 8.009046, 8.012206, 8.016119, 8.035189,
8.054353, 8.078359, 8.105569, 8.132947, 8.160519, 8.143446,
8.120925, 8.098519, 8.083079, 8.078281, 8.073490, 8.089623};
double[] expNN = new double[]{8.040000, 8.040000, 8.040000, 8.040000,
8.040000, 8.040000, 8.040000, 8.040000, 8.040000, 8.040000,
8.040000, 8.040000, 8.040000, 8.040000, 8.040000, 8.041202,
8.048167, 8.058878, 8.072557, 8.089860, 8.107915, 8.126098,
8.143861, 8.161247, 8.179631, 8.200000, 8.162554, 8.129212,
8.099322, 8.072501, 8.048067, 8.023506, 8.006961, 8.004099,
8.005888, 8.010183, 8.016907, 8.026038, 8.038366, 8.056879,
8.080395, 8.104321, 8.120821, 8.128538, 8.127940, 8.118928,
8.103649, 8.089243, 8.080988, 8.085650, 8.097606};
for (int i = 0; i < npoints; ++i) {
assertEquals(expDistance[i], distance[i], 1e-6);
}
for (int i = 0; i < npoints; ++i) {
assertEquals(expLinear[i], valuesLinear[i], 1e-6);
}
for (int i = 0; i < npoints; ++i) {
assertEquals(expNN[i], valuesNN[i], 1e-6);
}
} | [
"protected ArrayList<Polyhedron> subdivideHelper (Geometry g, GeometryMap hash) {\n\t\tArrayList<Polyhedron> newPolys = new ArrayList<Polyhedron> ();\n\n\t\t/** Original vertices */ int[] v1 = new int[4]; \n\t\t/** Midpoint vertices*/ int[] v2 = new int[6];\n\n\t\tv1[0] = vertices[0];\t// 0 1 2 \t//faces\n\t\tv1[1] = vertices[1];\t// 0 2 3\n\t\tv1[2] = vertices[2];\t// 0 1 3\n\t\tv1[3] = vertices[3];\t// 1 2 3\n\n\t\tv2[0] = hash.get(Vertex.midpoint(g.get(v1[0]),g.get(v1[1])));\t\t// 0 or 2\t\t//faces\n\t\tv2[1] = hash.get(Vertex.midpoint(g.get(v1[0]),g.get(v1[2])));\t\t// 0 or 1\n\t\tv2[2] = hash.get(Vertex.midpoint(g.get(v1[0]),g.get(v1[3])));\t\t// 1 or 2\n\t\tv2[3] = hash.get(Vertex.midpoint(g.get(v1[1]),g.get(v1[2])));\t \t// 0 or 3\n\t\tv2[4] = hash.get(Vertex.midpoint(g.get(v1[1]),g.get(v1[3])));\t\t// 2 or 3\n\t\tv2[5] = hash.get(Vertex.midpoint(g.get(v1[2]),g.get(v1[3])));\t\t// 1 or 3\n\n\t\tHashSet<Short> map = new HashSet<Short>();\n\t\tfor (short s : creaseFaces)\n\t\t\tmap.add(s);\n\n\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t012\t\t0 2\t\t0 1\t\t1 2\n\t\tTetrahedron t1 = new Tetrahedron(new int[] { \tv1[0], \tv2[0], \tv2[1], \tv2[2] }, this.material);\n\t\tif (map.contains((short)0)) t1.addCreaseFace(0);\n\t\tif (map.contains((short)1)) t1.addCreaseFace(1);\n\t\tif (map.contains((short)2)) t1.addCreaseFace(2);\n\n\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t023\t\t0 3\t\t0 2\t\t2 3\n\t\tTetrahedron t2 = new Tetrahedron(new int[] { \tv1[1], \tv2[3], \tv2[0], \tv2[4] }, this.material);\n\t\tif (map.contains((short)0)) t2.addCreaseFace(0);\n\t\tif (map.contains((short)2)) t2.addCreaseFace(1);\n\t\tif (map.contains((short)3)) t2.addCreaseFace(2);\n\n\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t013\t\t0 1\t\t0 3\t\t1 3\n\t\tTetrahedron t3 = new Tetrahedron(new int[] { \tv1[2], \tv2[1], \tv2[3], \tv2[5] }, this.material);\n\t\tif (map.contains((short)0)) t3.addCreaseFace(0);\n\t\tif (map.contains((short)1)) t3.addCreaseFace(2);\n\t\tif (map.contains((short)3)) t3.addCreaseFace(1);\n\n\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t123\t\t1 2\t\t1 3\t\t2 3\n\t\tTetrahedron t4 = new Tetrahedron(new int[] { \tv1[3], \tv2[2], \tv2[5], \tv2[4] }, this.material);\n\t\tif (map.contains((short)1)) t4.addCreaseFace(0);\n\t\tif (map.contains((short)2)) t4.addCreaseFace(2);\n\t\tif (map.contains((short)3)) t4.addCreaseFace(1);\n\n\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0 2\t\t0 1\t\t1 2\t\t0 3\t\t2 3\t\t1 3\n\t\tOctahedron o1 = new Octahedron(new int[] { \t\tv2[0], \tv2[1], \tv2[2], \tv2[3], \tv2[4], \tv2[5] }, this.material);\n\t\tif (map.contains((short)0)) o1.addCreaseFace(1);\n\t\tif (map.contains((short)1)) o1.addCreaseFace(2);\n\t\tif (map.contains((short)2)) o1.addCreaseFace(3);\n\t\tif (map.contains((short)3)) o1.addCreaseFace(4);\n\n\t\tnewPolys.add(t1); \n\t\tnewPolys.add(t2); \n\t\tnewPolys.add(t3); \n\t\tnewPolys.add(t4);\t\n\t\tnewPolys.add(o1);\n\t\n\t\treturn newPolys;\n\t}",
"private Intersection MollerTrumbore(Ray ray, int faceId, Point3D vert1,\n\t\t\tPoint3D vert2, Point3D vert3) {\n\n\t\t/* Ray data */\n\t\tVector3D dir = ray.getDirection();\n\t\tPoint3D orig = ray.getOrigin();\n\n\t\t/* Find vectors for two edges sharing vert1 */\n\t\tVector3D edge1 = Vector3D.sub(vert2, vert1);\n\t\tVector3D edge2 = Vector3D.sub(vert3, vert1);\n\n\t\t/* Begin calculating determinant - also used to calculate U parameter */\n\t\tVector3D P = Vector3D.cross(dir, edge2);\n\t\tdouble det = Vector3D.dot(edge1, P);\n\n\t\t/* If determinant is near zero, ray lies in plan of triangle */\n\t\tif (det > -EPSILON && det < EPSILON)\n\t\t\treturn null;\n\n\t\t/* Calculate distance from v1 to ray origin */\n\t\tVector3D T = Vector3D.sub(orig, vert1);\n\n\t\t/* Calculate U parameter and test bounds */\n\t\tdouble inv_det = 1. / det;\n\t\tdouble u = Vector3D.dot(T, P) * inv_det;\n\t\tif (u < 0. || u > 1.)\n\t\t\treturn null;\n\n\t\t/* Prepare to test V parameter */\n\t\tVector3D Q = Vector3D.cross(T, edge1);\n\n\t\t/* Calculate V parameter and test bounds */\n\t\tdouble v = Vector3D.dot(dir, Q) * inv_det;\n\t\tif (v < 0. || v > 1. || u + v > 1.)\n\t\t\treturn null;\n\n\t\t/* Calculate t, scale parameters, ray intersects triangle */\n\t\tdouble t = Vector3D.dot(edge2, Q) * inv_det;\n\n\t\tSystem.out.println(u + \" \" + v + \" \" + t);\n\n\t\t/* Ray intersection */\n\t\t//if (t > EPSILON) {\n\t\t// Point3D point = new Point3D(orig.x + t * dir.x, orig.y + t * dir.y, orig.z + t * dir.z);\n\t\tPoint3D point = new Point3D((1 - u - v) * vert1.x + u * vert2.x + v * vert3.x,\n\t\t\t\t(1 - u - v) * vert1.y + u * vert2.y + v * vert3.y,\n\t\t\t\t(1 - u - v) * vert1.z + u * vert2.z + v * vert3.z);\n\t\treturn new Intersection(this, faceId, point, t);\n\t\t//}\n\n\t\t/* No intersection */\n\t\t//return null;\n\t}",
"public void addPolyhedron(Rectangle2D bounds, double distance, double thickness,\n \t Appearance ap, TransformGroup objTrans)\n \t{\n \t\t\tGeometryInfo gi = new GeometryInfo(GeometryInfo.QUAD_ARRAY);\n \t\t\tdouble height = thickness + distance;\n \t\t\tPoint3d[] pts = new Point3d[8];\n \t\t\tpts[0] = new Point3d(bounds.getMinX(), bounds.getMinY(), distance);\n \t\t\tpts[1] = new Point3d(bounds.getMinX(), bounds.getMaxY(), distance);\n \t\t\tpts[2] = new Point3d(bounds.getMaxX(), bounds.getMaxY(), distance);\n \t\t\tpts[3] = new Point3d(bounds.getMaxX(), bounds.getMinY(), distance);\n \t\t\tpts[4] = new Point3d(bounds.getMinX(), bounds.getMinY(), height);\n \t\t\tpts[5] = new Point3d(bounds.getMinX(), bounds.getMaxY(), height);\n \t\t\tpts[6] = new Point3d(bounds.getMaxX(), bounds.getMaxY(), height);\n \t\t\tpts[7] = new Point3d(bounds.getMaxX(), bounds.getMinY(), height);\n \t\t\tint[] indices = {0, 1, 2, 3, /* bottom z */\n \t\t\t 0, 4, 5, 1, /* back y */\n \t\t\t 0, 3, 7, 4, /* back x */\n \t\t\t 1, 5, 6, 2, /* front x */\n \t\t\t 2, 6, 7, 3, /* front y */\n \t\t\t 4, 7, 6, 5}; /* top z */\n \t\t\tgi.setCoordinates(pts);\n \t\t\tgi.setCoordinateIndices(indices);\n \t\t\tGeometryArray c = gi.getGeometryArray();\n c.setCapability(GeometryArray.ALLOW_INTERSECT);\n \n \t\t\t//cubeTrans.addChild(new Shape3D(c, ap));\n \t\t\tShape3D box = new Shape3D(c, ap);\n \t\t\tbox.setCapability(Shape3D.ENABLE_PICK_REPORTING);\n \t\t\tbox.setCapability(Node.ALLOW_LOCAL_TO_VWORLD_READ);\n box.setCapability(Shape3D.ALLOW_PICKABLE_READ);\n \t\t\tPickTool.setCapabilities(box, PickTool.INTERSECT_FULL);\n \t\t\tobjTrans.addChild(box);\n \t}",
"Tetrahedron containingShape();",
"private HashMap<Vertex3d,Vertex3d> createContourVertices (\n ArrayList<IntersectionContour> contours, ArrayList<Vertex3d> contourVtxs) {\n \n // Create vertices for each contour ...\n\n boolean debug = false;\n\n LinkedHashMap<Vertex3d,Vertex3d> vertexMap =\n new LinkedHashMap<Vertex3d,Vertex3d>();\n for (IntersectionContour c : contours) {\n\n IntersectionPoint mip = c.get(0); \n if (c.isClosed()) {\n // If the contour is closed, back up until we find a point whose\n // preceeding point is *not* coincident. There must be such a\n // point, because otherwise the contour would consist of a single\n // set of coincident points and would have been eliminated.\n mip = backupToNonCoincident(c.get(0));\n // IntersectionPoint prev = mip.prev();\n // if (prev.distance (mip0) <= myPositionTol) {\n // do {\n // mip = prev;\n // prev = mip.prev();\n // }\n // while (prev.distance (mip0) <= myPositionTol && mip != mip0);\n // } \n \n }\n \n // Create a new vertex at the starting intersection point. \n BooleanHolder vtxIsCoincident = new BooleanHolder();\n Vertex3d newVtx = createNewVertex (mip, vertexMap, vtxIsCoincident);\n if (!vtxIsCoincident.value) {\n contourVtxs.add (newVtx);\n }\n mip.myVertex = newVtx;\n mip.effectiveFace0 = c.findSegmentFace (mip, myMesh0);\n mip.effectiveFace1 = c.findSegmentFace (mip, myMesh1);\n mip.nearEdge0 = null;\n mip.nearEdge1 = null;\n mip.clearEmptyMarks();\n for (int i=1; i<c.size(); i++) {\n mip = mip.next();\n \n // Question: do we want to cluster based on lastp, or newVtx.pnt?\n if (mip.distance(newVtx.pnt) > myPositionTol) {\n if (debug) {\n System.out.println (\"mip \"+mip.contourIndex+\" new vertex\");\n }\n newVtx = createNewVertex (mip, vertexMap, vtxIsCoincident);\n if (!vtxIsCoincident.value) {\n contourVtxs.add (newVtx);\n }\n }\n else {\n if (debug) {\n System.out.println (\"mip \"+mip.contourIndex+\" old vertex\");\n }\n if (vtxIsCoincident.value) {\n mapCoincidentVertices (mip, newVtx, vertexMap);\n }\n }\n mip.myVertex = newVtx;\n mip.effectiveFace0 = c.findSegmentFace (mip, myMesh0);\n mip.effectiveFace1 = c.findSegmentFace (mip, myMesh1);\n mip.nearEdge0 = null;\n mip.nearEdge1 = null;\n mip.clearEmptyMarks();\n }\n }\n return vertexMap;\n }",
"public void makeCube (int subdivisions)\r\n {\r\n \tfloat horz[] = new float[subdivisions + 1];\r\n \tfloat vert[] = new float[subdivisions + 1];\r\n \t\r\n \t\r\n \t// Front face\r\n \tPoint p1 = new Point(-0.5f, -0.5f, 0.5f);\r\n \tPoint p2 = new Point(0.5f, -0.5f, 0.5f);\r\n \tPoint p3 = new Point(0.5f, 0.5f, 0.5f);\r\n \tPoint p4 = new Point(-0.5f, 0.5f, 0.5f);\r\n \t\r\n \tfloat h = p1.x;\r\n \tfloat v = p1.y;\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], 0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], 0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], 0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], 0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Back face\r\n \tp1.y = p1.z = -0.5f;\r\n \tp1.x = 0.5f;\r\n \tp2.x = p2.y = p2.z = -0.5f;\r\n \tp3.x = p3.z = -0.5f;\r\n \tp3.y = 0.5f;\r\n \tp4.x = p4.y = 0.5f;\r\n \tp4.z = -0.5f;\r\n \t\r\n \th = p1.x;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], -0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], -0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], -0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], -0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Left face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.x = p2.y = -0.5f;\r\n \tp2.z = 0.5f;\r\n \tp3.x = -0.5f;\r\n \tp3.y = p3.z = 0.5f;\r\n \tp4.y = 0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(-0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(-0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(-0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(-0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Right face\r\n \tp1.x = p1.z = 0.5f;\r\n \tp1.y = -0.5f;\r\n \tp2.y = p2.z = -0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.y = p4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Top face\r\n \tp1.x = -0.5f;\r\n \tp1.y = p1.z = 0.5f;\r\n \tp2.x = p2.y = p2.z = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \tp4.y = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], 0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], 0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], 0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], 0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Bottom face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.y = p2.z = 0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.z = 0.5f;\r\n \tp3.y = -0.5f;\r\n \tp4.x = p4.y = -0.5f;\r\n \tp4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], -0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], -0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], -0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], -0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n }",
"public Cube6(Material material, int width, int height, int segmentsW) {}",
"protected void fillFlatSideTriangleInt(Graphics g, Vertice v1, Vertice v2, Vertice v3)\n {\n Vertice vTmp1 = new Vertice(v1.x, v1.y);\n Vertice vTmp2 = new Vertice(v1.x, v1.y);\n \n boolean changed1 = false;\n boolean changed2 = false;\n \n int dx1 = Math.abs(v2.x - v1.x);\n int dy1 = Math.abs(v2.y - v1.y);\n \n int dx2 = Math.abs(v3.x - v1.x);\n int dy2 = Math.abs(v3.y - v1.y);\n \n int signx1 = (int)Math.signum(v2.x - v1.x);\n int signx2 = (int)Math.signum(v3.x - v1.x);\n \n int signy1 = (int)Math.signum(v2.y - v1.y);\n int signy2 = (int)Math.signum(v3.y - v1.y);\n \n if (dy1 > dx1)\n { // swap values\n int tmp = dx1;\n dx1 = dy1;\n dy1 = tmp;\n changed1 = true;\n }\n \n if (dy2 > dx2)\n { // swap values\n int tmp = dx2;\n dx2 = dy2;\n dy2 = tmp;\n changed2 = true;\n }\n \n int e1 = 2 * dy1 - dx1;\n int e2 = 2 * dy2 - dx2;\n \n for (int i = 0; i <= dx1; i++)\n {\n g.drawLine(vTmp1.x, vTmp1.y, vTmp2.x, vTmp2.y);\n \n while (e1 >= 0)\n {\n if (changed1)\n vTmp1.x += signx1;\n else\n vTmp1.y += signy1;\n e1 = e1 - 2 * dx1;\n }\n \n if (changed1)\n vTmp1.y += signy1;\n else\n vTmp1.x += signx1; \n \n e1 = e1 + 2 * dy1;\n \n /* here we rendered the next point on line 1 so follow now line 2\n * until we are on the same y-value as line 1.\n */\n while (vTmp2.y != vTmp1.y)\n {\n while (e2 >= 0)\n {\n if (changed2)\n vTmp2.x += signx2;\n else\n vTmp2.y += signy2;\n e2 = e2 - 2 * dx2;\n }\n\n if (changed2)\n vTmp2.y += signy2;\n else\n vTmp2.x += signx2;\n\n e2 = e2 + 2 * dy2;\n }\n }\n \n }",
"public Cube6(Material material, int width, int height, int segmentsW, int segmentsH) {}",
"private void generateHalfCylinder() {\n\t\tint segments = 32;\n\t\tverts = new Vector[segments * 2];\n\t\tfaces = new int[4 * segments - 4][3];\n\t\tdouble heading = 0;\n\t\tdouble headingIncrement = Math.PI / (segments - 1); // The increment in heading between segments of vertices\n\t\tfor (int s = 0; s < segments; s++) {\n\t\t\tdouble x = Math.cos(heading); // x co-ordinate of points on the segment\n\t\t\tdouble z = Math.sin(heading); // z co-ordinate of points on the segment\n\t\t\tverts[s] = new Vector(3);\n\t\t\tverts[s].setElements(new double[] {x, -1, z}); // Vertex on the bottom semi-circle\n\t\t\tverts[s + segments] = new Vector(3);\n\t\t\tverts[s + segments].setElements(new double[] {x, 1, z}); // Vertex on the top semi-circle\n\t\t\theading += headingIncrement;\n\t\t}\n\t\tfor (int i = 0; i < segments - 1; i++) { // Vertical faces approximating the curved surface\n\t\t\tfaces[i * 2] = new int[] {i, i + segments, i + segments + 1}; // Face involving a point on the bottom semi-circle, the point directly above it (top semi-circle and the same segment) and the point directly above and one segment across\n\t\t\tfaces[i * 2 + 1] = new int[] {i, i + segments + 1, i + 1}; // Face involving a point on the bottom semi-circle, the point above and one segment across and the point one segment across on the bottom semi-circle\n\t\t}\n\t\tfor (int i = 0; i < segments - 2; i++) { // Horizontal faces approximating the semi-circles at the top and bottom\n\t\t\tfaces[segments * 2 - 2 + i] = new int[] {0, i + 1, i + 2}; // For the bottom semi-circle, the first vertex connected to the (i + 1)th vertex and the (i + 2)th vertex\n\t\t\tfaces[segments * 2 - 2 + i + segments - 2] = new int[] {segments, segments + i + 2, segments + i + 1}; // The same as above but for the top semi-circle\n\t\t}\n\t\t// Faces representing the vertical square cross-section\n\t\tfaces[4 * segments - 6] = new int[] {0, segments * 2 - 1, segments}; // The first vertex, the last vertex and the one above the first\n\t\tfaces[4 * segments - 5] = new int[] {0, segments - 1, segments * 2 - 1}; // The first vertex, the last vertex on the bottom and the last vertex (on the top)\n\t}",
"private static boolean intersect_triangle(ReadableVector3f orig, ReadableVector3f dir,\n ReadableVector3f v0, ReadableVector3f v1, ReadableVector3f v2,\n float[] lenSequard, int offset){\n float t,u,v;\n\n // Find vectors for two edges sharing vert0\n sub(v1, v0, edge1);\n sub(v2, v0, edge2);\n\n // Begin calculating determinant - also used to calculate U parameter\n Vector3f.cross(dir, edge2, pvec);\n\n // If determinant is near zero, ray lies in plane of triangle\n float det = Vector3f.dot(edge1, pvec);\n\n if (det > 0)\n {\n Vector3f.sub(orig, v0, tvec);\n }\n else\n {\n// tvec = v0 - orig;\n Vector3f.sub(v0, orig, tvec);\n det = -det;\n }\n\n if (det < 0.0001f)\n return false;\n\n // Calculate U parameter and test bounds\n u = Vector3f.dot(tvec, pvec);\n if (u < 0.0f || u > det)\n return false;\n\n // Prepare to test V parameter\n Vector3f qvec = Vector3f.cross(tvec, edge1, edge1);\n//\tD3DXVec3Cross(&qvec, &tvec, &edge1);\n\n // Calculate V parameter and test bounds\n v = Vector3f.dot(dir, qvec);\n if (v < 0.0f || u + v > det)\n return false;\n\n if(lenSequard == null)\n return true;\n\n // Calculate t, scale parameters, ray intersects triangle\n t = Vector3f.dot(edge2, qvec);\n float fInvDet = 1.0f / det;\n t *= fInvDet;\n u *= fInvDet;\n v *= fInvDet;\n\n Vector3f intersect_point = edge1;\n intersect_point.x = v0.getX() * t + v1.getX() * u + v2.getX() * v;\n intersect_point.y = v0.getY() * t + v1.getY() * u + v2.getY() * v;\n intersect_point.z = v0.getZ() * t + v1.getZ() * u + v2.getZ() * v;\n\n Vector3f dirToPoint = Vector3f.sub(intersect_point, orig, edge2);\n lenSequard[offset] = dirToPoint.lengthSquared();\n return true;\n }",
"private Point intersection(Point p0, Point p1, Point p2, Point p3) {\r\n // Point pm = MyMath.middle(p2, p3);\r\n // double angle = MyMath.angle(pm, p1, p0, p1);\r\n //\r\n // /* Rectangle's center and rectangle's margin */\r\n // double dist1 = MyMath.distance(p1, pm);\r\n // /* Mragin's middle and intersection point */\r\n // double dist2 = Math.tan(angle) * dist1;\r\n // /* Distance between the rectangle's center and the intersection point\r\n // */\r\n // double dist0 = Math.sqrt(dist1 * dist1 + dist2 * dist2);\r\n //\r\n // double dist = MyMath.distance(p0, p1);\r\n //\r\n // double l = dist0 / dist;\r\n //\r\n // return new Point((int)((1 - l) * p1.x + l * p0.x),\r\n // (int)((1 - l) * p1.y + l * p0.y));\r\n\r\n Point pm = MyMath.middle(p2, p3);\r\n double angle = MyMath.angle(pm, p1, p0, p1);\r\n\r\n /* Rectangle's center and rectangle's margin */\r\n double dist1 = MyMath.distance(p1, pm);\r\n /* Mragin's middle and intersection point */\r\n double dist2 = Math.tan(angle) * dist1;\r\n /* Distance between the rectangle's center and the intersection point */\r\n double dist0 = Math.sqrt(dist1 * dist1 + dist2 * dist2);\r\n\r\n double dist = MyMath.distance(p0, p1);\r\n\r\n double l = dist0 / dist;\r\n\r\n int x = (int) ((1 - l) * p1.x + l * p0.x);\r\n int y = (int) ((1 - l) * p1.y + l * p0.y);\r\n\r\n return new Point(x, y);\r\n }",
"private void generatePrism() {\n\t\tdouble halfAltitude = Math.sin(Math.PI / 3); // The cross-section is an equilateral triangle with sides of length 2 units. The altitude is the height of the triangle with one edge horizontal\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElements(new double[] {-1, -halfAltitude, -1});\n\t\tverts[1].setElements(new double[] {0, halfAltitude, -1});\n\t\tverts[2].setElements(new double[] {1, -halfAltitude, -1});\n\t\t// Use the same triangle of vertices but offset by 2 units along the z-axis\n\t\tverts[3].setElements(verts[0]);\n\t\tverts[4].setElements(verts[1]);\n\t\tverts[5].setElements(verts[2]);\n\t\tverts[3].setElement(2, 1);\n\t\tverts[4].setElement(2, 1);\n\t\tverts[5].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 1, 2}, {0, 5, 3}, {0, 2, 5}, {0, 3, 4}, {0, 4, 1}, {1, 4, 5}, {1, 5, 2}, {3, 5, 4}};\n\t}",
"public Cube6(Material material, int width, int height, int segmentsW, int segmentsH,\r\n\t\t\t\t int segmentsD) {}",
"private void extractNonManhattanTransistor(PolyBase poly, PrimitiveNode transistor, PolyMerge merge, PolyMerge originalMerge, Cell newCell)\n \t{\n \t\t// determine minimum width of polysilicon\n \t\tSizeOffset so = transistor.getProtoSizeOffset();\n \t\tdouble minWidth = transistor.getDefHeight() - so.getLowYOffset() - so.getHighYOffset();\n \n \t\t// reduce the geometry to a skeleton of centerlines\n \t\tList<Centerline> lines = findCenterlines(poly, tempLayer1, minWidth, merge, originalMerge);\n \t\tif (lines.size() == 0) return;\n \n \t\t// if just one line, it is simply an angled transistor\n \t\tif (lines.size() == 1)\n \t\t{\n \t\t\tCenterline cl = lines.get(0);\n \t\t\tdouble polySize = cl.start.distance(cl.end);\n \t\t\tdouble activeSize = cl.width;\n \t\t\tdouble cX = (cl.start.getX() + cl.end.getX()) / 2;\n \t\t\tdouble cY = (cl.start.getY() + cl.end.getY()) / 2;\n \t\t\tdouble sX = polySize + scaleUp(so.getLowXOffset() + so.getHighXOffset());\n \t\t\tdouble sY = activeSize + scaleUp(so.getLowYOffset() + so.getHighYOffset());\n \t\t\trealizeNode(transistor, Technology.NodeLayer.MULTICUT_CENTERED, cX, cY, sX, sY, cl.angle, null, merge, newCell, null);\n \t\t\treturn;\n \t\t}\n \n \t\t// serpentine transistor: organize the lines into an array of points\n \t\tEPoint [] points = new EPoint[lines.size()+1];\n \t\tfor(Centerline cl : lines)\n \t\t{\n \t\t\tcl.handled = false;\n \t\t}\n \t\tCenterline firstCL = lines.get(0);\n \t\tfirstCL.handled = true;\n \t\tpoints[0] = new EPoint(firstCL.start.getX(), firstCL.start.getY());\n \t\tpoints[1] = new EPoint(firstCL.end.getX(), firstCL.end.getY());\n \t\tint pointsSeen = 2;\n \t\twhile (pointsSeen < points.length)\n \t\t{\n \t\t\tboolean added = false;\n \t\t\tfor(Centerline cl : lines)\n \t\t\t{\n \t\t\t\tif (cl.handled) continue;\n \t\t\t\tEPoint start = new EPoint(cl.start.getX(), cl.start.getY());\n \t\t\t\tEPoint end = new EPoint(cl.end.getX(), cl.end.getY());\n \t\t\t\tif (start.equals(points[0]))\n \t\t\t\t{\n \t\t\t\t\t// insert \"end\" point at start\n \t\t\t\t\tfor(int i=pointsSeen; i>0; i--)\n \t\t\t\t\t\tpoints[i] = points[i-1];\n \t\t\t\t\tpoints[0] = end;\n \t\t\t\t\tpointsSeen++;\n \t\t\t\t\tcl.handled = true;\n \t\t\t\t\tadded = true;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tif (end.equals(points[0]))\n \t\t\t\t{\n \t\t\t\t\t// insert \"start\" point at start\n \t\t\t\t\tfor(int i=pointsSeen; i>0; i--)\n \t\t\t\t\t\tpoints[i] = points[i-1];\n \t\t\t\t\tpoints[0] = start;\n \t\t\t\t\tpointsSeen++;\n \t\t\t\t\tcl.handled = true;\n \t\t\t\t\tadded = true;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tif (start.equals(points[pointsSeen-1]))\n \t\t\t\t{\n \t\t\t\t\t// add \"end\" at the end\n \t\t\t\t\tpoints[pointsSeen++] = end;\n \t\t\t\t\tcl.handled = true;\n \t\t\t\t\tadded = true;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tif (end.equals(points[pointsSeen-1]))\n \t\t\t\t{\n \t\t\t\t\t// add \"start\" at the end\n \t\t\t\t\tpoints[pointsSeen++] = start;\n \t\t\t\t\tcl.handled = true;\n \t\t\t\t\tadded = true;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (!added) break;\n \t\t}\n \n \t\t// make sure all points are handled\n \t\tif (pointsSeen != points.length) return;\n \n \t\t// compute information about the transistor and create it\n \t\tdouble lX = points[0].getX(), hX = points[0].getX();\n \t\tdouble lY = points[0].getY(), hY = points[0].getY();\n \t\tfor(int i=1; i<points.length; i++)\n \t\t{\n \t\t\tif (points[i].getX() < lX) lX = points[i].getX();\n \t\t\tif (points[i].getX() > hX) hX = points[i].getX();\n \t\t\tif (points[i].getY() < lY) lY = points[i].getY();\n \t\t\tif (points[i].getY() > hY) hY = points[i].getY();\n \t\t}\n \t\tdouble cX = (lX + hX) / 2;\n \t\tdouble cY = (lY + hY) / 2;\n \t\tfor(int i=0; i<points.length; i++)\n \t\t\tpoints[i] = new EPoint((points[i].getX()) / SCALEFACTOR, (points[i].getY()) / SCALEFACTOR);\n \t\trealizeNode(transistor, Technology.NodeLayer.MULTICUT_CENTERED, cX, cY, hX - lX, hY - lY, 0, points, merge, newCell, null);\n \t}",
"default IndexWriter appendQuadAsTriangles(int oppositeCorner, int c0, int c1, int provoking) {\n return this.append(oppositeCorner).append(c0).append(provoking) //first triangle\n .append(c1).append(oppositeCorner).append(provoking); //second triangle\n }",
"boolean intersectionTriangleSegment(Vecteur3 a, Vecteur3 b, Vecteur3 c) {\n\n\t\tVecteur3 ab = b.moins(a);\n\t\tVecteur3 ac = c.moins(a);\n\t\tVecteur3 bc = c.moins(b);\n\n\t\tVecteur3 n = ab.produitVectoriel(ac);\n\t\tn.normaliser();\n\n\t\tif (Math.abs(n.produitScalaire(direction)) < 1e-20)\n\t\t\treturn false; // le rayon est presque parallele au plan du\n\t\t\t\t\t\t\t// triangle, on ne gere pas ce cas\n\n\t\tVecteur3 PA = new Vecteur3(a.x - pointDeDepart.x,\n\t\t\t\ta.y - pointDeDepart.y, a.z - pointDeDepart.z);\n\t\tdouble lambda = PA.produitScalaire(n) / direction.produitScalaire(n);\n\n\t\tif (lambda < 0)\n\t\t\treturn false;\n\t\tif (lambda > 1)\n\t\t\treturn false;\n\n\t\tVecteur3 i = pointDeDepart.plus(direction.fois(lambda));\n\n\t\tVecteur3 ai = i.moins(a);\n\t\tVecteur3 bi = i.moins(b);\n\t\tVecteur3 ci = i.moins(c);\n\n\t\tdouble A = 0.5 * (bi.produitVectoriel(bc)).norme();\n\t\tdouble B = 0.5 * (ci.produitVectoriel(ac)).norme();\n\t\tdouble C = 0.5 * (ai.produitVectoriel(ab)).norme();\n\t\tdouble abc = 0.5 * (ab.produitVectoriel(ac)).norme();\n\t\tif (A + B + C > abc + 1e-5)\n\t\t\treturn false;\n\t\treturn true;\n\n\t}",
"public TerrainQuad getTopQuad(TerrainQuad center);",
"public Geant4Basic createRegion(int isector, int iregion) {\n\n \n double regionDZ = (this.getChamberThickness())/2. + URWellConstants.ZENLARGEMENT ;\n double regionDY = URWellConstants.SECTORHEIGHT/2 + URWellConstants.YENLARGEMENT ;\n double regionDX0 = URWellConstants.DX0CHAMBER0 + URWellConstants.XENLARGEMENT ;\n double regionDX1 = (regionDY*2)*Math.tan(Math.toRadians(URWellConstants.THOPEN/2))+regionDX0 ; \n double regionThilt = Math.toRadians(URWellConstants.THTILT);\n\n // baricenter coordinate in CLAS12 frame \n\n Vector3d vCenter = new Vector3d(0, 0, 0);\n vCenter.x = 0 ;\n vCenter.y =URWellConstants.SECTORHEIGHT/2*Math.cos(regionThilt)+URWellConstants.YMIN;\n vCenter.z =-URWellConstants.SECTORHEIGHT/2*Math.sin(regionThilt)+URWellConstants.ZMIN;\n vCenter.rotateZ(-Math.toRadians(90 - isector * 60));\n\n // Sector construction\n Geant4Basic sectorVolume = new G4Trap(\"region_uRwell_\" + (iregion + 1) + \"_s\" + (isector + 1),\n regionDZ, -regionThilt, Math.toRadians(90.0),\n regionDY, regionDX0, regionDX1, 0.0,\n regionDY, regionDX0, regionDX1, 0.0);\n\n sectorVolume.rotate(\"yxz\", 0.0, regionThilt, Math.toRadians(90.0 - isector * 60.0));\n sectorVolume.translate(vCenter.x, vCenter.y, vCenter.z);\n sectorVolume.setId(isector + 1, iregion + 1, 0, 0);\n \n // Chambers construction\n for (int ich = 0; ich < URWellConstants.NCHAMBERS; ich++) {\n double y_chamber = (2*ich+1)*(URWellConstants.SECTORHEIGHT/URWellConstants.NCHAMBERS/2+0.05);\n //double y_chamber = (2*ich+1)*(SECTORHEIGHT/nChambers/2);\n Geant4Basic chamberVolume = this.createChamber(isector, iregion, ich);\n chamberVolume.setName(\"rg\" + (iregion + 1) + \"_s\" + (isector + 1) + \"_c\" + (ich +1));\n chamberVolume.setMother(sectorVolume);\n chamberVolume.translate(0.0,y_chamber-URWellConstants.SECTORHEIGHT/2,0. );\n chamberVolume.setId(isector + 1, iregion + 1, ich +1, 0);\n }\n \n return sectorVolume;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a BeastProfile for a beast based on ID. Returns null if a beast doesn't exist | public BeastProfile selectProfile(int beastID){
SQLiteDatabase db = this.getReadableDatabase();
String IdString = Integer.toString(beastID);
Cursor cursor = db.rawQuery("SELECT * FROM "+T1+
" WHERE "+T1_ID+" = "+IdString+";", null);
if (cursor.moveToFirst()){
BeastProfile beastProfile = new BeastProfile(
cursor.getInt(T1_ID_INDEX),
cursor.getString(T1_NAME_INDEX),
cursor.getString(T1_BIO_INDEX),
cursor.getString(T1_HISTORY_INDEX)
);
cursor.close();
return beastProfile;
} else {
cursor.close();
return null;
}
} | [
"public Profile getProfile (int id){\n\t\treturn profiles.stream().filter(p -> p.getId()==(id)).findFirst().get();\n\t}",
"public Profile getProfile(final String id);",
"Profile getProfile( String profileId );",
"public GrowthProfile getSpecificGrowthProfile(int id);",
"@Override\r\n public Profile getProfileById(int id) {\r\n return profileDAO.getProfileById(id);\r\n }",
"Optional<ProfileSettingsDTO> findOne(Long id);",
"private IProfile getProfile() {\n \t\treturn profileRegistry.getProfile(getProfileId());\n \t}",
"public Profile getProfile(String id) {\r\n\t\tString uuid = id;\r\n\t\tSystem.out.println(\"MineshafterProfileClient.getProfile(\" + uuid + \")\");\r\n\t\tURL u;\r\n\t\ttry {\r\n\t\t\tu = new URL(API_URL + \"?uuid=\" + id);\r\n\r\n\t\t\tHttpsURLConnection conn = (HttpsURLConnection) u.openConnection();\r\n\r\n\t\t\tInputStream in = conn.getInputStream();\r\n\t\t\tString profileJSON = Streams.toString(in);\r\n\t\t\tStreams.close(in);\r\n\r\n\t\t\tSystem.out.println(\"MS API Response: \" + profileJSON);\r\n\r\n\t\t\tif (profileJSON == null || profileJSON.length() == 0) { return new Profile(); }\r\n\r\n\t\t\tJsonObject pj = JsonObject.readFrom(profileJSON);\r\n\r\n\t\t\tProfile p = new Profile(pj.get(\"username\").asString(), uuid);\r\n\t\t\tJsonValue skinVal = pj.get(\"skin\");\r\n\t\t\tJsonValue capeVal = pj.get(\"cape\");\r\n\t\t\tJsonValue modelVal = pj.get(\"model\");\r\n\r\n\t\t\tString url;\r\n\t\t\tif (skinVal != null && !skinVal.isNull() && !skinVal.asString().isEmpty()) {\r\n\t\t\t\turl = textureHandler.addSkin(uuid, skinVal.asString());\r\n\t\t\t\tp.setSkin(url);\r\n\t\t\t}\r\n\r\n\t\t\tif (capeVal != null && !capeVal.isNull() && !capeVal.asString().isEmpty()) {\r\n\t\t\t\turl = textureHandler.addCape(uuid, capeVal.asString());\r\n\t\t\t\tp.setCape(url);\r\n\t\t\t}\r\n\r\n\t\t\tif (modelVal != null && !modelVal.isNull()) {\r\n\t\t\t\tString model = modelVal.asString();\r\n\t\t\t\tif (model.equals(\"slim\")) {\r\n\t\t\t\t\tp.setModel(CharacterModel.SLIM);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setModel(CharacterModel.CLASSIC);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn p;\r\n\t\t} catch (ParseException e) {\r\n\t\t\tSystem.out.println(\"Unable to parse getProfile response, using blank profile\");\r\n\t\t\treturn new Profile();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn new Profile();\r\n\t}",
"public Profile loadProfile(Long userId);",
"@Override\n @Transactional(readOnly = true)\n public Optional<BusinessContactProfileDTO> findOne(Long id) {\n log.debug(\"Request to get BusinessContactProfile : {}\", id);\n return businessContactProfileRepository.findById(id)\n .map(businessContactProfileMapper::toDto);\n }",
"public Optional<SpendProfileId> getSpendProfileId() {\n return Optional.ofNullable(spendProfileId);\n }",
"public FourSquareUser getUserProfile(String id);",
"public Profile getProfile();",
"public Saving findById(Integer id){\n LOGGER.info(\"Get Savings account with id \" + id);\n Saving saving = savingsRepository.findById(id).orElseThrow(() -> new DataNotFoundException(\"Savings Account id not found\"));\n return saving;\n }",
"public final Id<Profile> getProfileId() {\n return profileId;\n }",
"@Override\n @Transactional(readOnly = true)\n public Optional<SportDTO> findOne(Long id) {\n log.debug(\"Request to get Sport : {}\", id);\n return sportRepository.findById(id)\n .map(sportMapper::toDto);\n }",
"@Transactional(readOnly = true)\n public Optional<StudyEndPoint> findOne(Long id) {\n log.debug(\"Request to get StudyEndPoint : {}\", id);\n return studyEndPointRepository.findById(id);\n }",
"private StudentProfile getStudentProfileEntityFromDb(String googleId) {\n Key childKey = KeyFactory.createKey(Account.class.getSimpleName(), googleId)\n .getChild(StudentProfile.class.getSimpleName(), googleId);\n \n try {\n StudentProfile profile = getPM().getObjectById(StudentProfile.class, childKey);\n if (profile == null\n || JDOHelper.isDeleted(profile)) {\n return null;\n }\n \n return profile;\n } catch (JDOObjectNotFoundException je) {\n return getStudentProfileEntityForLegacyData(googleId);\n }\n }",
"@Override\n @Transactional(readOnly = true)\n public Optional<BenefitsDTO> findOne(Long id) {\n log.debug(\"Request to get Benefits : {}\", id);\n return benefitsRepository.findById(id)\n .map(benefitsMapper::toDto);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Autogenerated Javadoc The Interface ElecPoleRepository. | public interface ElecPoleRepository extends MongoRepository<ElectricPole, String> {
/**
* Find ElectricPole by id.
*
* @param _id the id
* @return the electric pole
*/
ElectricPole findBy_id(ObjectId _id);
} | [
"ElectricPole findBy_id(ObjectId _id);",
"@Override\n @Transactional(readOnly = true)\n public Page<Pole> findAll(Pageable pageable) {\n log.debug(\"Request to get all Poles\");\n return poleRepository.findAll(pageable);\n }",
"public T casePole(Pole object) {\n\t\treturn null;\n\t}",
"@Override\n public Collection<Candidate> findAllCandidates() {\n List<Candidate> candidate = new ArrayList<>();\n try (Connection cn = pool.getConnection();\n PreparedStatement ps = cn.prepareStatement(\"SELECT * FROM candidate \")\n ) {\n try (ResultSet it = ps.executeQuery()) {\n while (it.next()) {\n candidate.add(new Candidate(it.getInt(\"id\"), it.getString(\"name\"),\n it.getInt(\"photo_id\"), it.getInt(\"city_id\")));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n LOG.error(\"Неверный SQL запрос, кандидаты не найдены\");\n }\n return candidate;\n }",
"public int getAmountOnPole( GameObj pole )\n {\n int amount = 0;\n\n for ( int i = 0; i < poles.length; i++ )\n {\n for ( int j = 0; j < disks.length; j++ )\n {\n if ( disks[j].hit(poles[i]) == true )\n amount++;\n\n }\n }\n\n return amount;\n\n }",
"@Override\n @Transactional(readOnly = true)\n public Optional<Pole> findOne(Long id) {\n log.debug(\"Request to get Pole : {}\", id);\n return poleRepository.findById(id);\n }",
"public static List<BoreHole> getAllBoreholes() {\n List<BoreHole> borehole_list = new ArrayList<>();\n\n try (Connection conn = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1/boreholes?user=root&password=\")) {\n PreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM `borehole`\");\n ResultSet res = stmt.executeQuery();\n\n while (res.next()) {\n res.getInt(\"BoreholeType\");\n int boreholeID = res.getInt(\"BoreholeID\");\n String boreholeName = res.getString(\"BoreholeName\");\n int boreholeTypeID = res.getInt(\"BoreholeType\");\n String boreholeLatitude = res.getString(\"BoreholeLatitude\");\n String boreholeLongitude = res.getString(\"BoreholeLongitude\");\n float boreholeElevation = res.getFloat(\"BoreholeElevation\");\n\n PreparedStatement stmt2 = conn.prepareStatement(\"SELECT `TypeName` FROM `boreholetypes` WHERE `TypeID` = ?\");\n stmt2.setInt(1, boreholeTypeID);\n ResultSet res2 = stmt2.executeQuery();\n res2.next();\n String boreholeType = res2.getString(\"TypeName\");\n\n BoreHole bh = new BoreHole(boreholeID, boreholeName, boreholeType, boreholeLatitude, boreholeLongitude, boreholeElevation);\n borehole_list.add(bh);\n }\n\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n\n return borehole_list;\n }",
"public List<Proveedor> findAllProveedors();",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ObstacleRepository extends MongoRepository<Obstacle, String> {\n\n List<Obstacle> findByPointANear(Point p, Distance d);\n\n List<Obstacle> findByPointBNear(Point p, Distance d);\n\n List<Obstacle> findByPointCNear(Point p, Distance d);\n\n List<Obstacle> findByPointDNear(Point p, Distance d);\n\n}",
"@Override\n public ArrayList<Proveedor> buscarProveedoresPorDireccion(String direccion) {\n ArrayList<Proveedor> proveedores = new ArrayList<>();\n try {\n prepStatement = Conexion.getConexion().prepareStatement(BUSQUEDA_POR_DIRECCION);\n prepStatement.setString(1, \"%\" + direccion + \"%\");\n result = prepStatement.executeQuery();\n while (result.next()) {\n if(!result.getString(2).equalsIgnoreCase(\"PROVEEDOR_UNICO_PREDETERMINADO\")) {\n proveedores.add(new Proveedor(result.getInt(1), result.getString(2), result.getString(3), result.getString(4), result.getString(5), result.getString(6)));\n }\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return proveedores;\n }",
"public List<Poi> getPois(){ //TODO BORRAR TODO MENOS LA LISTA Q ES LO Q HAY Q RETORNAR.\r\n\t\t\t\t\r\n\t\tList<Poi> resultado = entityManager().createQuery(\"FROM Poi\", Poi.class).getResultList();\r\n\t\t\r\n\t\treturn resultado;\r\n\t}",
"public interface PoetryDao {\n\n int insertPoetry(Poetry poetry);\n\n int updatePoetry(Poetry poetry);\n\n int deleteByPoetryName(String poetryName);\n\n int deleteByPoetryId(int poetryId);\n\n Poetry getByPoetryId(int poetryId);\n\n Poetry getByPoetryName(String poetryName);\n\n List<Poetry> getAllCollectedPoetryByUserId(int userId);\n\n List<SimplePoetryVO> getAllSimplePoetry();\n\n List<SimplePoetryVO> getAllSimplePoetryByName(String childCategoryName);\n\n List<Poetry> getByPoetryDynasty(String dynasty);\n\n List<Poetry> getByPoetryAuthor(String author);\n\n List<Poetry> getAllPoetry();\n\n List<PoetrySimpleVO> getPoetrySimpleByChildCategoryName(String childCategoryName);\n\n List<PoetryChildCategoryVO> getPoetryChildCategoryByPoetryId(int poetryId);\n\n List<CategoryVO> getAllChildCategoryNameById(int id);\n}",
"public interface TemplatePoleMissionRepository extends MongoRepository<TemplatePoleMission, String> {\n\t\n\t/**\n\t * Find TemplatePoleMission by id.\n\t *\n\t * @param _id the id\n\t * @return the template pole mission\n\t */\n\tTemplatePoleMission findBy_id(ObjectId _id);\n\t\n\t/**\n\t * Find TemplatePoleMission bypoletype.\n\t *\n\t * @param poletype the poletype\n\t * @return the template pole mission\n\t */\n\tTemplatePoleMission findBypoletype(String poletype);\n}",
"@Repository(\"PollOptionRepository\")\npublic interface PollOptionRepository extends JpaRepository<PollOption, UUID> {\n /**\n * Get all poll options in a poll.\n *\n * @param poll The poll.\n * @return The poll options by poll.\n */\n Set<PollOption> getPollOptionsByPoll(Poll poll);\n\n /**\n * Get poll option by id.\n *\n * @param pollOptionId The poll option id.\n * @return The by id.\n */\n PollOption getById(UUID pollOptionId);\n}",
"public interface CandidatureRepository extends CrudRepository<Candidature, Long> {\n\n\tIterable<ReferendumOption> findByDistrict(District idDistrict);\n}",
"public Set<Coordenada> obtenerConjuntoOrdenado()\n {\n \n }",
"public List<Paciente> findAllPacientes();",
"public interface CandidatureListRepository extends CandidatureRepository {\n\n}",
"public Collection<Pared> getParedes() {\n List<Pared> list = new ArrayList<Pared>();\n for (Direccion direccion : Direccion.values()) {\n if (hayPared(direccion)) {\n Celda celda2 = getCelda(direccion);\n list.add(new Pared(this, celda2));\n }\n }\n return list;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Leaves from the bounty hunter. | public void leaveBountyHunter(Player player) {
targets.remove(player);
} | [
"void bust() {\n\t\t_loses++;\n\t\t//_money -= _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}",
"public void dropBounty() {\n //if bandit had bounties\n if (this.bounties.size() > 0) {\n //pick a random bounty\n Random r = new Random();\n int randomBountyIndex = r.nextInt(this.bounties.size());\n Bounty selectedBounty = this.bounties.get(randomBountyIndex);\n //remove the randomly picked bounty from his bounties\n this.bounties.remove(selectedBounty);\n //put the bounty back on the train on the bandit's position\n selectedBounty.moveTo(this.x, this.y);\n //Adds the bounty back again to the train entities\n this.train.addEntity(selectedBounty);\n }\n }",
"@Override\n public void remove() {\n if (this.blowerAttached) {\n this.setHeight(8);\n this.blowerAttached = false;\n } else {\n System.out.println(\"\\033[31mSnow Blower is already attached to something ...\");\n }\n }",
"@Override\n\tpublic void gotHit() {\n\t\tthis.setHealthPoints(this.getHealthPoints() - 1);\n\t\tif (isDead()) {\n\t\t\tGameTier.gameEngine.manDown(this);\n\t\t}\n\t}",
"public void revive() {\n\t\tfor (int i=0;i<player.length;i++)\n\t\t\tif (kecleon[i].getHitPoint() <= 0)\n\t\t\t\tkecleon[i] = new Kecleon(0, 100);\n\t}",
"public void loseHealth(int l){\r\n\t\thealth -= l;\r\n\t}",
"private void loseCondition() {\n if (player.getHealth() <= 0) {\n lose();\n }\n }",
"void bringOutYourDead()\n\t{\n\t\tIterator<Enemy> it = enemylist.iterator();\n\t\twhile (it.hasNext())\n\t\t\tif (it.next().isDead())\n\t\t\t\tit.remove();\n\t}",
"private void loseEnergy() { energyLevel -= energyLossPerChronon; }",
"public void detonatedBomb() {\n settedBombs.decrement();\n }",
"public void decreaseHealth() {\n setHealth(getHealth()-1);\n }",
"public void aircraftLeaves() {\n aircraftAtGate = null;\n }",
"public void dropBomb()\n {\n if(bombTimer <= 0 && bombsLeft > 0)\n {\n bombTimer = bombDelay;\n newBombs.add(getNewBomb());\n bombsLeft--;\n }\n }",
"public void testHunterCapturingBackwards() {\n // Set up a hunter, face-up, pointing towards BIG_Y\n int hunterX = 1;\n int hunterY = 1;\n board.addTile(hunter, hunterX, hunterY);\n board.flipTile(Team.HUMANS, hunterX, hunterY);\n assertEquals(Directional.BIG_Y, hunter.getDirection());\n \n // Place a face-up duck immediately behind the hunter\n int duckX = hunterX;\n int duckY = hunterY - 1;\n board.addTile(duck, duckX, duckY);\n board.flipTile(Team.PREDATORS, duckX, duckY);\n \n // Capture the duck (illegal)\n try {\n board.moveTile(humansPlayer, hunterX, hunterY, duckX, duckY);\n fail(\"Hunters aren't allowed to capture backwards\");\n }\n catch (IllegalMoveException expected) {\n // Success\n }\n }",
"public void loss() {\r\n\t\tcoins -= bet;\r\n\t\tbet = 0;\r\n\t}",
"@EventHandler\n\tpublic void onPlayerDeath(PlayerDeathEvent e) {\n\t\tif (!e.getEntity().hasPermission(\"walkingwasteland.immune\") && ConfigManager.isZombifyPlayers() && WastelandManager.isWastelander(e.getEntity().getKiller())) {\n\t\t\tString deathMessage;\n\t\t\tif (e.getDeathMessage().contains(\"shot by\")) {\n\t\t\t\tdeathMessage = e.getEntity().getDisplayName() + \" was shot down by \" + e.getEntity().getKiller().getDisplayName() + \", whose deadly aura resurrected them as a zombie!\";\n\t\t\t} else {\n\t\t\t\tdeathMessage = e.getEntity().getDisplayName() + \" was killed by \" + e.getEntity().getKiller().getDisplayName() + \", whose deadly aura resurrected them as a zombie!\";\n\t\t\t}\n\t\t\te.setDeathMessage(deathMessage);\n\t\t\tItemStack[] armor = e.getEntity().getEquipment().getArmorContents();\n\t\t\tItemStack mainHand = e.getEntity().getEquipment().getItemInMainHand();\n\t\t\tItemStack offHand = e.getEntity().getEquipment().getItemInOffHand();\n\t\t\tLivingEntity playerZombie = (LivingEntity)e.getEntity().getLocation().getWorld().spawnEntity(e.getEntity().getLocation(), EntityType.ZOMBIE);\n\t\t\t// Equip our new playerZombie with the stuff the player was holding.\n\t\t\tplayerZombie.getEquipment().setArmorContents(armor);\n\t\t\tplayerZombie.getEquipment().setItemInMainHand(mainHand);\n\t\t\tplayerZombie.getEquipment().setItemInOffHand(offHand);\n\t\t\tplayerZombie.getEquipment().setBootsDropChance(1);\n\t\t\tplayerZombie.getEquipment().setChestplateDropChance(1);\n\t\t\tplayerZombie.getEquipment().setHelmetDropChance(1);\n\t\t\tplayerZombie.getEquipment().setLeggingsDropChance(1);\n\t\t\tplayerZombie.getEquipment().setItemInMainHandDropChance(1);\n\t\t\tplayerZombie.getEquipment().setItemInOffHandDropChance(1);\n\t\t\t// To prevent items being duplicated (dropped by player and wielded by zombie), clear the player's equipped stuff.\n\t\t\tList<ItemStack> droppedItems = e.getDrops();\n\t\t\tfor (ItemStack piece : armor) {\n\t\t\t\tdroppedItems.remove(piece);\n\t\t\t}\n\t\t\tdroppedItems.remove(mainHand);\n\t\t\tdroppedItems.remove(offHand);\n\t\t\tplayerZombie.setCustomName(e.getEntity().getDisplayName());\n\t\t\tplayerZombie.setCustomNameVisible(true);\n\t\t}\n\t}",
"@Override\n\tpublic void makeDead() {\n\t\tthis.setHealthPoints(-1);\n\t\tthis.gotHit();\n\t}",
"public void decrement() {\r\n\t\tcurrentSheeps--;\r\n\t}",
"public void liftOff() {\n\t\tL.trace(\"liftOff\");\n\t\tif (canFly()) {\n\t\t\tjump();\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method created by SpringML to get notification message based on no. of days of last exposure. | private String getNotificationMsg(int days){
String message;
if (days == 0){
message = context.getString(R.string.notification_message_zero_days);
}
else if (days == 1){
message = context.getString(R.string.notification_message_one_day, days);
}
else{
message = context.getString(R.string.notification_message_two_days, days);
}
message = message + context.getString(R.string.notification_message_tap_to_learn);
return message;
} | [
"int getMessageCounterHistoryDayLimit();",
"public String After_1day_BegDateInspect(String objectStoreName, String Subject, String Body, String dominoServer, String dominoMailbox, String dominoUsername, String dominoPassword) throws VWException {\n Send_Notifications Send_Notif = new Send_Notifications();\n Send_Notif.log(\"\\tobjectStoreName: \" + objectStoreName);\n\n\n Date date = new Date();\n final String ISO_FORMAT = \"yyyyMMdd'T'HHmmss'Z'\";\n\n final SimpleDateFormat sdf = new SimpleDateFormat(ISO_FORMAT);\n final TimeZone utc = TimeZone.getTimeZone(\"UTC\");\n sdf.setTimeZone(utc);\n System.out.println(sdf.format(date));\n System.out.println(\"SDF Format= \" + sdf.format(date));\n\n\n Calendar c = Calendar.getInstance();\n c.setTime(date);\n c.add(Calendar.DATE, -2);\n Date PastDate = c.getTime();\n System.out.println(\"PastDate= \" + PastDate);\n\n c.setTime(date);\n c.add(Calendar.DATE, 0);\n Date FutureDate = c.getTime();\n System.out.println(\"FutureDate= \" + FutureDate);\n\n\n if (Send_Notif.init()) {\n Send_Notif.log(\"context initialized\");\n ObjectStore store = Factory.ObjectStore.fetchInstance(Send_Notif.getDomain(), objectStoreName, null);\n\n\n //NOTIFICATION DATE FORMAT\n String format = \"dd.MM.yyyy\";\n SimpleDateFormat message_format = new SimpleDateFormat(format);\n\n\n //String query = \"select * from FinInspect where DateRefItogFO>\"+\"20120920T080000Z\";\n String query = \"select * from FinInspect where BegDateInspect> \" + sdf.format(PastDate) + \" and BegDateInspect<\" + sdf.format(FutureDate);\n // String query = \"select * from FinInspect\";\n System.out.println(\"query= \" + query);\n SearchSQL sql = new SearchSQL(query);\n SearchScope search = new SearchScope(store);\n FolderSet folders = (FolderSet) search.fetchObjects(sql, null, null, Boolean.valueOf(true));\n Iterator it = folders.iterator();\n\n\n int kol = 0;\n while (it.hasNext()) {\n Folder folder = (Folder) it.next();\n String SectorFinOrg = folder.getProperties().getStringValue(\"SectorFinOrg\");\n // System.out.println(\"SectorFinOrg= \" + SectorFinOrg);\n\n\n //MESSAGE TEXT\n Id FinInspectDocId = folder.get_Id();\n String Org = folder.getProperties().getStringValue(\"Org\");\n //Subject = \"Уведомление о регистрации Акта о назначении проверки\";\n Subject = \"ВНИМАНИЕ! Касательно проверки «\";\n Subject = Subject + Org + \"».\" + \" Остался 1 день до наступления последнего дня регистрации Акта о назначении проверки в уполномоченном органе по правовой статистике и специальным учетам.\";\n //Body = \"ВНИМАНИЕ! Касательно проверки «\";\n //Body = Body + Org + \"».\" + \" Остался 1 день до наступления последнего дня регистрации Акта о назначении проверки в уполномоченном органе по правовой статистике и специальным учетам.\";\n System.out.println(Body);\n\n\n System.out.println(\"===========\");\n kol++;\n System.out.println(\"kol= \" + kol);\n System.out.println(\"RKKDate BegDateInspect= \" + folder.getProperties().getDateTimeValue(\"BegDateInspect\"));\n System.out.println(\"RKKDate BegDateInspect= \" + folder.getProperties().getDateTimeValue(\"BegDateInspect\"));\n Date RKKDate = folder.getProperties().getDateTimeValue(\"BegDateInspect\");\n\n\n System.out.println(\"CURRENT DATE is \" + date);\n\n c.setTime(date);\n c.add(Calendar.DATE, -1);\n Date DublicateDate = c.getTime();\n System.out.println(\"DublicateDate is \" + DublicateDate);\n\n if (DublicateDate.getDate() == RKKDate.getDate() && DublicateDate.getMonth() == RKKDate.getMonth() && DublicateDate.getYear() == RKKDate.getYear()) {\n System.out.println(\"send notification\");\n System.out.println(\"send notification\");\n\n\n String query2 = \"select * from NoticeInfo where SectorFinOrg = \" + \"'\" + SectorFinOrg + \"'\";\n System.out.println(\"query2= \" + query2);\n SearchSQL sql2 = new SearchSQL(query2);\n SearchScope search2 = new SearchScope(store);\n DocumentSet documents = (DocumentSet) search2.fetchObjects(sql2, null, null, Boolean.valueOf(true));\n\n\n Iterator it2 = documents.iterator();\n Document doc2 = (Document) it2.next();\n System.out.println(\"DocumentTitle= \" + doc2.getProperties().getStringValue(\"DocumentTitle\"));\n EmailList = doc2.getProperties().getStringListValue(\"email\");\n Iterator it3 = EmailList.iterator();\n\n while (it3.hasNext()) {\n\n String email = (String) it3.next();\n System.out.println(\"email= \" + email);\n System.out.println(\"email= \" + email);\n // System.out.println(\"User= \" + User);\n\n sendmail.SendMail(email, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n\n\n }\n\n // NOTIFICATION STAFF\n String query3 = \"select * from StaffInspectors where FinInspectDocId = \" + \"'\" + FinInspectDocId + \"'\" + \"and IsRuk= \" + \"'Руководитель'\" + \" and EndDate>\" + sdf.format(date);\n //String query3 = \"select * from StaffInspectors where FinInspectDocId = '{B59A6664-99EF-4C8C-BBF4-AB60718DBF6F}'\";\n System.out.println(\"query3=\" + query3);\n SearchSQL sql3 = new SearchSQL(query3);\n SearchScope search3 = new SearchScope(store);\n DocumentSet StaffInspectors = (DocumentSet) search3.fetchObjects(sql3, null, null, Boolean.valueOf(true));\n Iterator it4 = StaffInspectors.iterator();\n\n while (it4.hasNext()) {\n Document doc3 = (Document) it4.next();\n System.out.println(\"FIO= \" + doc3.getProperties().getStringValue(\"FIO\"));\n System.out.println(\"Email= \" + doc3.getProperties().getStringValue(\"EmailLotus\"));\n String email = doc3.getProperties().getStringValue(\"EmailLotus\");\n sendmail.SendMail(email, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n }\n\n\n } else {\n System.out.println(\"no notification\");\n\n }\n\n\n }\n\n }\n\n\n return \"null\";\n }",
"public static String getMessage() {\n\t\treturn dailyMessage;\n\t}",
"public String getTimeAgoNotification(){\n\t\tlong nowMs;\n\t\tlong dateMs;\n\t\ttry {\n\t\t\tnowMs = Utils.parseMilliseconds(Utils.getNowTime());\n\t\t\tdateMs = Utils.parseMilliseconds(getDate());\n\t\t} catch (ParseException e) {\n\t\t\tLog.e(Utils.LOG_TAG, Log.getStackTraceString(e));\n\t\t\treturn \"Unknown\";\n\t\t}\n\t\tdouble minutes = (nowMs - dateMs)/60000.0f;\n\t\treturn com.tools.Tools.convertMinutesToFormattedString(minutes, 0, 2);\n\t}",
"public String Before_2day_LimitedMeasure(String objectStoreName, String Subject, String Body, String dominoServer, String dominoMailbox, String dominoUsername, String dominoPassword) throws VWException {\n Send_Notifications Send_Notif = new Send_Notifications();\n Send_Notif.log(\"\\tobjectStoreName: \" + objectStoreName);\n\n Date date = new Date();\n final String ISO_FORMAT = \"yyyyMMdd'T'HHmmss'Z'\";\n\n final SimpleDateFormat sdf = new SimpleDateFormat(ISO_FORMAT);\n System.out.println(\"SDF Format= \" + sdf.format(date));\n TimeZone utc = TimeZone.getTimeZone(\"UTC\");\n sdf.setTimeZone(utc);\n\n Calendar c = Calendar.getInstance();\n c.setTime(date);\n c.add(Calendar.DATE, +1);\n final Date PastDate = c.getTime();\n System.out.println(\"PastDate= \" + PastDate);\n\n c.setTime(date);\n c.add(Calendar.DATE, +3);\n final Date FutureDate = c.getTime();\n System.out.println(\"FutureDate= \" + FutureDate);\n System.out.println(\"===========\");\n\n\n if (Send_Notif.init()) {\n Send_Notif.log(\"context initialized\");\n ObjectStore store = Factory.ObjectStore.fetchInstance(Send_Notif.getDomain(), objectStoreName, null);\n //NOTIFICATION DATE FORMAT\n String format = \"dd.MM.yyyy\";\n SimpleDateFormat message_format = new SimpleDateFormat(format);\n\n\n String query = \"select * from LimitedMeasure where DateExecLimMeasure> \" + sdf.format(PastDate) + \" and DateExecLimMeasure<\" + sdf.format(FutureDate);\n System.out.println(\"query= \" + query);\n SearchSQL sql = new SearchSQL(query);\n SearchScope search = new SearchScope(store);\n DocumentSet Docs = (DocumentSet) search.fetchObjects(sql, null, null, Boolean.valueOf(true));\n Iterator it = Docs.iterator();\n\n\n while (it.hasNext()) {\n\n Document doc = (Document) it.next();\n String FinInspectDocId = doc.getProperties().getStringValue(\"FinInspectDocId\");\n System.out.println(\"FinInspectDocId= \" + FinInspectDocId);\n\n String FinIdQuery = \"select * from FinInspect where ID=\" + \"'\" + FinInspectDocId + \"'\";\n SearchSQL sqlFinId = new SearchSQL(FinIdQuery);\n SearchScope searchFinId = new SearchScope(store);\n FolderSet folders = (FolderSet) searchFinId.fetchObjects(sqlFinId, null, null, Boolean.valueOf(true));\n\n Iterator iterator = folders.iterator();\n Folder folder = (Folder) iterator.next();\n System.out.println(\"title= \" + folder.get_FolderName());\n String SectorFinOrg = folder.getProperties().getStringValue(\"SectorFinOrg\");\n\n //MESSAGE TEXT\n //Subject = \"Уведомление по ограниченным мерам воздействия\";\n Date DateExecLimMeasure = doc.getProperties().getDateTimeValue(\"DateExecLimMeasure\");\n String Org = folder.getProperties().getStringValue(\"Org\");\n String VidImpact = doc.getProperties().getStringValue(\"VidImpact\");\n String OutNumRefFO = doc.getProperties().getStringValue(\"OutNumRefFO\");\n Subject = \"ВНИМАНИЕ! Касательно проверки «\";\n Subject = Subject + Org + \"».\" + \" Осталось 2 дня до наступления даты исполнения по '\" + VidImpact + \"' от \" + message_format.format(DateExecLimMeasure) + \" №\" + OutNumRefFO;\n //Body = \"ВНИМАНИЕ! Касательно проверки «\";\n //Body = Body + Org + \"».\" + \" Осталось 2 дня до наступления даты исполнения по '\" + VidImpact + \"' от \" + message_format.format(DateRefFO) + \" №\" + OutNumRefFO;\n System.out.println(Body);\n\n\n System.out.println(\"===========\");\n System.out.println(\"RKKDate DateExecLimMeasure= \" + doc.getProperties().getDateTimeValue(\"DateExecLimMeasure\"));\n System.out.println(\"===========\");\n System.out.println(\"RKKDate DateExecLimMeasure= \" + doc.getProperties().getDateTimeValue(\"DateExecLimMeasure\"));\n Date RKKDate = doc.getProperties().getDateTimeValue(\"DateExecLimMeasure\");\n\n\n System.out.println(\"CURRENT DATE is \" + date);\n\n c.setTime(date);\n c.add(Calendar.DATE, +2);\n Date DublicateDate = c.getTime();\n System.out.println(\"DublicateDate is \" + DublicateDate);\n\n\n if (DublicateDate.getDate() == RKKDate.getDate() && DublicateDate.getMonth() == RKKDate.getMonth() && DublicateDate.getYear() == RKKDate.getYear()) {\n System.out.println(\"Current Date= \" + date);\n System.out.println(\"send notification\");\n\n\n String query2 = \"select * from NoticeInfo where SectorFinOrg = \" + \"'\" + SectorFinOrg + \"'\";\n // System.out.println(\"query2= \" + query2);\n SearchSQL sql2 = new SearchSQL(query2);\n SearchScope search2 = new SearchScope(store);\n DocumentSet documents = (DocumentSet) search2.fetchObjects(sql2, null, null, Boolean.valueOf(true));\n\n\n Iterator it2 = documents.iterator();\n Document doc2 = (Document) it2.next();\n System.out.println(\"DocumentTitle= \" + doc2.getProperties().getStringValue(\"DocumentTitle\"));\n System.out.println(\"\");\n EmailList = doc2.getProperties().getStringListValue(\"email\");\n Iterator it3 = EmailList.iterator();\n\n while (it3.hasNext()) {\n\n String email = (String) it3.next();\n System.out.println(\"email= \" + email);\n sendmail.SendMail(email, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n }\n\n\n // NOTIFICATION STAFF\n System.out.println(\"NOTIFICATION STAFF\");\n String query3 = \"select * from StaffInspectors where FinInspectDocId = \" + \"'\" + FinInspectDocId + \"'\" + \"and IsRuk= \" + \"'Руководитель'\" + \" and EndDate>\" + sdf.format(date);\n //String query3 = \"select * from StaffInspectors where FinInspectDocId = '{B59A6664-99EF-4C8C-BBF4-AB60718DBF6F}'\";\n System.out.println(\"query3=\" + query3);\n SearchSQL sql3 = new SearchSQL(query3);\n SearchScope search3 = new SearchScope(store);\n DocumentSet StaffInspectors = (DocumentSet) search3.fetchObjects(sql3, null, null, Boolean.valueOf(true));\n Iterator it4 = StaffInspectors.iterator();\n\n while (it4.hasNext()) {\n Document doc3 = (Document) it4.next();\n System.out.println(\"FIO= \" + doc3.getProperties().getStringValue(\"FIO\"));\n System.out.println(\"Email= \" + doc3.getProperties().getStringValue(\"EmailLotus\"));\n String email = doc3.getProperties().getStringValue(\"EmailLotus\");\n sendmail.SendMail(email, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n }\n\n System.out.println(\"Finished NOTIFICATION STAFF\");\n\n } else {\n System.out.println(\"no notification\");\n\n }\n\n }\n\n }\n\n return \"null\";\n }",
"public static NotificationPoint getNotificationPoint() {\n return NotificationPoint.create(\n self.usrProps.getProperty(NOTIFY_DISPLAY, \"Days\"),\n self.usrProps.getProperty(NOTIFY_TYPE, String.valueOf(Calendar.DAY_OF_YEAR)),\n self.usrProps.getProperty(NOTIFY_VALUE, \"1\")\n );\n }",
"public String Mail_2Days_Before(String objectStoreName, String Subject, String Body, String dominoServer, String dominoMailbox, String dominoUsername, String dominoPassword) throws VWException {\n Send_Notifications Send_Notif = new Send_Notifications();\n Send_Notif.log(\"\\tobjectStoreName: \" + objectStoreName);\n\n Date date = new Date();\n final String ISO_FORMAT = \"yyyyMMdd'T'HHmmss'Z'\";\n\n final SimpleDateFormat sdf = new SimpleDateFormat(ISO_FORMAT);\n System.out.println(sdf.format(date));\n System.out.println(\"SDF Format= \" + sdf.format(date));\n final TimeZone utc = TimeZone.getTimeZone(\"UTC\");\n sdf.setTimeZone(utc);\n\n\n Calendar c = Calendar.getInstance();\n c.setTime(date);\n c.add(Calendar.DATE, +1);\n final Date PastDate = c.getTime();\n System.out.println(\"PastDate= \" + PastDate);\n\n c.setTime(date);\n c.add(Calendar.DATE, +3);\n final Date FutureDate = c.getTime();\n System.out.println(\"FutureDate= \" + FutureDate);\n System.out.println(\"===========\");\n\n if (Send_Notif.init()) {\n Send_Notif.log(\"context initialized\");\n ObjectStore store = Factory.ObjectStore.fetchInstance(Send_Notif.getDomain(), objectStoreName, null);\n\n //NOTIFICATION DATE FORMAT\n String format = \"dd.MM.yyyy\";\n SimpleDateFormat message_format = new SimpleDateFormat(format);\n\n\n // String query = \"select * from FinInspect where DateSubmPlan>\" + sdf.format(date);\n String query = \"select * from FinInspect where DateSubmPlan> \" + sdf.format(PastDate) + \" and DateSubmPlan<\" + sdf.format(FutureDate);\n System.out.println(\"query= \" + query);\n\n\n SearchSQL sql = new SearchSQL(query);\n SearchScope search = new SearchScope(store);\n FolderSet folders = (FolderSet) search.fetchObjects(sql, null, null, Boolean.valueOf(true));\n Iterator it = folders.iterator();\n\n while (it.hasNext()) {\n Folder folder = (Folder) it.next();\n String SectorFinOrg = folder.getProperties().getStringValue(\"SectorFinOrg\");\n // System.out.println(\"SectorFinOrg= \" + SectorFinOrg);\n\n\n //MESSAGE TEXT\n Id FinInspectDocId = folder.get_Id();\n String Org = folder.getProperties().getStringValue(\"Org\");\n //Subject = \"Уведомление по плану мероприятий\";\n Subject = \"ВНИМАНИЕ! Касательно проверки «\";\n Subject = Subject + Org + \"».\" + \" Осталось 2 дня до наступления даты предоставления Плана мероприятий.\";\n Body = \"\";\n //Body = \"ВНИМАНИЕ! Касательно проверки «\";\n //Body = Body + Org + \"».\" + \" Осталось 2 дня до наступления даты предоставления Плана мероприятий.\";\n System.out.println(Body);\n\n\n System.out.println(\"===========\");\n System.out.println(\"RKKDate DateRefItogFO= \" + folder.getProperties().getDateTimeValue(\"DateSubmPlan\"));\n System.out.println(\"===========\");\n System.out.println(\"RKKDate DateRefItogFO= \" + folder.getProperties().getDateTimeValue(\"DateSubmPlan\"));\n Date RKKDate = folder.getProperties().getDateTimeValue(\"DateSubmPlan\");\n\n\n System.out.println(\"CURRENT DATE is \" + date);\n\n c.setTime(date);\n c.add(Calendar.DATE, +2);\n Date DublicateDate = c.getTime();\n System.out.println(\"DublicateDate is \" + DublicateDate);\n\n\n if (DublicateDate.getDate() == RKKDate.getDate() && DublicateDate.getMonth() == RKKDate.getMonth() && DublicateDate.getYear() == RKKDate.getYear()) {\n System.out.println(\"send notification\");\n\n\n String query2 = \"select * from NoticeInfo where SectorFinOrg = \" + \"'\" + SectorFinOrg + \"'\";\n System.out.println(\"query2= \" + query2);\n\n SearchSQL sql2 = new SearchSQL(query2);\n SearchScope search2 = new SearchScope(store);\n DocumentSet documents = (DocumentSet) search2.fetchObjects(sql2, null, null, Boolean.valueOf(true));\n\n\n Iterator it2 = documents.iterator();\n Document doc2 = (Document) it2.next();\n System.out.println(\"DocumentTitle= \" + doc2.getProperties().getStringValue(\"DocumentTitle\"));\n EmailList = doc2.getProperties().getStringListValue(\"email\");\n Iterator it3 = EmailList.iterator();\n\n while (it3.hasNext()) {\n\n String email = (String) it3.next();\n System.out.println(\"email= \" + email);\n\n\n sendmail.SendMail(email, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n// try {\n// lotus.domino.Session dominoSession = lotus.domino.NotesFactory.createSession(dominoServer, dominoUsername, dominoPassword);\n// lotus.domino.Database dominoDb = dominoSession.getDatabase(dominoServer, dominoMailbox);\n// System.out.println(\"Connected as: \" + dominoSession.getUserName());\n//\n// lotus.domino.Document memo = dominoDb.createDocument();\n// memo.appendItemValue(\"Form\", \"Memo\");\n// memo.appendItemValue(\"Importance\", \"1\");\n// memo.appendItemValue(\"Subject\", Subject);\n// memo.appendItemValue(\"Body\", Body);\n// memo.send(false, email + \"/BSBNB@bsbnb\");\n//\n//\n// dominoDb.recycle();\n// dominoSession.recycle();\n// } catch (NotesException e) {\n// System.out.println(\"Error - \" + e.id + \" \" + e.text);\n//\n// } catch (Exception e) {\n// System.out.println(\"Error - \" + e.toString());\n//\n// }\n\n }\n\n\n // NOTIFICATION STAFF\n String query3 = \"select * from StaffInspectors where FinInspectDocId = \" + \"'\" + FinInspectDocId + \"'\" + \"and IsRuk= \" + \"'Руководитель'\" + \" and EndDate>\" + sdf.format(date);\n //String query3 = \"select * from StaffInspectors where FinInspectDocId = '{B59A6664-99EF-4C8C-BBF4-AB60718DBF6F}'\";\n System.out.println(\"query3=\" + query3);\n SearchSQL sql3 = new SearchSQL(query3);\n SearchScope search3 = new SearchScope(store);\n DocumentSet StaffInspectors = (DocumentSet) search3.fetchObjects(sql3, null, null, Boolean.valueOf(true));\n Iterator it4 = StaffInspectors.iterator();\n System.out.println(\"NOTIFICATION STAFF\");\n while (it4.hasNext()) {\n Document doc3 = (Document) it4.next();\n System.out.println(\"FIO= \" + doc3.getProperties().getStringValue(\"FIO\"));\n System.out.println(\"Email= \" + doc3.getProperties().getStringValue(\"EmailLotus\"));\n String EmailStaff = doc3.getProperties().getStringValue(\"EmailLotus\");\n sendmail.SendMail(EmailStaff, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n }\n System.out.println(\"Finished NOTIFICATION STAFF\");\n\n } else {\n System.out.println(\"no notification\");\n\n }\n\n\n }\n }\n\n return \"null\";\n }",
"public String Before_1day_FO(String objectStoreName, String Subject, String Body, String dominoServer, String dominoMailbox, String dominoUsername, String dominoPassword) throws VWException {\n Send_Notifications Send_Notif = new Send_Notifications();\n Send_Notif.log(\"\\tobjectStoreName: \" + objectStoreName);\n\n Date date = new Date();\n final String ISO_FORMAT = \"yyyyMMdd'T'HHmmss'Z'\";\n\n final SimpleDateFormat sdf = new SimpleDateFormat(ISO_FORMAT);\n System.out.println(\"SDF Format= \" + sdf.format(date));\n final TimeZone utc = TimeZone.getTimeZone(\"UTC\");\n sdf.setTimeZone(utc);\n\n Calendar c = Calendar.getInstance();\n c.setTime(date);\n c.add(Calendar.DATE, 0);\n Date PastDate = c.getTime();\n System.out.println(\"PastDate= \" + PastDate);\n\n c.setTime(date);\n c.add(Calendar.DATE, +2);\n Date FutureDate = c.getTime();\n System.out.println(\"FutureDate= \" + FutureDate);\n System.out.println(\"===========\");\n\n if (Send_Notif.init()) {\n Send_Notif.log(\"context initialized\");\n ObjectStore store = Factory.ObjectStore.fetchInstance(Send_Notif.getDomain(), objectStoreName, null);\n\n //NOTIFICATION DATE FORMAT\n String format = \"dd.MM.yyyy\";\n SimpleDateFormat message_format = new SimpleDateFormat(format);\n\n\n String query = \"select * from PlanInspect where DatePreparation> \" + sdf.format(PastDate) + \" and DatePreparation<\" + sdf.format(FutureDate);\n System.out.println(\"query= \" + query);\n SearchSQL sql = new SearchSQL(query);\n SearchScope search = new SearchScope(store);\n DocumentSet Docs = (DocumentSet) search.fetchObjects(sql, null, null, Boolean.valueOf(true));\n Iterator it = Docs.iterator();\n\n\n while (it.hasNext()) {\n\n Document doc = (Document) it.next();\n String FinInspectDocId = doc.getProperties().getStringValue(\"FinInspectDocId\");\n System.out.println(\"FinInspectDocId= \" + FinInspectDocId);\n System.out.println(\"FinInspectDocId= \" + FinInspectDocId);\n String FinIdQuery = \"select * from FinInspect where ID=\" + \"'\" + FinInspectDocId + \"'\";\n SearchSQL sqlFinId = new SearchSQL(FinIdQuery);\n SearchScope searchFinId = new SearchScope(store);\n FolderSet folders = (FolderSet) searchFinId.fetchObjects(sqlFinId, null, null, Boolean.valueOf(true));\n\n Iterator iterator = folders.iterator();\n Folder folder = (Folder) iterator.next();\n System.out.println(\"title=\" + folder.get_FolderName());\n System.out.println(\"title=\" + folder.get_FolderName());\n String SectorFinOrg = folder.getProperties().getStringValue(\"SectorFinOrg\");\n\n\n //MESSAGE TEXT\n String Org = folder.getProperties().getStringValue(\"Org\");\n String NameRazdel = doc.getProperties().getStringValue(\"NameRazdel\");\n //Subject = \"Уведомление по работам указанным в программе проверки деятельности ФО \";\n Subject = \"ВНИМАНИЕ! Касательно проверки «\";\n Subject = Subject + Org + \"».\" + \" Остался 1 день до контрольного срока по отчету «\" + NameRazdel + \"».\";\n //Body = \"ВНИМАНИЕ! Касательно проверки «\";\n //Body = Body + Org + \"».\" + \" Остался 1 день до контрольного срока по отчету «\" + NameRazdel + \"».\";\n System.out.println(Body);\n\n\n System.out.println(\"===========\");\n System.out.println(\"RKKDate DatePreparation= \" + doc.getProperties().getDateTimeValue(\"DatePreparation\"));\n Date RKKDate = doc.getProperties().getDateTimeValue(\"DatePreparation\");\n\n System.out.println(\"CURRENT DATE is \" + date);\n c.setTime(date);\n c.add(Calendar.DATE, +1);\n Date DublicateDate = c.getTime();\n System.out.println(\"DublicateDate is \" + DublicateDate);\n\n if (DublicateDate.getDate() == RKKDate.getDate() && DublicateDate.getMonth() == RKKDate.getMonth() && DublicateDate.getYear() == RKKDate.getYear()) {\n System.out.println(\"send notification\");\n\n String query2 = \"select * from NoticeInfo where SectorFinOrg = \" + \"'\" + SectorFinOrg + \"'\";\n System.out.println(\"query2= \" + query2);\n SearchSQL sql2 = new SearchSQL(query2);\n SearchScope search2 = new SearchScope(store);\n DocumentSet documents = (DocumentSet) search2.fetchObjects(sql2, null, null, Boolean.valueOf(true));\n\n\n Iterator it2 = documents.iterator();\n Document doc2 = (Document) it2.next();\n System.out.println(\"DocumentTitle= \" + doc2.getProperties().getStringValue(\"DocumentTitle\"));\n\n EmailList = doc2.getProperties().getStringListValue(\"email\");\n Iterator it3 = EmailList.iterator();\n\n while (it3.hasNext()) {\n\n String email = (String) it3.next();\n System.out.println(\"email= \" + email);\n sendmail.SendMail(email, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n\n }\n\n\n // NOTIFICATION STAFF\n System.out.println(\"NOTIFICATION STAFF\");\n String query3 = \"select * from StaffInspectors where FinInspectDocId = \" + \"'\" + FinInspectDocId + \"'\" + \"and IsRuk= \" + \"'Руководитель'\" + \" and EndDate>\" + sdf.format(date);\n //String query3 = \"select * from StaffInspectors where FinInspectDocId = '{B59A6664-99EF-4C8C-BBF4-AB60718DBF6F}'\";\n System.out.println(\"query3=\" + query3);\n SearchSQL sql3 = new SearchSQL(query3);\n SearchScope search3 = new SearchScope(store);\n DocumentSet StaffInspectors = (DocumentSet) search3.fetchObjects(sql3, null, null, Boolean.valueOf(true));\n Iterator it4 = StaffInspectors.iterator();\n\n while (it4.hasNext()) {\n Document doc3 = (Document) it4.next();\n System.out.println(\"FIO= \" + doc3.getProperties().getStringValue(\"FIO\"));\n System.out.println(\"Email= \" + doc3.getProperties().getStringValue(\"EmailLotus\"));\n String email = doc3.getProperties().getStringValue(\"EmailLotus\");\n sendmail.SendMail(email, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n }\n\n System.out.println(\"Finished NOTIFICATION STAFF\");\n } else {\n System.out.println(\"no notification\");\n\n }\n }\n\n }\n\n return \"null\";\n }",
"static Date calculateNextNotificationDate(Date now, Date sentDate, List<Integer> remindSteps) {\n Calendar sentCal = Calendar.getInstance();\n sentCal.setTime(sentDate);\n for (int dayOffset : remindSteps) {\n sentCal.add(Calendar.DAY_OF_YEAR, dayOffset);\n if (sentCal.getTime().compareTo(now) > 0) {\n return sentCal.getTime();\n }\n }\n return null;\n }",
"public String Mail_1_DayBefore(String objectStoreName, String Subject, String Body, String dominoServer, String dominoMailbox, String dominoUsername, String dominoPassword) throws VWException {\n\n Send_Notifications Send_Notif = new Send_Notifications();\n Send_Notif.log(\"\\tobjectStoreName: \" + objectStoreName);\n\n Date date = new Date();\n final String ISO_FORMAT = \"yyyyMMdd'T'HHmmss'Z'\";\n\n final SimpleDateFormat sdf = new SimpleDateFormat(ISO_FORMAT);\n final TimeZone utc = TimeZone.getTimeZone(\"UTC\");\n sdf.setTimeZone(utc);\n System.out.println(sdf.format(date));\n System.out.println(\"SDF Format= \" + sdf.format(date));\n\n\n Calendar c = Calendar.getInstance();\n c.setTime(date);\n c.add(Calendar.DATE, 0);\n final Date PastDate = c.getTime();\n System.out.println(\"PastDate= \" + PastDate);\n\n c.setTime(date);\n c.add(Calendar.DATE, +2);\n final Date FutureDate = c.getTime();\n System.out.println(\"FutureDate= \" + FutureDate);\n System.out.println(\"===========\");\n\n if (Send_Notif.init()) {\n Send_Notif.log(\"context initialized\");\n ObjectStore store = Factory.ObjectStore.fetchInstance(Send_Notif.getDomain(), objectStoreName, null);\n\n //NOTIFICATION DATE FORMAT\n String format = \"dd.MM.yyyy\";\n SimpleDateFormat message_format = new SimpleDateFormat(format);\n\n\n //String query = \"select * from FinInspect where DateRefItogFO>\" + sdf.format(date);\n String query = \"select * from FinInspect where DateRefItogFO> \" + sdf.format(PastDate) + \" and DateRefItogFO<\" + sdf.format(FutureDate);\n System.out.println(\"query= \" + query);\n System.out.println(\"query= \" + query);\n\n SearchSQL sql = new SearchSQL(query);\n SearchScope search = new SearchScope(store);\n FolderSet folders = (FolderSet) search.fetchObjects(sql, null, null, Boolean.valueOf(true));\n Iterator it = folders.iterator();\n\n while (it.hasNext()) {\n Folder folder = (Folder) it.next();\n String SectorFinOrg = folder.getProperties().getStringValue(\"SectorFinOrg\");\n // System.out.println(\"SectorFinOrg= \" + SectorFinOrg);\n\n\n //MESSAGE TEXT\n Id FinInspectDocId = folder.get_Id();\n String Org = folder.getProperties().getStringValue(\"Org\");\n // Subject = \"Уведомление по предоставлению возражений к Акту о результатах проверки\";\n Subject = \"ВНИМАНИЕ! Касательно проверки «\";\n Subject = Subject + Org + \"».\" + \" Остался 1 день до наступления даты предоставление возражений на Акт о результатах проверки.\";\n Body = \"\";\n// Body = \"ВНИМАНИЕ! Касательно проверки «\";\n// Body = Body + Org + \"».\" + \" Остался 1 день до наступления даты предоставление возражений на Акт о результатах проверки.\";\n System.out.println(Body);\n\n System.out.println(\"===========\");\n System.out.println(\"RKKDate DateRefItogFO= \" + folder.getProperties().getDateTimeValue(\"DateRefItogFO\"));\n Date RKKDate = folder.getProperties().getDateTimeValue(\"DateRefItogFO\");\n\n\n System.out.println(\"CURRENT DATE is \" + date);\n\n c.setTime(date);\n c.add(Calendar.DATE, +1);\n Date DublicateDate = c.getTime();\n System.out.println(\"DublicateDate is \" + DublicateDate);\n\n\n System.out.println(\"\");\n System.out.println(\"\");\n if (DublicateDate.getDate() == RKKDate.getDate() && DublicateDate.getMonth() == RKKDate.getMonth() && DublicateDate.getYear() == RKKDate.getYear()) {\n System.out.println(\"send notification\");\n\n String query2 = \"select * from NoticeInfo where SectorFinOrg = \" + \"'\" + SectorFinOrg + \"'\";\n System.out.println(\"query2= \" + query2);\n System.out.println(\"query2= \" + query2);\n\n SearchSQL sql2 = new SearchSQL(query2);\n SearchScope search2 = new SearchScope(store);\n DocumentSet documents = (DocumentSet) search2.fetchObjects(sql2, null, null, Boolean.valueOf(true));\n\n\n Iterator it2 = documents.iterator();\n Document doc2 = (Document) it2.next();\n System.out.println(\"DocumentTitle= \" + doc2.getProperties().getStringValue(\"DocumentTitle\"));\n System.out.println(\"DocumentTitle= \" + doc2.getProperties().getStringValue(\"DocumentTitle\"));\n EmailList = doc2.getProperties().getStringListValue(\"email\");\n Iterator it3 = EmailList.iterator();\n\n while (it3.hasNext()) {\n\n String email = (String) it3.next();\n System.out.println(\"email= \" + email);\n System.out.println(\"email= \" + email);\n\n sendmail.SendMail(email, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n// try {\n// lotus.domino.Session dominoSession = lotus.domino.NotesFactory.createSession(dominoServer, dominoUsername, dominoPassword);\n// lotus.domino.Database dominoDb = dominoSession.getDatabase(dominoServer, dominoMailbox);\n// System.out.println(\"Connected as: \" + dominoSession.getUserName());\n//\n// lotus.domino.Document memo = dominoDb.createDocument();\n// memo.appendItemValue(\"Form\", \"Memo\");\n// memo.appendItemValue(\"Importance\", \"1\");\n// memo.appendItemValue(\"Subject\", Subject);\n// memo.appendItemValue(\"Body\", Body);\n// memo.send(false, email + \"/BSBNB@bsbnb\");\n//\n//\n// dominoDb.recycle();\n// dominoSession.recycle();\n// } catch (NotesException e) {\n// System.out.println(\"Error - \" + e.id + \" \" + e.text);\n//\n// } catch (Exception e) {\n// System.out.println(\"Error - \" + e.toString());\n//\n// }\n\n\n }\n\n\n // NOTIFICATION STAFF\n String query3 = \"select * from StaffInspectors where FinInspectDocId = \" + \"'\" + FinInspectDocId + \"'\" + \"and IsRuk= \" + \"'Руководитель'\" + \" and EndDate>\" + sdf.format(date);\n //String query3 = \"select * from StaffInspectors where FinInspectDocId = '{B59A6664-99EF-4C8C-BBF4-AB60718DBF6F}'\";\n System.out.println(\"query3=\" + query3);\n SearchSQL sql3 = new SearchSQL(query3);\n SearchScope search3 = new SearchScope(store);\n DocumentSet StaffInspectors = (DocumentSet) search3.fetchObjects(sql3, null, null, Boolean.valueOf(true));\n Iterator it4 = StaffInspectors.iterator();\n System.out.println(\"NOTIFICATION STAFF\");\n while (it4.hasNext()) {\n Document doc3 = (Document) it4.next();\n System.out.println(\"FIO= \" + doc3.getProperties().getStringValue(\"FIO\"));\n System.out.println(\"Email= \" + doc3.getProperties().getStringValue(\"EmailLotus\"));\n String EmailStaff = doc3.getProperties().getStringValue(\"EmailLotus\");\n sendmail.SendMail(EmailStaff, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n }\n\n System.out.println(\"Finished NOTIFICATION STAFF\");\n\n\n } else {\n System.out.println(\"no notification\");\n }\n\n\n }\n\n\n }\n return \"null\";\n }",
"public String Select_1day_Before_EndDateInspect(String objectStoreName, String Subject, String Body, String dominoServer, String dominoMailbox, String dominoUsername, String dominoPassword) throws VWException {\n Send_Notifications Send_Notif = new Send_Notifications();\n Send_Notif.log(\"\\tobjectStoreName: \" + objectStoreName);\n\n\n Date date = new Date();\n final String ISO_FORMAT = \"yyyyMMdd'T'HHmmss'Z'\";\n\n final SimpleDateFormat sdf = new SimpleDateFormat(ISO_FORMAT);\n System.out.println(\"SDF Format= \" + sdf.format(date));\n final TimeZone utc = TimeZone.getTimeZone(\"UTC\");\n sdf.setTimeZone(utc);\n\n Calendar c = Calendar.getInstance();\n c.setTime(date);\n c.add(Calendar.DATE, 0);\n final Date PastDate = c.getTime();\n System.out.println(\"PastDate= \" + PastDate);\n\n c.setTime(date);\n c.add(Calendar.DATE, +2);\n final Date FutureDate = c.getTime();\n System.out.println(\"FutureDate= \" + FutureDate);\n\n if (Send_Notif.init()) {\n Send_Notif.log(\"context initialized\");\n ObjectStore store = Factory.ObjectStore.fetchInstance(Send_Notif.getDomain(), objectStoreName, null);\n\n //NOTIFICATION DATE FORMAT\n String format = \"dd.MM.yyyy\";\n SimpleDateFormat message_format = new SimpleDateFormat(format);\n\n\n String query = \"select * from FinInspect where EndDateInspect> \" + sdf.format(PastDate) + \" and EndDateInspect<\" + sdf.format(FutureDate);\n System.out.println(\"query= \" + query);\n System.out.println(\"query= \" + query);\n\n SearchSQL sql = new SearchSQL(query);\n SearchScope search = new SearchScope(store);\n FolderSet folders = (FolderSet) search.fetchObjects(sql, null, null, Boolean.valueOf(true));\n Iterator it = folders.iterator();\n\n while (it.hasNext()) {\n Folder folder = (Folder) it.next();\n String SectorFinOrg = folder.getProperties().getStringValue(\"SectorFinOrg\");\n // System.out.println(\"SectorFinOrg= \" + SectorFinOrg);\n\n\n //MESSAGE TEXT\n Id FinInspectDocId = folder.get_Id();\n String Org = folder.getProperties().getStringValue(\"Org\");\n //Subject = \"Уведомление об окончании проверки\";\n Subject = \"ВНИМАНИЕ! Касательно проверки «\";\n Subject = Subject + Org + \"».\" + \" Остался 1 день до наступления даты окончания проверки.\";\n Body = \"\";\n// Body = \"ВНИМАНИЕ! Касательно проверки «\";\n// Body = Body + Org + \"».\" + \" Остался 1 день до наступления даты окончания проверки.\";\n System.out.println(Body);\n\n System.out.println(\"===========\");\n System.out.println(\"RKKDate DateRefItogFO= \" + folder.getProperties().getDateTimeValue(\"EndDateInspect\"));\n System.out.println(\"===========\");\n System.out.println(\"RKKDate DateRefItogFO= \" + folder.getProperties().getDateTimeValue(\"EndDateInspect\"));\n Date RKKDate = folder.getProperties().getDateTimeValue(\"EndDateInspect\");\n\n\n System.out.println(\"CURRENT DATE is \" + date);\n\n c.setTime(date);\n c.add(Calendar.DATE, +1);\n Date DublicateDate = c.getTime();\n System.out.println(\"DublicateDate is \" + DublicateDate);\n\n\n if (DublicateDate.getDate() == RKKDate.getDate() && DublicateDate.getMonth() == RKKDate.getMonth() && DublicateDate.getYear() == RKKDate.getYear()) {\n System.out.println(\"send notification\");\n\n\n String query2 = \"select * from NoticeInfo where SectorFinOrg = \" + \"'\" + SectorFinOrg + \"'\";\n System.out.println(\"query2= \" + query2);\n\n\n SearchSQL sql2 = new SearchSQL(query2);\n SearchScope search2 = new SearchScope(store);\n DocumentSet documents = (DocumentSet) search2.fetchObjects(sql2, null, null, Boolean.valueOf(true));\n\n\n Iterator it2 = documents.iterator();\n Document doc2 = (Document) it2.next();\n System.out.println(\"DocumentTitle= \" + doc2.getProperties().getStringValue(\"DocumentTitle\"));\n\n EmailList = doc2.getProperties().getStringListValue(\"email\");\n Iterator it3 = EmailList.iterator();\n\n while (it3.hasNext()) {\n\n String email = (String) it3.next();\n System.out.println(\"email= \" + email);\n System.out.println(\"email= \" + email);\n\n sendmail.SendMail(email, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n\n }\n\n\n // NOTIFICATION STAFF\n String query3 = \"select * from StaffInspectors where FinInspectDocId = \" + \"'\" + FinInspectDocId + \"'\" + \"and IsRuk= \" + \"'Руководитель'\" + \" and EndDate>\" + sdf.format(date);\n //String query3 = \"select * from StaffInspectors where FinInspectDocId = '{B59A6664-99EF-4C8C-BBF4-AB60718DBF6F}'\";\n System.out.println(\"query3=\" + query3);\n SearchSQL sql3 = new SearchSQL(query3);\n SearchScope search3 = new SearchScope(store);\n DocumentSet StaffInspectors = (DocumentSet) search3.fetchObjects(sql3, null, null, Boolean.valueOf(true));\n Iterator it4 = StaffInspectors.iterator();\n\n System.out.println(\"NOTIFICATION STAFF\");\n while (it4.hasNext()) {\n Document doc3 = (Document) it4.next();\n System.out.println(\"FIO= \" + doc3.getProperties().getStringValue(\"FIO\"));\n System.out.println(\"Email= \" + doc3.getProperties().getStringValue(\"EmailLotus\"));\n String email = doc3.getProperties().getStringValue(\"EmailLotus\");\n sendmail.SendMail(email, Subject, Body, dominoServer, dominoMailbox, dominoUsername, dominoPassword);\n }\n System.out.println(\"Finished NOTIFICATION STAFF\");\n\n\n } else {\n System.out.println(\"no notification\");\n\n }\n }\n }\n return \"null\";\n }",
"public String getSummary(){\n float riskSum = getWeightedExposureSum();\n boolean isExposure = isExposure();\n String previousSummary = exposure.getSummary();\n if(isExposure == true){\n String summary = \"ExposureNotificationCalculator: [Exposure: yes (Weighted Exposure Sum = \"+riskSum+\")]\";\n return summary + \"\\n\" + previousSummary;\n } else {\n String summary = \"ExposureNotificationCalculator: [Exposure: no (Weighted Exposure Sum = \"+riskSum+\")]\";\n return summary + \"\\n\" + previousSummary;\n }\n }",
"public int getNotificationBlackoutDaysFromEnd() {\n return notificationBlackoutDaysFromEnd;\n }",
"public static int getJSNotification()\n\t{\n\t\tString logging = EquationCommonContext.getConfigProperty(\"eq.js.notification\");\n\t\treturn Toolbox.parseInt(logging, 10);\n\t}",
"private void retrieveNotification() { =====================================================\n // Creating Notification Model\n // =====================================================\n\n// Bitmap patientAvatar1 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_18);\n// Bitmap patientAvatar2 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_19);\n// Bitmap patientAvatar3 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_20);\n//\n// Patient patient1 = new Patient(\"Garry\", \"Reese\", \"123AB456\", patientAvatar1);\n// Patient patient2 = new Patient(\"Lillian\", \"Wade\", \"987CD654\", patientAvatar2);\n// Patient patient3 = new Patient(\"Laura\", \"Freeman\", \"AV12G64\", patientAvatar3);\n//\n// Bitmap caregiverAvatar1 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_01);\n// Bitmap caregiverAvatar2 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_02);\n// Bitmap caregiverAvatar3 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_03);\n// Bitmap caregiverAvatar4 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_04);\n// Bitmap caregiverAvatar5 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_05);\n//\n// DateTime date1 = DateTime.now();\n// DateTime date2 = DateTime.now().minusDays(2).minusHours(2);\n// DateTime date3 = DateTime.now().minusDays(5).plusHours(1);\n// DateTime date4 = DateTime.now().minusDays(4).minusHours(2);\n// DateTime date5 = DateTime.now().minusDays(1).plusHours(1);\n// DateTime date6 = DateTime.now().minusDays(3).plusHours(5);\n//\n// String caregiverName1 = \"John Doe\";\n// String caregiverName2 = \"Jane Doe\";\n// String caregiverName3 = \"Tracy Lee\";\n// String caregiverName4 = \"Apple Tan\";\n// String caregiverName5 = \"Bethany Mandler\";\n//\n// String summary1 = \"Updated information of patient Garry Reese\";\n// String summary2 = \"Log new problem for patient Lilian Wade\";\n// String summary3 = \"Create new patient Laura Freeman\";\n// String summary4 = \"Recommended the game category memory to patient Garry Reese\";\n// String summary5 = \"Updated the milk allergy of patient Lillian Wade\";\n// String summary6 = \"Log new problem for patient Garry Reese\";\n//\n// Notification notification1 = new Notification(date1, caregiverName1, caregiverAvatar1, summary1, patient1, Notification.STATUS_NONE, Notification.TYPE_UPDATE_INFO_FIELD);\n// Notification notification2 = new Notification(date2, caregiverName2, caregiverAvatar2, summary2, patient2, Notification.STATUS_NONE, Notification.TYPE_NEW_INFO_OBJECT);\n// Notification notification3 = new Notification(date3, caregiverName3, caregiverAvatar3, summary3, patient3, Notification.STATUS_NONE, Notification.TYPE_NEW_PATIENT);\n// Notification notification4 = new Notification(date4, caregiverName4, caregiverAvatar4, summary4, patient1, Notification.STATUS_NONE, Notification.TYPE_GAME_RECOMMENDATION);\n// Notification notification5 = new Notification(date5, caregiverName5, caregiverAvatar5, summary5, patient2, Notification.STATUS_NONE, Notification.TYPE_UPDATE_INFO_OBJECT);\n// Notification notification6 = new Notification(date6, caregiverName3, caregiverAvatar3, summary6, patient1, Notification.STATUS_NONE, Notification.TYPE_NEW_INFO_OBJECT);\n//\n ArrayList<Notification> notificationList = new ArrayList<>();\n//// notificationList.add(notification1);\n//// notificationList.add(notification2);\n//// notificationList.add(notification3);\n//// notificationList.add(notification4);\n//// notificationList.add(notification5);\n//// notificationList.add(notification6);\n\n dbfile db = new dbfile();\n notificationList = db.prepareNotificationList(getApplicationContext());\n Log.v(\"WHY LIKE THAT\", String.valueOf(notificationList.size()));\n // =====================================================\n // Building the Notification Group based on the notification\n // =====================================================\n\n HashMap patientAndNotificationGroupMap = new HashMap();\n\n for(Notification notification:notificationList) {\n Patient currentPatient = notification.getAffectedPatient();\n String patientNric = currentPatient.getNric();\n\n if (patientAndNotificationGroupMap.containsKey(patientNric)) {\n NotificationGroup notifGroup = (NotificationGroup) patientAndNotificationGroupMap.get(patientNric);\n if(notification.getStatus() == Notification.STATUS_NONE) {\n notifGroup.getUnprocessedNotif().add(notification);\n } else {\n notifGroup.getProcessedNotif().add(notification);\n }\n } else {\n NotificationGroup newNotifGroup = new NotificationGroup();\n newNotifGroup.setAffectedPatient(currentPatient);\n if(notification.getStatus() == Notification.STATUS_NONE) {\n newNotifGroup.getUnprocessedNotif().add(notification);\n } else {\n newNotifGroup.getProcessedNotif().add(notification);\n }\n patientAndNotificationGroupMap.put(patientNric, newNotifGroup);\n }\n }\n\n ArrayList<NotificationGroup> notificationGroupList = new ArrayList<>();\n NotificationComparator comparator = new NotificationComparator();\n for (Object obj : patientAndNotificationGroupMap.values()) {\n NotificationGroup notificationGroup = (NotificationGroup) obj;\n\n // Set notification status\n UtilsUi.setNotificationGroupStatus(this, notificationGroup);\n\n // Sort the notifications by date\n Collections.sort(notificationGroup.getProcessedNotif(), comparator);\n Collections.sort(notificationGroup.getUnprocessedNotif(), comparator);\n\n // Set the summary\n UtilsUi.setNotificationGroupSummary(this, notificationGroup);\n\n notificationGroupList.add(notificationGroup);\n }\n\n DataHolder.setNotificationGroupList(notificationGroupList);\n }",
"double rs2_get_notification_timestamp(PointerByReference notification, PointerByReference error);",
"public int getNotificationBlackoutDaysFromStart() {\n return notificationBlackoutDaysFromStart;\n }",
"int getNoClaimDays();",
"private long calculateNextNotificationDate(int wateringFrequency, int lastWatering) {\n // The time of the plant adding, if the plant has been watered many days ago and it should\n // have been watered by now, return now.\n Calendar rightNow = Calendar.getInstance(); //current date and time\n\n // The plant has been watered some days ago, but it should be watered in the future\n if(lastWatering < wateringFrequency) {\n rightNow.add(Calendar.DAY_OF_WEEK, wateringFrequency - lastWatering); //CORRECT\n //rightNow.add(Calendar.MINUTE, wateringFrequency-lastWatering); //TESTING\n\n // The watered has been watered now, so it should be watered after (watering frequency) days\n } else if (lastWatering == 0) {\n rightNow.add(Calendar.DAY_OF_WEEK, wateringFrequency); //CORRECT\n //rightNow.add(Calendar.MINUTE, wateringFrequency); //TESTING\n }\n\n return rightNow.getTimeInMillis();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convert a term into words (separated by ASCII space only) | public static ArrayList<String> ToWordListBySpace(String inTerm)
{
// tokenize words
StringTokenizer buf = new StringTokenizer(inTerm.trim(), " ");
ArrayList<String> wordList = new ArrayList<String>();
while(buf.hasMoreTokens() == true)
{
wordList.add(buf.nextToken());
}
return wordList;
} | [
"public String normalize(String word);",
"public String[] separateWords() {\n //Separates the words into an array.\n String[] separatedWords = tokenizer.tokenize(phrase);\n //But that's not all! We need to remove capital letters and punctuation!\n //That's what this loop is for.\n int length = separatedWords.length;\n for (int i = 0; i < length; i++) {\n String currentWord = separatedWords[i];\n //This is the operation that actually formats the word:\n String cleanedWord = currentWord.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n separatedWords[i] = cleanedWord;\n }\n return separatedWords;\n }",
"Collection<String> cutSentenceToWord(StringBuffer unCheckedString);",
"java.lang.String getWord();",
"public Vector wordSplit() throws IOException {\n Vector letters = new Vector();\n Letter tempLetter;\n String tString,tStringNext;\n\n for (int i = 0; i < tWord.length(); i++) {\n tString = tWord.substring(i, i+1);\n if(i<tWord.length()-1)\n tStringNext = tWord.substring(i+1, i+2);\n else\n tStringNext=\"\";\n\n if(tStringNext.equals(\"\\u0BBE\") || tStringNext.equals(\"\\u0BCD\") || tStringNext.equals(\"\\u0BBF\") || tStringNext.equals(\"\\u0BC0\") || tStringNext.equals(\"\\u0BC1\") || tStringNext.equals(\"\\u0BC2\") || tStringNext.equals(\"\\u0BC6\") || tStringNext.equals(\"\\u0BC7\") || tStringNext.equals(\"\\u0BC8\") || tStringNext.equals(\"\\u0BCA\") ||\ntStringNext.equals(\"\\u0BCB\") || tStringNext.equals(\"\\u0BCC\") || tStringNext.equals(\"\\u0BD7\") || tStringNext.equals(\"\\u0BD7\") ){\n\n\n tString = tString + tStringNext;\n i++;\n }\n tempLetter = chars.findLetter(new Letter(tString, \"-\",\"-\",0,0));\n letters.add(tempLetter);\n }\n return letters;\n }",
"private String word() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (true) {\n\t\t\tif (currentIndex >= input.length || input[currentIndex] == ' ')\n\t\t\t\tbreak;\n\t\t\tsb.append(input[currentIndex]);\n\t\t\tcurrentIndex++;\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }",
"public void getWordList() {\n\t\ttextAsTokens = Arrays.asList(text.split(\"((?<=\\\\s+)|(?=\\\\s+)|(?<=[\\\\p{Punct}&&[^']])|(?=[\\\\p{Punct}&&[^']]))\"));\n\t}",
"String getStringTerm2();",
"List<String> tokenize1(String doc) \n {\n List<String> res = new ArrayList<String>();\n Pattern p = Pattern.compile(\"[^a-z0-9 ]\", Pattern.CASE_INSENSITIVE);\n TokenizerFactory<Word> factory = PTBTokenizerFactory.newTokenizerFactory();\n Tokenizer<Word> tokenizer = factory.getTokenizer(new StringReader(doc));\n List<Word> words = tokenizer.tokenize();\n for(Word word:words)\n {\n if(DocumentVectorCache.getInstance().getStopWords().contains(word.word()))\n continue;\n if((p.matcher(word.word()).find()))\n continue;\n res.add(StanfordLemmatizer.stemWord(word.word().toLowerCase()));\n }\n return res;\n }",
"public static Tokenizer forWord(){\n return word;\n }",
"private static String splitWords(String str) {\n if (str.isEmpty()) {\n return \"\";\n }\n\n final StringBuilder result = new StringBuilder();\n int tokenStart = 0;\n int currentType = Character.getType(str.charAt(tokenStart));\n\n for (int pos = tokenStart + 1; pos < str.length(); pos++) {\n final char c = str.charAt(pos);\n final int type = Character.getType(c);\n if (type == currentType) {\n continue;\n }\n if (type == Character.LOWERCASE_LETTER && currentType == Character.UPPERCASE_LETTER) {\n final int newTokenStart = pos - 1;\n if (newTokenStart != tokenStart) {\n addLowerCaseStringToBuilder(result, str, tokenStart, newTokenStart - tokenStart);\n result.append(' ');\n tokenStart = newTokenStart;\n }\n } else {\n // Skip character groupings that are delimiters. We just want letters and numbers.\n if (Character.isLetterOrDigit(str.charAt(pos - 1))) {\n addLowerCaseStringToBuilder(result, str, tokenStart, pos - tokenStart);\n result.append(' ');\n }\n tokenStart = pos;\n }\n currentType = type;\n }\n\n if (Character.isLetterOrDigit(str.charAt(tokenStart))) {\n // Add the last segment if it's a letter or number.\n addLowerCaseStringToBuilder(result, str, tokenStart, str.length() - tokenStart);\n } else {\n // Since the last segment is ignored, remove the trailing space.\n result.setLength(result.length() - 1);\n }\n\n return result.toString();\n }",
"String getWordChars(Position pos);",
"EObject getWORD();",
"List<String> MyTokenizerAux2(String doc) {\n\t List<String> res = new ArrayList<String>();\n\t \n\t for (String s: doc.split(\"[\\\\p{Punct}\\\\s]+\"))\n\t res.add(s.toLowerCase());\n\t return res;\n\t }",
"protected String stem(String term)\n\t{\n\t\tStemmer stemmer = new Stemmer(); //We create a new stemmer\n\t\tSystem.out.println(\"Word before char array: \" + term);\n\n\t\tfor (int i = 0; i<term.length(); i++) {\n\t\t\tstemmer.add(term.charAt(i)); //We add all the characters of the word into the stemmer\n\t\t\tSystem.out.println(\"Letter added to stem: \" + term.charAt(i));\n\t\t}\n\t\tstemmer.stem(); //We stem the word\n\t\tchar[] stemmed_word = stemmer.getResultBuffer(); //We get the result of the stemmed word but with null characters\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tString word = \"\";\n\n\t\tfor (int i = 0; i<stemmed_word.length; i++)\n\t\t{\n\t\t\tif (stemmed_word[i] != '\\0') //We check if the character is null -> we don't put it in the buffer\n\t\t\t{\n\t\t\t\tbuilder.append(stemmed_word[i]); //If its not null we put it in the buffer\n\t\t\t}\n\t\t}\n\t\tword = builder.toString(); //We store our word without null characters into the variable word\n\t\treturn word; //Finnally we return the word stemmed\n\t}",
"String stemOf (String word);",
"List<String> MyTokenizer1(String doc) {\n List<String> res = new ArrayList<String>();\n \n for (String s: doc.split(\"[\\\\p{Punct}\\\\s]+\"))\n \n if(!StopWords.contains(s.toLowerCase()))\n {\n res.add(s.toLowerCase());}\n return res;\n }",
"private String buildTerm( final String term ) {\n String _term = term;\n _term = _term.replaceAll( \"\\\\[\",\n \"\\\\\\\\[\" );\n _term = _term.replaceAll( \"\\\\]\",\n \"\\\\\\\\]\" );\n return _term;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the text is completely empty (and cursor is at line 1). | public boolean isEmpty() {
return cursor==-1 && lines.isEmpty();
} | [
"public boolean empty(){\n return(workspace.getText().length() == 0);\n }",
"private boolean isEmptyContent() {\n\t\tchar c = data[currentIndex];\n\t\tif(c == ' ' || c == '\\t') {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean isConsiderEmptyText() {\n return considerEmptyText;\n }",
"private boolean isEmpty(TextView etText) {\n return etText.getText().toString().trim().length() <= 0;\n }",
"private boolean isBlank() {\n\t\tchar currentChar = data[index];\n\t\tif (currentChar == '\\r' || currentChar == '\\n' || currentChar == '\\t' || currentChar == ' ') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isEmpty(){return getText().equals(\"\"); }",
"private boolean isBlank(String line) {\n return line.trim().length() == 0;\n }",
"public boolean isFullyParsed() {\r\n return textIndex == getTextLength();\r\n }",
"public boolean endOfText () {\n if (index >= blockIn.length()) {\n blockEnded = true;\n textEnded = true;\n }\n return textEnded;\n }",
"public static boolean isEmpty (TextFragment textFragment) {\r\n \t\treturn (textFragment == null || (textFragment != null && textFragment.isEmpty()));\r\n \t}",
"protected boolean isEmpty(String text) {\r\n if (text == null) {\r\n return true;\r\n }\r\n\r\n if (text.trim().length() == 0) {\r\n return true;\r\n }\r\n return false;\r\n }",
"@Override\n\tpublic boolean isEmpty() {\n\t\treturn (getSelection() == null);\n\t}",
"public boolean isEmpty(String line){\n char[] lineChars = line.toCharArray();\n if(lineChars.length == 0){return true;}\n\n boolean lineIsEmpty = true;\n for (char c : lineChars){\n if (!Character.isWhitespace(c)){\n return false;\n }\n }\n return lineIsEmpty;\n }",
"public boolean isTextTruncated() {\n for (int i = 0; i < fragments.size(); i++) {\n if (((TextFragmentBox) fragments.get(i)).isTruncated())\n return true;\n }\n return false;\n }",
"public boolean isBlanked() {\n return (modifiers & BLANKED_MASK) != 0;\n }",
"public boolean isEmpty()\r\n {\r\n return getCharacters().isEmpty();\r\n }",
"public boolean isText() {\n return nItems() == 1 && isText(at(0));\n }",
"public boolean isEmpty() {\n\n return top == ' ';\n }",
"public boolean isEmpty() {\n return top == ' ';\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Logical Not Operation Call Exp CS'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseLogicalNotOperationCallExpCS(LogicalNotOperationCallExpCS object) {
return null;
} | [
"public T caseLogicalOrOperationCallExpCS(LogicalOrOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseLogicalAndOperationCallExpCS(LogicalAndOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseLogicalImpliesOperationCallExpCS(LogicalImpliesOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseLogicalXorOperationCallExpCS(LogicalXorOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseOperationCallBinaryExpCS(OperationCallBinaryExpCS object) {\r\n return null;\r\n }",
"public T caseUnaryOperationCallExpCS(UnaryOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseOperationCallExpCS(OperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseOperationCallOnSelfExpCS(OperationCallOnSelfExpCS object) {\r\n return null;\r\n }",
"public T caseStaticOperationCallExpCS(StaticOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseRelationalOperationCallExpCS(RelationalOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseOperation_NotUnary(Operation_NotUnary object)\r\n {\r\n return null;\r\n }",
"public T caseMultOperationCallExpCS(MultOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseOperationCallBaseExpCS(OperationCallBaseExpCS object) {\r\n return null;\r\n }",
"public T caseCallExpCS(CallExpCS object) {\r\n return null;\r\n }",
"public T caseEqualityOperationCallExpCS(EqualityOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseImplicitOperationCallCS(ImplicitOperationCallCS object) {\r\n return null;\r\n }",
"public T caseOperationCallWithSourceExpCS(OperationCallWithSourceExpCS object) {\r\n return null;\r\n }",
"public T caseIfExpCS(IfExpCS object) {\r\n return null;\r\n }",
"public T caseAdditiveOperationCallExpCS(AdditiveOperationCallExpCS object) {\r\n return null;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'var292' field. | public java.lang.Double getVar292() {
return var292;
} | [
"public java.lang.Double getVar292() {\n return var292;\n }",
"public java.lang.CharSequence getVar234() {\n return var234;\n }",
"public java.lang.CharSequence getVar234() {\n return var234;\n }",
"public java.lang.CharSequence getVar233() {\n return var233;\n }",
"public java.lang.Integer getVar123() {\n return var123;\n }",
"public java.lang.Integer getVar123() {\n return var123;\n }",
"public java.lang.CharSequence getVar233() {\n return var233;\n }",
"public java.lang.CharSequence getVar296() {\n return var296;\n }",
"public java.lang.Integer getVar232() {\n return var232;\n }",
"public java.lang.Integer getVar294() {\n return var294;\n }",
"public java.lang.Integer getVar298() {\n return var298;\n }",
"public java.lang.CharSequence getVar296() {\n return var296;\n }",
"public java.lang.Integer getVar298() {\n return var298;\n }",
"public java.lang.Integer getVar294() {\n return var294;\n }",
"public java.lang.Integer getVar232() {\n return var232;\n }",
"public java.lang.CharSequence getVar243() {\n return var243;\n }",
"public java.lang.Integer getVar289() {\n return var289;\n }",
"public java.lang.CharSequence getVar243() {\n return var243;\n }",
"public java.lang.Integer getVar235() {\n return var235;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the fixture for this Connection Info test case. | protected void setFixture(ConnectionInfo fixture) {
this.fixture = fixture;
} | [
"protected ConnectionInfo getFixture() {\r\n\t\treturn fixture;\r\n\t}",
"protected void setFixture(DatabaseOptions fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(Endpoint fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(Meta fixture) {\r\n\t\tthis.fixture = fixture;\r\n\t}",
"protected void setFixture(Channel fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(final ICooker fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(PCNReference fixture) {\r\n\t\tthis.fixture = fixture;\r\n\t}",
"protected void setFixture(PayMachine fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(PropertyInstance fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(ApplicationConfig fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(Diary fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(Software fixture) {\r\n\t\tthis.fixture = fixture;\r\n\t}",
"protected void setFixture(IHeatSource fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(Map fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(StudyInstance fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(OpcDevice fixture)\n {\n this.fixture = fixture;\n }",
"protected void setFixture(GraphAsset fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"@Override\r\n\tprotected Connection getFixture() {\r\n\t\treturn (Connection)fixture;\r\n\t}",
"protected void setFixture(ProrSpecViewConfiguration fixture) {\n \t\tthis.fixture = fixture;\n \t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
XDialog() Create an XDialog | public XDialog(Frame owner)
{
super(owner );
} | [
"public abstract Dialog createDialog(DialogDescriptor descriptor);",
"public XDialog(Dialog owner)\r\n\t{\r\n\t\tsuper(owner );\r\n\t}",
"public void createAndShowDialog() {\n\t\tcreateDialog();\n\t\tgetSwingRenderer().showDialog(createdDialog, true);\n\t}",
"private DialogBox createDialogBox(String text) {\n\t DialogBox dialogBox = new DialogBox();\n\t return dialogBox;\n\t }",
"void showDialog();",
"private void createDialog(){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Are you sure?\").setPositiveButton(\"Yes\", dialogClickListener)\n .setNegativeButton(\"No\", dialogClickListener).show();\n }",
"Dialog getDialog () {\n dialog = createDialog ();\n okPressed = false;\n setValid ();\n startListening ();\n panel.addPropertyChangeListener (this);\n return dialog;\n }",
"public Dialog() {\n }",
"@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tsuper.onCreateDialog(id);\n\t\treturn visitor.instantiateDialog(id);\n\t}",
"private void initDialog() {\n dialog = new Dialog(context);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_custom_ok);\n }",
"public void createDialog() {\n new AlertDialog.Builder(getContext())\n .setPositiveButton(\"MORE!\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n createDialogAgain();\n }\n })\n .setNegativeButton(\"No thanks!\", null)\n .setMessage(\"This is a standard positive/negative AlertDialog. \" +\n \"Do you want another dialog?\")\n .show();\n }",
"private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}",
"private void buildDialog()\n {\n setMinimumSize( new Dimension( 640, 480 ) );\n\n final JComponent settingsPane = createSettingsPane();\n final JComponent ioPane = createIOPane();\n\n final JPanel contentPane = new JPanel( new GridBagLayout() );\n contentPane.add( settingsPane, //\n new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.NONE, new Insets( 2,\n 0, 2, 0 ), 0, 0 ) );\n\n contentPane.add( ioPane, //\n new GridBagConstraints( 1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH, GridBagConstraints.BOTH, new Insets( 2,\n 0, 2, 0 ), 0, 0 ) );\n\n final JButton closeButton = ToolUtils.createCloseButton();\n\n final JComponent buttonPane = SwingComponentUtils.createButtonPane( closeButton );\n\n SwingComponentUtils.setupDialogContentPane( this, contentPane, buttonPane );\n\n pack();\n }",
"JDialog createActionDialog(JFrame owner, String title, String message, ActionListener actionListener);",
"public FiltroGirosDialog() {\n \n }",
"public void crearDialogCargar() {\n\t\tdialogoCargar= new DialogoCargar(this);\n\t\tdialogoCargar.setVisible(true);\n\t\tactualizarListaPartidas();\n\t}",
"public AddLineDialog(){\n dialog = new TextInputDialog(\"walter\");\n vbox = new VBox();\n hbox = new HBox();\n label1 = new Label(\"Name: \");\n tx = new TextField();\n colorPickerCircle = new Circle();\n colorPicker = new ColorPicker();\n }",
"protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }",
"public JDialog createDialog() {\n\t\tForm editorForm = createEditorForm(false, false);\n\t\tDialogBuilder dialogBuilder = createDelegateDialogBuilder();\n\t\tdialogBuilder.setContentComponent(editorForm);\n\t\tdialogBuilder.setTitle(getEditorWindowTitle());\n\t\tdialogBuilder.setIconImage(getEditorWindowIconImage());\n\n\t\tList<Component> buttonBarControls = new ArrayList<Component>(createMostButtonBarControls(editorForm));\n\t\t{\n\t\t\tif (isDialogCancellable()) {\n\t\t\t\tList<JButton> okCancelButtons = dialogBuilder.createStandardOKCancelDialogButtons(getOKCaption(),\n\t\t\t\t\t\tgetCancelCaption());\n\t\t\t\tbuttonBarControls.addAll(okCancelButtons);\n\t\t\t} else {\n\t\t\t\tbuttonBarControls.add(dialogBuilder.createDialogClosingButton(getCloseCaption(), null));\n\t\t\t}\n\t\t\tdialogBuilder.setButtonBarControls(buttonBarControls);\n\t\t}\n\t\tfinal RenderedDialog dialog = dialogBuilder.createDialog();\n\t\tdialog.addWindowListener(new WindowAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\tinitializeDialogModifications();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\tfinalizeDialogModifications();\n\t\t\t\tdialog.removeWindowListener(this);\n\t\t\t}\n\n\t\t});\n\t\tcreatedDialog = dialog;\n\t\treturn dialog;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handler for when a transaction in the TableView is selected. Enables the "Delete Transaction" button when a transaction is selected. | @FXML
public void handleClickTransactionItem() {
deleteTransactionButton.setDisable(false);
} | [
"@FXML\n public void handleDelete() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete the transaction?\");\n Transaction selected = transactionTable.getSelectionModel().getSelectedItem();\n Optional<ButtonType> result = alert.showAndWait();\n if(result.isPresent() & result.get() == ButtonType.OK) {\n transactionTable.getItems().remove(selected);\n BudgetTracker.getInstance().getTransactions().remove(selected);\n }\n }",
"private void deleteTransaction() {\n Transaction transaction = getSelectedTransaction();\n if (transaction != null) {\n if (JOptionPane.showConfirmDialog(null, \"Permanently delete transaction?\", \"Warning\", JOptionPane.WARNING_MESSAGE,\n JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {\n config.deleteTransaction(transaction);\n update();\n mainFrame.updateOwnedPanel();\n }\n }\n }",
"@FXML private void handleDeleteButtonT2(){\n\t\tString tableName = \"Edging\";\n\t\tString idName = \"edgeId\";\n\t\tint selectedIndex = edgingTable.getSelectionModel().getSelectedIndex();\n \tif(selectedIndex >= 0) {\n \t\t\tint id = edgingTable.getItems().get(selectedIndex).idProperty().get();\n \t\t\tdeleteRow(tableName, idName, id);\n \t\t\tedgingTable.getItems().remove(selectedIndex);\n \t\t\tSystem.out.println(\"Index \" + selectedIndex + \": deleted\");\n \t}\n \telse{\n \t\tFxDialogs.showError(\"Warning: Edging Table Deletion\", \"Something Went Wrong With edging Table\");\n \t}\n\t}",
"@FXML private void handleDeleteButtonT1(){\n\t\tString tableName = \"Countertop\";\n\t\tString idName = \"ctId\";\n\t\tint selectedIndex = kitchenTable.getSelectionModel().getSelectedIndex();\n\t\tif(selectedIndex >= 0) {\n\t\t\tint id = kitchenTable.getItems().get(selectedIndex).idProperty().get();\n\t\t\tdeleteRow(tableName, idName, id);\n\t\t\tkitchenTable.getItems().remove(selectedIndex);\n\t\t\tSystem.out.println(\"Index \" + selectedIndex + \": deleted\");\n\t\t}\n\t\telse{\n\t\t\tFxDialogs.showError(\"Warning: Something Is Wrong With Selection\", \"Something Went Wrong With Countertop Table\");\n\t\t}\n\t}",
"public void onDeleteButtonClicked() {\n \t\n \tLog.v(TAG, \"Delete button clicked\");\n \t\n deleteTransactionEntry();\n finish();\n \n model.close();\n dbConn.close();\n \t\n }",
"@FXML\n private void confirmDelete() {\n if (customerTable.getSelectionModel().getSelectedItem() != null) {\n boolean del = AlertBox.choice(\"Confirmation\", \"About to delete!\", \"Are you sure you wish to delete the currently selected Customer?\");\n if (del) {\n int id = customerTable.getSelectionModel().getSelectedItem().getcolID();\n int index = customerTable.getSelectionModel().getSelectedIndex();\n customerTable.getSelectionModel().clearSelection(index);\n String delQuery = \"DELETE FROM Customers WHERE CustomerID = ?\";\n try (PreparedStatement stmt = db.getCon().prepareStatement(delQuery)) { //try-with-resources\n stmt.setInt(1, id);\n db.update(\"PRAGMA foreign_keys=ON\");\n stmt.executeUpdate();\n } catch (SQLException se) {\n AlertBox.error(\"Error Deleting\", \"SQL Error occurred while deleting this selection\", se);\n }\n loadCustomerData(2);\n refreshOtherModules();\n }\n } else {\n AlertBox.error(\"Error Selection\", \"Select A Customer Record!\");\n }\n }",
"@FXML\r\n private void deleteRowHandler(KeyEvent event) {\r\n if(event.getCode().equals(KeyCode.DELETE)){\r\n //Get the selected Trade to delete\r\n Trade selectedRow=tableView.getSelectionModel().getSelectedItem();\r\n // Delete Trade from Table View and because the observable feature\r\n // will also delete the trade from the list\r\n tableView.getItems().remove(selectedRow);\r\n }\r\n }",
"private void onDeletePressed(ActionEvent e) {\n deleteSelectedEntry();\n }",
"@FXML\n\t private void handleDeleteTask() {\n\t int selectedIndex = taskTable.getSelectionModel().getSelectedIndex();\n\n\t if (selectedIndex >= 0) {\n\t \t // Delete selected item\n\t taskTable.getItems().remove(selectedIndex);\n\t } else {\n\t \t // Alert user he has not selected a task to delete.\n\t Alert alert = new Alert(AlertType.WARNING);\n\t alert.initOwner(mainApp.getPrimaryStage());\n\t \n\t alert.setTitle(\"No Selection Made\");\n\t alert.setHeaderText(\"No Task Was Selected\");\n\t alert.setContentText(\"Please select a task from the list.\");\n\n\t alert.showAndWait();\n\t }\n\t }",
"public void formDeleteTransaction()\n {\n ChosenFiguresFacet chosenFigures = new ChosenFiguresFacet()\n {\n public boolean isChosen(FigureFacet figure)\n {\n return figure == BasicNodeFigureFacetImpl.this;\n }\n };\n List<FigureFacet> toDelete = new ArrayList<FigureFacet>();\n toDelete.add(this);\n\n // remove the views with deleted subjects\n Set<String> deletionFigureIds = DeleteFromDiagramTransaction.getFigureIdsIncludedInDelete(toDelete, chosenFigures, false);\n DeleteFromDiagramTransaction.delete(getDiagram(), deletionFigureIds, false);\n }",
"public void tableListener() {\n resultsTable.getSelectionModel().selectedItemProperty().addListener((obs, oldSelection, newSelection) -> {\n if (newSelection != null) {\n delBtn.setDisable(false);\n changeBtn.setDisable(false);\n } else {\n delBtn.setDisable(true);\n changeBtn.setDisable(true);\n }\n });\n\n }",
"public void deleteSelectedRow() {\n \tString selectedOption = (String) dataSelectCombo.getValue();\n if (selectedOption.equals(\"Ingredients\")) {\n if (ingredientTable.getSelectionModel().getSelectedItem() == null) { return; }\n ingredientManager.deleteIngredient(ingredientTable.getSelectionModel().getSelectedItem());\n ingredientTable.getItems().removeAll(ingredientTable.getSelectionModel().getSelectedItem());\n resetEditPane();\n } else if (selectedOption.equals(\"Menu Items\")) {\n if (menuItemTable.getSelectionModel().getSelectedItem() == null) { return; }\n MenuItem selectedMenuItem = menuItemTable.getSelectionModel().getSelectedItem();\n menuItemManager.deleteMenuItem(selectedMenuItem);\n menuItemTable.getItems().removeAll(menuItemTable.getSelectionModel().getSelectedItem());\n resetEditPane();\n } else if (selectedOption.equals(\"Suppliers\")) {\n if (supplierTable.getSelectionModel().getSelectedItem() == null) { return; }\n dataManager.deleteExistingSupplier(supplierTable.getSelectionModel().getSelectedItem());\n supplierTable.getItems().removeAll(supplierTable.getSelectionModel().getSelectedItem());\n resetEditPane();\n } else if (selectedOption.equals(\"Users\")) {\n User targetUser = userTable.getSelectionModel().getSelectedItem();\n if (!userManager.getCurrentlyLoggedInUser().getUsername().equals(targetUser.getUsername())) {\n userManager.deleteUser(targetUser.getId());\n userTable.getItems().remove(targetUser);\n resetEditPane();\n }\n }\n }",
"private void actionDelete() {\r\n showDeleteDialog();\r\n }",
"private void delete_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_delete_btnActionPerformed\n int row = customer_tbl.getSelectedRow();\n if (row == -1){\n JOptionPane.showMessageDialog(null, \"Please select a Customer!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\n } else {\n Customer cust = new Customer(customer_tbl.getValueAt(row, 0).toString());\n cust.delete();\n DefaultTableModel dtm = (DefaultTableModel) customer_tbl.getModel();\n dtm.removeRow(row);\n }\n }",
"@FXML void deleteButtonPushed(ActionEvent event) throws IOException {\n \n selectedCustomer = customerTable.getSelectionModel().getSelectedItem();\n \n if(selectedCustomer != null)\n { \n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setContentText(\"Are you sure you want to delete \" + selectedCustomer.getCustomerName() + \"? This will also delete all associated appointments.\");\n Optional<ButtonType> result = alert.showAndWait();\n \n if(result.get() == ButtonType.OK)\n {\n try\n { \n PreparedStatement ps = conn.prepareStatement(\n \"DELETE appointments.* FROM appointments WHERE Customer_ID =?\");\n \n PreparedStatement ps2 = conn.prepareStatement(\n \"DELETE customers.* FROM customers WHERE Customer_ID =?\");\n \n ps.setInt(1, selectedCustomer.getCustomerId());\n ps2.setInt(1, selectedCustomer.getCustomerId());\n int rs = ps.executeUpdate();\n int rs2 = ps2.executeUpdate();\n \n if(rs > 0)\n { \n System.out.println(\"Customer Deleted\");\n populateTable();\n }\n else\n {\n System.out.println(\"Deletion Failed\");\n } \n } \n catch (SQLException ex) \n {\n Logger.getLogger(CustomersController.class.getName()).log(Level.SEVERE, null, ex);\n } \n } \n } \n \n \n }",
"@FXML\r\n\tvoid addReservationAction() {\r\n\t\tint i = table.getSelectionModel().getSelectedIndex();\r\n\t\tif( i >= 0 ) {\r\n\t\t\tCustomer e = table.getItems().get( i );\r\n\t\t\taddReservationAction( e );\r\n\t\t} else {\r\n\t\t\tSystem.out.println( \" -- no selection.\");\r\n\t\t}\r\n\t}",
"protected void onSelectedRow(Object currentRow) {\r\n\r\n }",
"public void deleteButtonAction() throws SQLException {\r\n\r\n if (appointmentsTable.getSelectionModel().getSelectedItem() == null) {\r\n Alert alert = new Alert(AlertType.ERROR);\r\n alert.setHeaderText(\"There is no appointment selected.\");\r\n alert.setContentText(\"To delete an appointment, first select on from the table.\");\r\n alert.showAndWait();\r\n return;\r\n }\r\n\r\n Alert alert = new Alert(AlertType.CONFIRMATION);\r\n alert.setTitle(\"Delete Appointment Confirmation\");\r\n alert.setHeaderText(\"You are about to delete an Appointment!\");\r\n alert.setContentText(\"Press OK to delete appointment \\nPress Cancle to go back\");\r\n alert.showAndWait()\r\n .filter(response -> response == ButtonType.OK) // Lambdas used in Alerts, makes code more easily understood.\r\n .ifPresent(response -> {\r\n Appointment appointment = (Appointment) appointmentsTable.getSelectionModel().getSelectedItem();\r\n int appointmentId = appointment.getAppointmentID();\r\n System.out.println(\"Appoingment ID: \" + appointmentId);\r\n try {\r\n Appointment.deleteAppointment(appointmentId);\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n appointmentsTable.setItems(Appointment.getCurrentAppointments(isWeekly));\r\n });\r\n }",
"@FXML\n public void handleTable(MouseEvent event){ // table row listener\n DataItem d=tb.getSelectionModel().getSelectedItem(); // change combobox for a given selected row table\n ComboChooseQuestion.getSelectionModel().select(d.getQuestion());\n ComboDelete.getSelectionModel().select(d.getQuestion());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Detect languages in document | private LanguageDetect(Document doc) {
this(doc, "deu", new String[] { "tur", "en" }, 5);
} | [
"private void detectLanguage(Document document) throws LangDetectException{\n \tString detail_page_main_content = document.getFieldToTextMap().get(\"detail_page_main_content\");\n \tString lang = null;\n \tif(detail_page_main_content != null && !detail_page_main_content.isEmpty()){\n \t\tlang = this.languageDetection.detectLang(detail_page_main_content);\n \t}\n \t\n \tif(lang != null)\n \t\tdocument.getFieldToTextMap().put(\"language\", lang);\n \telse\n \t\tdocument.getFieldToTextMap().put(\"language\", \"unknown\");\n\t}",
"public boolean isTextDefinedFor(Language... lang);",
"public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}",
"public abstract String[] getAvailableLanguages();",
"public String getLanguage() {\r\n return docLanguage;\r\n }",
"List<String> getSupportedLanguages();",
"public void detectLanguage() {\n\t\tLocalizedTextManager.setLanguage(getLanguage().name().toLowerCase());\n\t}",
"java.lang.String getLanguage();",
"public String getDOC_LANG() {\r\n return DOC_LANG;\r\n }",
"CLanguage getClanguage();",
"public boolean canAutoDetectSourceLang() { return false; }",
"ubii.processing.ProcessingModuleOuterClass.ProcessingModule.Language getLanguage();",
"private Language getLanguage() {\n final XComponent xComponent = getXComponent();\n final Locale charLocale;\n final XPropertySet xCursorProps;\n try {\n final XModel model = UnoRuntime.queryInterface(XModel.class, xComponent);\n final XTextViewCursorSupplier xViewCursorSupplier = UnoRuntime\n .queryInterface(XTextViewCursorSupplier.class,\n model.getCurrentController());\n final XTextViewCursor xCursor = xViewCursorSupplier.getViewCursor();\n if (xCursor.isCollapsed()) { // no text selection\n xCursorProps = UnoRuntime.queryInterface(XPropertySet.class, xCursor);\n } else { // text is selected, need to create another cursor\n // as multiple languages can occur here - we care only\n // about character under the cursor, which might be wrong\n // but it applies only to the checking dialog to be removed\n xCursorProps = UnoRuntime.queryInterface(\n XPropertySet.class,\n xCursor.getText().createTextCursorByRange(xCursor.getStart()));\n }\n\n // The CharLocale and CharLocaleComplex properties may both be set, so we still cannot know\n // whether the text is Khmer (the only \"complex text layout (CTL)\" language we support so far).\n // Thus we check the text itself:\n final KhmerDetector khmerDetector = new KhmerDetector();\n if (khmerDetector.isKhmer(xCursor.getText().getString())) {\n return Language.getLanguageForShortName(\"km\"); // Khmer\n }\n\n final Object obj = xCursorProps.getPropertyValue(\"CharLocale\");\n if (obj == null) {\n return Language.getLanguageForShortName(\"en-US\");\n }\n charLocale = (Locale) obj;\n boolean langIsSupported = false;\n for (Language element : Language.LANGUAGES) {\n if (charLocale.Language.equalsIgnoreCase(LIBREOFFICE_SPECIAL_LANGUAGE_TAG)\n && element.getShortNameWithCountryAndVariant().equalsIgnoreCase(\n charLocale.Variant)) {\n langIsSupported = true;\n break;\n }\n if (element.getShortName().equals(charLocale.Language)) {\n langIsSupported = true;\n break;\n }\n }\n if (!langIsSupported) {\n final String message = org.languagetool.gui.Tools.makeTexti18n(\n MESSAGES, \"language_not_supported\", charLocale.Language);\n JOptionPane.showMessageDialog(null, message);\n return null;\n }\n } catch (final Throwable t) {\n showError(t);\n return null;\n }\n\n try {\n if (charLocale.Language.equalsIgnoreCase(LIBREOFFICE_SPECIAL_LANGUAGE_TAG)) {\n return Language.getLanguageForShortName(charLocale.Variant);\n } else {\n return Language.getLanguageForShortName(charLocale.Language + \"-\"\n + charLocale.Country);\n }\n } catch (java.lang.IllegalArgumentException e) {\n return Language.getLanguageForShortName(charLocale.Language);\n }\n\n }",
"private static void findLanguages() {\n\n File i18nDirectory = new File(FreeCol.getDataDirectory(), Messages.STRINGS_DIRECTORY);\n File[] files = i18nDirectory.listFiles();\n if (files == null) {\n throw new RuntimeException(\"No language files could be found in the <\" + i18nDirectory +\n \"> folder. Make sure you ran the ant correctly.\");\n }\n String prefix = Messages.FILE_PREFIX + \"_\";\n int prefixLength = prefix.length();\n for (File file : files) {\n if (file.getName() == null) {\n continue;\n }\n if (file.getName().startsWith(prefix)) {\n try {\n final String languageID =\n file.getName().substring(prefixLength, file.getName().indexOf(\".\"));\n // qqq contains explanations only\n if (!\"qqq\".equals(languageID)) {\n languages.put(languageID, new Language(languageID, getLocale(languageID)));\n }\n } catch (Exception e) {\n logger.log(Level.WARNING, \"Exception in findLanguages()\", e);\n continue;\n }\n }\n }\n }",
"public GetSupportedLanguagesResponse getSupportedLanguages();",
"boolean isNonEnglishAllowed();",
"RulesLanguage getOutputLanguage ();",
"@AutoEscape\n\tpublic String getForeignLanguages();",
"boolean hasGlossaryDocumentTranslation();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inverts a binary tree. Example: 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 Strategy: For each visited node, swap its children. An easy solution is to use DFS or BFS since they visit every node. | public TreeNode invertTree(TreeNode root) {
// Null Check: tree is null
if (root == null) return root;
// Swap children
TreeNode temp = root.left;
root.left = root.right;
root.right = temp;
// Call invertTree on left and right
invertTree(root.left);
invertTree(root.right);
return root;
} | [
"public void invert() {\n mxGraphHierarchyNode temp = source;\n source = target;\n target = temp;\n isReversed = !isReversed;\n }",
"public static void mirror(BinaryTreeNode<Integer> root){\n if(root == null){\n return;\n }\n Queue<BinaryTreeNode<Integer>> queue = new LinkedList<>();\n queue.add(root);\n\n while(!queue.isEmpty()){\n BinaryTreeNode<Integer> front = queue.poll();\n BinaryTreeNode<Integer> temp = front.leftChild;\n front.leftChild = front.rightChild;\n front.rightChild = temp;\n\n if(front.leftChild != null){\n queue.add(front.leftChild);\n }\n if(front.rightChild != null){\n queue.add(front.rightChild);\n }\n }\n\n BinaryTreeUsage.printLevelWise(root);\n }",
"public void reverseSubtree(V vertex) {\n ArrayList<V> nodes = new ArrayList<V>();\n getAll(vertex, null, nodes);\n for (V node : nodes) {\n flipChildren(node);\n }\n modPlus();\n }",
"public void flipChildren(V parent) {\n // If we've already stored a sorting value, then toggle it.\n Integer o = sorting.get(parent);\n if (o == null)\n setSorting(parent, REVERSE);\n else if (o == REVERSE)\n setSorting(parent, FORWARD);\n else\n setSorting(parent, REVERSE);\n }",
"public void mirrorTree() {\n\t\tmirror(root);\n\t}",
"public void reverseOrderTraversal(){\n reverseOrderTraversal(root);\n }",
"public void inorder() { inorder_p(root); }",
"public void replaceNodeInInorderTraverse(Node node)\n\t{\n\t\tif(node!=null)\n\t\t{\n\t\t\t\n\t\t\treplaceNodeInInorderTraverse(node.leftChild);\n\t\t\tnode.data = (int) arr.get(index);\n\t\t\tindex++;\n\t\t\treplaceNodeInInorderTraverse(node.rightChild);\n\t\t}\n\t}",
"static void convertTree(Node root) \n\t{ \n\t\tif (root == null) \n\t\t\treturn; \n\t\t // first recur on left child \n\t\tconvertTree(root.left); \n\t\t // then recur on right child \n\t\tconvertTree(root.right); \n\n\t\tif (root.left != null && root.right != null) {\n\t\t\troot.data = (root.left.data) & (root.right.data); \n\t\t}\n\t}",
"public Node swapDown(Node node) {\n Node current = node;\n Comparable parentValue = current.getParent().getData();\n current.getParent().setData(current.getData());\n current.setData(parentValue);\n return current;\n }",
"private void reverse(TreeNode from, TreeNode to){\n // System.out.println(\"from = \"+from.val + \", to = \"+to.val);\n if (from == to)\n return;\n TreeNode x = from, y = from.right, temp;\n while (true){\n temp = y.right;\n y.right = x;\n x = y;\n y = temp;\n if (x == to)\n break;\n }\n }",
"public void inorderTraversal()\r\n {\r\n inorder(root);\r\n }",
"void transplant(BinaryTreeNode<T> node1, BinaryTreeNode<T> node2) {\n\n\t\tif (node1.getParent() == null) {\n\t\t\troot = node2;\n\t\t} else if (node1.equals(node1.getParent().getLeft())) {\n\t\t\tnode1.getParent().setLeft(node2);\n\t\t} else {\n\t\t\tnode1.getParent().setRight(node2);\n\t\t}\n\t\tif (node2 != null) {\n\t\t\tnode2.setParent(node1.getParent());\n\t\t}\n\t}",
"public void preorder()\r\n {\r\n preorder(root);\r\n }",
"void inorder() { \n\t inorderRec(root); \n\t }",
"void inorder() { \n\tinorderRec(root); \n\t}",
"public void inorder()\n {\n inorderRec(root);\n }",
"Graph<T> reverse();",
"void InOrderTraversal(Tree node){\n if(node!=null){\n InOrderTraversal(node.left);\n visit(node);\n InOrderTraversal(node.right);\n }\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
need to be in lower case eventAliases.put("Event", Event.class); | private void initialiseEventAliases() {
eventAliases.put("entity", EntityEvent.class);
eventAliases.put("entityc", EntityCombustEvent.class);
eventAliases.put("entitydbb", EntityDamageByBlockEvent.class);
eventAliases.put("entitydbe", EntityDamageByEntityEvent.class);
eventAliases.put("entitydbp", EntityDamageByProjectileEvent.class);
eventAliases.put("entityd", EntityDamageEvent.class);
eventAliases.put("entitye", EntityExplodeEvent.class);
} | [
"public interface Event\n\t{\n\t\tpublic static final String EVENT_ID = \"aether.event.id\";\n\t\tpublic static final String TIME = \"aether.event.time\";\n\t\tpublic static final String EVENT_TYPE = \"aether.event.type\";\n\t}",
"public EventClass getEventClass();",
"EventUse createEventUse();",
"public interface EventMeta {\n /**\n * The application where the event is used.\n *\n * The variable system may be used for different applications. <em>App</em>\n * acts as the namespace for both the <em>Event</em> and the <em>Variable</em>.\n *\n * <p>There is a special value \"__all__\" which means the event can be\n * used in all the applications.\n *\n * @return the application this event is used\n */\n public String getApp();\n\n /**\n * The event name which can differentiate it from other events in this\n * application.\n *\n * @return event name\n */\n public String getName();\n\n /**\n * The type that this event belongs to.\n *\n * Events can be grouped into different types. The events with same type may have\n * some characteristics in common.\n *\n * @return\n */\n public String getType();\n\n /**\n * Whether the event is defined manually directly or derived in the internal system.\n *\n * @return false if the event is manually defined and from the outside world directly,\n * true if the event is derived by the internal system and will be\n * emitted to the outside world.\n */\n public boolean isDerived();\n\n /**\n * Get the identifier of the variable where the event comes from.\n *\n * If the {code isDerived()} is true, which means the event is generated from some\n * variable, this method will give the parent variable identifier. If it is not a derived\n * event, this method will simply return null.\n *\n * We use identifer to decouple the event and variable.\n *\n * @return the source variable identifer if this is a derived event; null if there is not one.\n */\n public Identifier getSrcVariableID();\n\n /**\n * The properties attached to the event.\n *\n * You may attach many additional properties to the event.\n * The property name can't be app/name/key/timestamp/value/\n * @return\n */\n public List<Property> getProperties();\n\n /**\n * Check if an property exists.\n *\n * @return true if the property exists.\n */\n public boolean hasProperty(Property property);\n\n /**\n * The schema for the data contained in the event.\n *\n * <p>The event should contain lots of information, and we need to give the schema\n *\n * <p>The schema should contain:\n * <ul>\n * <li>app | {@code NamedType.STRING} | {@code Event.getApp()}</li>\n * <li>name | {@code NamedType.STRING} | {@code Event.getName()}</li>\n * <li>key | {@code NamedType.STRING} | {@code Event.getKey()}</li>\n * <li>timestamp | {@code NamedType.DOUBLE} | {@code Event.getTimestamp()}</li>\n * <li>value | {@code NamedType.DOUBLE} | {@code Event.getValue()}</li>\n * <li>others | including data instances of {@code EventMeta.getProperties()}</li>\n * </ul>\n *\n * <p>The first five items are predefined, while the others can be defined by users.\n *\n * @return the schema about the event.\n */\n public Map<String, NamedType> getDataSchema();\n\n /**\n * When this event should expire and be deactivated.\n *\n * Some events will exist for ever, while others are generated temporarily and\n * should expire in the near future.\n *\n * @return the time when the event should expire, -1 means this event\n * will never expire.\n */\n public long expireAt();\n\n /**\n * Register in the registry.\n */\n public void active();\n\n /**\n * Unregister in the registry.\n */\n public void deactive();\n\n /**\n * Description on the event\n * @return\n */\n public String getRemark();\n}",
"@Override\n public Class<? extends EventObject> getEventClass() {\n return eventClass;\n }",
"@Override\r\n\tprotected void setupAliases() {\r\n\t\tsuper.setupAliases();\r\n\t\taliasPackage(\"model\", \"at.rc.tacos.platform.model\");\r\n\t\taliasPackage(\"message\", \"at.rc.tacos.platform.net.message\");\r\n\t\taliasPackage(\"config\", \"at.rc.tacos.platform.config\");\r\n\t}",
"EventUses createEventUses();",
"public void setEventName(String name);",
"public JHI_ENTITY_AUDIT_EVENT(String alias) {\n this(alias, JHI_ENTITY_AUDIT_EVENT);\n }",
"public interface EventConstant {\n /**\n * This classification is for events where event classificaton\n * is unknown.\n */\n public static final int CLASSIFICATION_UNKNOWN = -1;\n\n /**\n *This type definition is for event type where event type is\n *not known.\n */\n public static final int TYPE_UNKNOWN = -1;\n\n /**\n * The Standard Events System as defined by LDAP Persistence Search Draft\n * \"Persistent Search: A Simple LDAP Change Notification Mechanism\".\n */\n public static final int CLASSIFICATION_LDAP_PSEARCH = 0;\n\n /**\n * The Edirectory specific extensions for event processing.\n */\n public static final int CLASSIFICATION_EDIR_EVENT = 1;\n\n /* LDAP Persistence Search Events Type*/\n\n /**\n * Event type specifying that you want to track additions of new entries\n * to the directory.\n */\n public static final int LDAP_PSEARCH_ADD =\n LDAPPersistSearchControl.ADD;\n\n /**\n * Event type specifying that you want to track removals of entries from\n * the directory.\n */\n public static final int LDAP_PSEARCH_DELETE =\n LDAPPersistSearchControl.DELETE;\n\n /**\n * Event type specifying that you want to track modifications of entries\n * in the directory.\n */\n public static final int LDAP_PSEARCH_MODIFY =\n LDAPPersistSearchControl.MODIFY;\n\n /**\n * Change type specifying that you want to track modifications of the DNs\n * of entries in the directory.\n */\n public static final int LDAP_PSEARCH_MODDN =\n LDAPPersistSearchControl.MODDN;\n\n /**\n * Event type specifying that you want to track any of the\n * modifications (add,delete,modify, modifydn).\n */\n public static final int LDAP_PSEARCH_ANY =\n LDAPPersistSearchControl.ANY;\n}",
"public String getEventClass() {\n return eventClass;\n }",
"public ContainerEventTable(java.lang.String alias) {\n\t\tthis(alias, io.cattle.platform.core.model.tables.ContainerEventTable.CONTAINER_EVENT);\n\t}",
"private String initClassName()\n {\n StringBuffer sb = new StringBuffer();\n String fieldName = _eventField.getName();\n String setName = _eventSet.getClassName();\n sb.append(Character.toUpperCase(fieldName.charAt(0)));\n if (fieldName.length() > 1)\n sb.append(fieldName.substring(1));\n sb.append(setName.substring(setName.lastIndexOf('.') + 1));\n sb.append(\"EventAdaptor\");\n return sb.toString();\n }",
"Event(String event, Item item){\n this.events = event;\n this.item = item;\n }",
"@Override\n public SoapEvent convertType(Event parent) {\n return new SoapEvent(parent);\n }",
"public static void putEvent(String key, Class<?> value) {\n eventMap.put(key, value);\n }",
"interface EVENTS {\n static final String SHOW_CATEGORIES_CHILDREN = \"showcategorieschildren\";\n static final String DOWNLOAD_UPLOAD = \"downloadupload\";\n static final String SHOW_POST_UPLOADS = \"showpostuploads\";\n static final String SHOW_POST_ACLS = \"showpostacls\";\n static final String ADD_ACL_POST = \"addaclpost\";\n static final String REMOVE_ACL_POST = \"removeaclpost\";\n static final String SHOW_CATEGORY_ACLS = \"showcategoryacls\";\n static final String ADD_ACL_CATEGORY = \"addaclcategory\";\n static final String REMOVE_ACL_CATEGORY = \"removeaclcategory\";\n static final String SHOW_UPLOAD_ACLS = \"showuploadacls\";\n static final String ADD_ACL_UPLOAD = \"addaclupload\";\n static final String REMOVE_ACL_UPLOAD = \"removeaclupload\";\n static final String UPDATE_CONTENT_POST = \"updatecontentpost\";\n static final String SHOW_POST_COMMENTS = \"showpostcomments\";\n static final String ADD_COMMENT_POST = \"addcommentpost\";\n static final String UPDATE_COMMENTS_POST = \"updatecommentspost\";\n static final String UPDATE_STATUS_COMMENT_POST = \"updatestatuscommentpost\";\n static final String SHOW_POST_RELATIONSHIPS = \"showpostrelationships\";\n static final String ADD_RELATIONSHIP_POST = \"addrelationshippost\";\n static final String REMOVE_RELATIONSHIP_POST = \"removerelationshippost\";\n static final String SHOW_TEMPLATE_RELATIONSHIPS = \"showtemplaterelationships\";\n static final String ADD_RELATIONSHIP_TEMPLATE = \"addrelationshiptemplate\";\n static final String REMOVE_RELATIONSHIP_TEMPLATE = \"removerelationshiptemplate\";\n static final String UNLOCK_POST = \"unlockpost\";\n static final String UNLOCK_CATEGORY = \"unlockcategory\";\n static final String UNLOCK_UPLOAD = \"unlockupload\";\n static final String UNLOCK_TEMPLATE = \"unlocktemplate\";\n static final String SHOW_LOCKS = \"showlocks\";\n static final String REMOVE_LOCK = \"removelock\";\n static final String EXPORT = \"export\";\n }",
"public static String getEventType(Class<? extends Event> eventClass) {\n return EventTypeScanner.getInstance().getEventType(eventClass);\n }",
"public interface ItemEvent extends Event{\n\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
We need to reset previous state of adapter and recycler view before every new query | @Override
public void resetQuery() {
mData.clear();
mAdapter.notifyDataSetChanged();
mEndlessScrollListener.resetState();
} | [
"private void clearCurrentResults() {\n if (adapter != null) {\n adapter.clearRecyclerView();\n page = 0;\n }\n }",
"public void resetAdapter() {\n\n // Hide ProgressBar\n mBinding.searchUserLayout.getUvm().hideProgress();\n\n // Cancel any pending searches\n mSearchHandler.removeCallbacksAndMessages(null);\n\n // Clear the Adapter\n mAdapter.clear();\n }",
"private void resetSearchAheadList() {\n if (!searchResultsData.isEmpty()) {\n searchResultsData.clear();\n searchAdapter.notifyDataSetChanged();\n }\n }",
"private void refreshFilterData(){\n empty.setVisibility(View.GONE);\n adapter = new FoundRecyclerviewAdapter(FoundActivity.this, filteredData);\n v.setAdapter(adapter);\n emptyViewForFilter();\n }",
"private void updateWhereItemListData() {\n ModelWhereItem itemDB = new ModelWhereItem(database);\n ArrayList<WhereItem> itemList = itemDB.WSfindItemsByFields(selectedCityId,selectedDistrictId,selectedStreetId,selectedCategoryId);\n RecyclerViewAdapter recyclerViewAdapter = new RecyclerViewAdapter(getContext(),itemList,gridViewMenuAdapter,viewPagerSlideAdapter);\n recyclerView.setAdapter(recyclerViewAdapter);\n\n // tweaks cho recycler view\n recyclerView.setHasFixedSize(true);\n //recyclerView.setItemViewCacheSize(20);\n recyclerView.setDrawingCacheEnabled(true);\n //recyclerView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);\n\n changeTab(0);\n }",
"public void resetCounts() {\n // For each item in the RecyclerView\n for(int pos = 0; pos < numItems; pos++) {\n // Reset the count variable of the item\n DataStorage.listInUse.getList().get(pos).reset();\n notifyItemChanged(pos);\n }\n }",
"private void setAdapterAndUpdateData() {\n mAdapter = new CommentAdapter(this, mComments);\n mRecyclerView.setAdapter(mAdapter);\n\n // scroll to the last comment\n if (mComments.size() > 0) {\n mRecyclerView.smoothScrollToPosition(mComments.size() - 1);\n } else {\n mRecyclerView.smoothScrollToPosition(mComments.size());\n }\n\n }",
"private void searchRefresh(){\n adapter = new FoundRecyclerviewAdapter(FoundActivity.this, search);\n v.setAdapter(adapter);\n }",
"public void reset() {\n resetData();\n postInvalidate();\n }",
"@SuppressWarnings(\"ConstantConditions\")\n private void restoreLayoutManagerPosition(){\n if(recyclerView != null){\n recyclerView.getLayoutManager().onRestoreInstanceState(recyclerViewState);\n }\n }",
"public void clear() {\n recyclerView.setAdapter(null);\n }",
"public void newQuery(String query){\n for(RecyclerViewWrapper wrapper : mRecyclerViews){\n wrapper.data.clear();\n wrapper.adapter.notifyDataSetChanged();\n Log.d(TAG, \"Test: \" + wrapper.data.size());\n }\n\n mQueryManager.searchAll(query);\n }",
"private void refreshListView() {\n mAdapter = new RecyclerAdapter(arrayOfSessions);\n mRecyclerView.setAdapter(mAdapter);\n mAdapter.notifyDataSetChanged();\n }",
"public void onDataReady() {\n pendingView=null;\n notifyDataSetChanged();\n }",
"public void updateRecyclerView () {\n\n if (recyclerViewDebetableGoalsNow != null) {\n recyclerViewDebetableGoalsNow.destroyDrawingCache();\n recyclerViewDebetableGoalsNow.setVisibility(ListView.INVISIBLE);\n recyclerViewDebetableGoalsNow.setVisibility(ListView.VISIBLE);\n\n displayDebetableGoalsSet ();\n }\n }",
"private void resetEndlessScrollState() {\n articles.clear();\n adapter.notifyDataSetChanged();\n scrollListener.resetState();\n }",
"@Override\n public void onResume() {\n super.onResume();\n mArticleAdapter.notifyDataSetChanged();\n }",
"private void resetRecycler(List<Visit> visits) {\r\n\r\n if (visits == null || visits.isEmpty()) {\r\n visitsViewModel.setPlaceholderText(false);\r\n } else {\r\n // Parses values into adapters and update view\r\n visitsViewModel.setPlaceholderText(true);\r\n visitsAdapter.setItems(visits);\r\n visitsAdapter.notifyDataSetChanged();\r\n }\r\n }",
"private void refreshListView() {\n adapter.refill(dataSource.getAllBases());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column vendor_application.result_status | public void setResultStatus(String resultStatus) {
this.resultStatus = resultStatus == null ? null : resultStatus.trim();
} | [
"public void setGetTaskStatusResult(int value) {\r\n this.getTaskStatusResult = value;\r\n }",
"protected void maybeSetResultPropertyValue(int result) {\r\n String res = Integer.toString(result);\r\n if (resultProperty != null) {\r\n getProject().setNewProperty(resultProperty, res);\r\n }\r\n }",
"void setIntResult(int result) {\n\t\tthis.intResult = result;\n\t}",
"public void setResultLocationStatus(long resultLocationStatus) {\n this.resultLocationStatus = resultLocationStatus;\n }",
"public String getResultStatus() {\n return resultStatus;\n }",
"public void setResultId(int value) {\n this.resultId = value;\n }",
"public void setResult (Result result)\r\n {\r\n this.result = result;\r\n }",
"public void setResultCode(String resultCode) {\r\n\t\tthis.resultCode = resultCode;\r\n\t}",
"public void setUserResult(Integer userResult) {\n this.userResult = userResult;\n }",
"public void setDevResult(Integer devResult) {\n this.devResult = devResult;\n }",
"public void setResult(String value) {\n setAttributeInternal(RESULT, value);\n }",
"public void setResult (String Result);",
"public void setResultType(ResultType value) {\n this.result_type = value;\n }",
"public void setResultId(long resultId) {\n this.resultId = resultId;\n }",
"public void setTresult(Integer tresult) {\n\t\tthis.tresult = tresult;\n\t}",
"@ApiModelProperty(required = true, value = \"Result code of this `PRESET` that reflects current state; see list of all [Result Codes](https://www.optile.io/opg#294007)\")\n @NotNull\n\n\n public String getResultCode() {\n return resultCode;\n }",
"public void setResultCount(String resultCount)\n {\n this.resultCount = resultCount;\n }",
"public void setResultid(Long resultid) {\n this.resultid = resultid;\n }",
"void setClientVersionResult(java.lang.String clientVersionResult);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the seasons before and after the current season in the ordered set where companyId = &63;. | public hu.webtown.liferay.portlet.model.Season[] findByCompanyId_PrevAndNext(
long seasonId, long companyId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException,
hu.webtown.liferay.portlet.NoSuchSeasonException; | [
"public hu.webtown.liferay.portlet.model.Season[] findByUuid_C_PrevAndNext(\n\t\tlong seasonId, java.lang.String uuid, long companyId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\thu.webtown.liferay.portlet.NoSuchSeasonException;",
"public java.util.List<hu.webtown.liferay.portlet.model.Season> findByCompanyId(\n\t\tlong companyId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public List<Season> getSeasons() {\n if (this.seasons.isEmpty()) {\n this.seasons = EntityManager.getInstance().getRefereeSeasons(this);\n }\n return this.seasons;\n //TODO:Pull From DB\n }",
"public hu.webtown.liferay.portlet.model.Season[] filterFindByG_T_PrevAndNext(\n\t\tlong seasonId, long groupId, long tvShowId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\thu.webtown.liferay.portlet.NoSuchSeasonException;",
"public java.util.List<hu.webtown.liferay.portlet.model.Season> findByUuid_C(\n\t\tjava.lang.String uuid, long companyId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public hu.webtown.liferay.portlet.model.Season[] filterFindByGroupId_PrevAndNext(\n\t\tlong seasonId, long groupId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\thu.webtown.liferay.portlet.NoSuchSeasonException;",
"public hu.webtown.liferay.portlet.model.Season fetchByCompanyId_First(\n\t\tlong companyId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public hu.webtown.liferay.portlet.model.Season findByCompanyId_First(\n\t\tlong companyId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\thu.webtown.liferay.portlet.NoSuchSeasonException;",
"public Integer getSeason() {\n return season;\n }",
"public hu.webtown.liferay.portlet.model.Season[] findByG_T_PrevAndNext(\n\t\tlong seasonId, long groupId, long tvShowId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\thu.webtown.liferay.portlet.NoSuchSeasonException;",
"public java.util.List<hu.webtown.liferay.portlet.model.Season> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"private List<String> getSeasonsForDate(Date date) {\n List<String> seasons = new ArrayList<>();\n if (date == null) {\n return seasons;\n }\n SimpleDateFormat calDateFormat = new SimpleDateFormat(IceTicketUtils.CAL_DATE_FORMAT, Locale.US);\n String dateStr = calDateFormat.format(date);\n CombinedSeasonalTicket ticket = null;\n\n if (mCalendarResultMap != null) {\n ticket = mCalendarResultMap.get(dateStr);\n }\n if (ticket == null) {\n return seasons;\n }\n List<SeasonalTicketDetail> ticketDetails = ticket.getDetail();\n // Add a season string for every season available for this ticket\n // entry in the map (there may be duplicates so use a Set to enforce unique entries)\n Set<String> seasonsSet = new HashSet<>();\n for (SeasonalTicketDetail ticketDetail : ticketDetails) {\n if (ticketDetail.getSeason() == null) {\n continue;\n }\n seasonsSet.add(ticketDetail.getSeason());\n }\n seasons = new ArrayList<>(seasonsSet);\n return seasons;\n }",
"@java.lang.Override\n public int getSeason() {\n return season_;\n }",
"private List<Season> filterSeasons(List<Season> seasons) {\n\t\treturn seasons.stream()\n\t\t\t.filter(season -> season.get_id().getYear().equals(currentSeason))\n\t\t\t.filter(season -> {\n\t\t\t\tString semester = season.get_id().getSemester();\n\t\t\t\tif (semester == null) return false;\n\n\t\t\t\t// eng O -> rus O, costul'\n\t\t\t\treturn Objects.equals(semester.replace('O', 'О'), currentSemester);\n\t\t\t})\n\t\t\t.collect(Collectors.toList());\n\t}",
"public int getSeasonId() {\n return seasonId;\n }",
"@java.lang.Override\n public int getSeason() {\n return season_;\n }",
"public final List<Seasoning> getSeasonings()\n {\n return Collections.unmodifiableList(this.seasonings);\n }",
"public hu.webtown.liferay.portlet.model.Season[] findByGroupId_PrevAndNext(\n\t\tlong seasonId, long groupId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\thu.webtown.liferay.portlet.NoSuchSeasonException;",
"public Season getSeason( int seasonId ) throws OpenMMMidtierException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this just checkes if wordSpawnDelay has passed | @Override
public void update(float delta) {
timedelta += delta;
if(timedelta > wordSpawnDelay){
spawnWord();
timedelta = 0f;
}
updateWords(delta);
} | [
"public void checkSpawnTimer(World world)\n {\n if(spawn_Assignment_timer.isTimeUp())\n {\n float the_starting_Y = generate_starting_Y();\n float the_starting_speed = generate_speed();\n\n Assignments_Spawned.add(new Assignments(world, the_starting_speed, 4f, the_starting_Y));\n spawn_Assignment_timer.resetTimer();\n }\n\n if(spawn_E_Drink_timer.isTimeUp())\n {\n float the_starting_Y = generate_starting_Y();\n float the_starting_speed = generate_speed();\n\n Energy_Drinks_Spawned.add(new Energy_Drink(world, the_starting_speed, 4f, the_starting_Y));\n spawn_E_Drink_timer.resetTimer();\n }\n }",
"public boolean commandDelayPassed() {\n\t\treturn System.currentTimeMillis() - commandDelay > 0;\n\t}",
"boolean shouldKeepSpawnLoaded();",
"private void checkRespawn(){\n\t\t//If timer expires\n\t\tif (respawnTimer == 0){\n\t\t\t//Make player visible\n\t\t\tvisible = true;\n\t\t\t//Make player invincible for a while after spawn\n\t\t\tcollideable = false;\n\t\t\ttempColCooldown = 0;\n\t\t\tblinking = true;\n\t\t\t//Make player able to control plane again\n\t\t\tcontrollable = true;\n\t\t\t//Set timer to \"pause-mode\"\n\t\t\trespawnTimer = -1;\n\t\t}\n\t\t//Count down timer\n\t\telse if (respawnTimer > 0){\n\t\t\tvisible = false;\n\t\t\trespawnTimer--;\n\t\t}\n\t}",
"private void spawnAdditionalRandom() {\n if ( gameTime % 1 >= 0.5 && 0.5 - (gameTime - timeLastSpawn) < 0) {\n Random rand = new Random();\n int randomInt = rand.nextInt(1000);\n\n if(randomInt <= randSpawnPossibility) {\n spawn(true);\n //System.out.println(\"Spawned a random Unit\");\n }\n }\n }",
"private void checkDespawn() {\n Player player = GameInstance.INSTANCE.getEntityManager().getOrCreatePlayer();\n\n if (this.distanceFrom(player) > 3000) {\n setDead(true);\n Gdx.app.debug(\"NPCEntity\", \"Too far from player, despawning!\");\n if(this instanceof NPCBoat) {\n NPCBoat npcBoat = (NPCBoat) this;\n if(npcBoat.isBoss() && npcBoat.getAllied().isPresent()) {\n //if boss is spawning, set spawned to false (so it will spawn again)\n College allied = npcBoat.getAllied().get();\n allied.setBossSpawned(false);\n }\n }\n }\n }",
"public boolean checkOnCooldown() {\r\n\t\tif(timer.get() > targetTime) {\r\n\t\t\ttimer.stop();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"boolean cometAtSpawn()\n\t{\n\t\tfor(int i = 0; i < comets.size(); i++)\n\t\t{\n\t\t\tComet c = comets.elementAt(i);\n\t\t\tif(Math.sqrt(Math.pow(Math.abs(c.getXPosition() - playWidth/2), 2)\n\t\t\t\t\t+ Math.pow(Math.abs(c.getYPosition() - playHeight/2), 2)) < 80)\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean canSpawnMore() {\n for(int e: enemiesLeft) {\n if(e > 0) {\n return true;\n }\n }\n\n return false;\n }",
"private boolean enoughSleeping() {\n return sleepingPlayers >= needToSleep();\n }",
"public boolean isSpawn()\n\t{\n\t\treturn block == Block.FRUIT_SPAWN || block == Block.GHOST_SPAWN || block == Block.PAC_SPAWN;\n\t}",
"public abstract int getSpawnChance();",
"public boolean requestDelayPassed() {\n\t\treturn System.currentTimeMillis() - requestDelay > 0;\n\t}",
"public void crawlDelay()\n\t{\n//\t\tint delay = robot.getCrawlDelay(best_match);\n//\t\tif (delay!=-1)\n//\t\t{\n//\t\t\ttry \n//\t\t\t{\n//\t\t\t\tTimeUnit.SECONDS.sleep(robot.getCrawlDelay(best_match));\n//\t\t\t} \n//\t\t\tcatch (InterruptedException e) \n//\t\t\t{\n//\t\t\t\treturn;\n//\t\t\t}\n//\t\t}\n\t}",
"boolean haveAnySpawn();",
"private void checkLives() {\n if (getLives() <= 0) {\n isRunning = false;\n System.out.println(\"Out of lives\");\n }\n }",
"private void spawn(boolean randomUnit) {\n if (spawnRate - (gameTime - timeLastSpawn) < 0 || randomUnit) {\n spawnEnemy();\n\n if (!randomUnit) {\n timeLastSpawn = gameTime;\n //System.out.println(\"Spawned a unit\");\n }\n }\n }",
"public void powerupTimeCollisionCheck(){\n\t\tif(gameComponent.getBall().objectsIntersectBallAndPowerup(gameComponent.getPowerupTime())){\n\t\t\tsetTimeRemaining(-10);\n\t\t\tgameComponent.getPowerupTime().setVisibility(false);\n\t\t}\n\t}",
"@Inject(\n method = \"checkGuardianSpawnRules\",\n at = @At(\"HEAD\"),\n cancellable = true\n )\n private static void shouldSpawn(EntityType<? extends Guardian> entityType, LevelAccessor world, MobSpawnType spawnReason, BlockPos blockPos, Random random, CallbackInfoReturnable<Boolean> cir) {\n if (TickManager.isEntityLimitReached(world, blockPos, EntityType.GUARDIAN)) cir.setReturnValue(false);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Term__Group__2__Impl" $ANTLR start "rule__Term__Group__3" ../com.blasedef.onpa.ONPA.ui/srcgen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2256:1: rule__Term__Group__3 : rule__Term__Group__3__Impl rule__Term__Group__4 ; | public final void rule__Term__Group__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2260:1: ( rule__Term__Group__3__Impl rule__Term__Group__4 )
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2261:2: rule__Term__Group__3__Impl rule__Term__Group__4
{
pushFollow(FOLLOW_rule__Term__Group__3__Impl_in_rule__Term__Group__34494);
rule__Term__Group__3__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Term__Group__4_in_rule__Term__Group__34497);
rule__Term__Group__4();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Term__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9064:1: ( rule__Term__Group__3__Impl rule__Term__Group__4 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9065:2: rule__Term__Group__3__Impl rule__Term__Group__4\n {\n pushFollow(FOLLOW_rule__Term__Group__3__Impl_in_rule__Term__Group__317760);\n rule__Term__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Term__Group__4_in_rule__Term__Group__317763);\n rule__Term__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Term__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2229:1: ( rule__Term__Group__2__Impl rule__Term__Group__3 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2230:2: rule__Term__Group__2__Impl rule__Term__Group__3\n {\n pushFollow(FOLLOW_rule__Term__Group__2__Impl_in_rule__Term__Group__24432);\n rule__Term__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Term__Group__3_in_rule__Term__Group__24435);\n rule__Term__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Term__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9033:1: ( rule__Term__Group__2__Impl rule__Term__Group__3 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9034:2: rule__Term__Group__2__Impl rule__Term__Group__3\n {\n pushFollow(FOLLOW_rule__Term__Group__2__Impl_in_rule__Term__Group__217698);\n rule__Term__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Term__Group__3_in_rule__Term__Group__217701);\n rule__Term__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Language__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1475:1: ( ( ( rule__Language__Group_3__0 )? ) )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1476:1: ( ( rule__Language__Group_3__0 )? )\n {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1476:1: ( ( rule__Language__Group_3__0 )? )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1477:1: ( rule__Language__Group_3__0 )?\n {\n before(grammarAccess.getLanguageAccess().getGroup_3()); \n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1478:1: ( rule__Language__Group_3__0 )?\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0==25) ) {\n alt4=1;\n }\n switch (alt4) {\n case 1 :\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1478:2: rule__Language__Group_3__0\n {\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group_3__0_in_rule__Language__Group__3__Impl2883);\n rule__Language__Group_3__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getLanguageAccess().getGroup_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Objective__Group__3__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8636:1: ( ( ( rule__Objective__Group_3__0 )? ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8637:1: ( ( rule__Objective__Group_3__0 )? )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8637:1: ( ( rule__Objective__Group_3__0 )? )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8638:1: ( rule__Objective__Group_3__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getObjectiveAccess().getGroup_3()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8639:1: ( rule__Objective__Group_3__0 )?\r\n int alt74=2;\r\n int LA74_0 = input.LA(1);\r\n\r\n if ( (LA74_0==67) ) {\r\n alt74=1;\r\n }\r\n switch (alt74) {\r\n case 1 :\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8639:2: rule__Objective__Group_3__0\r\n {\r\n pushFollow(FOLLOW_rule__Objective__Group_3__0_in_rule__Objective__Group__3__Impl18062);\r\n rule__Objective__Group_3__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getObjectiveAccess().getGroup_3()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Artefact__Group__3__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10808:1: ( ( ( rule__Artefact__Group_3__0 )? ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10809:1: ( ( rule__Artefact__Group_3__0 )? )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10809:1: ( ( rule__Artefact__Group_3__0 )? )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10810:1: ( rule__Artefact__Group_3__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getArtefactAccess().getGroup_3()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10811:1: ( rule__Artefact__Group_3__0 )?\r\n int alt93=2;\r\n int LA93_0 = input.LA(1);\r\n\r\n if ( (LA93_0==92) ) {\r\n alt93=1;\r\n }\r\n switch (alt93) {\r\n case 1 :\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10811:2: rule__Artefact__Group_3__0\r\n {\r\n pushFollow(FOLLOW_rule__Artefact__Group_3__0_in_rule__Artefact__Group__3__Impl22338);\r\n rule__Artefact__Group_3__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getArtefactAccess().getGroup_3()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Objective__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8625:1: ( rule__Objective__Group__3__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8626:2: rule__Objective__Group__3__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Objective__Group__3__Impl_in_rule__Objective__Group__318035);\r\n rule__Objective__Group__3__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Language__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1463:1: ( rule__Language__Group__3__Impl rule__Language__Group__4 )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1464:2: rule__Language__Group__3__Impl rule__Language__Group__4\n {\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__3__Impl_in_rule__Language__Group__32853);\n rule__Language__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__4_in_rule__Language__Group__32856);\n rule__Language__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Rules__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:8592:1: ( rule__Rules__Group__3__Impl rule__Rules__Group__4 )\n // InternalDsl.g:8593:2: rule__Rules__Group__3__Impl rule__Rules__Group__4\n {\n pushFollow(FOLLOW_16);\n rule__Rules__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Rules__Group__4();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__End__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10636:1: ( rule__End__Group__3__Impl rule__End__Group__4 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10637:2: rule__End__Group__3__Impl rule__End__Group__4\r\n {\r\n pushFollow(FOLLOW_rule__End__Group__3__Impl_in_rule__End__Group__321994);\r\n rule__End__Group__3__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__End__Group__4_in_rule__End__Group__321997);\r\n rule__End__Group__4();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Objective__Group_3__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8728:1: ( rule__Objective__Group_3__2__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8729:2: rule__Objective__Group_3__2__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Objective__Group_3__2__Impl_in_rule__Objective__Group_3__218240);\r\n rule__Objective__Group_3__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Objective__Group_3__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8739:1: ( ( '}' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8740:1: ( '}' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8740:1: ( '}' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8741:1: '}'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getObjectiveAccess().getRightCurlyBracketKeyword_3_2()); \r\n }\r\n match(input,68,FOLLOW_68_in_rule__Objective__Group_3__2__Impl18268); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getObjectiveAccess().getRightCurlyBracketKeyword_3_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Predicate__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3368:1: ( rule__Predicate__Group__3__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3369:2: rule__Predicate__Group__3__Impl\n {\n pushFollow(FOLLOW_rule__Predicate__Group__3__Impl_in_rule__Predicate__Group__36631);\n rule__Predicate__Group__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Predicate__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:3652:1: ( rule__Predicate__Group__3__Impl )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:3653:2: rule__Predicate__Group__3__Impl\n {\n pushFollow(FOLLOW_rule__Predicate__Group__3__Impl_in_rule__Predicate__Group__37215);\n rule__Predicate__Group__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Action__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10061:1: ( rule__Action__Group__3__Impl rule__Action__Group__4 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10062:2: rule__Action__Group__3__Impl rule__Action__Group__4\r\n {\r\n pushFollow(FOLLOW_rule__Action__Group__3__Impl_in_rule__Action__Group__320862);\r\n rule__Action__Group__3__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Action__Group__4_in_rule__Action__Group__320865);\r\n rule__Action__Group__4();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__TerminalExpression__Group_3__1() throws RecognitionException {\n int rule__TerminalExpression__Group_3__1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 980) ) { return ; }\n // InternalGaml.g:16410:1: ( rule__TerminalExpression__Group_3__1__Impl )\n // InternalGaml.g:16411:2: rule__TerminalExpression__Group_3__1__Impl\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__TerminalExpression__Group_3__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 980, rule__TerminalExpression__Group_3__1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Objective__Group_3__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8661:1: ( rule__Objective__Group_3__0__Impl rule__Objective__Group_3__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8662:2: rule__Objective__Group_3__0__Impl rule__Objective__Group_3__1\r\n {\r\n pushFollow(FOLLOW_rule__Objective__Group_3__0__Impl_in_rule__Objective__Group_3__018101);\r\n rule__Objective__Group_3__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Objective__Group_3__1_in_rule__Objective__Group_3__018104);\r\n rule__Objective__Group_3__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Definition__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:562:1: ( rule__Definition__Group__3__Impl rule__Definition__Group__4 )\n // InternalWh.g:563:2: rule__Definition__Group__3__Impl rule__Definition__Group__4\n {\n pushFollow(FOLLOW_8);\n rule__Definition__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Definition__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Objective__Group_3__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8692:1: ( rule__Objective__Group_3__1__Impl rule__Objective__Group_3__2 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8693:2: rule__Objective__Group_3__1__Impl rule__Objective__Group_3__2\r\n {\r\n pushFollow(FOLLOW_rule__Objective__Group_3__1__Impl_in_rule__Objective__Group_3__118163);\r\n rule__Objective__Group_3__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Objective__Group_3__2_in_rule__Objective__Group_3__118166);\r\n rule__Objective__Group_3__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new generic three drop down choices model. | public ThreeDropDownChoicesModel( final T selectedOption,
final Map< T, List< T >> modelsMap,
final List< T > selectedValuesChoices ) {
super( selectedOption, modelsMap );
this.selectedValuesChoices = selectedValuesChoices;
} | [
"public GenericOptionChoice() {\n // your code here\n\n }",
"MultipleChoice createMultipleChoice();",
"public GenericOptionChoice(ApplicationEnvironment environment) {\n super(environment);\n\n }",
"public MultipleChoiceSet() {\n }",
"public void createSpecialityComboBox(){\n SpecialityRefference refference=new SpecialityRefference();//creating a new specialoty reffrence object and obtaining all the specilaity reffrences\n DefaultComboBoxModel newModel = new DefaultComboBoxModel(refference.getSpecialityTypes().toArray());\n getView().getspecialityComboBox().setModel( newModel );\n }",
"private DropDownButtonFactory() {\n }",
"public DropDown() {\n\t\tthis.suppressDropDownArrow=true;\n\t\tthis.boxMessage=new BoxMessage();\n\t\tthis.list=new ArrayList<>();\n\t}",
"private Node createConditionDropdowns() {\n\t\tVBox box = new VBox(boxSpacing);\n\t\t\n\t\tLabel soilLabel = new Label(\"Soil Type: \");\n\t\tsoilDropdown = new ComboBox<>();\n\t\tsoilDropdown.getItems().addAll(SoilType.values());\n\t\tsoilDropdown.getItems().remove(0);\n\t\tsoilDropdown.getSelectionModel().select(1);\n\t\t\n\t\tLabel moistLabel = new Label(\"Moisture Level: \");\n\t\tmoistureDropdown = new ComboBox<>();\n\t\tmoistureDropdown.getItems().addAll(MoistureType.values());\n\t\tmoistureDropdown.getItems().remove(0);\n\t\tmoistureDropdown.getSelectionModel().select(1);\n\n\t\tLabel sunLabel = new Label(\"Sunlight Level: \");\n\t\tsunlightDropdown = new ComboBox<>();\n\t\tsunlightDropdown.getItems().addAll(LightType.values());\n\t\tsunlightDropdown.getItems().remove(0);\n\t\tsunlightDropdown.getSelectionModel().select(1);\n\t\t\n\t\tsoilLabel.setFont(new Font(\"Andale Mono\", fontSize));\n\t\tmoistLabel.setFont(new Font(\"Andale Mono\", fontSize));\n\t\tsunLabel.setFont(new Font(\"Andale Mono\", fontSize));\n\t\tsoilLabel.setStyle(\"-fx-text-fill: #5c5346\");\n\t\tmoistLabel.setStyle(\"-fx-text-fill: #5c5346\");\n\t\tsunLabel.setStyle(\"-fx-text-fill: #5c5346\");\n\n\n\t\tbox.getChildren().addAll(soilLabel, soilDropdown, moistLabel, moistureDropdown, sunLabel, sunlightDropdown);\n\t\t\n\t\tVBox.setVgrow(box, Priority.ALWAYS);\n\t\t\n\t\treturn box;\n\t}",
"public ChoiceQuestion() {\n choices = new ArrayList<Question>();\n }",
"public ProductOptionChoice(DBConfig config)\r\n {\r\n super(config);\r\n }",
"private void setUpDropDowns() {\n List<String> stations = model.getListOfStations();\n Map<String, List<String>> stationColorMap = model.getStationColorMap();\n view.customizeDropDowns(stationColorMap);\n view.fillStationsOptions(stations);\n }",
"public ChoiceQuestion() {\n m_choices = new ArrayList<>();\n }",
"Choice createChoice();",
"private void createTierTypesComboBox()\n\t{\n\t\tthis.oGIPSYTierTypesComboBox = new JComboBox();\n\t\n\t\tfor(String strTierType: AppConstants.TIER_TYPES)\n\t\t{\n\t\t\tthis.oGIPSYTierTypesComboBox.addItem(strTierType);\n\t\t}\n\t}",
"public MultChoice()\n {\n super();\n answers = null;\n }",
"protected abstract View createDropDownView(int position, ViewGroup parent);",
"private void choiceBoxInitializer() {\n searchChoiceBox.getItems().addAll(\"Learning Applications\", \"Learning Categories\",\n \"Learning Units\");\n searchChoiceBox.setValue(\"Learning Applications\");\n }",
"public MultiChoiceQuestion(String q, int diff) {\n\t\tsuper(q, \"\", diff);\n\t\tthis.choices = new ArrayList<String>();\n\t}",
"private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown53() {\n return build_f_ListDropDown53();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to click on edit employee | public void Edit_employee()
{
clk_edit_employee.click();
} | [
"public void clickEdit(){\n\t\tdriver.findElement(edit).click();\n\t}",
"public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}",
"public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}",
"public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-tab-panel-noborder') and not(contains(@class,'x-hide-display'))]//button[contains(@class,'icon-ov-edit')]\").click();\r\n\t\t\r\n\t}",
"public void Click_Employee()\n\t{ \n\t\temploybutt.click();\n\t\t\n\t}",
"public static void editEmployee() {\n new EmployeeEditFrame(employee).setVisible(true);\n }",
"public void editEmployee(ActionRequest request, ActionResponse response) throws PortalException, SystemException {\n\t\tString strKey = request.getParameter(\"editKey\");\n\t\tlong empId = Long.valueOf(strKey);\n\t\tEmployee emp = EmployeeLocalServiceUtil.getEmployee(empId);\n\t\trequest.setAttribute(\"editKey\", emp);\n\t\tresponse.setRenderParameter(\"mvcPath\", \"/html/employee/edit.jsp\");\n\t}",
"public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}",
"@Step(\"{method}\")\n\tpublic ExpensePage clickExpenseEdit() throws Exception {\n\t\tuntilPageLoadComplete();\n\t\tisElementDisplayed(Copyhamburger_Icon_Xpath);\n\t\t//ScrollToElement(Copyhamburger_Icon_Xpath);\n\t\twaitAndClickWebElement(Copyhamburger_Icon_Xpath);\n\t\twaitForElementVisible(edit_Link_Xpath);\n\t\tsafeJavaScriptClick(edit_Link_Xpath);\n\t\twaitAndClickWebElement(edit_Link_Xpath);\n\t\treturn GetInstance(ExpensePage.class);\n\t}",
"public void clickEditOutlet() {\n wait.until(ExpectedConditions.visibilityOfElementLocated(btn_expand));\n scrollIntoView(driver.findElement(btn_expand));\n wait.until(ExpectedConditions.elementToBeClickable(driver.findElement(btn_expand))).click();\n wait.until(ExpectedConditions.visibilityOfElementLocated(btn_edit_outlet)).click();\n System.out.println(\"Navigated to Edit outlet page\");\n }",
"@When(\"^I click on Edit \\\"([^\\\"]*)\\\"$\")\n public void iClickOnEdit(SObject sObject) {\n Navigator.mapActions(sObject).clickEditButton(helper.getItemName());\n }",
"public EditAccountPage clickOnEditAccountLink() {\n\t\tutilities.clickOnElement(homePageLocators.getEditAccountElement());\n\t\treturn new EditAccountPage();\n\t}",
"@RequestMapping(\"/edit/{id}\")\r\n\tpublic ModelAndView editUser(@PathVariable int id,\r\n\t\t\t@ModelAttribute Employee employee) {\r\n\t\tSystem.out.println(\"------------- redirecting to emp edit page --------------\" + employee);\r\n\t\tEmployee employeeObject = dao.getEmployee(id);\r\n\t\treturn new ModelAndView(\"edit\", \"employee\", employeeObject);\r\n\t}",
"public void ClickEditCustomer() {\r\n driver.findElement(By.xpath(\"//*[@id=\\\"form-customer\\\"]/div/table/tbody/tr[12]/td[8]/a/i\")).click();\r\n\t}",
"@Listen(\"onClick=#btnEditar\")\n\tpublic void editar(){\n\t\tif (personaSeleccionada == null) {\n\t\t\tClients.showNotification(\"Debe seleccionar una persona.\");\n\t\t\treturn; \n\t\t}\n\n\t\t// Actualiza la instancia antes de enviarla a editar.\n\t\tpersonaDao.getEntityManager().refresh(personaSeleccionada);\n\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"Persona\", personaSeleccionada);\n\t\tparams.put(\"VentanaPadre\", this);\n\t\tWindow ventanaCargar = (Window) Executions.createComponents(\"/mvc/personaEditar.zul\", winListaPersonas, params);\n\t\tventanaCargar.doModal();\n\n\t}",
"public void viewParticularEmployee() {\r\n\t\tScanner scan = Scan.getScannerInstance();\r\n//\t\tint id;\r\n//\t\tSystem.out.println(\"Enter Employee ID to view details:\");\r\n//\t\tid = scan.nextInt();\r\n//\t\ttry {\r\n//\t\t\t//dao.getparticualarDetail(id);\r\n//\t\t} catch (SQLException e) {\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\r\n\t}",
"public void edit() {\n\t\tEmployee tmpE = view();\r\n\t\t//If the Book to be edited != null\r\n\t\tif(tmpE != null) {\r\n\t\t\tint index=employees.indexOf(tmpE);\r\n\t\t\t//Read in new details for it by calling its read() method\r\n\t\t\ttmpE.read();\r\n\t\t\t//Reset it in the ArrayList to this new \r\n\t\t\temployees.set(index,tmpE);\r\n\t\t}\r\n\t}",
"public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }",
"public String btn_edit_action()\n {\n int n = this.getDataTableSemental().getRowCount();\n ArrayList<SementalDTO> selected = new ArrayList();\n for (int i = 0; i < n; i++) { //Obtener elementos seleccionados\n this.getDataTableSemental().setRowIndex(i);\n SementalDTO aux = (SementalDTO) this.\n getDataTableSemental().getRowData();\n if (aux.isSelected()) {\n selected.add(aux);\n }\n }\n if(selected == null || selected.size() == 0){\n //En caso de que no se seleccione ningun elemento\n MessageBean.setErrorMessageFromBundle(\"not_selected\", this.getMyLocale());\n return null;\n }\n else if(selected.size() == 1){ //En caso de que solo se seleccione un elemento\n \n getgermplasm$SementalSessionBean().setSementalDTO(selected.get(0));\n \n getgermplasm$SemenGatheringSessionBean().resetPagination();\n \n //Llamada al jsp encargado de la edicion de accessiones\n return \"edit\";\n \n }\n else{ //En caso de que sea seleccion multiple\n MessageBean.setErrorMessageFromBundle(\"not_yet\", this.getMyLocale());\n return null;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
closes the source reader | public void closeFile() throws IOException{
sourceReader.close();
} | [
"@Override\n protected void _closeInput() throws IOException\n {\n if (_reader != null) {\n if (_ioContext.isResourceManaged() || isEnabled(Feature.AUTO_CLOSE_SOURCE)) {\n _reader.close();\n }\n _reader = null;\n }\n }",
"public void close() {\r\n\t\t\ttry {\r\n\t\t\t\tbr.close();\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t// logger.warn(\"Error while closing the buffered reader in TRECTokenizer\",\r\n\t\t\t\t// ioe);\r\n\t\t\t}\r\n\t\t}",
"private void closeReader() {\n try {\n if (reader != null) {\n reader.close();\n reader = null;\n }\n } catch (Exception e) {\n logger.warn(\"Failure while closing Hive Record reader.\", e);\n }\n }",
"public void close() {\n // Don't close the reads. The provider is responsible for this.\n // Just dispose of the pointer.\n reads = null;\n }",
"protected void dispose(CoverageReader reader) {\n try {\n// //try to close sub stream\n// Object input = reader.getInput();\n// if(input instanceof ImageReader){\n// final ImageReader ireader = (ImageReader)input;\n// ImageIOUtilities.releaseReader(ireader);\n// }else if(input instanceof InputStream){\n// final InputStream stream = (InputStream) input;\n// stream.close();\n// }else if(input instanceof ImageInputStream){\n// final ImageInputStream stream = (ImageInputStream) input;\n// stream.close();\n// }\n\n reader.dispose();\n\n } catch (CoverageStoreException ex) {\n Logging.getLogger(\"org.geotoolkit.storage.coverage\").log(Level.WARNING, ex.getMessage(), ex);\n }\n }",
"protected void close() {\r\n\t\ttry {\r\n\t\t\t_asciiIn.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Error ocurred while closing file \" + _directory + _filename + _filetype + \":\" + e.getMessage());\r\n\t\t} // catch\r\n\t}",
"public void close() {\n try {\n if (reader != null) {\n reader.close();\n }\n } catch (final Exception ex) {\n if (LogUtil.configEnabled(this)) {\n LogUtil.config(\"Exception while closing stream.\", ex);\n }\n }\n }",
"@Override\n public void close() throws IOException {\n input.close();\n }",
"public void close() throws MiningException {\n if (!this.isOpen())\n throw new MiningDataException(\"Stream is already closed\");\n\n this.open = false;\n try {\n reader.close();\n } catch (IOException ex) {\n throw new MiningDataException(\"Can't close reader from the file: \" + path);\n } catch (NullPointerException ex) { // stream is still/already closed\n }\n reader = null;\n }",
"@Override\n public void close() {\n // don't close the stream.\n }",
"private void dispose(RaysGen source){\n source.close();\n if(source.getBuffer().getRaysBuffers() != params.getViewRaysBuffer()){\n source.getBuffer().getRaysBuffers().close();\n }\n }",
"protected static void closeLine (SourceDataLine line)\n {\n line.drain ();\n line.close ();\n }",
"public static void closeFile() {\n\t\t\n\t\t/*\n\t\t * TODO: MULTILINE-MISSING\n\t\t */\n\t\ttry{\n\t\t\tif(input != null){\n\t\t\t\tinput.close();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.err.println(\"Error: object input stream could not be closed\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t}",
"public void close() {\n\t\tidx = 0;\n\t\tmark = 0;\n\t}",
"@Override\n public final void close() {\n if (!built) {\n data.close();\n data = null;\n if (valid != null) {\n valid.close();\n valid = null;\n }\n if (offsets != null) {\n offsets.close();\n offsets = null;\n }\n built = true;\n }\n }",
"public synchronized void close()\n {\n if (open) {\n open = false;\n reset();\n line.close();\n }\n }",
"public void closeReadFile() {\r\n\t\ttry // close file and exit\r\n\t\t{\r\n\t\t\tif (input != null)\r\n\t\t\t\tinput.close();\r\n\t\t} // end try\r\n\t\tcatch (IOException ioException) {\r\n\t\t\tshowDialog(\"Error closing file!\", true);\r\n\t\t} // end catch\r\n\t}",
"public void close() throws IOException {\n bufferedReader.close();\n this.attachedToCSV = false;\n this.currentLine = 0;\n this.totalLines = -1;\n }",
"public void closeBufferedReader() {\r\n\t\t\ttry {\r\n\t\t\t\tbr.close();\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t// logger.warn(\"Error while closing the buffered reader in TRECTokenizer\",\r\n\t\t\t\t// ioe);\r\n\t\t\t}\r\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get whether the tiles list has changed since the last update. | public boolean haveTilesChanged() {
return tilesChanged;
} | [
"private boolean recentlyChanged() {\n List<ResultValue> previousResultValues = getPreviousResultValues();\n if (previousResultValues.isEmpty()) {\n return false;\n }\n return previousResultValues.get(previousResultValues.size() - 1) != getResultValue();\n }",
"public boolean wasChanged() {\n if (lastChange != wFile.lastModified()) {\n this.lastChange = wFile.lastModified();\n return true;\n } else {\n return false;\n }\n }",
"public boolean hasChanged()\n {\n return map.hasChanged();\n }",
"private boolean hasChanged() {\n\t\treturn changes;\n\t}",
"public boolean hasChanged() {\r\n return lastChange != animation.getLastChange();\r\n }",
"public boolean isModified() {\n\t\tfor (Track track : tracks) {\n\t\t\tif (track.isModified())\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isUpdated() {\n return updated;\n }",
"public boolean isChanged()\r\n\t{\r\n\t\treturn changed;\r\n\t}",
"boolean isUpdated();",
"public boolean isUpdated();",
"public boolean changed()\n {\n if(changed)\n {\n changed = false;\n return true;\n }\n return false;\n }",
"public boolean hasUpdated() {\n return fieldSetFlags()[5];\n }",
"public boolean hasUnsyncedChanges () {\n return !_mods.isEmpty();\n }",
"public boolean isDataModified() {\r\n\t\tint stat = getPageDataStoresStatus();\r\n\r\n\t\tif (stat == DataStoreBuffer.STATUS_MODIFIED)\r\n\t\t\treturn true;\r\n\t\telse if (stat == DataStoreBuffer.STATUS_NEW_MODIFIED)\r\n\t\t\treturn true;\r\n\t\telse if (stat == DataStoreBuffer.STATUS_NEW)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"public boolean hasChanges();",
"private boolean isUnderlyingZipFileChanged() {\n return !this.loadedAtLeastOnce || this.size != this.file\n .getSize() || this.lastModified != this.file.getLastModified();\n }",
"public boolean hasChanges() {\r\n return this.hasAdds() || this.hasRemoves() || this.hasChangedMapKeys() || this.getOwner().isNew();\r\n }",
"public boolean hasChanged() {\n\t\t\t// Note: Checking to see if the size has changed doesn't work under\n\t\t\t// Windows. Apparently the copy operation sets the file to the new\n\t\t\t// size, and then writes the copied data over. I guess this makes\n\t\t\t// sense as a \"fail-fast\" way of making sure a copy won't fail due\n\t\t\t// to a full disk?\n\t\t\tlong size = file.length();\n\t\t\tlong modified = file.lastModified();\n\t\t\t// Rather than check to see if it's newer or anything, just check if\n\t\t\t// it's different. This allows for weird edge cases like the clock\n\t\t\t// going backwards.\n\t\t\tif (size != oldSize || modified != lastModified) {\n\t\t\t\toldSize = size;\n\t\t\t\tlastModified = modified;\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"private boolean hasChangedMapKeys() {\r\n return (changedMapKeys != null) && (!changedMapKeys.isEmpty());\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is this a new release item | public abstract boolean isNewRelease(); | [
"public boolean isNewRelease() {\r\n return newRelease;\r\n }",
"public boolean isRelease() {\n return this.release;\n }",
"public boolean isReleased() {\n // Exam\n ZonedDateTime releaseDate;\n if (this.isExamExercise()) {\n releaseDate = this.getExerciseGroup().getExam().getStartDate();\n }\n else {\n releaseDate = getReleaseDate();\n }\n return releaseDate == null || releaseDate.isBefore(ZonedDateTime.now());\n }",
"protected boolean isReleaseMember(RepositoryItem item) throws RepositoryException {\n \tFreeTextSearchService service = FreeTextSearchServiceFactory.getInstance();\n \tLibrarySearchResult library = service.getLibrary( item, false );\n \tboolean result = false;\n \t\n \tif (library != null) {\n \t\tList<ReleaseSearchResult> releaseList = service.getLibraryReleases( library, false );\n \t\tresult = (releaseList.size() > 0);\n \t}\n \treturn result;\n }",
"private String createReleasedItem() throws Exception {\r\n theItemId = createSubmittedItem();\r\n\r\n String pidParam;\r\n if (getItemClient().getPidConfig(\"cmm.Item.objectPid.setPidBeforeRelease\", \"true\")\r\n && !getItemClient().getPidConfig(\"cmm.Item.objectPid.releaseWithoutPid\", \"false\")) {\r\n pidParam = getPidParam(theItemId, \"http://somewhere\" + this.theItemId);\r\n assignObjectPid(theItemId, pidParam);\r\n }\r\n if (getItemClient().getPidConfig(\"cmm.Item.versionPid.setPidBeforeRelease\", \"true\")\r\n && !getItemClient().getPidConfig(\"cmm.Item.versionPid.releaseWithoutPid\", \"false\")) {\r\n String latestVersion = getLatestVersionObjidValue(theItemXml);\r\n pidParam = getPidParam(latestVersion, \"http://somewhere\" + latestVersion);\r\n assignVersionPid(latestVersion, pidParam);\r\n }\r\n\r\n release(theItemId, getTheLastModificationParam(false, theItemId, null));\r\n\r\n return theItemId;\r\n }",
"@Schema(description = \"Indicates that the version is released. If the version is released a request to release again is ignored. Not applicable when creating a version. Optional when updating a version.\")\n public Boolean isReleased() {\n return released;\n }",
"public boolean isSetRelease()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(RELEASE$4) != 0;\r\n }\r\n }",
"public boolean releasedInTheFuture() {\n\n\t\tif ((getReleasedInYear() == null) || (getReleasedInMonth() == null) || (getReleasedOnDay() == null)) {\n\t\t\t// not released at all!\n\t\t\treturn false;\n\t\t}\n\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(new Date());\n\n\t\tif (cal.get(Calendar.YEAR) < getReleasedInYear()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (cal.get(Calendar.MONTH) < getReleasedInMonth()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (cal.get(Calendar.DAY_OF_MONTH) < getReleasedOnDay()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public final boolean isReleased()\n {\n return released;\n }",
"public boolean isSetRelease_date() {\r\n return this.release_date != null;\r\n }",
"@Test\n public void canObtainOwnRelease() throws Exception {\n final Release release = release();\n final RtReleaseAsset asset = new RtReleaseAsset(\n new FakeRequest(),\n release,\n 1\n );\n MatcherAssert.assertThat(\n asset.release(),\n Matchers.is(release)\n );\n }",
"protected boolean isOld( StorageItem item )\n {\n return isOld( getItemMaxAge(), item );\n }",
"public String releaseTag() { return releaseTag; }",
"public boolean isNew() {\n return content.getPk().isNew();\n }",
"@Override\n\tpublic boolean isItemInStock() {\n\t\treturn _eprocurementRequest.isItemInStock();\n\t}",
"boolean hasBuyArtifactState();",
"public boolean isItNew() {\n\n return itNew;\n }",
"@Override\n public boolean isAcItem(ItemImpl item) throws RepositoryException {\n return false;\n }",
"public String getRelease()\n {\n return release;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The ID of the first DM user, or an empty string if this message was not sent through a DM chat. optional string user_id_one = 12; | com.google.protobuf.ByteString
getUserIdOneBytes(); | [
"java.lang.String getUserIdOne();",
"public UserID userID() {\n if (person != null && !person.userIds.isEmpty())\n return person.userIds.get(0);\n return null;\n }",
"java.lang.String getUserID();",
"public void setFirstUser(User firstUser) {\n this.firstUser = firstUser;\n }",
"public String getIdUser() {\n return idUser;\n }",
"public String getPlayerOneUserName() {\n if (gameStatus == null) return \"\";\n if (gameStatus.getPlayerOneUserName() == null) return \"\";\n return gameStatus.getPlayerOneUserName();\n }",
"public String getSingle_user_phone() {\n return single_user_phone == null ? null : single_user_phone.trim();\n }",
"java.lang.String getSenderId();",
"public int getSender(int messageID){\n Message msg = getmessage(messageID);\n return msg.getSenderid();\n }",
"java.lang.String getUserIdTwo();",
"public int getMemberId1() {\n return memberId1_;\n }",
"com.google.protobuf.StringValue getUserId();",
"public void setFirstTurnIdentifier(String id) {\n this._idFirst = id;\n }",
"public String getUserID();",
"public int getMemberId1() {\n return memberId1_;\n }",
"String getSenderId();",
"@Override\n\tpublic long getUserId() {\n\t\treturn _announcement.getUserId();\n\t}",
"public String getFirstTurnIdentifier() {\n return this._idFirst;\n }",
"public String getUserID(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_USER_ID, null);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SEARCH /_search/hrClassInfos/:query > search for the hrClassInfo corresponding to the query. | @RequestMapping(value = "/_search/hrClassInfos/{query}",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public List<HrClassInfo> searchHrClassInfos(@PathVariable String query) {
log.debug("REST request to search HrClassInfos for query {}", query);
return StreamSupport
.stream(hrClassInfoSearchRepository.search(queryStringQuery(query)).spliterator(), false)
.collect(Collectors.toList());
} | [
"@RequestMapping(value = \"/_search/hrProjectInfos/{query}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<HrProjectInfo> searchHrProjectInfos(@PathVariable String query) {\n log.debug(\"REST request to search HrProjectInfos for query {}\", query);\n return StreamSupport\n .stream(hrProjectInfoSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"com.cst14.im.protobuf.ProtoClass.SearchInfo getSrchInfo();",
"public void setSearchClass(String searchClass) {\r\n this.searchClass = searchClass;\r\n }",
"private void searchFor(String query) {\n AnalyticsHelper.sendEvent(SCREEN_LABEL, \"Search\", \"\");\n Bundle args = new Bundle(1);\n if (query == null) {\n query = \"\";\n }\n args.putString(ARG_QUERY, query);\n mQuery = query;\n\n }",
"@Override\n public List<ClarifaiProcessDTO> search(String query) {\n log.debug(\"Request to search ClarifaiProcesses for query {}\", query);\n return StreamSupport\n .stream(clarifaiProcessSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .map(clarifaiProcessMapper::toDto)\n .collect(Collectors.toList());\n }",
"@RequestMapping(value = \"/_search/hrEducationInfos/{query}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<HrEducationInfo> searchHrEducationInfos(@PathVariable String query) {\n log.debug(\"REST request to search HrEducationInfos for query {}\", query);\n return StreamSupport\n .stream(hrEducationInfoSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"List<Tache> search(String query);",
"public String getSearchClass() {\r\n return searchClass;\r\n }",
"List<SearchResult> search(SearchQuery searchQuery);",
"void executeSearch(String query);",
"List<Codebadge> search(String query);",
"ModelDefResponse fetchSearchResultDef(String queryName);",
"com.cst14.im.protobuf.ProtoClass.SearchInfoOrBuilder getSrchInfoOrBuilder();",
"SearchResult<TimelineMeta> search(SearchQuery searchQuery);",
"public abstract AbstractSearcher createSearcher(Query query);",
"List<Corretor> search(String query);",
"public void search() {\n try {\n for(int i = 0; i < this.queries.size(); i++){\n search(i);\n // in case of error stop\n if(!this.searchOK(i)){\n System.out.println(\"\\t\" + new Date().toString() + \" \" + db + \" Search for rest queries cancelled, because failed for query \" + i + \" : \" + this.queries.get(i));\n break;\n }\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(EntrezSearcher.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void searchTitle(String query) throws Exception{\n String urls=\"http://localhost:8080/search\";\n OkHttpClient client = new OkHttpClient();\n\n HttpUrl.Builder urlBuilder = HttpUrl.parse(urls).newBuilder();\n urlBuilder.addQueryParameter(\"subgenre\", query);\n String url = urlBuilder.build().toString();\n\n Request request = new Request.Builder()\n .url(url)\n .build();\n\n Response response = client.newCall(request).execute();\n gamelist = objectMapper.readValue(response.body().toString(), Game[].class);\n }",
"public void doSearch(String query) {\n timelinesMgr.clearTimeline();\n Search newSearch = new Search(query);\n subscriptionsMgr.addSubscription(newSearch);\n timelinesMgr.addToTimeline(newSearch);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Only the first piece of code that recognizes that the response is done gets to set response end time. | public void setResponseEndTimeNanosToNowIfNotAlreadySet() {
if (this.responseEndTimeNanos == null) {
this.responseEndTimeNanos = System.nanoTime();
}
} | [
"Timer getServerRequestCompletedDuration();",
"public void endResponse() throws IOException {\n out.println();\n //out.println(\"--End\");\n out.flush();\n endedLastResponse = true;\n }",
"protected void finish() {\n writerServerTimingHeader();\n\n try {\n\n // maybe nobody ever call getOutputStream() or getWriter()\n if (bufferedOutputStream != null) {\n\n // make sure the writer flushes everything to the underlying output stream\n if (bufferedWriter != null) {\n bufferedWriter.flush();\n }\n\n // send the buffered response to the client\n bufferedOutputStream.writeBufferTo(getResponse().getOutputStream());\n\n }\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Could not flush response buffer\", e);\n }\n\n }",
"public void setResponseTime(int time){\n\n responseTime = time;\n }",
"boolean hasResponseTimeNsec();",
"long getClientEnd();",
"protected void onEndRequest()\n\t{\n\t}",
"@Test\n\tpublic void checkResponseTime() {\n\t\tlong responsetime = response.getTime();\n\t\tSystem.out.println(\"Response time is:\" + responsetime);\n\t}",
"void stubNextResponse(HttpExecuteResponse nextResponse, Duration delay);",
"public ResponseTime finish(){\n return finish(Instant.now());\n }",
"@Override\n public void responseEnd(RequestMetric requestMetric, HttpServerResponse response) {\n log.debugf(\"responseEnd: %s, %s\", requestMetric, response);\n\n Timer.Sample sample = getRequestSample(requestMetric);\n if (sample != null) {\n String requestPath = getServerRequestPath(requestMetric);\n Timer.Builder builder = Timer.builder(nameHttpServerRequests)\n .tags(requestMetric.tags)\n .tags(Tags.of(\n VertxMetricsTags.uri(requestPath, response.getStatusCode()),\n VertxMetricsTags.outcome(response),\n VertxMetricsTags.status(response.getStatusCode())));\n\n sample.stop(builder.register(registry));\n }\n }",
"public void recordResponseTime() {\n long responseTime = System.nanoTime() - responseTimeMetric;\n thePlayer.setResponseTime(responseTime);\n\n double responseTimeSec = responseTime / 1000000000.0;\n\n logger.info(\"Your response time was: \" \n + responseTimeSec + \" seconds\");\n }",
"public void setResponseTime( String responseTime ) {\n this.responseTime = responseTime;\n }",
"public void setResponseTime(int responseTime) {\n\t\tthis.responseTime = responseTime;\n\t}",
"@Test(description = \"This test verifies api response time\", groups = { \"topmonitor\" }, enabled = false)\n\tpublic void testResponseTime() {\n\t\tString api = \"http://economictimes.indiatimes.com/homefeed.cms?feedtype=etjson&curpg=1\";\n\t\tLong startTime = System.currentTimeMillis();\n\t\tApiHelper.getAPIResponse(api);\n\t\tLong endTime = System.currentTimeMillis();\n\t\tLong totalTime = endTime - startTime;\n\t\tDBUtil.dbInsertApi(new Date(), api, totalTime.doubleValue());\n\t}",
"public void endResponse()\n\t\t\t{\n\t\t\t\tsend(\"</response>\", false);\n\t\t\t}",
"public void setResponseTime(long responseTime) {\n\t\tthis.responseTime = responseTime;\n\t}",
"long getResponseTime();",
"boolean hasTrickEndedResponse();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Configure the classifier to traverse the cause chain. | public RetryTopicConfigurationBuilder traversingCauses() {
classifierBuilder().traversingCauses();
return this;
} | [
"public void setClassifier(Classifier classifier) {\n this.classifier = classifier;\n //setClassifier(classifier, false);\n }",
"public void configure(Configuration config) {\r\n this.learner = config.get(\"classifier\");\r\n if(learner == null)\r\n throw new IllegalArgumentException(\"No weka classifier specified. Make sure a 'classifier' property is specified.\");\r\n this.classifier = classifiers.get(learner);\r\n if(classifier == null)\r\n throw new IllegalArgumentException(\"Invalid weka classifier name of '\"+learner+\"' - must be one of \"+ArrayUtil.asString(classifiers.getValidNames()));\r\n\r\n super.configure(config);\r\n\r\n logger.config(\" \"+this.getClass().getName()+\" configure: weka-classifier[\"+learner+\"]=\"+classifier);\r\n\r\n if(config.containsKey(\"options\"))\r\n {\r\n try\r\n {\r\n classifier.setOptions(config.get(\"options\").split(\" \"));\r\n }\r\n catch(Exception ex)\r\n {\r\n throw new RuntimeException(\"Failed to initialize \"+this.getClass().getName(),ex);\r\n }\r\n }\r\n /**\r\n * For later use... eventually we may want to read in a Weka model from a file:\r\n *\r\n * read in weka-model from file:\r\n * InputStream is = new FileInputStream(objectInputFileName);\r\n if (objectInputFileName.endsWith(\".gz\")) {\r\n is = new GZIPInputStream(is);\r\n }\r\n\t objectInputStream = new ObjectInputStream(is);\r\n if (objectInputFileName.length() != 0) {\r\n\r\n // Load classifier from file\r\n classifier = (Classifier) objectInputStream.readObject();\r\n objectInputStream.close();\r\n }\r\n */\r\n }",
"public void configure(Configuration config) {\r\n learner = config.get(\"classifier\");\r\n if(learner == null)\r\n throw new IllegalArgumentException(\"No weka classifier specified. Make sure a 'classifier' property is specified.\");\r\n classifier = classifiers.get(learner);\r\n if(classifier == null)\r\n throw new IllegalArgumentException(\"Invalid weka classifier name of '\"+learner+\"' - must be one of \"+ArrayUtil.asString(classifiers.getValidNames()));\r\n\r\n super.configure(config);\r\n\r\n logger.config(\" \"+this.getClass().getName()+\"[\"+getName()+\"] configure: weka-classifier[\"+learner+\"]=\"+classifier);\r\n\r\n if(config.containsKey(\"options\"))\r\n {\r\n try\r\n {\r\n classifier.setOptions(config.get(\"options\").split(\" \"));\r\n }\r\n catch(Exception ex)\r\n {\r\n throw new RuntimeException(\"Failed to initialize \"+this.getClass().getName(),ex);\r\n }\r\n }\r\n }",
"private void setParentFeatures(ClassifiedFeature classifiedFeature, Classifier newClassifier) {\n Feature childFeature = classifiedFeature.getFeature();\r\n List<Feature> anchestors = FeatureModelUtil.getAllAchestorFeatures(childFeature);\r\n\r\n Classification classification = (Classification) classifiedFeature.eContainer();\r\n // set each anchestor alive\r\n for (Feature feature : anchestors) {\r\n // check if the parent features are contained in the view and therefore can be configured manually\r\n handleAutoCompleteFeature(feature, newClassifier, classification);\r\n }\r\n }",
"public void setCorrectionClassifier(int low, int high, AuToBIClassifier classifier) {\n correction_classifiers.put(generateKey(low, high), classifier);\n }",
"public void setClassifier(String clazz) {\n\t\tthis.classifier = clazz;\n\t}",
"public void setClassifier(Classifier c){\n\t\tthis.c = c;\n\t}",
"public void setClassifier(String classifier) {\n\t\tthis.classifier = classifier;\n\t}",
"protected void classifyComponents(ValidationContext vctx) {\n \n // check for classification already run\n if (!isClassified()) {\n \n // check if there's a mapping if used without children\n // TODO: this isn't correct, but validation may not have reached\n // this element yet so the context may not have been set. Clean\n // this with parent link in all elements.\n DefinitionContext dctx = vctx.getDefinitions();\n if (children().size() == 0) {\n if (m_mapAsQName == null) {\n \n // make sure not just a name, allowed for skipped element\n if (!isFlagOnly() &&\n (hasProperty() || getDeclaredType() != null)) {\n \n // see if this is using implicit marshaller/unmarshaller\n if ((vctx.isInBinding() && getUnmarshallerName() == null) ||\n (vctx.isOutBinding() && getMarshallerName() == null)) {\n if (getUsing() == null) {\n \n // check for specific type known\n IClass type = getType();\n if (type == null) {\n vctx.addError(\"Internal error - null type\");\n } else if (!\"java.lang.Object\".equals(type.getName())) {\n setMappingReference(vctx, dctx, type);\n }\n }\n }\n }\n \n } else {\n \n // find mapping by type name or class name\n TemplateElementBase base =\n dctx.getNamedTemplate(m_mapAsQName.toString());\n if (base == null) {\n base = dctx.getSpecificTemplate(m_mapAsName);\n if (base == null) {\n vctx.addFatal(\"No mapping with type name \" +\n m_mapAsQName.toString());\n }\n }\n if (base != null) {\n \n // make sure type is compatible\n IClass type = getType();\n if (vctx.isLookupSupported() && type != null) {\n if (!type.isAssignable(base.getHandledClass()) &&\n !base.getHandledClass().isAssignable(type)) {\n vctx.addError(\"Object type \" + type.getName() +\n \" is incompatible with binding for class \" +\n base.getClassName());\n }\n }\n m_effectiveMapping = base;\n \n // check for namespace conflicts\n checkNamespaceUsage(base, vctx);\n \n // set flag for mapping with name\n m_hasMappingName = base instanceof MappingElementBase &&\n !((MappingElementBase)base).isAbstract();\n }\n \n }\n \n // classify mapping reference as providing content, attributes, or both\n if (m_effectiveMapping instanceof MappingElement) {\n MappingElement mapping = (MappingElement)m_effectiveMapping;\n mapping.classifyComponents(vctx);\n if (hasProperty()) {\n mapping.verifyConstruction(vctx);\n }\n if (mapping.getName() == null) {\n ArrayList attribs = EmptyArrayList.INSTANCE;\n ArrayList contents = EmptyArrayList.INSTANCE;\n if (mapping.getContentComponents().size() > 0) {\n contents = new ArrayList();\n contents.add(m_effectiveMapping);\n }\n if (mapping.getAttributeComponents().size() > 0) {\n attribs = new ArrayList();\n attribs.add(m_effectiveMapping);\n }\n setComponents(attribs, contents);\n } else {\n ArrayList contents = new ArrayList();\n contents.add(m_effectiveMapping);\n setComponents(EmptyArrayList.INSTANCE, contents);\n }\n }\n \n } else if (m_mapAsName != null) {\n vctx.addError(\"map-as attribute cannot be used with children\");\n }\n \n }\n \n // pass on call to superclass implementation\n super.classifyComponents(vctx);\n }",
"public void setCauseOf(gov.ucore.ucore._2_0.CauseOfRelationshipType causeOf)\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.CauseOfRelationshipType target = null;\n target = (gov.ucore.ucore._2_0.CauseOfRelationshipType)get_store().find_element_user(CAUSEOF$0, 0);\n if (target == null)\n {\n target = (gov.ucore.ucore._2_0.CauseOfRelationshipType)get_store().add_element_user(CAUSEOF$0);\n }\n target.set(causeOf);\n }\n }",
"public void buildClassHierarchy() throws Exception {\n\t\tch = ClassHierarchy.make(scope);\n\t}",
"public static void initializeClassAttributes() {\n\tAboraSupport.findAboraClass(FeDetector.class).setAttributes( new Set().add(\"DEFERRED\").add(\"EQ\"));\n/*\n\nGenerated during transformation: AddMethod\n*/\n}",
"Configuration setTransitive(boolean t);",
"public void resolveChainedTargets() {\n final Map<TypeVariable, InferredValue> inferredTypes = new LinkedHashMap<>(this.size());\n\n //TODO: we can probably make this a bit more efficient\n boolean grew = true;\n while (grew == true) {\n grew = false;\n for (final Entry<TypeVariable, InferredValue> inferred : this.entrySet()) {\n final TypeVariable target = inferred.getKey();\n final InferredValue value = inferred.getValue();\n\n if (value instanceof InferredType) {\n inferredTypes.put(target, value);\n\n } else {\n final InferredTarget currentTarget = (InferredTarget) value;\n final InferredType equivalentType = (InferredType) inferredTypes.get(((InferredTarget) value).target);\n\n if (equivalentType != null) {\n grew = true;\n final AnnotatedTypeMirror type = equivalentType.type.deepCopy();\n type.replaceAnnotations(currentTarget.additionalAnnotations);\n\n final InferredType newConstraint = new InferredType(type);\n inferredTypes.put(currentTarget.target, newConstraint);\n }\n }\n }\n }\n\n this.putAll(inferredTypes);\n }",
"public void setClassifier(String classifier) {\n JodaBeanUtils.notNull(classifier, \"classifier\");\n this._classifier = classifier;\n }",
"private void configure() {\r\n LogManager manager = LogManager.getLogManager();\r\n String className = this.getClass().getName();\r\n String level = manager.getProperty(className + \".level\");\r\n String filter = manager.getProperty(className + \".filter\");\r\n String formatter = manager.getProperty(className + \".formatter\");\r\n\r\n //accessing super class methods to set the parameters\r\n\r\n\r\n }",
"public void setCause(Throwable cause) {\n this.cause = cause;\n }",
"public void classify() {\r\n \t\t// interpreter needs the analyzer\r\n \t\tanalyzer = new ConfigurationAnalyzer(actor);\r\n \r\n \t\t// checks for empty actors\r\n \t\tList<Action> actions = actor.getActions();\r\n \t\tif (actions.isEmpty()) {\r\n \t\t\tSystem.out.println(\"actor \" + actor\r\n \t\t\t\t\t+ \" does not contain any actions, defaults to dynamic\");\r\n \t\t\tactor.setMoC(new DynamicMoC());\r\n \t\t\treturn;\r\n \t\t}\r\n \r\n \t\t// checks for actors with time-dependent behavior\r\n \t\tboolean td = new TimeDependencyAnalyzer(actor).isTimeDependent();\r\n \t\tactor.setTimeDependent(td);\r\n \t\tif (actor.isTimeDependent()) {\r\n \t\t\tSystem.out.println(\"actor \" + actor\r\n \t\t\t\t\t+ \" is time-dependent, defaults to dynamic\");\r\n \t\t\tactor.setMoC(new DynamicMoC());\r\n \t\t\treturn;\r\n \t\t}\r\n \r\n \t\t// first tries SDF with *all* the actions of the actor\r\n \t\tMoC clasz = classifySDF(actions);\r\n \t\tif (!clasz.isSDF()) {\r\n \t\t\ttry {\r\n \t\t\t\t// not SDF, tries CSDF\r\n \t\t\t\tclasz = classifyCSDF();\r\n \t\t\t} catch (OrccRuntimeException e) {\r\n \t\t\t\t// data-dependent behavior\r\n \t\t\t}\r\n \r\n \t\t\tif (!clasz.isCSDF()) {\r\n \t\t\t\t// not CSDF, tries QSDF\r\n \t\t\t\tif (actor.getActionScheduler().hasFsm()) {\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tclasz = classifyQSDF();\r\n \t\t\t\t\t} catch (OrccRuntimeException e) {\r\n \t\t\t\t\t\t// data-dependent behavior\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\tif (clasz.isSDF()) {\r\n \t\t\t// print port token rates\r\n \t\t\tSDFMoC staticClass = (SDFMoC) clasz;\r\n \t\t\tstaticClass.printTokenConsumption();\r\n \t\t\tstaticClass.printTokenProduction();\r\n \t\t\tSystem.out.println();\r\n \t\t} else if (clasz.isCSDF()) {\r\n \t\t\tCSDFMoC csdfClass = (CSDFMoC) clasz;\r\n \t\t\tcsdfClass.printTokenConsumption();\r\n \t\t\tcsdfClass.printTokenProduction();\r\n \t\t\tSystem.out.println();\r\n \t\t} else if (clasz.isDynamic()) {\r\n \t\t\tSystem.out.println(\"actor \" + actor + \" classified dynamic\");\r\n \t\t}\r\n \r\n \t\tactor.setMoC(clasz);\r\n \t}",
"public void buildClassifier(Instances data) throws Exception {\r\n // can classifier handle the data?\r\n getCapabilities().testWithFail(data);\r\n\r\n // adapt the differential privacy parameter from a global\r\n // parameter to a per-operation parameter\r\n // Due to partition operation, a quota should be given per level of depth\r\n // for each level of depth (node), we make two operations:\r\n // 1. noisy count on num instances (to decide whether to turn to leaf or split\r\n // 2. choose class (for leaf) or choose splitting attribute (for node)\r\n\r\n PrivacyAgent privacyAgent = new PrivacyAgentBudget(m_Epsilon);\r\n m_PrivacyBudgetForLeaves=new BigDecimal(-Math.log(1-Math.pow(CONFIDENCE_BOUNDS,data.classAttribute().numValues()))/ m_Granularity, DiffPrivacyClassifier.MATH_CONTEXT);\r\n m_PrivacyBudgetForStoppingCriterion =new BigDecimal(Math.log(CONFIDENCE_BOUNDS/(1-CONFIDENCE_BOUNDS))/(2* m_Granularity),DiffPrivacyClassifier.MATH_CONTEXT);\r\n\r\n // Divide the remaining budget among the attribute choice decisions\r\n BigDecimal budget=m_Epsilon.subtract(m_PrivacyBudgetForLeaves);\r\n if (budget.signum()>0)\r\n {\r\n int depth=(int) Math.floor(budget.divide(m_PrivacyBudgetForStoppingCriterion,DiffPrivacyClassifier.MATH_CONTEXT).doubleValue());\r\n if (m_MaxDepth>depth)\r\n m_MaxDepth=depth;\r\n \r\n budget=budget.subtract(m_PrivacyBudgetForStoppingCriterion.multiply(BigDecimal.valueOf(m_MaxDepth)));\r\n if (m_MaxDepth>0)\r\n m_PrivacyBudgetForAttributeChoice=budget.divide(BigDecimal.valueOf(m_MaxDepth),DiffPrivacyClassifier.MATH_CONTEXT);\r\n else\r\n m_PrivacyBudgetForAttributeChoice=BigDecimal.ZERO;\r\n\r\n }\r\n else\r\n {\r\n m_MaxDepth=0;\r\n m_PrivacyBudgetForStoppingCriterion=BigDecimal.ZERO;\r\n m_PrivacyBudgetForAttributeChoice=BigDecimal.ZERO;\r\n }\r\n\r\n //m_PrivacyBudgetForAttributeChoice=m_PrivacyBudgetForLeaves.multiply(BigDecimal.valueOf(data.numAttributes()));\r\n //m_PrivacyBudgetForNodes= m_PrivacyBudgetForStoppingCriterion.add(m_PrivacyBudgetForAttributeChoice);\r\n\r\n if (m_Debug)\r\n {\r\n System.out.println(\"Overall epsilon is \" + m_Epsilon);\r\n System.out.println(\"Depth is \" + m_MaxDepth);\r\n System.out.println(\"Granularity is \" + m_Granularity);\r\n System.out.println(\"epsilon per leaf \" +m_PrivacyBudgetForLeaves);\r\n System.out.println(\"epsilon per continuation choice is \" + m_PrivacyBudgetForStoppingCriterion);\r\n System.out.println(\"epsilon per attribute choice is \" + m_PrivacyBudgetForAttributeChoice);\r\n //System.out.println(\"epsilon per node \" +m_PrivacyBudgetForNodes);\r\n }\r\n\r\n // remove instances with missing class\r\n data.deleteWithMissingClass();\r\n if (m_Debug)\r\n System.out.println(\"Total (accurate) number of instances: \" + data.numInstances());\r\n\r\n PrivateInstances privateData= new PrivateInstances(privacyAgent,data);\r\n privateData.setDebugMode(m_Debug);\r\n privateData.setSeed(getSeed());\r\n\r\n List<C45Attribute> candidateAttributes = new LinkedList<C45Attribute>();\r\n Enumeration attEnum = data.enumerateAttributes();\r\n while (attEnum.hasMoreElements())\r\n candidateAttributes.add(new C45Attribute(((Attribute)attEnum.nextElement())));\r\n\r\n makeTree(privateData,candidateAttributes);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use ReqBattleEnd.newBuilder() to construct. | private ReqBattleEnd(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"protobuf.clazz.Protocol.GameEndResponseOrBuilder getGameEndOrBuilder();",
"protobuf.clazz.Protocol.GameEndResponse getGameEnd();",
"private LeaveBattleReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public static com.voole.hobbit2.camus.order.OrderPlayEndReqSrvV2.Builder newBuilder() {\n return new com.voole.hobbit2.camus.order.OrderPlayEndReqSrvV2.Builder();\n }",
"public static com.voole.hobbit2.camus.order.OrderPlayEndReqSrvV2.Builder newBuilder(com.voole.hobbit2.camus.order.OrderPlayEndReqSrvV2.Builder other) {\n return new com.voole.hobbit2.camus.order.OrderPlayEndReqSrvV2.Builder(other);\n }",
"public ResponseTime finish(Instant end){\n if(isFinished()) {\n throw new IllegalStateException(\"Transaction already finished\");\n }\n return new ResponseTime(uuid, transaction, getStart(), Duration.between(getStart(), end));\n }",
"com.bingo.server.msg.Fight.FightExitGameRequestOrBuilder getFightExitGameRequestOrBuilder();",
"com.github.jtendermint.jabci.types.Types.RequestEndBlockOrBuilder getEndBlockOrBuilder();",
"public static com.voole.hobbit2.camus.order.OrderPlayEndReqSrvV2.Builder newBuilder(com.voole.hobbit2.camus.order.OrderPlayEndReqSrvV2 other) {\n return new com.voole.hobbit2.camus.order.OrderPlayEndReqSrvV2.Builder(other);\n }",
"com.bingo.server.msg.Fight.FightExitGameRequest getFightExitGameRequest();",
"com.github.jtendermint.jabci.types.Types.ResponseEndBlockOrBuilder getEndBlockOrBuilder();",
"com.protobuftest.protobuf.GameProbuf.Game.End getEnd();",
"private RequestEndBlock(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private ResponseEndBlock(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private MatchBattleReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public protobuf.clazz.Protocol.GameEndResponse getGameEnd() {\n return gameEnd_;\n }",
"private CancelMatchBattleReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"com.felania.msldb.MsgBattleEndCVCOuterClass.MsgBattleEndCVCOrBuilder getCvcOrBuilder();",
"com.bingo.server.msg.Fight.FightAgreeExitGameRequest getFightAgreeExitGameRequest();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Jwt access token converter jwt access token converter. | @Bean
public JwtAccessTokenConverter jwtAccessTokenConverter() {
JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
String jwtsigningKey = paascloudProperties.getSecurity().getOauth2().getJwtSigningKey();
if(StringUtils.isBlank(jwtsigningKey)){
jwtsigningKey = "paascloud";
}
converter.setSigningKey(jwtsigningKey);
return converter;
} | [
"@Bean\n public JwtAccessTokenConverter tokenConverter() {\n JwtAccessTokenConverter converter = new JwtAccessTokenConverter();\n converter.setSigningKey(Constants.SIGN_KEY);\n return converter;\n }",
"private JwtAuthenticationConverter jwtAuthenticationConverter() {\n JwtAuthenticationConverter jwtAuthenticationConverter = new JwtAuthenticationConverter();\n jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter(new MyIDPAuthoritiesConverter());\n return jwtAuthenticationConverter;\n }",
"@Bean\n public JwtAccessTokenConverter tokenEnhancer() {\n var jwtTokenEnhancer = new JwtTokenEnhancer(keyPairHolder);\n jwtTokenEnhancer.setAccessTokenConverter(accessTokenConverter());\n return jwtTokenEnhancer;\n }",
"public JwtAuthenticationConverter(JwtTokenService jwtTokenService) {\n this.jwtTokenService = jwtTokenService;\n }",
"String toToken(JwtClaims claims, SecretKey key);",
"String generateJWTToken(AuthUser authUser);",
"@FormUrlEncoded\n @POST(\"exchange/jwt/\")\n Call<AuthToken> getAuthToken(@Field(\"client_id\") String id, @Field(\"client_secret\") String secret, @Field(\"jwt_token\") String jwt);",
"@Test\n void jwtTest(){\n String token = new JwtsUtils().parserToken(\"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjMiLCJpYXQiOjE2MTg5MzQzNjd9.2i4Vrez1FtQYdN4-xkTD-m_PSqE9_qoTk-Wqo_6YxP0\");\n System.out.println(token);\n }",
"@Override\n public AccessTokenDTO getAccessToken() {\n return restTemplate.getForObject(weChatProperties.getAssessTokenIp(),AccessTokenDTO.class,SystemConstants.ACCESS_TOKENG_RANT_TYPE,weChatProperties.getAppid(),weChatProperties.getAppsecret());\n }",
"Pokemon.RequestEnvelop.AuthInfo.JWT getToken();",
"public TrueNTHAccessTokenExtractor<JsonObject> getAccessTokenExtractor() {\n\n\treturn new TrueNTHAccessTokenExtractorJSon();\n }",
"@Override\n public void acceptVisitor(AuthServiceVisitor visitor) {\n visitor.visitAccessToken(this);\n }",
"public static JSONObject buildLoginJwt (OAuthClientResponse oAuthResponse,\n String spaName) throws OperationFailureExceptions {\n\n // read the access token from the OAuth token end-point response.\n String accessToken = oAuthResponse.getParam(ProxyUtils.ACCESS_TOKEN);\n // read the refresh token from the OAuth token end-point response.\n String refreshToken = oAuthResponse.getParam(ProxyUtils.REFRESH_TOKEN);\n // read the expiration from the OAuth token endpoint response.\n long expiration = Long.parseLong(oAuthResponse.getParam(ProxyUtils.EXPIRATION));\n // read the id token from the OAuth token end-point response.\n String idToken = oAuthResponse.getParam(ProxyUtils.ID_TOKEN);\n\n if (idToken != null) {\n // extract out the content of the JWT, which comes in the id token.\n String[] idTkElements = idToken.split(Pattern.quote(\".\"));\n idToken = idTkElements[1];\n }\n\n // create a JSON object aggregating OAuth access token, refresh token and id token\n JSONObject json = new JSONObject();\n\n try {\n json.put(ProxyUtils.ID_TOKEN, idToken);\n json.put(ProxyUtils.ACCESS_TOKEN, accessToken);\n json.put(ProxyUtils.REFRESH_TOKEN, refreshToken);\n json.put(ProxyUtils.SPA_NAME, spaName);\n json.put(ProxyUtils.EXPIRATION, Long.valueOf(expiration));\n return json;\n } catch (JSONException e) {\n throw new OperationFailureExceptions(\"Error while building the login jwt from the OAuth token endpoint \" +\n \"response.\", e);\n }\n }",
"java.lang.String getAccessToken();",
"private OIDCTokens makeJWTBearerGrantRequest()\n throws java.text.ParseException, URISyntaxException, IOException, ParseException {\n\n SignedJWT signedJWT = SignedJWT.parse(jwtAssertion);\n AuthorizationGrant jwtGrant = new JWTBearerGrant(signedJWT);\n return makeTokenRequest(jwtGrant);\n }",
"public Token createAuthorizationToken(User user);",
"String createNewAuthorizationToken(User forUser);",
"String createJwt(JwtInfo jwt) throws TokenCreateFailedException {\n try {\n Assert.notNull(jwt);\n Date issuedAt = new Date(jwt.getCreateTime());\n Date expiresAt = new Date(jwt.getExpireTime());\n return JWT.create().withIssuer(jwt.getIssuer()).withIssuedAt(issuedAt)\n .withExpiresAt(expiresAt).withAudience(jwt.getAudience()).withSubject(jwt.getSubject())\n .withClaim(JwtInfo.USER_NAME_KEY, jwt.getName())\n .withClaim(JwtInfo.USER_ACCOUNT_KEY, jwt.getAccount())\n .withClaim(JwtInfo.PERMISSION_KEY, jwt.getPermission())\n .sign(Algorithm.HMAC512(this.securityKey));\n } catch (Exception e) {\n log.error(\"failed create jwt \", e);\n throw new TokenCreateFailedException(\"failed create jwt: \" + jwt, e);\n }\n }",
"AuthResponse getJWTToken(String userId) throws IaaSServiceException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the remote port | public void updateRemotePort(int remotePort){
this.remotePort = remotePort;
} | [
"public void updateLocalPort(int localPort){\n this.localPort = localPort;\n }",
"private void setRemoteDataPort(int value) {\n\n remoteDataPort_ = value;\n }",
"public final void setRemoteSocketPort(int port){\r\n remoteSocketPort = port;\r\n }",
"public void setPort(int port);",
"private void setRemoteProxyPort(int value) {\n\n remoteProxyPort_ = value;\n }",
"public void setPort(Port port);",
"void updateHttpPort() {\n String target = Util.computeTarget(instance.getProperties());\n String gpc;\n if (Util.isDefaultOrServerTarget(instance.getProperties())) {\n gpc = \"*.server-config.*.http-listener-1.port\";\n setEnvironmentProperty(GlassfishModule.HTTPHOST_ATTR, \n instance.getProperty(GlassfishModule.HOSTNAME_ATTR), true); // NOI18N\n } else {\n String server = getServerFromTarget(target);\n String adminHost = instance.getProperty(GlassfishModule.HOSTNAME_ATTR);\n setEnvironmentProperty(GlassfishModule.HTTPHOST_ATTR,\n getHttpHostFromServer(server,adminHost), true);\n gpc = \"servers.server.\"+server+\".system-property.HTTP_LISTENER_PORT.value\";\n }\n try {\n ResultMap<String, String> result = CommandGetProperty.getProperties(\n instance, gpc, GlassfishModule.PROPERTIES_FETCH_TIMEOUT);\n boolean didSet = false;\n if (result.getState() == TaskState.COMPLETED) {\n Map<String, String> values = result.getValue();\n for (Entry<String, String> entry : values.entrySet()) {\n String val = entry.getValue();\n try {\n if (null != val && val.trim().length() > 0) {\n Integer.parseInt(val);\n setEnvironmentProperty(GlassfishModule.HTTPPORT_ATTR, val, true);\n didSet = true;\n }\n } catch (NumberFormatException nfe) {\n LOGGER.log(Level.FINEST,\n \"Property value {0} was not a number\", val);\n }\n }\n }\n if (!didSet && !Util.isDefaultOrServerTarget(instance.getProperties())) {\n setEnvironmentProperty(GlassfishModule.HTTPPORT_ATTR, \"28080\", true); // NOI18N\n }\n } catch (GlassFishIdeException gfie) {\n LOGGER.log(Level.INFO, \"Could not get http port value.\", gfie);\n }\n }",
"public void setServerPort(int newPort) {\n\t\tif (newPort == serverPort) return;\n\t\tserverPort = newPort;\n\t\tif (connected) reconnect();\n\t}",
"public void setPort(int value) {\n this.port = value;\n }",
"public final void setSessionPort(int port) {\n m_remotePort = port;\n }",
"public void setPort(int p) {\n\t\tport = p;\n\t}",
"public void setPort(String port) {\r\n \t\tfPort = port;\r\n \t\tfDirty = true;\r\n \t}",
"public void setPort(int port) {\n m_Port = port;\n }",
"public void setRemoteAddress(String host, int port) {\n this.host = host;\n this.port = port;\n }",
"public int forwardRemotePort(String fwdAddress, int fwdPort, IProgressMonitor monitor) throws RemoteConnectionException;",
"public void testSetPort() {\n }",
"public void setLocalPort(int localPort) {\n this.localPort = localPort;\n }",
"public final void updateRMIPort(final String rmiPort) {\n\t\tremoteProperties.updateRMIPort(rmiPort);\n\t}",
"int getRemoteManagerPort();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column S_TODO_DET.RECEIVED_CODE | public BigDecimal getRECEIVED_CODE() {
return RECEIVED_CODE;
} | [
"public void setRECEIVED_CODE(BigDecimal RECEIVED_CODE) {\r\n this.RECEIVED_CODE = RECEIVED_CODE;\r\n }",
"public java.lang.String getReceiveCode() {\r\n return receiveCode;\r\n }",
"protocol.Msg.ReadTableMsg.ReadImportantTableRsp.ResultCode getResultCode();",
"@Override\n\tpublic java.lang.String getDetailCode() {\n\t\treturn _codeDto.getDetailCode();\n\t}",
"public Date getDATE_RECEIVED() {\r\n return DATE_RECEIVED;\r\n }",
"public Long getCode() {\n return code;\n }",
"MWeixinCodeDTO selectByPrimaryKey(String code);",
"String getCodeColumn();",
"public void setReceiveCode(java.lang.String receiveCode) {\r\n this.receiveCode = receiveCode;\r\n }",
"public java.lang.String getOrder_code_desc() {\n return order_code_desc;\n }",
"@javax.persistence.Column(name = \"event_code\", nullable = false)\n\tpublic java.lang.Integer getEventCode() {\n\t\treturn getValue(org.jooq.examples.cubrid.demodb.tables.Record.RECORD.EVENT_CODE);\n\t}",
"@Select({\n \"select\",\n \"code, host, date, app_name\",\n \"from app_download_info\",\n \"where code = #{code,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n AppDownloadInfo selectByPrimaryKey(Integer code);",
"public String getCode(){\n if (!isProcedure())\n return null;\n else\n return code;\n }",
"public String getJP_BankDataCustomerCode2();",
"public long toLong() {\r\n return code;\r\n }",
"public abstract java.lang.String getCod_lote_sap();",
"public int getBd_code() {\r\n return Bd_code;\r\n }",
"public BigDecimal getRECEIPT_NO() {\r\n return RECEIPT_NO;\r\n }",
"public ScGridColumn<AcItemMovementVo> newReceiveAirportCodeColumn()\n {\n return newReceiveAirportCodeColumn(\"Receive Airport Code\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the label associated with the specified address. | AccountLabel getLabel(final Address address); | [
"private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }",
"Label getLabelForAddress(final int addressOffset) {\n if (this.addressLabels.containsKey(addressOffset)) {\n return this.addressLabels.get(addressOffset);\n } else {\n final Label label = new Label();\n this.addressLabels.put(addressOffset, label);\n return label;\n }\n }",
"private String getDeasLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return symbols[key] + \": \";\n }\n return \"\";\n }",
"private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }",
"public UUID getLabelUUID(final int address) {\n return MeshAddress.getLabelUuid(labelUuids, address);\n }",
"private Object lookupSymbol(Address addr) {\n\t\tExternalReference ref = getExternalReference(addr);\n\t\tif (ref != null) {\n\t\t\treturn ref;\n\t\t}\n\t\tFunction func = getFunctionContaining(addr);\n\t\tif (func != null) {\n\t\t\treturn func;\n\t\t}\n\t\tRegister reg = program.getRegister(addr);\n\t\tif (reg != null) {\n\t\t\t// This isn't an actual symbol, let decompiler fill in the register name at a later time\n\t\t\treturn null;\n\t\t}\n\t\tData data = listing.getDataContaining(addr);\n\t\tif (data != null) {\n\t\t\treturn data;\n\t\t}\n\t\t// This final query checks for labels with no real datatype attached\n\t\t// which works especially for labels for addresses without a memory block \n\t\tSymbol sym = program.getSymbolTable().getPrimarySymbol(addr);\n\t\tif ((sym != null) && sym.isGlobal()) {\n\t\t\treturn sym; // A label of global data of some sort\n\t\t}\n\t\treturn null;\n\t}",
"com.google.ads.googleads.v1.resources.Label getLabel();",
"protected int getLabelAddress(String id, int offset) {\n\t\tLabelSymbol sym = (LabelSymbol) labels.get(id);\n\t\tif (sym == null) {\n\t\t\t// assume it's a forward code reference; record opnd address\n\t\t\tsym = new LabelSymbol(id, ip - 1, offset, true);\n\t\t\tsym.isDefined = false;\n\t\t\tlabels.put(id, sym); // add to symbol table\n\t\t} else {\n\t\t\tif (sym.isForwardRef) {\n\t\t\t\t// address is unknown, must simply add to forward ref list\n\t\t\t\t// record where in code memory we should patch later\n\t\t\t\tsym.addForwardReference(ip - 1, offset);\n\t\t\t} else {\n\t\t\t\t// all is well; it's defined--just grab address\n\t\t\t\treturn sym.address;\n\t\t\t}\n\t\t}\n\t\treturn 0; // we don't know the real address yet\n\t}",
"com.google.ads.googleads.v6.resources.Label getLabel();",
"public LabelModel getLabel(String aName);",
"public ProgramLabel newProgramLabel(String name, int byteAddress) {\n ProgramLabel label = new ProgramLabel(name, byteAddress);\n labels.put(labelName(name), label);\n return label;\n }",
"public String getLabel(int index) {\r\n\t\treturn (String) labels.elementAt(index);\r\n\t}",
"public static Optional<Label> getLabel(Node node) {\n return Optional.ofNullable((Label) node.queryAccessibleAttribute(AccessibleAttribute.LABELED_BY));\n }",
"java.lang.String getFromAddress();",
"public String getLabelInfo(int label) {\n return getLabelInfo_0(nativeObj, label);\n }",
"java.lang.String getLabel();",
"public abstract LabelCode getLabel();",
"public String getLabel() {\n return getElement().getChildren()\n .filter(child -> child.getTag().equals(\"label\")).findFirst()\n .get().getText();\n }",
"public String getLabel(String uniqueName){\n\t\tif(uniqueName == null){\n\t\t\treturn null;\n\t\t}\n\t\tString label = this.labelMap.get(uniqueName);\n\t\tif(label == null){\n\t\t\treturn uniqueName;\n\t\t}\n\t\treturn label;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
update atmospheric information with the given data point for the given point type | public void updateAtmosphericInformation(AtmosphericInformation ai, String pointType, DataPoint dp) throws Exception {
final DataPointType dptype = DataPointType.valueOf(pointType.toUpperCase());
ai.update(dptype, dp);
} | [
"public AtmosphericInformation updateAtmosphericValues(AtmosphericInformation atmosphericInformation,\n String pointType, DataPoint dp) throws WeatherUpdateException {\n\n if (pointType.equalsIgnoreCase(DataPointType.WIND.name())) {\n if (dp.getMean() >= 0) {\n atmosphericInformation.setWind(dp);\n atmosphericInformation.setLastUpdateTime(System.currentTimeMillis());\n }\n } else if (pointType.equalsIgnoreCase(DataPointType.TEMPERATURE.name())) {\n if (dp.getMean() >= -50 && dp.getMean() < 100) {\n atmosphericInformation.setTemperature(dp);\n atmosphericInformation.setLastUpdateTime(System.currentTimeMillis());\n }\n } else if (pointType.equalsIgnoreCase(DataPointType.HUMIDTY.name())) {\n if (dp.getMean() >= 0 && dp.getMean() < 100) {\n atmosphericInformation.setHumidity(dp);\n atmosphericInformation.setLastUpdateTime(System.currentTimeMillis());\n }\n } else if (pointType.equalsIgnoreCase(DataPointType.PRESSURE.name())) {\n if (dp.getMean() >= 650 && dp.getMean() < 800) {\n atmosphericInformation.setPressure(dp);\n atmosphericInformation.setLastUpdateTime(System.currentTimeMillis());\n }\n } else if (pointType.equalsIgnoreCase(DataPointType.CLOUDCOVER.name())) {\n if (dp.getMean() >= 0 && dp.getMean() < 100) {\n atmosphericInformation.setCloudCover(dp);\n atmosphericInformation.setLastUpdateTime(System.currentTimeMillis());\n }\n } else if (pointType.equalsIgnoreCase(DataPointType.PRECIPITATION.name())) {\n if (dp.getMean() >= 0 && dp.getMean() < 100) {\n atmosphericInformation.setPrecipitation(dp);\n atmosphericInformation.setLastUpdateTime(System.currentTimeMillis());\n }\n } else {\n LOGGER.log(Level.SEVERE, \"Weather information cannot be updated due to [pointType] \" + pointType + \" doesn't\" +\n \" match with existing point types: TEMPERATURE, HUMIDTY, PRESSURE,CLOUDCOVER, PRECIPITATION \");\n throw new WeatherUpdateException(\"couldn't update atmospheric data\");\n }\n return atmosphericInformation;\n }",
"public Point3 setPoint3(Point3 point, CoordinateType type) {\r\n if (type.equals(CoordinateType.CARTESIAN)) {\r\n setXYZ3(point);\r\n } else if (type.equals(CoordinateType.FRACTIONAL)) {\r\n setXYZFract(point);\r\n }\r\n return point;\r\n }",
"protected void updatePointType()\n {\n if ( inhibitChanges ) return;\n \n int[] indices = specList.getSelectedIndices();\n if ( indices.length > 0 && indices[0] > -1 ) {\n Integer type = new Integer( pointType.getSelectedType() );\n applyProperty( indices, SpecData.POINT_TYPE, type );\n }\n }",
"public void setPointType(int value) {\r\n this.pointType = value;\r\n }",
"public void update(double[] point) {\n checkNotNull(point, \"point must not be null\");\n checkArgument(point.length == dimensions, String.format(\"point.length must equal %d\", dimensions));\n executor.update(point);\n }",
"public void saveSignal(Point point){\n\n String query = String.format(\"INSERT INTO emt_map_signal(Id, lng, lat, type) VALUES (%s, '%s', '%s', '%s')\", point.getId(), point.getLng(), point.getLat(), point.getType());\n executeUpdate(query);\n }",
"private void updateMeasurement(Point measuredPoint) {\n measurement.put(0, 0, measuredPoint.x);\n measurement.put(1, 0, measuredPoint.y);\n }",
"public boolean append_object(String type, Point point) {\r\n\t\treturn LayerManager.get_instance().append_object( type, point, this);\r\n\t}",
"public void\nsetPoint(int index, final SoPointDetail pd)\n//\n////////////////////////////////////////////////////////////////////////\n{\n point[index].copyFrom(pd);\n}",
"public PointOfInterest(Point point, PointType pointType) {\n super(point.getX(), point.getY());\n this.pointType = pointType;\n }",
"void onPointUpdate(Shape shape, Point point);",
"private void addPoint( LatLng point ) {\n \t\tthis.addMarker( point );\n \t\tthis.commitPolygon();\n \t}",
"public void addData(DataPoint point)\n {\n data.add(point);\n }",
"public void update(PieceType pieceType);",
"public void updateEverything(Point newPoint) {\n\t\tPoint oldPoint = getLocation();\n\t\tif(oldPoint.getX()-newPoint.getX()== -1) {\n\t\t\tshipView.setScaleX(-1);\n\t\t}else if(oldPoint.getX()-newPoint.getX() == 1) {\n\t\t\tshipView.setScaleX(1);\n\t\t}\n\t\tOceanMap oceanMap = OceanMap.getInstance();\n\t\toceanMap.changePoint(oldPoint, 0);\n\t oceanMap.changePoint(newPoint, 2);\n\t setLocation(newPoint);\n\t}",
"private void setPointDataField(List<Point> pointList,\n StarTable starTable,\n FieldElement []fields)\n throws SedParsingException, IOException\n {\n\n for ( int iCol = 0; iCol < starTable.getColumnCount(); iCol++ )\n {\n ColumnInfo infoCol = starTable.getColumnInfo(iCol);\n String utype = infoCol.getUtype ();\n int utypeIdx = VOTableKeywords.getUtypeFromString( utype,\n this.namespace );\n\n switch ( utypeIdx )\n {\n // for Flux\n case VOTableKeywords.SEG_DATA_FLUXAXIS_VALUE :\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++)\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow, iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().setValue( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_FLUXAXIS_ACC_STATERRLOW:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().createAccuracy().setStatErrLow( param );\n }\n \n break;\n\n case VOTableKeywords.SEG_DATA_FLUXAXIS_ACC_STATERRHIGH:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().createAccuracy().setStatErrHigh( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_FLUXAXIS_ACC_SYSERR:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().createAccuracy().setSysError( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_FLUXAXIS_QUALITY:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n IntParam param = this.newIntParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().setQuality( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_FLUXAXIS_ACC_BINLOW:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().createAccuracy().setBinLow( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_FLUXAXIS_ACC_BINHIGH:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().createAccuracy().setBinHigh( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_FLUXAXIS_ACC_BINSIZE:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().createAccuracy().setBinSize( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_FLUXAXIS_ACC_STATERR:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().createAccuracy().setStatError( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_FLUXAXIS_RESOLUTION:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().setResolution( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_FLUXAXIS_ACC_CONFIDENCE:\n \tfor ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createFluxAxis().createAccuracy().setConfidence( param );\n }\n break;\n\n // for Spectral\n case VOTableKeywords.SEG_DATA_SPECTRALAXIS_VALUE :\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createSpectralAxis().setValue( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_SPECTRALAXIS_ACC_STATERRLOW:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createSpectralAxis().createAccuracy().setStatErrLow( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_SPECTRALAXIS_ACC_STATERRHIGH:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createSpectralAxis().createAccuracy().setStatErrHigh( param );\n }\n break;\n case VOTableKeywords.SEG_DATA_SPECTRALAXIS_ACC_SYSERR:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createSpectralAxis().createAccuracy().setSysError( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_SPECTRALAXIS_RESOLUTION:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createSpectralAxis().setResolution( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_SPECTRALAXIS_ACC_BINLOW:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createSpectralAxis().createAccuracy().setBinLow( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_SPECTRALAXIS_ACC_BINHIGH:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createSpectralAxis().createAccuracy().setBinHigh( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_SPECTRALAXIS_ACC_BINSIZE:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createSpectralAxis().createAccuracy().setBinSize( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_SPECTRALAXIS_ACC_STATERR:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createSpectralAxis().createAccuracy().setStatError( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_SPECTRALAXIS_ACC_CONFIDENCE:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createSpectralAxis().createAccuracy().setConfidence( param );\n }\n break;\n\n\n // for Time\n case VOTableKeywords.SEG_DATA_TIMEAXIS_VALUE :\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createTimeAxis().setValue( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_TIMEAXIS_ACC_STATERRLOW:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createTimeAxis().createAccuracy().setStatErrLow( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_TIMEAXIS_ACC_STATERRHIGH:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createTimeAxis().createAccuracy().setStatErrHigh( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_TIMEAXIS_ACC_SYSERR:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createTimeAxis().createAccuracy().setSysError( param );\n }\n break;\n case VOTableKeywords.SEG_DATA_TIMEAXIS_RESOLUTION:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createTimeAxis().setResolution( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_TIMEAXIS_ACC_BINLOW:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createTimeAxis().createAccuracy().setBinLow( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_TIMEAXIS_ACC_BINHIGH:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createTimeAxis().createAccuracy().setBinHigh( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_TIMEAXIS_ACC_BINSIZE:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createTimeAxis().createAccuracy().setBinSize( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_TIMEAXIS_ACC_STATERR:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createTimeAxis().createAccuracy().setStatError( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_TIMEAXIS_ACC_CONFIDENCE:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createTimeAxis().createAccuracy().setConfidence( param );\n }\n break;\n\n // for background model\n case VOTableKeywords.SEG_DATA_BGM_VALUE :\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createBackgroundModel().setValue( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_BGM_ACC_STATERRLOW:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createBackgroundModel().createAccuracy().setStatErrLow( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_BGM_ACC_STATERRHIGH:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createBackgroundModel().createAccuracy().setStatErrHigh( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_BGM_ACC_SYSERR:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createBackgroundModel().createAccuracy().setSysError( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_BGM_QUALITY:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n IntParam param = this.newIntParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createBackgroundModel().setQuality( param );\n }\n break;\n case VOTableKeywords.SEG_DATA_BGM_ACC_BINLOW:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createBackgroundModel().createAccuracy().setBinLow( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_BGM_ACC_BINHIGH:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createBackgroundModel().createAccuracy().setBinHigh( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_BGM_ACC_BINSIZE:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createBackgroundModel().createAccuracy().setBinSize( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_BGM_ACC_STATERR:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createBackgroundModel().createAccuracy().setStatError( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_BGM_RESOLUTION:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow,iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n\n pointList.get( iRow ).createBackgroundModel().setResolution ( param );\n }\n break;\n\n case VOTableKeywords.SEG_DATA_BGM_ACC_CONFIDENCE:\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n DoubleParam param = this.newDoubleParam( starTable.getCell( iRow, iCol ), infoCol );\n param.setId (fields[iCol].getID ());\n pointList.get( iRow ).createBackgroundModel().createAccuracy().setConfidence( param );\n }\n break;\n\n default:\n {\n List <Param> params = new ArrayList<Param> ((int)starTable.getRowCount ());\n Class dataClass = infoCol.getContentClass ();\n boolean updateCustomRefCount = false;\n\n for ( int iRow = 0; iRow < starTable.getRowCount(); iRow++ )\n {\n\n \tParam param = null;\n if ((dataClass == Integer.class) || (dataClass == Long.class) || (dataClass == Short.class))\n param = this.newIntParam (starTable.getCell( iRow, iCol ), infoCol );\n else if ((dataClass == Double.class) || (dataClass == Float.class))\n param = this.newDoubleParam (starTable.getCell( iRow, iCol ), infoCol );\n else if (dataClass == String.class)\n {\n String value = (String)starTable.getCell( iRow, iCol );\n\n if (value != null) \n \t param = new TextParam (value,\n \t\t\t\tinfoCol.getName(),\n \t\t\t\tinfoCol.getUCD());\n else\n param = new TextParam (null, \n infoCol.getName(),\n infoCol.getUCD());\n }\n else\n logger.warning (\"The data type, \"+fields[iCol].getDatatype ()+\" for the custom data is not supported. Supported datatypes include char, int, short, long, float and double\");\n \n if (param == null)\n \tparam = new Param ();\n \n param.setId (fields[iCol].getID ());\n\n // if the field is potentially referenced somewhere\n // store the params into a table otherwise add it\n // directly to the point\n if (fields[iCol].getID () != null)\n {\n param.setId (fields[iCol].getID ());\n params.add(param);\n }\n else\n {\n // every field needs to have an id -- create one\n param.setInternalId (\"_customId\"+this.customRefCount);\n updateCustomRefCount = true;\n try {\n\t\t\t\t\t\t\t\tpointList.get( iRow ).addCustomParam (param);\n\t\t\t\t\t\t\t} catch (SedNullException exp) {\n\t\t\t\t\t\t\t\tlogger.warning(exp.getMessage ());\n\t\t\t\t\t\t\t} catch (SedInconsistentException exp) {\n\t\t\t\t\t\t\t\tlogger.warning(exp.getMessage ());\n\t\t\t\t\t\t\t}\n }\n \n }\n if (updateCustomRefCount)\n this.customRefCount++;\n\n if (fields[iCol].getID () != null)\n this.customData.put (fields[iCol].getID (), params);\n }\n break;\n }\n }\n }",
"private void updateColorOfPoint(DataPointColored point) {\n if (coloringMethod == ColoringMethod.None) {\n if (point == projector.getCurrentPoint() && hotPointMode == true) {\n point.setColor(hotColor);\n } else {\n point.setColor(baseColor);\n }\n } else if (coloringMethod == ColoringMethod.DecayTrail) {\n if (point == projector.getCurrentPoint()) {\n if (point == projector.getCurrentPoint()\n && hotPointMode == true) {\n point.setColor(hotColor);\n } else {\n point.setColor(baseColor);\n }\n point.spikeActivation(ceiling);\n } else {\n point.decrementActivation(floor, decrementAmount);\n point.setColorBasedOnVal(Utils.colorToFloat(baseColor));\n }\n } else if (coloringMethod == ColoringMethod.Frequency) {\n if (point == projector.getCurrentPoint()) {\n if (point == projector.getCurrentPoint()\n && hotPointMode == true) {\n point.setColor(hotColor);\n } else {\n point.setColor(baseColor);\n }\n point.incrementActivation(ceiling, incrementAmount);\n } else {\n point.setColorBasedOnVal(Utils.colorToFloat(baseColor));\n }\n }\n\n }",
"public void setPoint( Float point ) {\n this.point = point;\n }",
"private void _setPoint(int index, DataPoint point) {\n ntree.set(index, point);\n ensureDistances();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a surface definition from the tag at which the reader is currently positioned. | SurfaceDef(XMLStreamReader reader) {
name = reader.getAttributeValue(null, "start");
int x = Integer.parseInt(reader.getAttributeValue(null, "ulx"));
int y = Integer.parseInt(reader.getAttributeValue(null, "uly"));
int w = Integer.parseInt(reader.getAttributeValue(null, "lrx")) - x;
int h = Integer.parseInt(reader.getAttributeValue(null, "lrx")) - y;
bounds = new Rectangle(x, y, w, h);
} | [
"public Surface(){\r\n\t\tsuper(SURFACE_TAG,\"\");\r\n\t\tthis.setRef(\"CG\");\r\n\t}",
"DynamicSurface createSurface (\n int time,\n int level\n ) throws IOException;",
"Surface createSurface();",
"public org.landxml.schema.landXML11.SurfaceDocument.Surface addNewSurface()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SurfaceDocument.Surface target = null;\r\n target = (org.landxml.schema.landXML11.SurfaceDocument.Surface)get_store().add_element_user(SURFACE$0);\r\n return target;\r\n }\r\n }",
"void createSurface(SurfaceTexture surfaceTexture);",
"public Surface newSurface()\n {\n return new SurfCylinder(_radius);\n }",
"public org.landxml.schema.landXML11.SurfaceDocument.Surface getSurface()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SurfaceDocument.Surface target = null;\r\n target = (org.landxml.schema.landXML11.SurfaceDocument.Surface)get_store().find_element_user(SURFACE$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"SurfacePropertyType getBaseSurface();",
"@DISPID(1611005996) //= 0x6006002c. The runtime will prefer the VTID if present\n @VTID(71)\n CatPartSurfaceElementsLocation surfaceElementsLocation();",
"protected Sector createSector(int tag, XmlReader.Element elem, ResourceResolver reso, Vector2 offset, Vector2 scale, float vScale) {\n\t\tSector s = new Sector(elem,reso,offset,scale,vScale);\n\t\treturn s;\n\t}",
"public void setSurface(org.landxml.schema.landXML11.SurfaceDocument.Surface surface)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SurfaceDocument.Surface target = null;\r\n target = (org.landxml.schema.landXML11.SurfaceDocument.Surface)get_store().find_element_user(SURFACE$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.landxml.schema.landXML11.SurfaceDocument.Surface)get_store().add_element_user(SURFACE$0);\r\n }\r\n target.set(surface);\r\n }\r\n }",
"void createPlanetSurface(int width, int height) {\r\n\t\trenderer.surface = new PlanetSurface();\r\n\t\trenderer.surface.width = width;\r\n\t\trenderer.surface.height = height;\r\n\t\trenderer.surface.computeRenderingLocations();\r\n\t\tui.allocationPanel.buildings = renderer.surface.buildings;\r\n\t}",
"public interface GeoSurfaceFactory extends ProjectViewObject {\n\n /**\n * Checks if this factory is initialized.\n *\n * @return true if the factory is initialized, or false if not.\n */\n boolean isInitialized();\n\n /**\n * Adds a task to the list to be performed before any other initialization.\n *\n * @param task the task to add to the list.\n *\n * @since 0.6\n */\n void addInitTask (Runnable task);\n\n /**\n * Initializes the factory before performing any other queries.\n * Initialization may take some time. If the factory is already initialized,\n * no operation is performed.\n *\n * @throws IOException if factory initialization failed.\n */\n void initialize() throws IOException;\n\n /**\n * Determines if this factory has multiple time steps available.\n *\n * @return true if there are time steps or false if not.\n */\n boolean hasTimes();\n\n /**\n * Determines if this factory has multiple levels available.\n *\n * @return true if there are levels or false if not.\n */\n boolean hasLevels();\n\n /**\n * Gets the time steps available in this factory.\n *\n * @return the list of times. The index of each time in the list can be\n * used to create surface objects. The list may have zero length\n * if there are no time steps.\n */\n List<Date> getTimes();\n\n /**\n * Gets the vertical levels available in this factory.\n *\n * @return the list of level values. The index of each level in the list\n * can be used to create surface objects. The list may have zero\n * length if there are no levels.\n */\n List<Double> getLevels();\n\n /**\n * Creates a dynamic surface at the specified time and level.\n *\n * @param time the time step for the surface, ignored if there are no\n * time steps.\n * @param level the level for the surface, ignored if there are no levels.\n *\n * @return the dynamic surface matching the specified time and level.\n *\n * @throws IOException if factory initialization failed.\n */\n DynamicSurface createSurface (\n int time,\n int level\n ) throws IOException;\n\n /**\n * Gets the legend for the surfaces created by this factory.\n *\n * @return the legend to combine with surface display, or null if there\n * is no legend.\n *\n * @since 0.6\n */\n default Region getLegend() { return (null); }\n\n /**\n * Gets the vertical level units available in this factory.\n *\n * @return the vertical level measurement units, or null for none.\n *\n * @since 0.6\n */\n default String getLevelUnits() { return (null); }\n\n /**\n * Gets the data credit for this factory.\n *\n * @return the data credit or null for none.\n *\n * @since 0.6\n */\n default String getCredit() { return (null); }\n\n /**\n * Gets the source URL for this factory.\n *\n * @return the source URL or null for none.\n *\n * @since 0.6\n */\n default String getSourceUrl() { return (null); }\n\n}",
"Layer createLayer();",
"protected AIMetadata.Tag newFaceTag(FaceDetail faceDetail, long timestamp) {\n BoundingBox box = faceDetail.getBoundingBox();\n if (faceDetail.getConfidence() >= minConfidence) {\n List<AIMetadata.Label> labels = collectLabels(faceDetail, timestamp);\n return new AIMetadata.Tag(\"face\", kind, null,\n new AIMetadata.Box(box.getWidth(), box.getHeight(), box.getLeft(), box.getTop()), labels,\n faceDetail.getConfidence());\n }\n return null;\n }",
"@FromString\n public static SurfaceName of(String name) {\n return new SurfaceName(name);\n }",
"public ISurface getSurface();",
"private Geometry createGeometry()\r\n\t{\t\t\r\n\t\tPoint3f ldf = new Point3f(-X, -Y, Z); // left down front\r\n\t\tPoint3f luf = new Point3f(-X, Y, Z); // left up front\r\n\t\tPoint3f rdf = new Point3f( X, -Y, Z); // right down front\r\n\t\tPoint3f ruf = new Point3f( X, Y, Z); // right up front\r\n\t\t\r\n\t\tPoint3f ldb = new Point3f(-X, -Y, -Z); // left down front\r\n\t\tPoint3f lub = new Point3f(-X, Y, -Z); // left up front\r\n\t\tPoint3f rdb = new Point3f( X, -Y, -Z); // right down front\r\n\t\tPoint3f rub = new Point3f( X, Y, -Z); // right up front\r\n\t\t\r\n\t\tPoint3f[] points = {\r\n\t\t\t\tluf, ldf, rdf, ruf,\r\n\t\t\t\tldf, ldb, rdb, rdf,\r\n\t\t\t\tldb, lub, rub, rdb,\r\n\t\t\t\tlub, luf, ruf, rub,\r\n\t\t\t\tlub, ldb, ldf, luf, \r\n\t\t\t\truf, rdf, rdb, rub\t\t\t\r\n\t\t\t\t\r\n\t\t};\r\n\t\t\r\n\t\tQuadArray qa = new QuadArray(points.length,\tQuadArray.COORDINATES);\r\n\t\tqa.setCoordinates(0, points);\r\n\t\treturn qa;\r\n\t}",
"public void surfaceCreated(SurfaceHolder holder) {\n mSurface = holder.getSurface();\n startARX();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Detects contact made between penguin, obstacles, and ground. | @Override
public void beginContact(Contact contact) {
Body a = contact.getFixtureA().getBody();
Body b = contact.getFixtureB().getBody();
if((BodyUtils.bodyIsPenguin(a) && BodyUtils.bodyIsGround(b)) ||
(BodyUtils.bodyIsGround(a) && BodyUtils.bodyIsPenguin(b))){
penguin.land();
if(firstHopHappen){
hitGroundSound.play();
}
} else if((BodyUtils.bodyIsPenguin(a) && BodyUtils.bodyIsObstacle(b)) ||
(BodyUtils.bodyIsObstacle(a) && BodyUtils.bodyIsPenguin(b))){
if(obstacle.getUserData().getAssetId() != OBSTACLE_CLOUD_ASSETS_ID){
slapSound.play();
}
penguin.hit();
onGameOver();
}
} | [
"public void decideGroundContactPointsInContact()\n {\n List<Joint> children = this.getRootJoints();\n\n for (int i = 0; i < children.size(); i++)\n {\n Joint rootJoint = children.get(i);\n rootJoint.physics.recursiveDecideGroundContactPointsInContact();\n }\n }",
"protected boolean onGroundImpl(Body body) {\r\n\t\tif (world == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tboolean yInverse;\r\n\t\tif (Constants.GRAVITY.getY() > 0){\r\n\t\t\tyInverse = false;\r\n\t\t}else{\r\n\t\t\tyInverse = true;\r\n\t\t}\r\n\t\t\r\n\t\t// loop through the collision events that have occured in the world\r\n\t\tCollisionEvent[] events = world.getContacts(body);\r\n\t\t\r\n\t\tfor (int i=0;i<events.length;i++) {\r\n\t\t\t//Log.debug(\"CollisionEvent:\"+events[i].getNormal());\r\n\t\t\t\r\n\t\t\t// if the point of collision was below the centre of the actor\r\n\t\t\t// i.e. near the feet\r\n\t\t\tif ((events[i].getPoint().getY() > getY()+(diameter/4) && !yInverse) ||\r\n\t\t\t\t\t(events[i].getPoint().getY() < getY()+(diameter/4) && yInverse)) {\r\n\t\t\t\t// check the normal to work out which body we care about\r\n\t\t\t\t// if the right body is involved and a collision has happened\r\n\t\t\t\t// below it then we're on the ground\r\n\t\t\t\tif ((events[i].getNormal().getY() < -0.5 && !yInverse) || \r\n\t\t\t\t\t\t(events[i].getNormal().getY() > 0.5 && yInverse)) {\r\n\t\t\t\t\tif (events[i].getBodyB() == body) {\r\n\t\t\t\t\t\t//Log.debug(events[i].getPoint()+\",\"+events[i].getNormal());\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif ((events[i].getNormal().getY() > 0.5 & !yInverse) || \r\n\t\t\t\t\t\t(events[i].getNormal().getY() < -0.5 && yInverse)) {\r\n\t\t\t\t\tif (events[i].getBodyA() == body) {\r\n\t\t\t\t\t\t//Log.debug(events[i].getPoint()+\",\"+events[i].getNormal());\r\n\t\t\t\t\t\treturn true;\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\t\r\n\t\treturn false;\r\n\t}",
"private void checkForIntersection() {\n if (ball.checkForCollision(ball.getX() + ball.getWidth(), ball.getY() - 2, this, wall)) {\n ball.YBounce();\n }\n else if( ball.checkForCollision(ball.getX() + ball.getWidth(),ball.getY() + ball.getHeight() + 2, this, wall)) {\n ball.YBounce();\n }\n else if(ball.checkForCollision(ball.getX() - 1, ball.getY() + ball.getHeight(), this, wall)) {\n ball.XBounce();\n }\n else if (ball.checkForCollision(ball.getX() + ball.getWidth() + 2, ball.getY() + ball.getHeight(), this, wall)) {\n ball.XBounce();\n }\n }",
"boolean hitBodySeg(BodySeg bodySeg);",
"@Override\r\n\tpublic void handleCollision(Contact contact) {\n\t}",
"private void detectCollision()\n\t{\n\t\tArrayList<CollidableObject> objects = new ArrayList<CollidableObject>();\n\t\tArrayList<CollidableObject> collision = new ArrayList<CollidableObject>();\n\t\t\n\t\tquadTree.getAllObjects(objects);\n\t\t\n\t\tfor (int x = 0, len = objects.size(); x < len; x++)\n\t\t{\n\t\t\tcollision.clear();\n\t\t\tquadTree.retrieve(collision, objects.get(x));\n\t\t\n\t\t\tfor (int y = 0, length = collision.size(); y < length; y++)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\tif ( objects.get(x).isCollidableWith(collision.get(y)) &&\n\t\t\t\t\t\tobjects.get(x).getX() < collision.get(y).getX() + collision.get(y).getWidth() &&\n\t\t\t\t\t objects.get(x).getX() + objects.get(x).getWidth() > collision.get(y).getX() &&\n\t\t\t\t\t objects.get(x).getY() < collision.get(y).getY() + collision.get(y).getHeight() &&\n\t\t\t\t\t\t objects.get(x).getY() + objects.get(x).getHeight() > collision.get(y).getY()) \n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * If the collision is with a power up, the settings must be different, since\n\t\t\t\t\t\t * the power up doesn't damage the player, but instead gives him a different\n\t\t\t\t\t\t * weapon or boost\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif(collision.get(y) instanceof PowerUp)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Display power up text on the screen\n\t\t\t\t\t\t\tsetPowerUpText(((PowerUp) collision.get(y)).getType());\n\t\t\t\t\t\t\t//Indicate to the player's ship that it got a power up\n\t\t\t\t\t\t\tadmiralShip.getPowerUp((PowerUp) collision.get(y));\n\t\t\t\t\t\t\t//Remove the power from the holder\n\t\t\t\t\t\t\tPowerUpHolder.getInstance().removePowerUp((PowerUp) collision.get(y));\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tobjects.get(x).setColliding(true, collision.get(y).getDamageDealt());\n\t\t\t\t\t\tcollision.get(y).setColliding(true, objects.get(x).getDamageDealt());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t}",
"void checkHandleContactWithPlayer() {\n Player curPlayer = this.mainSketch.getCurrentActivePlayer();\n\n if (this.doesAffectPlayer) {\n // boundary collision for player\n if (contactWithCharacter(curPlayer)) { // this has contact with non-player\n if (!this.charactersTouchingThis.contains(curPlayer)) { // new collision detected\n curPlayer.changeNumberOfVerticalBoundaryContacts(1);\n this.charactersTouchingThis.add(curPlayer);\n }\n curPlayer.handleContactWithVerticalBoundary(this.startPoint.x);\n\n } else { // this DOES NOT have contact with player\n if (this.charactersTouchingThis.contains(curPlayer)) {\n curPlayer.setAbleToMoveRight(true);\n curPlayer.setAbleToMoveLeft(true);\n curPlayer.changeNumberOfVerticalBoundaryContacts(-1);\n this.charactersTouchingThis.remove(curPlayer);\n }\n }\n }\n }",
"private void checkForCollision() {\n if (isJumping) {\n if (obstacle.isInArea(rect.right, rect.bottom) && obstacle.frontCollision(rect)) collision();\n else if(obstacle.isInArea(rect.left, rect.bottom) && obstacle.backCollision(rect)) collision();\n } else {\n if (obstacle.xIsInArea(rect.right)) collision();\n }\n }",
"void onInside(GVRSceneObject sceneObj, GVRPicker.GVRPickedObject collision);",
"boolean collideWithVehicles(Vehicle v);",
"void processCollisionIfAny(boolean inContactWithBall) {\n boolean stillInContact = wasTouchingBall && inContactWithBall;\n\n \t\n \t// If there is no collision, set wasTouchingBall to false to inform the next updateDifficultyDependents of this,\n // updatePosition and return.\n if (!inContactWithBall) {\n wasTouchingBall = false;\n return;\n }\n\n // If a collision is still in process since the last updateDifficultyDependents, updatePosition and return.\n if (stillInContact) {\n return;\n }\n\n // Otherwise, calculate the effect of the collision on the targets shieldHealth, if vulnerable, and flag the\n // beginning of the collision for the targetRenderer.\n if (isShielded) {\n \tshieldHealth = shieldHealth - shieldHealthIncrement;\n\t\t\tif (shieldHealth <= 0 && type != TargetType.BLOCKER) {\n\t\t\t\ttaggedForDeletion = true;\n\t\t\t}\n } else { // target is unshielded and should be marked for deletion.\n\t\t\tif (type != TargetType.BLOCKER && !invulnerable) {\n\t\t\t\ttaggedForDeletion = true;\n\t\t\t}\n\t\t}\n checkHealth();\n wasTouchingBall = true; // Inform next updateDifficultyDependents about this collision.\n return;\n }",
"boolean collidesWith(PhysObj other);",
"@Override\r\n public void endContact(Contact contact) {\r\n Body bodyA = contact.getFixtureA().getBody();\r\n Body bodyB = contact.getFixtureB().getBody();\r\n\r\n if ((bodyA.getUserData() instanceof PlatformsModel || bodyA.getUserData() instanceof PlatfFastModel || bodyA.getUserData() instanceof PlatfBlocksModel || bodyA.getUserData() instanceof PlatfSlowModel || bodyA.getUserData() instanceof PlatfSpikesModel) && bodyB.getUserData() instanceof HeroModel) {\r\n onTheGround = false;\r\n }\r\n if ((bodyB.getUserData() instanceof PlatformsModel || bodyB.getUserData() instanceof PlatfFastModel || bodyB.getUserData() instanceof PlatfBlocksModel || bodyB.getUserData() instanceof PlatfSlowModel || bodyB.getUserData() instanceof PlatfSpikesModel) && bodyA.getUserData() instanceof HeroModel) {\r\n onTheGround = false;\r\n }\r\n if ((bodyA.getUserData() instanceof PlatformsModel || bodyA.getUserData() instanceof PlatfFastModel || bodyA.getUserData() instanceof PlatfBlocksModel || bodyA.getUserData() instanceof PlatfSlowModel || bodyA.getUserData() instanceof PlatfSpikesModel) && bodyB.getUserData() instanceof AlienModel) {\r\n ((AlienModel) bodyB.getUserData()).setInPlatform(false);\r\n }\r\n if ((bodyB.getUserData() instanceof PlatformsModel || bodyB.getUserData() instanceof PlatfFastModel || bodyB.getUserData() instanceof PlatfBlocksModel || bodyB.getUserData() instanceof PlatfSlowModel || bodyB.getUserData() instanceof PlatfSpikesModel) && bodyA.getUserData() instanceof AlienModel) {\r\n ((AlienModel) bodyA.getUserData()).setInPlatform(false);\r\n\r\n }\r\n\r\n }",
"private void Collision()\n {\n /// se verifica daca mobul se afla in aer si se intoarce pt a nu cadea\n int air=0;\n for(CollisionObjects t: Map.Tiles)\n {\n if(t!=null) {\n if (getBoundsLeft().intersects(t.getBounds())) {\n VelX=2;\n facing=1;\n\n }\n if (getBoundsRight().intersects(t.getBounds())) {\n VelX=-2;\n facing=0;\n }\n if(facing==0)\n {\n if (getBoundsBottomLeft().intersects(t.getBounds())) {\n air=1;\n }\n }\n if(facing==1)\n {\n if (getBoundsBottomRight().intersects(t.getBounds())) {\n air=1;\n }\n }\n\n }\n\n }\n if(air==0)\n {\n VelX=-VelX;\n if(facing==0)\n {\n facing=1;\n }\n else\n {\n facing=0;\n }\n }\n }",
"boolean hitPlayer(Gnome gnome) {\n for (BodySeg bodySeg : this.body) {\n if (bodySeg.gnomeInRange(gnome)) {\n return true;\n }\n }\n return false;\n }",
"private void checkCollisions() {\n\t\tfor(int i = bodyParts; i > 0; i--) {\n\t\t\tif((x[0] == x[i]) && (y[0] == y[i])) {\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t\t// checks if head touches with left border\n\t\tif(x[0] < 0) {\n\t\t\trunning = false;\n\t\t}\n\t\t// checks if head touches with right border\n\t\tif(x[0] > SCREEN_WIDTH) {\n\t\t\trunning = false;\n\t\t}\n\t\t// checks if head touches with top border\n\t\tif(y[0] < 0) {\n\t\t\trunning = false;\n\t\t}\n\t\t// checks if head touches with bottom border\n\t\tif(y[0] > SCREEN_HEIGHT) {\n\t\t\trunning = false;\n\t\t}\n\t\t// stop running if collision is detected\n\t\tif(!running) {\n\t\t\ttimer.stop();\n\t\t}\n\t}",
"public void checkCollision() {\n if (virusHitbox().intersects(player.playerHitbox())) {\r\n player.collision = true;\r\n } else {\r\n player.collision = false;\r\n }\r\n }",
"private boolean checkCollisions()\n {\n boolean ret_val = true;\n \n viewTg.getLocalToVworld(worldEyeTransform);\n worldEyeTransform.mul(viewTx);\n \n // Where are we now?\n worldEyeTransform.get(locationVector);\n locationPoint.set(locationVector);\n \n // Where are we going to be soon?\n worldEyeTransform.transform(COLLISION_DIRECTION, collisionVector);\n \n collisionVector.scale(avatarSize);\n \n locationEndPoint.add(locationVector, collisionVector);\n locationEndPoint.add(oneFrameTranslation);\n \n // We need to transform the end point to the direction that we are\n // currently travelling. At the moment, this always points forward\n // in the same direction as the viewpoint.\n collisionPicker.set(locationPoint, locationEndPoint);\n \n SceneGraphPath[] closest = collidables.pickAllSorted(collisionPicker);\n \n if((closest == null) || (closest.length == 0))\n return true;\n \n boolean real_collision = false;\n\n for(int i = 0; (i < closest.length) && !real_collision; i++)\n {\n // OK, so we collided on the bounds, lets check on the geometry\n // directly to see if we had a real collision. Java3D just gives\n // us the collision based on the bounding box intersection. We\n // might actually have just walked through something like an\n // archway.\n Transform3D local_tx = closest[i].getTransform();\n \n float length = (float)collisionVector.length();\n \n Shape3D i_shape = (Shape3D)closest[i].getObject();\n \n Enumeration geom_list = i_shape.getAllGeometries();\n \n while(geom_list.hasMoreElements() && !real_collision)\n {\n GeometryArray geom = (GeometryArray)geom_list.nextElement();\n \n if(geom == null)\n continue;\n \n real_collision =\n intersector.rayUnknownGeometry(locationPoint,\n collisionVector,\n length,\n geom,\n local_tx,\n wkPoint,\n true);\n }\n \n ret_val = !real_collision;\n }\n \n return ret_val;\n }",
"public abstract List<CollisionResponse> detectCollisions(Collider collidingCollider, Entity collidingEntity);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
HashMap of IValidator Constructs the validator on a group of validators. | public GroupValidator(Map<Object, IValidator> validatorMap)
{
this(validatorMap,null);
} | [
"public GroupValidator()\n {\n this(new HashMap<Object, IValidator>());\n }",
"public Map getValidatorMap();",
"com.github.jtendermint.jabci.types.Types.Validator getValidators(int index);",
"cosmos.staking.v1beta1.ValidatorOrBuilder getValidatorsOrBuilder(\n int index);",
"public void putValidator(String key, IValidator validator)\n {\n \t validatorMap.put(key, validator);\n }",
"cosmos.staking.v1beta1.Validator getValidators(int index);",
"ValidatorRegistry getValidatorRegistry();",
"public RuleBasedValidator() {\n globalRules = new ArrayList();\n rulesByProperty = new HashMap();\n }",
"void parseValidatorDefinitions(Map<String,String> validators, InputStream is, String resourceName);",
"public IValidator get(String key)\n {\n \t return validatorMap.get(key);\n }",
"void setValidators(com.jarden.testengine.Validators validators);",
"@Override\r\n protected Multimap<String, Object> getMap() {\r\n return ICheckImpl.Registry.INSTANCE.getLanguageToValidatorMap();\r\n }",
"public interface ValidatorFactory {\n\n /**\n * The method retrieves object of validator that\n * the list of relevant validators for the trade product type.\n *\n * @param productType type of trade product.\n * @return the list of relevant validators for trade product type.\n */\n List<Validator> getInstance(String productType);\n}",
"Validator createValidator();",
"com.jarden.testengine.Validators addNewValidators();",
"private void setValidators() {\n getUtils().addNoNumbers(getOriginTxt(), getValidatorTxt());\n getUtils().addNoNumbers(getDestinationTxt(), getValidatorTxt());\n getUtils().addNoNumbers(getCollectionPlaceTxt(), getValidatorTxt());\n getUtils().addNoNumbers(getDeliveryPlaceTxt(), getValidatorTxt());\n getUtils().eurosListener(getTravelValueTxt(), getValidatorTxt());\n getUtils().eurosListener(getMoneyforDriverTxt(), getValidatorTxt());\n getUtils().eurosListener(getCustomsTxt(), getValidatorTxt());\n getUtils().eurosListener(getOtherExpensesTxt(), getValidatorTxt());\n getUtils().eurosListener(getShippingExpensesTxt(), getValidatorTxt());\n //No listenerValidator for distance because, finally it is a string\n// getUtils().distanceListener(getDistanceTxt(), getValidatorTxt());\n getUtils().dateValidator(getDateTxt(), getValidatorTxt());\n getUtils().timeListener(getArriveHourTxt(), getValidatorTxt());\n getUtils().timeListener(getExitHourTxt(), getValidatorTxt());\n getUtils().timeListener(getProvidedHourTxt(), getValidatorTxt());\n\n }",
"protected static synchronized void createValidators () {\n\n\t\tif (_validators_created) {\n\t\t\treturn;\n\t\t}\n\n\t\t_CarrierCode_validator_ = new XmlStringValidator(\n\t\t\t\"Carrier.CarrierCode\", \"Element\", \n\t\t\t\"Carrier/CarrierCode\", -1, -1, 1, 1);\n\n\t\t_validators_created = true;\n\t}",
"List<FormValidator> getValidators();",
"private static void createApplicationValidator(group_bp my_group_bp) {\n\t\t// TODO Auto-generated method stub\n\t\tmy_group_bp.createValidators();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an aliased location_indoor.tracking_k_nearest table reference | public TrackingKNearest(String alias) {
this(alias, TRACKING_K_NEAREST);
} | [
"public TrackingKNearest() {\n this(\"tracking_k_nearest\", null);\n }",
"public SPIEntry nearest(Coordinate latlon);",
"public SPIEntry nearest(Coordinate latlon, float maxDist);",
"private static TableRef createAliasedTableRef( final TableMeta table,\n final String alias ) {\n return new TableRef() {\n public String getColumnName( String rawName ) {\n return alias + \".\" + rawName;\n }\n public String getIntroName() {\n return table.getName() + \" AS \" + alias;\n }\n };\n }",
"public void buildLocation() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT EXISTS location (location_name\"\n + \" TEXT, lat REAL, lon REAL PRIMARY KEY (location_name));\")) {\n prep.executeUpdate();\n } catch (final SQLException e) {\n e.printStackTrace();\n }\n }",
"public KNearestNeighbors(int k){\r\n \tthis.k = k;\r\n }",
"public interface NearestNeigh {\n\n /**\n * construct the data structure to store the nodes\n * @param nodes to be stored\n */\n void buildIndex(List<Point> points);\n\n /**\n * search for nearby points\n * @param searchTerm The query point which passes information such as category and location\n * @return a list of point as search result\n */\n List<Point> search(Point searchTerm, int k);\n\n /**\n * add a point to the data structure\n * @param point to be added\n * @return whether succeeded, e.g. return false when point is already in the data structure\n */\n boolean addPoint(Point point);\n\n /**\n * delete a point from data structure. Be aware that even when the object are not in the data structure, the identical point in the data structure should be deleted\n * @param point to be deleted\n * @return whether succeeded, e.g. return false when point not found\n */\n boolean deletePoint(Point point);\n\n /**\n * Check whether the point is in the index\n * @param point to be checked\n * @return true if point is in\n */\n boolean isPointIn(Point point);\n\n}",
"public static SqlOperatorTable spatialInstance() {\n return SPATIAL.get();\n }",
"public interface LSH {\n\n /**\n * Returns an instance of the distance measure associated to the LSH family of this implementation.\n * Beware, hashing families and their amplification constructs are distance-specific.\n */\n String getDistanceMeasure();\n\n /**\n * Returns the size of a hash compared against in one hashing bucket, corresponding to an AND construction\n *\n * denoting hashLength by h,\n * amplifies a (d1, d2, p1, p2) hash family into a\n * (d1, d2, p1^h, p2^h)-sensitive one (match probability is decreasing with h)\n *\n * @return the length of the hash in the AND construction used by this index\n */\n int getHashLength();\n\n /**\n *\n * denoting numTables by n,\n * amplifies a (d1, d2, p1, p2) hash family into a\n * (d1, d2, (1-p1^n), (1-p2^n))-sensitive one (match probability is increasing with n)\n *\n * @return the # of hash tables in the OR construction used by this index\n */\n int getNumTables();\n\n /**\n * @return The dimension of the index vectors and queries\n */\n int getInDimension();\n\n /**\n * Populates the index with data vectors.\n * @param data the vectors to index\n */\n void makeIndex(INDArray data);\n\n /**\n * Returns the set of all vectors that could approximately be considered negihbors of the query,\n * without selection on the basis of distance or number of neighbors.\n * @param query a vector to find neighbors for\n * @return its approximate neighbors, unfiltered\n */\n INDArray bucket(INDArray query);\n\n /**\n * Returns the approximate neighbors within a distance bound.\n * @param query a vector to find neighbors for\n * @param maxRange the maximum distance between results and the query\n * @return approximate neighbors within the distance bounds\n */\n INDArray search(INDArray query, double maxRange);\n\n /**\n * Returns the approximate neighbors within a k-closest bound\n * @param query a vector to find neighbors for\n * @param k the maximum number of closest neighbors to return\n * @return at most k neighbors of the query, ordered by increasing distance\n */\n INDArray search(INDArray query, int k);\n}",
"public void ResetKClosest() {\n\t\tk_closest = null;\n\t\tsample_map.clear();\n\t}",
"Object getNearest(double targetKey, double tolerance);",
"private static void calculateOptimalTableValues()\n\t{\n\t\tactuald = FastMath.sqrt(FastMath.sqr(actualTableX) + FastMath.sqr(actualTableY));\n\t\tactualT = FastMath.asin((actualTableX * FastMath.sin(FastMath.DEG_TO_RAD * 90)) / actuald);\n\t\tactualR = (FastMath.DEG_TO_RAD * 90) - actualT;\n\t\tactualA = (FastMath.DEG_TO_RAD * 90) - actualR;\n\t\tfloat e = FastMath.sqrt((FastMath.sqr(referenceDistance) + FastMath.sqr(actuald)) - (2 * referenceDistance * actuald * FastMath.cos(actualT)));\n\t\tactualS = FastMath.asin((referenceDistance * FastMath.sin(actualT)) / e);\n\t\tactualB = (FastMath.DEG_TO_RAD * 180) - actualS - actualA;\n\t\tactualLineToAAngle = (actualT + (FastMath.DEG_TO_RAD * 180)) - actualTableO;\n\t\tactualLineToBAngle = actualLineToAAngle + actualS;\n\t}",
"private void initDistances(DA_SourceArea currentActor){\n\t\ttry{\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\t\t\tConnection con = DriverManager.getConnection(database);\n\t\t\tStatement stmt = con.createStatement();\n\t\t\t\n\t\t\tString query = \" select destination_rownumber,distanceinminutes from \"+distance+\" where kreis_id =\"+currentActor.landkreisId+\";\";\n\t\t\tResultSet sa = stmt. executeQuery(query);\n\t\t\twhile(sa.next()){\n\t\t\t\tcurrentActor.distance.put(Integer.parseInt(sa.getString(\"DESTINATION_ROWNUMBER\")), (int)(Float.parseFloat(sa.getString(\"distanceinminutes\"))));\n\t\t\t}\n\t\tcon.close();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public List<K> findNearestK(LatitudeLongitude current, int k) {\n\n // Find the euclidean distance between this point and others\n List<Tuple2<Double, K>> closest = new ArrayList<>(locations.size());\n for (K l : locations) {\n LatitudeLongitude latlon = l.getLocation();\n if (latlon != null) {\n Double result = euclidean(latlon, current);\n closest.add(new Tuple2<>(result, l));\n }\n }\n\n // Sort the list\n closest.sort((element1, element2) -> {\n return element1._1().compareTo(element2._1());\n });\n\n closest.removeIf(i -> (i._1().equals(0.0)));\n\n // Return the first k records\n if (k > closest.size()) {\n k = closest.size();\n }\n if (k < 0) {\n k = 0;\n }\n List<K> toReturn = new ArrayList<>(k);\n for (int i = 0; i < k; i++) {\n toReturn.add(closest.get(i)._2());\n }\n\n return toReturn;\n }",
"public Map convertGridReference(Map input, double f, double a, double k0) {\n Map output = new HashMap();\n /*\n * **************************************************************** GRID\n * TO SPHEROID LATITUDE & LONGITUDE FROM AMG GRID REFERENCE USING\n * REDFEARN'S REVERSE FORMULAE \"Accurate to better than 1 mm in the\n * Australian Map Grid\"\n * **************************************************************** It\n * has been introduced to allow for use of grid references in the South\n * Australian Gazetteer, which were the basis for the positioning of\n * place names. The latitudes and longitudes provided in this Gazetteer\n * are more approximate, just to the nearest minute. Mr Paul Dearden of\n * DENR is acknowledged for supply of text of a series of C-based\n * programs which served to explain the computation of the \"foot plant\n * latitude\". W.R. Barker 27 October 1995\n */\n\n if (!input.get(\"gridref1_5\").equals(\"\")) {\n int gridref1_1 = Integer.parseInt((String) input.get(\"gridref1_1\"));\n int gridref1_2 = Integer.parseInt((String) input.get(\"gridref1_2\"));\n String gridref1_3 = (String) input.get(\"gridref1_3\");\n int gridref1_4 = Integer.parseInt((String) input.get(\"gridref1_4\"));\n String gridref1_5 = (String) input.get(\"gridref1_5\");\n\n\n double ecc2 = 2 * f - Math.pow(f, 2); /* the eccentricity squared */\n\n /*******************************************************************\n * Calculation of FOOT POINT LATITUDE (fplat, AMG manual: phi' the\n * latitude for which m = N'/k0 AMG manual p. 24\n *\n * input gridref1_4\n *\n * derived constants based on f, a\n */\n\n double n = f / (2 - f);\n\n double G = (a * (1 - n) * (1 - Math.pow(n, 2)) * (1 + (9 / 4)\n * Math.pow(n, 2) + (255 / 64) * Math.pow(n, 4)))\n * Math.PI / 180; /* metres */\n\n /* if (gridref1_5 == \"S\") */\n /*\n * For some reason the above conditional causes m and therfore lat\n * to be zero\n */\n\n double m = (gridref1_4 - 10000000) / k0; /*\n * Meridian distance,\n * -ve southwards\n */\n\n double sigma = (m / G) * Math.PI / 180;\n double s2 = Math.sin(sigma * 2); /*\n * the degrees must be in\n * radians\n */\n double s4 = Math.sin(sigma * 4);\n double s6 = Math.sin(sigma * 6);\n double s8 = Math.sin(sigma * 8);\n\n double fplat1 = sigma + (3 * n / 2 - 27 * Math.pow(n, 3) / 32) * s2;\n double fplat2 = (21 * Math.pow(n, 2) / 16 - 55 * Math.pow(n, 4) / 32)\n * s4;\n double fplat3 = (151 * Math.pow(n, 3) / 96) * s6;\n double fplat4 = (1097 * Math.pow(n, 4) / 512) * s8;\n double fplat = fplat1 + fplat2 + fplat3 + fplat4;\n ;\n\n /*\n * fplat = sigma + (3*n/2 - 27* pow(n,3)/32)*s2 + (21* pow(n,2)/16 -\n * 55* pow(n,4)/32)*s4 + (151* pow(n,3)/96)*s6 + (1097*\n * pow(n,4)/512)*s8;\n */\n\n /*\n * advise(-1,-1,\"G \".G.\" metres, eccentricity^2 \".ecc2.\" sigma\n * \".sigma);\n */\n /*******************************************************************\n * Calculation of VARIABLES ASSOCIATED WITH FOOT POINT LATITUDE\n * rho', nu' and psi' from Kym Perkins (1988) rho_nu routine\n */\n\n double v1 = Math.sqrt(1 - ((ecc2 * Math.pow(Math.sin(fplat), 2))));\n\n double rhofpl = a * (1 - ecc2) / (Math.pow(v1, 3));\n double nufpl = a / v1;\n\n double psifpl = nufpl / rhofpl;\n\n /* advise(-1,-1,\" fplat \".fplat.\" psifpl \".psifpl); */\n\n /*******************************************************************\n * Calculation of Lat/Long from AMG Grid from AMG Manual pp. 5,8, 14\n */\n\n /* LATITUDE calculation (radians) */\n\n /* calculated variables */\n\n /*\n * It appears gridref1_3 here is actually west, with the 500000\n * converting t easting\n */\n double east = gridref1_2 - 500000;\n double tfpl = Math.tan(fplat); /* fplat must be in radians */\n double tk = tfpl / (k0 * rhofpl);\n\n /* split computation into component parts */\n\n double elat1 = Math.pow(east, 2) / (2 * k0 * nufpl);\n double elat2 = Math.pow(east, 4)\n / (24 * Math.pow(k0, 3) * Math.pow(nufpl, 3));\n double elat3 = Math.pow(east, 6)\n / (720 * Math.pow(k0, 5) * Math.pow(nufpl, 5));\n double elat4 = Math.pow(east, 8)\n / (40320 * Math.pow(k0, 7) * Math.pow(nufpl, 7));\n double lat2 = -4 * Math.pow(psifpl, 2) + 9 * psifpl\n * (1 - Math.pow(tfpl, 2)) + 12 * Math.pow(tfpl, 2);\n\n double lat3a = 8 * Math.pow(psifpl, 4)\n * (11 - 24 * Math.pow(tfpl, 2));\n double lat3b = 12 * Math.pow(psifpl, 3)\n * (21 - 71 * Math.pow(tfpl, 2));\n double lat3c = 15 * Math.pow(psifpl, 2)\n * (15 - 98 * Math.pow(tfpl, 2) + 15 * Math.pow(tfpl, 4));\n double lat3d = 180 * psifpl\n * (5 * Math.pow(tfpl, 2) - 3 * Math.pow(tfpl, 4)) + 360\n * Math.pow(tfpl, 4);\n double lat3 = lat3a - lat3b + lat3c + lat3d;\n\n /*\n * lat3 = 8*pow(psifpl,4)*(11 - 24*pow(tfpl,2)) -\n * 12*pow(psifpl,3)*(21 - 71*pow(tfpl,2)) + 15*pow(psifpl,2)*(15 -\n * 98*pow(tfpl,2) + 15*pow(tfpl,4)) + 180*psifpl*(5*pow(tfpl,2) -\n * 3*pow(tfpl,4)) + 360*pow(tfpl,4);\n */\n\n double lat4 = 1385 + 3633 * Math.pow(tfpl, 2) + 4095\n * Math.pow(tfpl, 4) + 1575 * Math.pow(tfpl, 6);\n\n double term1 = tk * elat1; /* Terms match worked example on p.15 */\n double term2 = tk * elat2 * lat2;\n double term3 = tk * elat3 * lat3;\n double term4 = tk * elat4 * lat4;\n\n double latrad = fplat - term1 + term2 - term3 + term4; /*\n * latitude\n * in\n * radians\n */\n\n /* LONGITUDE calculation (radians) */\n\n /* calculated variables relating to zone */\n double loncm = ((gridref1_1 - 31) * 6 + 3) * Math.PI / 180; /*\n * longitude\n * of\n * central\n * meridian\n */\n double sfpl = 1 / Math.cos(fplat); /* sec(fplat) */\n\n /* split computation into component parts */\n\n double elon1 = east / (k0 * nufpl);\n double elon2 = Math.pow(east, 3)\n / (6 * Math.pow(k0, 3) * Math.pow(nufpl, 3));\n double elon3 = Math.pow(east, 5)\n / (120 * Math.pow(k0, 5) * Math.pow(nufpl, 5));\n double elon4 = Math.pow(east, 7)\n / (5040 * Math.pow(k0, 7) * Math.pow(nufpl, 7));\n double lon2 = psifpl + 2 * Math.pow(tfpl, 2);\n double lon3 = -4 * Math.pow(psifpl, 3)\n * (1 - 6 * Math.pow(tfpl, 2)) + Math.pow(psifpl, 2)\n * (9 - 68 * Math.pow(tfpl, 2)) + 72 * psifpl\n * Math.pow(tfpl, 2) + 24 * Math.pow(tfpl, 4);\n double lon4 = 61 + 662 * Math.pow(tfpl, 2) + 1320\n * Math.pow(tfpl, 4) + 720 * Math.pow(tfpl, 6);\n\n term1 = sfpl * elon1; /* Terms match worked example on p.15 */\n term2 = sfpl * elon2 * lon2;\n term3 = sfpl * elon3 * lon3;\n term4 = sfpl * elon4 * lon4;\n\n\n /* longitude from central meridian in radians */\n double lonexcm = term1 - term2 + term3 - term4;\n\n /* Longitude (radians) w.r. to Greenwich */\n double lonrad = lonexcm + loncm;\n\n /* advise(-1,-1,\" latrad \".latrad.\" lonrad \".lonrad); */\n\n /* Convert radians to seconds */\n\n double calclat = 3600 * latrad * 180 / Math.PI;\n double calclong = 3600 * lonrad * 180 / Math.PI;\n\n /*\n * advise(-1,-1,\" calclat \".calclat.\" secs, calclong is \".calclong.\"\n * secs\");\n */\n\n if (gridref1_3.equalsIgnoreCase(\"W\")) {\n calclong = -calclong;\n // grlong_4 = \"W\";\n } else\n // grlong_4 = \"E\";\n if (gridref1_5 == \"S\") {\n /* calclat = -calclat; *//*\n * Do above calculations make this\n * +ve?\n */\n // grlat_4 = \"S\";\n } else\n // grlat_4 = \"N\";\n calclat = -calclat;\n /*\n * advise(-1,-1,\" calclat \".calclat.\" secs, calclong is \".calclong.\"\n * secs\");\n */\n\n /* WHAT TO DO WITH HEMISPHERE ???????? */\n /* Establish whether N/S, E/W */\n /*\n * IF grlat < 0 grlat = ABS(grlat) grlat_4 = \"S\" ELSE grlat_4 = \"N\"\n * ENDIF IF grlong < 0 grlong = ABS(grlong) grlong_4 = \"W\" ELSE\n * grlong_4 = \"E\" ENDIF\n */\n /* MUST DEAL WITH HEMISPHERE ABOVE ============== */\n\n /* ... degree, minutes, seconds */\n /* NOTE; THE MODULO DOES NOT GIVE DECIMALS: DID IT LONG WAY */\n /*\n * Test of rounding grlat = 180000 + 600 + 59.6; grlong = 360000 +\n * 600 + 59.555;\n */\n\n /* Lat: New way of rounding and exact */\n /* Rounding used to give the grid reference derived lat/longs */\n // rndgrlat = round(calclat);\n // grlat_1 = trunc(rndgrlat/3600);\n // latrmnsec = rndgrlat%3600;\n // grlat_2 = printf(\"%02d\", trunc(latrmnsec/60));\n // grlat_3 = printf(\"%02d\", latrmnsec%60);\n /* Long: New way of rounding and exact */\n /* Rounding used to give the grid reference derived lat/longs */\n // rndgrlong = round(calclong);\n // grlong_1 = trunc(rndgrlong/3600);\n // longrmnsec = rndgrlong%3600;\n // grlong_2 = printf(\"%02d\", trunc(longrmnsec/60));\n // grlong_3 = printf(\"%02d\", longrmnsec%60);\n\n \n output.put(\"lat\",String.valueOf(calclat/3600));\n output.put(\"long\",String.valueOf(calclong/3600));\n }\n \n\n return output;\n }",
"static NafLookupTable buildNafLookupTable(EdwardsPoint P) {\n ProjectiveNielsPoint[] points = new ProjectiveNielsPoint[8];\n points[0] = P.toProjectiveNiels();\n EdwardsPoint P2 = P.dbl();\n for (int i = 0; i < 7; i++) {\n points[i + 1] = P2.add(points[i]).toExtended().toProjectiveNiels();\n }\n return new ProjectiveNielsPoint.NafLookupTable(points);\n }",
"public static final java.util.List<int[]> NearestOffices (\n\t\tfinal java.util.List<int[]> officeLocationList,\n\t\tfinal int k)\n\t{\n\t\tjava.util.HashMap<Double, java.util.ArrayList<int[]>> officeDistanceMap =\n\t\t\tnew java.util.HashMap<Double, java.util.ArrayList<int[]>>();\n\n\t\tfor (int[] officeLocation : officeLocationList) {\n\t\t\tdouble distance = Math.sqrt (officeLocation[0] * officeLocation[0] + officeLocation[1] *\n\t\t\t\tofficeLocation[1]);\n\n\t\t\tif (officeDistanceMap.containsKey (distance))\n\t\t\t\tofficeDistanceMap.get (distance).add (officeLocation);\n\t\t\telse {\n\t\t\t\tjava.util.ArrayList<int[]> officeList = new java.util.ArrayList<int[]>();\n\n\t\t\t\tofficeList.add (officeLocation);\n\n\t\t\t\tofficeDistanceMap.put (distance, officeList);\n\t\t\t}\n\t\t}\n\n\t\tjava.util.PriorityQueue<Double> nearestOfficeHeap = new\n\t\t\tjava.util.PriorityQueue<Double>((x, y) -> Double.compare (y, x));\n\n\t\tfor (double distance : officeDistanceMap.keySet()) {\n\t\t\tif (k < nearestOfficeHeap.size()) {\n\t\t\t\tif (nearestOfficeHeap.peek() > distance) nearestOfficeHeap.poll();\n\t\t\t}\n\n\t\t\tnearestOfficeHeap.offer (distance);\n\t\t}\n\n\t\tjava.util.List<int[]> nearestOfficesList = new java.util.ArrayList<int[]>();\n\n\t\tint i = 0;\n\t\tboolean set = false;\n\n\t\twhile (!nearestOfficeHeap.isEmpty()) {\n\t\t\tjava.util.ArrayList<int[]> officeList = officeDistanceMap.get (nearestOfficeHeap.poll());\n\n\t\t\tfor (int[] officeLocation : officeList) {\n\t\t\t\tif (set)\n\t\t\t\t\tnearestOfficesList.set (i, officeLocation);\n\t\t\t\telse\n\t\t\t\t\tnearestOfficesList.add (officeLocation);\n\n\t\t\t\tif (k == ++i) {\n\t\t\t\t\ti = 0;\n\t\t\t\t\tset = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn nearestOfficesList;\n\t}",
"public void buildLocations() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS locations (id TEXT, latitude\"\n + \" REAL, longitude REAL, name TEXT, PRIMARY KEY (id));\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }",
"public void constructMap() {\n\t\t// To store the goal configuration\n\t\tdouble[] real_goal = new double[link_num];\n\t\tfor (int i = 0; i < link_num; i++)\n\t\t\treal_goal[i] = goal_config[i];\n\t\t// Then I can use the compareTo function to get the k nearest points\n\t\tSystem.out.println(\"Total Nodes Construct: \" + Integer.toString(samples.size()));\n\t\tint curNum = 0;\n\t\tfor (ArmProblemNode arm1 : samples) {\n\t\t\tfor (int i = 0; i < link_num; i++)\n\t\t\t\tgoal_config[i] = arm1.getConfig(i);\n\t\t\tPriorityQueue<ArmProblemNode> candidtae_neighbours = new PriorityQueue<ArmProblemNode>();\n\t\t\tfor (ArmProblemNode arm2 : samples) {\n\t\t\t\tif (!arm1.equals(arm2)) {\n\t\t\t\t\tif (!arm1.armPathCollision(arm2, world))\n\t\t\t\t\t\tcandidtae_neighbours.add(arm2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tHashSet<ArmProblemNode> neighbours = new HashSet<ArmProblemNode>();\n\t\t\tfor (int i = 0; i < k_neigh; i++) {\n\t\t\t\tif (candidtae_neighbours.peek() != null)\n\t\t\t\t\tneighbours.add(candidtae_neighbours.poll());\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tadjList.put(arm1, neighbours);\n\t\t\tcurNum++;\n\t\t\tSystem.out.println(Integer.toString(curNum) + \"/\" + Integer.toString(samples.size()) + \" Done\");\n\t\t}\n\t\t// restore the goal_config\n\t\tfor (int i = 0; i < link_num; i++)\n\t\t\tgoal_config[i] = real_goal[i];\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read the input image to test or train, store its pixel values in image_all[0][0]. Input image's filename is passed as a parameter. Input text file is assumed to be of the following format: 1 1 1 1 ... (First line is the class label) 5 12 25 57 ...... (The last 3636 lines and columns are the pixel values of the input image) ...... | public void readInputImage(String filename) throws IOException {
Scanner reader;
reader=new Scanner(new File(filename));
createClassLabel(reader);
createInput(reader);
} | [
"public static ArrayList<ClassificationImage> readClassificationIPUTxt(String path) throws Exception {\n ArrayList<ClassificationImage> classificationIPUImage = new ArrayList<>();\n String lineTxt = \"\";\n File file = new File(path);\n\n InputStreamReader isr = new InputStreamReader(new FileInputStream(file));\n BufferedReader br = new BufferedReader(isr);\n int count = 1;\n ClassificationImage image = null;\n while ((lineTxt = br.readLine()) != null) {\n switch (count % 3) {\n case 0:\n image.setTime(lineTxt);\n image.setFps(getFps(Double.valueOf(lineTxt)));\n classificationIPUImage.add(image);\n break;\n case 1:\n image = new ClassificationImage();\n String[] split = lineTxt.split(\"/\");\n //image.setName(split[split.length - 1]);\n image.setName(lineTxt);\n break;\n case 2:\n String temp = lineTxt.substring(10);\n image.setResult(temp);\n break;\n default:\n break;\n }\n count++;\n }\n isr.close();\n br.close();\n return classificationIPUImage;\n }",
"public void train(String filename) throws IOException {\r\n\t\treadInputImage(filename);\r\n\t\tfprop();\r\n\t\tbprop();\r\n\t}",
"public void readIntensityFile() {\r\n\r\n\t\tStringTokenizer token;\r\n\t\tScanner read;\r\n\t\tDouble intensityBin;\r\n\t\tString line = \"\";\r\n\t\tint lineNumber = 0;\r\n\t\ttry {\r\n\t\t\tread = new Scanner(new File(\"src/intensity.txt\"));\r\n\t\t\t// ///////////////////\r\n\t\t\t// /your code///\r\n\t\t\t// ///////////////\r\n\t\t\twhile (read.hasNextLine()) { // Run through every line in the file\r\n\t\t\t\tint binCount = 0; // Keep track of when we are accessing the\r\n\t\t\t\t\t\t\t\t\t// next bin\r\n\t\t\t\twhile (read.hasNextInt()) { // Keep reading in the pixel values\r\n\t\t\t\t\t\t\t\t\t\t\t// in the bin till the line is empty\r\n\t\t\t\t\tif (binCount == 0) {\r\n\t\t\t\t\t\timageSize[lineNumber + 1] = read.nextDouble();\r\n\t\t\t\t\t\tbinCount++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdouble i = read.nextDouble();\r\n\t\t\t\t\t\tintensityMatrix[lineNumber][binCount] = i;\r\n\t\t\t\t\t\t// intensityAndCCMatrix[lineNumber][binCount] = i;\r\n\t\t\t\t\t\tbinCount++;\r\n\t\t\t\t\t\tif (binCount % 26 == 0) {\r\n\t\t\t\t\t\t\tlineNumber++;\r\n\t\t\t\t\t\t\tbinCount = 0;\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\tline = read.nextLine();\r\n\t\t\t}\r\n\r\n\t\t} catch (FileNotFoundException EE) {\r\n\t\t\tSystem.out.println(\"The file intensity.txt does not exist\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"private void imageProcessing (File file){\n\t\ttry {\n\t\t\timg = ImageIO.read(file);\n\t\t\tgrayLevelMatrix = imageToGray (img);\n\t\t\t//testPixel = testPixel(img);\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void initiateFromFile(){\r\n\t\tFileStorage fs = new FileStorage(imageLocation, FileStorage.READ);\t\t\t\r\n\t\tFileNode node = fs.getFirstTopLevelNode();\r\n\t\tknn = KNearest.create();\r\n\t\tknn.read(node);\r\n\t\ttry {\r\n\t\t\tfs.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tINPUT_VECTOR_SIZE = knn.getVarCount();\r\n\t}",
"public readImage() {\n while (imageCount < 101) {\n\n try {\n\n // Read the next image file\n File file;\n file = new File(\"images/\" + imageCount + \".jpg\");\n if (file.exists()) {\n BufferedImage image = ImageIO.read(file);\n\n int height = image.getHeight();\n int width = image.getWidth();\n\n getIntensity(image, height, width);\n getColorCode(image, height, width);\n } else {\n System.err.println(\"File images/\" + imageCount + \".jpg does not exist.\");\n }\n\n } catch (Exception e) {\n System.out.println(\"Error occurred when reading or processing image \" + imageCount + \".\");\n //failedReads++;\n }\n ++imageCount;\n }\n\n writeIntensity();\n writeColorCode();\n\n }",
"@Override\n public void loadImage(String filename) throws IllegalArgumentException {\n BufferedImage img;\n try {\n img = ImageIO.read(new File(filename));\n this.width = img.getWidth();\n this.height = img.getHeight();\n this.pixels = new int[width][height][3];\n for (int x = 0; x < this.width; x++) {\n for (int y = 0; y < this.height; y++) {\n int pixel = img.getRGB(x, y);\n Color color = new Color(pixel, true);\n int red = color.getRed();\n int green = color.getGreen();\n int blue = color.getBlue();\n int [] singlePixel = new int [] {red, green, blue};\n this.pixels[x][y] = singlePixel;\n }\n }\n this.maxColorValue = 255;\n } catch (IOException error) {\n throw new IllegalArgumentException(\"File does not exist.\");\n }\n }",
"public void readTrainingFile() {\n\t\ttry {\n\t\t\tFile file = new File(trainingFile);\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\t\tSystem.out.print(\"Read training data >>>\\t\");\n\t\t\t// read first line to get attribute names\n\t\t\tString line = reader.readLine();\n\t\t\t// find delimiter\n\t\t\tdelimiter = findDelimiter(line);\n\t\t\t// get all attributes\n\t\t\tallAttributes = line.split(delimiter);\n\t\t\t// target attribute is at the last position\n\t\t\tint targetIndex = allAttributes.length - 1;\n\t\t\t\n\t\t\ttrainingTuples = new ArrayList<String[]>();\n\t\t\tclassLabels = new HashSet<String>();\n\t\t\tmapAttrValue = new HashMap<String, Set<String>>();\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\tif(line.isEmpty() == true) {\n\t\t\t\t\t//if the line is empty\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// read one tuple\n\t\t\t\tString[] tuple = line.split(delimiter);\n\t\t\t\ttrainingTuples.add(tuple);\n\t\t\t\t// add attribute value to mapAttrValue\n\t\t\t\tfor(int i = 0; i < targetIndex; i++) {\n\t\t\t\t\tString attribute = allAttributes[i];\n\t\t\t\t\tString value = tuple[i];\n\t\t\t\t\tSet<String> valueSet = mapAttrValue.get(attribute);\n\t\t\t\t\tif(valueSet == null) {\n\t\t\t\t\t\tvalueSet = new HashSet<String>();\n\t\t\t\t\t\tmapAttrValue.put(attribute, valueSet);\n\t\t\t\t\t}\n\t\t\t\t\tvalueSet.add(value);\n\t\t\t\t}\n\t\t\t\t// get class label\n\t\t\t\tclassLabels.add(tuple[targetIndex]);\n\t\t\t}\t\t\t\n\t\t\treader.close();\n\t\t\tSystem.out.println(\"Complete!\");\t\n\t\t} catch(FileNotFoundException e) {\n\t\t\tSystem.out.println(\"No such file!\");\n\t\t\te.printStackTrace();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}",
"public static float[][] getData(int width, int height, File whereTheImagesAre)\n {\n try\n {\n\n //File folder = new File(System.getProperty(\"user.home\") + \"/Downloads/TrainingFiles/\");\n\n //Gets all of the images as Files\n File[] listOfFiles = whereTheImagesAre.listFiles();\n\n //creates a nice, empty dataset with as many slots as there are files in our folder\n float[][]dataSet = new float[listOfFiles.length][width*height*3];\n\n\n //this loop reads each file and adds it to the dataset.\n //spot keeps track of where in [][]dataSet to add the latest image\n int spot = 0;\n for (File image : listOfFiles)\n {\n\n float[] imageFloats = new float[width*height*3];//creates an empty array for our latest image\n\n //get and resize the image\n BufferedImage img = ImageIO.read(image);\n BufferedImage resized = new BufferedImage(width, height, img.getType());\n Graphics2D g = resized.createGraphics();\n g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n g.drawImage(img, 0, 0, width, height, 0, 0, img.getWidth(),\n img.getHeight(), null);\n g.dispose();\n\n img = resized;\n //the image is now resized\n\n\n //get all the actual values from the image\n for (int i = 0; i < height*width;i++){\n\n //figure out where from the image to get the color of\n int x = i%width;\n int y = i/width;\n Color atPixel = new Color(img.getRGB(x,y));\n\n\n //get the red green and blue values, add to our array\n imageFloats[i] = atPixel.getRed()/255f;\n imageFloats[i+width*height] = atPixel.getGreen()/255f;\n imageFloats[i+width*height*2] = atPixel.getBlue()/255f;\n\n }\n\n\n dataSet[spot] = imageFloats;//insert converted image into the dataSet\n spot++;//increment the spot we are inserting things, so the next image goes in the next spot\n }//end of adding all of the images\n\n return dataSet;\n }\n catch(Exception e)\n {\n System.out.println(\"An error occured during Data Set generation\");\n System.out.println(e.getStackTrace());\n }\n\n return null;//if data set generation fails, return null, which will cause things to break and shutdown.\n }",
"private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }",
"public void readImage() {\r\n\t \tFileIO fileIO = null;\r\n\t \t// boolean multiFile = false;\r\n\t \t// FileInfoBase fileInfo = null;\r\n\t \t// System.err.println(\"fileName = \" + fileName);\r\n\t \t try {\r\n\t fileIO = new FileIO();\r\n\t // fileIO.setRawImageInfo(rawInfo);\r\n\t // read absolute path\r\n\t myImage = fileIO.readImage(fileName, directory);\r\n\t // new ViewJFrameImage(myImage);\r\n\t } catch (OutOfMemoryError e) {\r\n\t MipavUtil.displayError(\"Out of memory!\");\r\n\t }\r\n\r\n\t \t\r\n\t \t\r\n\t }",
"static BufferedImage readFile(String filename) {\r\n\t\t\tBufferedImage img = new BufferedImage(width, height,\r\n\t\t\t\t\tBufferedImage.TYPE_INT_RGB);\r\n\r\n\t\t\ttry {\r\n\t\t\t\t// img = ImageIO.read(f);\r\n\t\t\t\tFile f1 = new File(filename);\r\n\t\t\t\tInputStream is = new FileInputStream(f1);\r\n\r\n\t\t\t\tlong len = f1.length();\r\n\t\t\t\tbyte[] bytes = new byte[(int) len];\r\n\r\n\t\t\t\tint offset = 0;\r\n\t\t\t\tint numRead = 0;\r\n\t\t\t\twhile (offset < bytes.length\r\n\t\t\t\t\t\t&& (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) {\r\n\t\t\t\t\toffset += numRead;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tint ind = 0;\r\n\t\t\t\tfor (int y = 0; y < height; y++) {\r\n\r\n\t\t\t\t\tfor (int x = 0; x < width; x++) {\r\n\r\n\t\t\t\t\t\tbyte a = 0;\r\n\t\t\t\t\t\tbyte r = bytes[ind];\r\n\t\t\t\t\t\tbyte g = bytes[ind + height * width];\r\n\t\t\t\t\t\tbyte b = bytes[ind + height * width * 2];\r\n\r\n\t\t\t\t\t\tint pix = 0xff000000 | ((r & 0xff) << 16)\r\n\t\t\t\t\t\t\t\t| ((g & 0xff) << 8) | (b & 0xff);\r\n\t\t\t\t\t\t// int pix = ((a << 24) + (r << 16) + (g << 8) + b);\r\n\r\n\t\t\t\t\t\timg.setRGB(x, y, pix);\r\n\t\t\t\t\t\tind++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (final IOException e) {\r\n\t\t\t}\r\n\r\n\t\t\treturn img;\r\n\t\t}",
"public void readPGM(String filename) {\r\n try {\r\n Scanner infile = new Scanner(new FileReader(filename));\r\n // process the top 4 header lines\r\n String filetype = infile.nextLine();\r\n if (!filetype.equalsIgnoreCase(\"p2\")) {\r\n System.out.println(\"[readPGM]Cannot load the image type of \" + filetype);\r\n return;\r\n }\r\n int cols = infile.nextInt();\r\n int rows = infile.nextInt();\r\n int maxValue = infile.nextInt();\r\n pixels = new int[rows][cols];\r\n System.out.println(\"Reading in image from \" + filename + \" of size \" + rows + \" by \" + cols);\r\n // process the rest lines that hold the actual pixel values\r\n for (int r = 0; r < rows; r++) {\r\n for (int c = 0; c < cols; c++) {\r\n pixels[r][c] = (int) (infile.nextInt() * 255.0 / maxValue);\r\n }\r\n }\r\n infile.close();\r\n } catch (FileNotFoundException fe) {\r\n System.out.println(\"Had a problem opening a file.\");\r\n } catch (Exception e) {\r\n System.out.println(e.toString() + \" caught in readPPM.\");\r\n e.printStackTrace();\r\n }\r\n }",
"private void readLocalImage() {\n if (isCorrectFileExtension()) {\n try {\n BufferedImage originImage = ImageIO.read(fileImage);\n\n BufferedImage resizeImage = ImageResize.resizeImage(originImage, 100, 100);\n ImageIO.write(resizeImage, \"png\", new File(\"resource/images/OUT.png\"));\n colorPixel = new Color[resizeImage.getWidth()][resizeImage.getHeight()];\n width = resizeImage.getWidth();\n height = resizeImage.getHeight();\n\n for (int x = 0; x < resizeImage.getWidth(); x++) {\n for (int y = 0; y < resizeImage.getHeight(); y++) {\n Color color = new Color(resizeImage.getRGB(x, y));\n colorPixel[x][y] = color;\n }\n }\n } catch (IOException e) {\n System.out.println(\"Incorrect file path\");\n }\n } else {\n System.out.println(\"Incorrect file extension, supported only .png .jpg\");\n }\n }",
"public void ReadImage() {\n\n\ttry {\n\t char buffer; // character in PPM header\n\t String id = new String(); // PPM magic number (\"P6\")\n\t String dim = new String(); // image dimension as a string\n\t FileInputStream fis = new FileInputStream(filename);\n\t InputStreamReader isr = new InputStreamReader(fis);\n\n\t do {\n\t\tbuffer = (char)isr.read();\n\t\tid = id + buffer;\n\t } while (buffer != '\\n' && buffer != ' ');\n\t if (id.charAt(0) == 'P' && id.charAt(1) == '6') {\n\t\tSystem.out.print(\"Image is \");\n\t\tSystem.out.flush();\n\t\tbuffer = (char)isr.read();\n\t\tdo { // second header line is \"width height\\n\"\n\t\t dim = dim + buffer;\n\t\t buffer = (char)isr.read();\n\t\t} while (buffer != ' ' && buffer != '\\n');\n\n\t\tint width = Integer.parseInt(dim);\n\t\tSystem.out.print(width);\n\t\tSystem.out.flush();\n\t\tdim = new String();\n\t\tbuffer = (char)isr.read();\n\t\tdo {\n\t\t dim = dim + buffer;\n\t\t buffer = (char)isr.read();\n\t\t} while (buffer != ' ' && buffer != '\\n');\n\t\tint height = Integer.parseInt(dim);\n\t\tSystem.out.println(\" X \" + height + \" pixels.\");\n\t\tdo { // third header line is max RGB value, e.g., \"255\\n\"\n\t\t buffer = (char)isr.read();\n\t\t} while (buffer != ' ' && buffer != '\\n');\n\t\t\n\t\tSystem.out.print(\"Reading image...\");\n\t\tSystem.out.flush();\n\t\t\n\t\t// remainder of file is width*height*3 bytes (red/green/blue triples)\n\n\t\tbytes = new char[height][width*3];\n\t\t\n\t\tfor (int y=0; y < height; y++) {\n\t\t\tfor (int x=0; x<width*3;x++){\n\t\t\t\tbytes[y][x] = (char) isr.read();\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\nDone.\");\n\t\tfis.close();\n\t }\n\t else {\n\t\tSystem.out.println(\"Unsupported file format, no image read.\");\n\t\tbytes=null;\n\t }\n\t}\n\tcatch (FileNotFoundException e) {\n\t System.out.println(\"\\nError opening PPM file, no image read.\");\n\t bytes = null;\n\t}\n\tcatch (IOException e) {\n\t System.out.println(\"\\nError reading PPM file, no image read.\");\n\t bytes = null;\n\t}\n\tcatch (NumberFormatException e) {\n\t System.out.println(\"\\nSomething's wrong with the PPM header? No image read.\");\n\t}\n }",
"public void readInputFile()\n {\n BufferedReader bufferedReader;\n StringTokenizer stringTokenizer;\n\n try\n {\n bufferedReader = new BufferedReader(new FileReader(inputFile)); // Opens previously specified input file.\n\n inputNodes = Integer.parseInt(bufferedReader.readLine()); // Find number of input nodes\n\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n hiddenLayerNodes = new int[Integer.parseInt(stringTokenizer.nextToken())];\n for (int i = 0; i < hiddenLayerNodes.length; i++)\n {\n hiddenLayerNodes[i] = Integer.parseInt(stringTokenizer.nextToken()); // Populate number of nodes per hidden layer\n }\n\n outputNodes = Integer.parseInt(bufferedReader.readLine()); // Find number of output nodes\n\n numberCases = Integer.parseInt(bufferedReader.readLine()); // Find the number of trial cases\n trialCases = new double[numberCases][inputNodes];\n truths = new double[numberCases][outputNodes];\n lambda = Double.parseDouble(bufferedReader.readLine()); // Lambda\n MINIMUM_ERROR = Double.parseDouble(bufferedReader.readLine()); // Error\n MAX_STEPS = Integer.parseInt(bufferedReader.readLine()); // Steps\n lowValue = Double.parseDouble(bufferedReader.readLine()); // Low Value\n highValue = Double.parseDouble(bufferedReader.readLine()); // High Value\n bufferedReader.close();\n } // Reads the input file.\n catch (IOException e)\n {\n throw new IllegalArgumentException(\"Input File \" + e.toString() + \" not accepted, terminating.\");\n }\n\n }",
"public void readAll() throws FileNotFoundException{ \n b = new BinaryIn(this.filename);\n this.x = b.readShort();\n this.y = b.readShort();\n \n int count = (x * y) / (8 * 8);\n this.blocks = new double[count][8][8][3];\n \n Node juuri = readTree();\n readDataToBlocks(juuri);\n }",
"public ImageProcessor(String imageFile) {\n\n\t\t// Initilize picture\n\t picture = new Picture(imageFile);\n\t\t// get the data\n\t\tH = picture.height();\n\t\tW = picture.width()-1;\n\t\t// Make an array to hold the values\n\t\t// pixelData = new int[H][W];\n\t\tColor color;\n\t\t// Add the rgb data into pixelData\n\n\t\t/*\n\t\t * for(int i = 0; i<H; i++){ //H for(int j = 0; j<W; j++){ //W\n\t\t * \n\t\t * color = picture.get(j, i);\n\t\t * \n\t\t * pixelData[i][j] = color.getRGB();\n\t\t * \n\t\t * //System.out.print(pixelData[i][j]); } //System.out.println(); }\n\t\t */\n\t}",
"private void loadImageData()\n {\n image = new ImageComponent[MAX_SENTENCES];\n\n for (int imageNumber = 0; imageNumber < MAX_SENTENCES; imageNumber++)\n {\n image[imageNumber] = new ImageComponent(IMAGE_SOURCE[imageNumber]);\n } // end of for (int imageNumber = 0; imageNumber < NUMBER_OF_IMAGES; imageNumber++)\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return an array giving the indexes in getDataForGraphing() where you calculate steps occurring. This can be used to visualize/debug. | public int[] getStepIndexes() {
return null;
} | [
"private static int[] computeIndices() {\n \t\tint[] ret = new int[batch_size/numberOfProcessesPerBatch];\n \t\tfor (int i = 0; i < batch_size/numberOfProcessesPerBatch; i++) {\n \t\t\tret[i] = data_p[phase][i].index;\n \t\t}\n \t\treturn ret;\n \t}",
"public abstract Point2D[] getNextTracePositions();",
"int[] timeMachine_positions()\n\t {\n\t \t\n\t return timeMachine_array;\n\t }",
"public int[] getStarts() {\n if (!isTerminated())\n throw new RuntimeException(\"Graph must be terminated to have start nodes\");\n List<Integer> list = new ArrayList<>();\n for (int i = startNodes.nextSetBit(0); i >= 0; i = startNodes.nextSetBit(i+1)) {\n list.add(i);\n if (i == Integer.MAX_VALUE)\n break; // or (i+1) would overflow\n }\n int[] ret = new int[list.size()];\n for (int i = 0; i < list.size(); i ++)\n ret[i] = list.get(i);\n return ret;\n }",
"LocationStep[] getSteps();",
"public final int[] GetData ()\r\n {\r\n return m_aiIndex;\r\n }",
"public int[][] getProgressionSteps() {\n return progressionSteps;\n }",
"public int getIndexInAnalysis() { return index; }",
"public float[] getDataRange() {\n return new float[] { _start, _stop, _step };\n }",
"java.util.List<java.lang.Integer> getOutputIndexList();",
"public int getVisitedCells() \r\n\t{\r\n\t\tint lastCell = path.size() - 1;\r\n\t\tint visitedCells = path.get(lastCell).getDiscoveryTime() + 1;\r\n\t\treturn visitedCells;\r\n\t}",
"public Object[] toArray()\r\n\t{\r\n\t\tint completeSize = (pow(kFactor,height+1)-1) / (kFactor-1);\r\n\t\t\r\n\t\tObject[] array = new Object[completeSize];\r\n\t\ttracer = 0; // initializing the tracer of index of each visited node in link-structure tree.\r\n\t\t\r\n\t\tbuildArray(root,array); // first call to the recursive method that builds the tree.\r\n\r\n\t\treturn array;\r\n\t}",
"private void generateStepArrayMap() {\r\n\r\n\t\tList<List<Integer>> stepMapList = new ArrayList<>();\r\n\t\tfor (FlightOfStairs flight : stairsFlights) {\r\n\t\t\tList<List<Integer>> stepMap = createRowsListGivenFlight(flight, strideLength);\r\n\t\t\tif(!stepMapList.isEmpty()){\r\n\t\t\t\tzeroPadEachRowOfFlight(stepMapList, stepMap, flight);\r\n\t\t\t}\r\n\t\t\tstepMapList.addAll(0, stepMap);\r\n\t\t}\r\n\t\tsetStepsMap(convertToIntArray(countEachStepFromBottom(stepMapList, stairsFlights)));\r\n\t}",
"int[] getGraph(int[] pattern);",
"public float[] getTaxiData() {\n\n int totalTravelDistance = 0;\n int totalTravelDistanceCount = 0;\n\n int maximumTravelDistance = Integer.MIN_VALUE;\n int minimumTravelDistance = Integer.MAX_VALUE;\n\n int totalTimeStoodStillAmount = 0;\n\n for (Taxi taxi : taxis) {\n\n Vertex previous = null;\n int travelDistance = 0;\n\n for (Vertex vertex : taxi.getPositionHistory()) {\n\n if (previous == null) {\n previous = vertex;\n continue;\n }\n\n // Check if the taxi made a movement\n if (vertex != previous) {\n travelDistance++;\n } else {\n totalTimeStoodStillAmount++;\n }\n\n }\n\n totalTravelDistance += travelDistance;\n totalTravelDistanceCount++;\n\n if (travelDistance > maximumTravelDistance) {\n maximumTravelDistance = travelDistance;\n }\n\n if (travelDistance < minimumTravelDistance) {\n minimumTravelDistance = travelDistance;\n }\n }\n\n float averageTravelDistance = (float) totalTravelDistance / (float) totalTravelDistanceCount;\n\n float averageStoodStillTime = (float) totalTimeStoodStillAmount / (taxis.size() * preamble.getCallListLength());\n\n return new float[] {\n averageTravelDistance,\n maximumTravelDistance,\n minimumTravelDistance,\n averageStoodStillTime\n };\n }",
"public int[][] getPathHistory() {\n return this.path;\n }",
"StateLog[] getStateLog(int start, int end);",
"public int[] getIndices() {\r\n\t\treturn indices;\r\n\t}",
"public int[][] calculate() {\n\n this.currentProgress = 0;\n this.lengthOfTask = distances.length;\n this.done = false;\n this.canceled = false;\n\n Node[] nodes = new Node[nodesList.size()];\n\n // TODO: REMOVE\n // System.err.println( \"Calculating all node distances.. for: \"\n //+nodesList.size()+\" and \"+nodes.length );\n\n // We don't have to make new Integers all the time, so we store the index\n // Objects in this array for reuse.\n Integer[] integers = new Integer[nodes.length];\n\n // Fill the nodes array with the nodes in their proper index locations.\n int index;\n Node from_node;\n\n for (int i = 0; i < nodes.length; i++) {\n\n from_node = (Node) nodesList.get(i);\n if (from_node == null) {\n continue;\n }\n index = ((Integer) nodeIndexToMatrixIndexMap.get(new Integer(from_node.getRootGraphIndex()))).intValue();\n\n if ((index < 0) || (index >= nodes.length)) {\n System.err.println(\"WARNING: GraphNode \\\"\" + from_node +\n \"\\\" has an index value that is out of range: \" +\n index +\n \". Graph indices should be maintained such \" +\n \"that no index is unused.\");\n return null;\n }\n if (nodes[index] != null) {\n System.err.println(\"WARNING: GraphNode \\\"\" + from_node +\n \"\\\" has an index value ( \" + index + \" ) that is the same as \" +\n \"that of another GraphNode ( \\\"\" + nodes[index] +\n \"\\\" ). Graph indices should be maintained such \" +\n \"that indices are unique.\");\n return null;\n }\n nodes[index] = from_node;\n Integer in = new Integer(index);\n integers[index] = in;\n }\n\n LinkedList queue = new LinkedList();\n boolean[] completed_nodes = new boolean[nodes.length];\n Iterator neighbors;\n Node to_node;\n Node neighbor;\n int neighbor_index;\n int to_node_distance;\n int neighbor_distance;\n for (int from_node_index = 0;\n from_node_index < nodes.length;\n from_node_index++) {\n\n if (this.canceled) {\n // The task was canceled\n this.distances = null;\n return this.distances;\n }\n\n from_node = nodes[from_node_index];\n\n if (from_node == null) {\n // Make the distances in this row all Integer.MAX_VALUE.\n if (distances[from_node_index] == null) {\n distances[from_node_index] = new int[nodes.length];\n }\n Arrays.fill(distances[from_node_index], Integer.MAX_VALUE);\n continue;\n }\n\n // TODO: REMOVE\n // System.err.print( \"Calculating node distances from graph node \" +\n // from_node );\n //System.err.flush();\n\n // Make the distances row and initialize it.\n if (distances[from_node_index] == null) {\n distances[from_node_index] = new int[nodes.length];\n }\n Arrays.fill(distances[from_node_index], Integer.MAX_VALUE);\n distances[from_node_index][from_node_index] = 0;\n\n // Reset the completed nodes array.\n Arrays.fill(completed_nodes, false);\n\n // Add the start node to the queue.\n queue.add(integers[from_node_index]);\n\n while (!(queue.isEmpty())) {\n\n if (this.canceled) {\n // The task was canceled\n this.distances = null;\n return this.distances;\n }\n\n index = ((Integer) queue.removeFirst()).intValue();\n if (completed_nodes[index]) {\n continue;\n }\n completed_nodes[index] = true;\n\n to_node = nodes[index];\n to_node_distance = distances[from_node_index][index];\n\n if (index < from_node_index) {\n // Oh boy. We've already got every distance from/to this node.\n int distance_through_to_node;\n for (int i = 0; i < nodes.length; i++) {\n if (distances[index][i] == Integer.MAX_VALUE) {\n continue;\n }\n distance_through_to_node =\n to_node_distance + distances[index][i];\n if (distance_through_to_node <=\n distances[from_node_index][i]) {\n // Any immediate neighbor of a node that's already been\n // calculated for that does not already have a shorter path\n // calculated from from_node never will, and is thus complete.\n if (distances[index][i] == 1) {\n completed_nodes[i] = true;\n }\n distances[from_node_index][i] =\n distance_through_to_node;\n }\n } // End for every node, update the distance using the distance from\n // to_node.\n // So now we don't need to put any neighbors on the queue or\n // anything, since they've already been taken care of by the previous\n // calculation.\n continue;\n } // End if to_node has already had all of its distances calculated.\n\n neighbors = perspective.neighborsList(to_node).iterator();\n\n while (neighbors.hasNext()) {\n\n if (this.canceled) {\n this.distances = null;\n return this.distances;\n }\n\n neighbor = (Node) neighbors.next();\n\n neighbor_index = ((Integer) nodeIndexToMatrixIndexMap.get(\n new Integer(neighbor.getRootGraphIndex()))).intValue();\n\n // If this neighbor was not in the incoming List, we cannot include\n // it in any paths.\n if (nodes[neighbor_index] == null) {\n distances[from_node_index][neighbor_index] =\n Integer.MAX_VALUE;\n continue;\n }\n\n if (completed_nodes[neighbor_index]) {\n // We've already done everything we can here.\n continue;\n }\n\n neighbor_distance = distances[from_node_index][neighbor_index];\n\n if ((to_node_distance != Integer.MAX_VALUE) &&\n (neighbor_distance > (to_node_distance + 1))) {\n distances[from_node_index][neighbor_index] =\n (to_node_distance + 1);\n queue.addLast(integers[neighbor_index]);\n }\n\n // TODO: REMOVE\n //System.out.print( \".\" );\n //System.out.flush();\n\n\n } // For each of the next nodes' neighbors\n // TODO: REMOVE\n //System.out.print( \"|\" );\n //System.out.flush();\n } // For each to_node, in order of their (present) distances\n\n // TODO: REMOVE\n /*\n System.err.println( \"done.\" );\n */\n this.currentProgress++;\n double percentDone = (this.currentProgress * 100) / this.lengthOfTask;\n this.statusMessage = \"Completed \" + percentDone + \"%.\";\n } // For each from_node\n\n // TODO: REMOVE\n //System.err.println( \"..Done calculating all node distances.\" );\n\n this.done = true;\n this.currentProgress = this.lengthOfTask; // why?\n return distances;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the next card of the card stack. | Card getNextCard() {
if (cardStack.isEmpty()) {
return null;
}
Card next = cardStack.removeFirst();
lastDrawnCard = next;
return next;
} | [
"public Card nextCard(){\r\n\t if(topCardIndex >=52){\r\n\t throw new IndexOutOfBoundsException();\r\n\t }\r\n\t return cards[topCardIndex++];\r\n\t}",
"public AbstractCard getNextCard() {\n currentCardPos++;\n if (currentCardPos >= deck.size()) {\n return null;\n }\n return getCurrentCard();\n }",
"public Card getNextCard() {\n\t\tif (this.cardDeck.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tCard cardToDeal = null;\n\t\tsynchronized (instance) {\n\t\t\tcardToDeal = this.cardDeck.get(0);\n\t\t\tthis.cardDeck.remove(0);\n\t\t}\n\t\treturn cardToDeal;\n\t}",
"public Card getNextCard() {\r\n\t\tRandom random = new Random();\r\n\t\tint index = 0;\r\n\t\t\r\n\t\tif (totalCards <= 6) {\r\n\t\t\tthis.cards = newDeck();\r\n\t\t}\r\n\t\t\r\n\t\tdo {\r\n\t\t\tindex = random.nextInt(52);\r\n\t\t} while (cards.get(index) == null);\r\n\t\t\r\n\t\ttotalCards--;\r\n\t\tCard temp = cards.get(index);\r\n\t\tcards.set(index, null);\r\n\t\t\t\t\r\n\t\treturn temp;\r\n\t}",
"public Card getNextPlayerCard()\n\t{\n\t\tDeck<Card> playerCards = board.getPlayerCardDeck();\n\t\tif (playerCards.isEmpty())\n\t\t{\n\t\t\tsystemDataInput.printMessage(\"There is no player card to play the game.\");\n\t\t\tendGame(EndGameType.noPlayerCard);\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCard topCard = playerCards.pickTopCard();\n\t\t\tif (playerCards.size() == 1)\n\t\t\t{\n\t\t\t\tsystemDataInput.printMessage(\"The last player card \" + topCard.getName() + \" has been picked up. This is the end of the game.\");\n\t\t\t\tendGame(EndGameType.noPlayerCard);\n\t\t\t}\n\t\t\t\n\t\t\treturn topCard;\n\t\t}\n\t}",
"@Override\n public Card next() {\n Card next = deck[position+1];\n position++;\n return next;\n }",
"public Card getCard(final Card card) {\n Card curr = this.first;\n while (curr != null && !curr.matches(true, card)) {\n curr = curr.getNext();\n }\n return curr;\n }",
"public synchronized PlayingCard dealNext() {\n\n\n try {\n PlayingCard temp = deck[nextCard];\n nextCard++;\n return temp;\n } catch (ArrayIndexOutOfBoundsException e) {\n PlayingCard temp = null;\n if(nextDiscardDeal < nextDiscardedPlace) {\n temp = discardPile[nextDiscardDeal];\n nextDiscardDeal++;\n }\n return temp;\n }\n }",
"public SylladexCard getNextEmptyCard()\n\t{\n\t\tfor(SylladexCard card : sylladexcards)\n\t\t{\n\t\t\tif(card.isEmpty())\n\t\t\t{\n\t\t\t\treturn card;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Card dealOneCard() {\r\n if (cards.isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n\r\n final int index = cards.size() - 1;\r\n Card toReturn = cards.get(index);\r\n cards.remove(index);\r\n return toReturn;\r\n }",
"public Cards pullCard() {\n\t\tCards drawnCard = null;\n\t\ttry {\n\t\t\tdrawnCard = deck.get(deck.size() - 1);\n\t\t\tif (deck.size() > 0){\n\t\t\t\tdeck.remove(deck.size() - 1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"There are no cards to pull\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn drawnCard;\n\t}",
"public Card DrawCard() {\n if (!isEmpty()) {\n return dcard[--remainCardNum];\n }\n return null;\n }",
"public Card randomCard() {\n Random randomGen = new Random();\n int randomIndex = randomGen.nextInt(cards.size());\n for (Card card : cards) {\n if (randomIndex == 0)\n return card;\n randomIndex--;\n }\n throw new IllegalArgumentException(\"Cannot return a random card.\");\n }",
"public Cards returnFrontCard(){\n Cards temp;\n temp = deck.pollFirst();\n return temp;\n }",
"public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }",
"public Card pullCard(){\n if(this.deckOfCards.isEmpty()){\n return null;\n }\n Card cardPulled = this.deckOfCards.get(0);\n this.deckOfCards.remove(0);\n return cardPulled;\n }",
"public Card getCard(int n) {\r\n\t\treturn this.Hand.get(n);\r\n\t}",
"public Card dealCard() {\n //Return an invalid card if there are no cards in the deck.\n if (this.topCard < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Create a copy of the card on the top of the deck.\n Card card = new Card(this.cards[this.topCard - 1]);\n //Set the actual card on the top of the deck to null, to destroy it.\n this.cards[this.topCard - 1] = null;\n //The topCard is now one less than it was.\n this.topCard--;\n //return the copy.\n return card;\n }\n }",
"public CardGao dealCard()\r\n {\r\n return cards.get(top--);\r\n\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the color settings. | public Vector<ColorSettingsIntervalBased> getColorSettingsVector() {
if (colorSettings==null) {
colorSettings = new Vector<>();
}
return colorSettings;
} | [
"static Color[] getSavedColorSettings() {\n\t\tFile path = new File(\"save\" + File.separatorChar + \"colorSettings.mpy\");\n\t\tif (path.exists()) {\n\t\t\ttry {\n\t\t\t\tFileInputStream file = new FileInputStream(path);\n\t\t\t\tObjectInputStream colorSettings = new ObjectInputStream(file);\n\t\t\t\tColor[] colorSet = (Color[]) colorSettings.readObject();\n\t\t\t\tcolorSettings.close();\n\t\t\t\treturn colorSet;\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"Failed to load colors, using default\");\n\t\t\t\treturn LAYERCOLORS;\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tSystem.err.println(\"Failed to load colors, using default\");\n\t\t\t\treturn LAYERCOLORS;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Failed to load colors, using default\");\n\t\t\treturn LAYERCOLORS;\n\t\t}\n\t}",
"public List<String> getColor() {\n\t\treturn this.colors;\n\t}",
"public static ColorScheme getColorProperties() {\n \n return BASE_PROPERTIES;\n }",
"public ColorMap getColorMap() {\n return mColorButton.getSelectedColorMap();\n }",
"public BitmapRenderingSettings getSettings() {\n return this.bitmapSettings;\n }",
"private Color getColor( ColorSettingName name )\n\t{\n\t\tColorSetting setting = mSettingsManager.getColorSetting( name );\n\t\t\n\t\treturn setting.getColor();\n\t}",
"public @ColorMode int getColorModes() {\n return mColorModes;\n }",
"public ColorScheme getColorScheme(){\n return mColors;\n }",
"public ArrayList<String> getColorList()\n {\n \treturn colors;\n }",
"protected int getThemePreference() {\n SharedPreferences prefs = getSharedPreferences(\"colormode\", MODE_PRIVATE);\n int pref = prefs.getInt(ResistorActivity.PREFERENCES_COLOR_MODE, 1);\n return themeResourceIDs[pref];\n }",
"public List<PhotoColor> getColors() {\n return fullPhoto.getColors();\n }",
"public CustomRenderer.Settings getRendererSettings() {\n\t\treturn renderer.getSettings();\n\t}",
"public Color[] getPredefinedColors(){\n return predefinedColors;\n }",
"public ColorPalette getColorPalette() {\n return this.colorPalette;\n }",
"public ColorModel getColorModel()\n {\n return manager.getColorModel ();\n }",
"ThemeSettings getSettings();",
"public Color[] getColors() {\n return mGraphicsRenderer.getColors();\n }",
"public int [] getPalette() {\r\n return bitmapColors;\r\n }",
"public synchronized ColorModel getColorModel() {\n\treturn screen.getColorModel();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Minimize cursor shape while maintaining same number of iterations | public void optimizeCursorMaxShape() {
for (int i = 0; i < 3; i++) {
int numIterations = _maxBrickIndex[i] / _cursorMaxShape[i] + 1;
int r = numIterations * _cursorMaxShape[i] - (_maxBrickIndex[i] + 1);
_cursorMaxShape[i] -= r / numIterations;
}
} | [
"private void resetCursorToMaxBufferedRowsPlus1() {\n if (cursorPosition > rows.size() + 1) {\n cursorPosition = rows.size() + 1;\n }\n }",
"private void scaleCursors() {\n\t\ttempDst.set(0.0f, 0.0f, bridge.charWidth, bridge.charHeight);\n\t\tscaleMatrix.setRectToRect(tempSrc, tempDst, scaleType);\n\t}",
"public void moveCursorToStart();",
"private void setBusyCursor(){\r\n\t\tlensdiagram.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\t}",
"private void focusCursor() {\n // Modify line offset so that the cursor stays in area vertically.\n if (this.cursor.getLineNumber() < lineOffset) {\n lineOffset = this.cursor.getLineNumber();\n } else if (this.cursor.getLineNumber() + 1 > lineOffset + lineCount) {\n lineOffset = (this.cursor.getLineNumber() + 1) - lineCount;\n }\n\n // Modify column offset so the cursor remains in the area horizontally, excluding the columns taken up by the line number column.\n if (this.cursor.getColumnNumber() < columnOffset) {\n columnOffset = this.cursor.getColumnNumber();\n } else if (this.cursor.getColumnNumber() + 1 > columnOffset + (columnCount - this.getLineNumberColumnWidth())) {\n columnOffset = (this.cursor.getColumnNumber() + 1) - (columnCount - this.getLineNumberColumnWidth());\n }\n }",
"public void cursor() {\n \t\tif (embeddedNApplet)\n \t\t\tSystem.err\n \t\t\t\t\t.println(\"NApplet: Cursor manipulation disabled for now.\");\n \t\telse\n \t\t\tsuper.cursor();\n \t}",
"public void shrink()\n {\n float value= points[offset].floatValue();\n minCorner= value;\n maxCorner= value;\n for (int i= 0; i < count; i++) {\n value= points[offset + i].floatValue();\n minCorner= Math.min( minCorner, value);\n maxCorner= Math.max( maxCorner, value);\n }\n }",
"private void nextGrip()\n {\n gripArrayIndex++;\n setGrip();\n }",
"public void draw_cursor(){\n }",
"public void updateCursorImmediately()\n {\n }",
"void normalCursor()\n {\n ROUTINES.makeCursor( this, new Cursor( Cursor.DEFAULT_CURSOR ) );\n }",
"private void resetCursorPos() {\n cursor.setX(0);\n cursor.setY(0);\n }",
"public void cursorOff() {\n if (hasCursor()) {\n curs_y = curs_x = -1;\n if (backing == this)\n updated();\n }\n if (propagateCursor()) \n backing.cursorOff();\n }",
"public static void setCursor(int i)\r\n\t{\r\n\t\tcursor = i;\r\n\t}",
"private void drawCursor(Graphics g) {\n int x, y;\n x = 0;\n y = 0;\n \n g.setColor(Color.BLACK);\n \n g.drawRect(x - uiTolerance / 2, y - uiTolerance / 2, uiTolerance,\n uiTolerance);\n \n g.drawLine(x, y - 2 * uiTolerance, x, y + 2 * uiTolerance);\n \n g.drawLine(x - 2 * uiTolerance, y, x + 2 * uiTolerance, y);\n }",
"public void cursorReset()\n {\n cursor = root;\n }",
"public void redraw() {\n Terminal terminal = game.getTerminal();\n Coordinates startingPoint = game.getOffset();\n for (int i = 0; i < terminal.getTerminalSize().getColumns() - 2; i++) {\n //if (i + startingPoint.getX() >= map.length) continue;\n for (int j = 0; j < terminal.getTerminalSize().getRows() - 5; j++) {\n //if (j + startingPoint.getY() >= map[0].length) break;\n terminal.moveCursor(i + 1, j + 1);\n if (!(i + startingPoint.getX() >= map.length)\n && i + startingPoint.getX() < map.length\n && i >= -startingPoint.getX()\n && !(j + startingPoint.getY() >= map[0].length)\n && j >= -startingPoint.getY()\n && j + startingPoint.getY() < map[0].length\n && map[i + startingPoint.getX()][j + startingPoint.getY()] != null)\n map[i + startingPoint.getX()][j + startingPoint.getY()].show();\n else {\n terminal.applyBackgroundColor(Terminal.Color.BLUE);\n terminal.putCharacter(' ');\n terminal.applyBackgroundColor(Terminal.Color.DEFAULT);\n }\n }\n }\n }",
"private void setCursors() {\n text.setSelection(text.getText().length());\n }",
"public void cursorOff();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.